c c------------------------------------------------------------------ c Begin file /home/sting/foster/timegcm/sltglb.f c------------------------------------------------------------------ c subroutine sltglb(fields,utc) c include 'timesproc.h' character*56 toplab parameter(nx=7, ny=7) dimension plt(imx,jmx),vp(4),numx(nx),numy(ny) dimension fields(imx,kmx,jmx,nfget) data vp /.14,.92,.32,.82/, dum/0./, dgrid/15./ data numy/-90,-60,-30,0,30,60,90/ c xmid = 0.5*(vp(1)+vp(2)) call cpseti('SET',0) call cpseti('MAP',1) call cpsetr('XC1',gcmlon(1)) call cpsetr('XCM',gcmlon(imx)) call cpsetr('YC1',gcmlat(1)) call cpsetr('YCN',gcmlat(jmx)) call cpsetr('ILX',xmid) call cpsetr('ILY',-.30) call cpsetr('ILS',.015) call cpseti('ILP',0) call mapstr('GR',dgrid) c c censlt = 0. (midnight in center of x-axis), or c 12. (noon in center of x-axis) c Note ixslt() returns longitude at censlt and utc in sltlon -- this is c passed to mkproj, which rotates the projection accordingly c (islt is not used) c islt = ixslt(censlt,utc,sltlon,gcmlon,imx,dlon) if (censlt.eq.12.) then numx(1) = 0 numx(2) = 4 numx(3) = 8 numx(4) = 12 numx(5) = 16 numx(6) = 20 numx(7) = 0 else numx(1) = 12 numx(2) = 16 numx(3) = 18 numx(4) = 0 numx(5) = 4 numx(6) = 8 numx(7) = 12 endif c c subroutine mkproj(proj,vp,cenlat,cenlon,rot,perimlat,eradii) c call mkproj('CE',vp,0.,sltlon,0.,dum,dum) c c Field loop: do 200 ip=1,nftot if (ifplt(ip).le.0) goto 200 c c Selected pressure/height loop: do 100 izp = 1,npls+nhts ixpl = 0 ht = 0. if (izp.le.npls) then ixpl = ixfind(gcmzp,kmx,spls(izp),dzp) if (ixpl.le.0) then write(6,"('>>> sltglb: bad selected pressure=',f10.3, + ' izp=',i3)") spls(izp),izp goto 100 endif else ht = shts(izp-npls) endif c call getglb(fields,plt,ixpl,ht,ip) if (icolor.le.0) then call contour(plt,imx,imx,jmx,cint(ip),cmin(ip),cmax(ip)) else call conclr(plt,imx,imx,jmx,cint(ip),cmin(ip),cmax(ip)) call sflush call gsplci(0) call gspmci(0) endif if (icont.gt.0) call maplot if (icolor.gt.0) then call sflush call gsplci(1) call gspmci(1) endif c c Add vectors if plotting tn (black if color): if (ip.eq.itxt.and.ituv.gt.0) then call getglb(fields,udat,ixpl,ht,itxu) call getglb(fields,vdat,ixpl,ht,itxv) c uvmax = 0. m = 1 ispvec = 0 spvec = 1.e36 iskip = 0 ixcolor = 1 if (icolor.gt.0) then call sflush call gsplci(0) call gspmci(0) ixcolor = 0 endif call pltvec(udat,vdat,uvmax,imx,jmx,jmx,iskip,gcmlat(1), + gcmlat(jmx),m,ispvec,spvec,ixcolor) if (icolor.gt.0) then call sflush call gsplci(1) call gspmci(1) endif endif c c Add axes labels: c call labaxes(nx,numx,4,'LOCAL TIME (HRS)', + ny,numy,3,'LATITUDE (DEG) ', 0.) c c Top label: c call clearstr(toplab) if (izp.le.npls) then if (log10map.gt.0.and.itimelog(ip).gt.0) then write(toplab,"('LOG10 ',a8,' ZP=',f5.1,' UT = ',f6.2)") + flab(ip),spls(izp),utc else write(toplab,"(a8,' ZP=',f5.1,' UT = ',f6.2)") + flab(ip),spls(izp),utc endif else if (log10map.gt.0.and.itimelog(ip).gt.0) then write(toplab,"('LOG10 ',a8,' HT=',f5.1,' UT = ',f6.2)") + flab(ip),ht,utc else write(toplab,"(a8,' HT=',f5.1,' UT = ',f6.2)") + flab(ip),ht,utc endif endif call wrlab(toplab(1:lenstr(toplab)),xmid,vp(4)+.03,0.) c c History label: c call clearstr(toplab) write(toplab,"('HISTORY=',a)") histvol(ivol) call wrlab(toplab(1:lenstr(toplab)),xmid,vp(3)-0.12, + .012) c c Wrap-up: c call frame iframe = iframe+1 if (izp.le.npls) then write(6,"('sltglb: frame ',i4,' field ',a8,' zp=',f5.1, + ' censlt=',f5.1)") iframe,flab(ip),spls(izp), + censlt else write(6,"('sltglb: frame ',i4,' field ',a8,' ht=',f5.1, + ' censlt=',f5.1)") iframe,flab(ip),ht,censlt endif c c End selected pressure/height loop: izp=1,npls+nhts 100 continue c c End field loop: ip=1,nftot 200 continue c return end