c subroutine conclr(zz,idimx,nx,ny,cint,cmin,cmax,icella,nrgb) dimension zz(idimx,ny) include 'cpwrk.h' parameter(mxclrs=256) common/color/ nclrs,ixclr(mxclrs) dimension rgb(3,mxclrs) external drawcl,colram data icls/10/ c c If cint=0, then let conpack pick contour levels, otherwise c force cint as contour level: c if (cint.le.0.) then call cpseti('CLS -- contour level selector',icls) call cpsetr('CIS -- contour interval specifier',cint) call cpsetr('CMN -- contour minimum',cmin) call cpsetr('CMX -- contour maximum',cmax) c c If cint > 0, then hardwire min, max, and interval: c (cint > 0 from getinp, cmin < cmax, icls not used) c else call cpseti('CLS -- contour level selector',1) call cpsetr('CIS -- contour interval specifier',cint) call cpsetr('CMN -- contour minimum',cmin) call cpsetr('CMX -- contour maximum',cmax) endif c c Initialize conpack and pick contour levels: c (ncl = number of contour levels) c call cprect(zz,idimx,nx,ny,rwrk,lrwrk,iwrk,liwrk) call cppkcl(zz,rwrk,iwrk) call cpgeti('NCL -- number of contour levels',ncl) c c Make color table: c If nrgb > 0, then we want a pre-determined color table with c nrgb colors. Number of contours has probably been fixed c such that nrgb = ncl+1 where ncl = number of contour levels c Call fixrgb (in mkrgb.f) to establish fixed color table with c nrgb colors. c nclrs = ncl+1 if (nrgb.gt.0) then if (nrgb.ne.nclrs) then write(6,"('>>> conclr warning: nrgb=',i3,' nclrs=',i3, + ' ncl=',i3,' nrgb should = nclrs for fixed coltab')") + nrgb,nclrs,ncl endif call fixrgb(nrgb,rgb,ixclr) if (nrgb.lt.0) then write(6,"('>>> conclr: error from fixrgb -- will call ', + 'mkrgb instead')") call mkrgb(nclrs,ixclr) endif else call mkrgb(nclrs,ixclr) c write(6,"('conclr after mkrgb: ncl=',i3,' nclrs=',i3 c + ,' ixclr=',/(18i4))") ncl,nclrs,(ixclr(i),i=1,nclrs) endif c c Black contour lines: c if (icella.le.0) then do i=1,ncl call cpseti('PAI',i) call cpgetr('CLV -- contour level',clev) call cpseti('CLC -- contour line color',0) call cpseti('LLC -- contour line label color',0) c write(6,"('ncl=',i3,' i=',i3,' clev=',f10.3)") ncl,i,clev enddo call arinam(iama,liama) call cpclam(zz,rwrk,iwrk,iama) call arscam(iama,xcra,ycra,lcra,iaia,igia,10,colram) call cplbam(zz,rwrk,iwrk,iama) call cplbdr(zz,rwrk,iwrk) c call cpcldm(zz,rwrk,iwrk,iama,drawcl) else call getset(vl,vr,vb,vt,wl,wr,wb,wt,ity) write(6,"('conclr calling cpcica: vl,r,b,t=',4f7.3, + ' wl,r,b,t=',4f8.2)") vl,vr,vb,vt,wl,wr,wb,wt icra(:,:) = 0 call cpcica(zz,rwrk,iwrk,icra,icam,icam,ican,vl,vb,vr,vt) call gca(wl,wb,wr,wt,icam,ican,1,1,icam,ican,icra) call cplbdr(zz,rwrk,iwrk) endif c return end c ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c subroutine drawcl(xcs,ycs,ncs,iai,iag,nai) dimension xcs(*),ycs(*),iai(*),iag(*) idr=1 do i=1,nai if (iai(i).lt.0) idr=0 enddo if (idr.ne.0) call curved(xcs,ycs,ncs) return end c ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c subroutine colram(xcra,ycra,ncra,iaia,igia,naia) c parameter(mxclrs=256) common/color/ nclrs,ixclr(mxclrs) dimension xcra(*),ycra(*),iaia(*),igia(*) c c Edge group 1=ocean, 2=continents, 3=contour levels, 4=vertical strips c ifll=1 do 100 i=1,naia 100 if (iaia(i).lt.0) ifll=0 if (ifll.ne.0) then ! fill the area ifll=0 do 105 i=1,naia 105 if (igia(i).eq.3) ifll=iaia(i) ! area id of a contour level if (ifll.gt.0.and.ifll.le.nclrs) then ! within the color tabl call gsfaci(ixclr(ifll)) call gfa(ncra-1,xcra,ycra) c write(6,"('colram: ifll=',i3,' ixclr(ifll)=',i3)") ifll, c + ixclr(ifll) elseif (ifll.gt.nclrs) then write(6,"('>>> colram warning: outside color table: ifll=', + i3,' nclrs=',i3)") ifll,nclrs endif endif return end