c c------------------------------------------------------------------ c Begin file /home/sting/foster/timesdif/pltlatzp.f c------------------------------------------------------------------ c subroutine pltlatzp(utc,fld) c c Contour longitude slices (lat on x-axis, zp on y-axis) c include 'gettime.h' include 'timesdif.h' character*56 toplab,lab dimension plt(jmx,kmx),viewport(4),rimx(imx), + fld(imx,kmx,jmx,nplfld) data viewport /.15,.89,.26,.91/ c if (nlon.le.0) then write(6,"('pltlatzp: no selected longitudes -- returning')") return endif xmid = 0.5*(viewport(1)+viewport(2)) call cpseti('SET',0) call cpseti('MAP',0) call cpsetr('XC1',gcmlat(1)) call cpsetr('XCM',gcmlat(jmx)) call cpsetr('YC1',gcmzp(izprange(1))) call cpsetr('YCN',gcmzp(izprange(2))) call cpsetr('ILX',xmid) call cpsetr('ILY',-.20) call cpseti('ILP',0) call set(viewport(1),viewport(2),viewport(3),viewport(4), + -90.,90.,gcmzp(izprange(1)),gcmzp(izprange(2)),1) c c Field loop: ixp = 0 nzp = izprange(2)-izprange(1)+1 do 200 ip=1,ntimefld if (ipltime(ip).le.0) goto 200 if (ip.eq.itxz.and.iplz.le.0) goto 200 ixp = ixp+1 c c Selected longitude loop: c do 100 i=1,nlon if (slon(i).ne.zmlon) then ixlon = ixfind(gcmlon,imx,slon(i),dlon) if (ixlon.le.0) then write(6,"('>>> pltlatzp: bad longitude=',f10.3,' i=',i3, + ' skipping this lon')") slon(i),i goto 100 endif rlon = gcmlon(ixlon) else ixlon = ifix(zmlon) rlon = slon(i) endif c do k=izprange(1),izprange(2) kk = k-izprange(1)+1 do j=1,jmx if (slon(i).ne.zmlon) then plt(j,kk) = fld(ixlon,k,j,ixp) else ! zonal means rimx(:) = fld(:,k,j,ixp) plt(j,kk) = calcmean(rimx,imx-1,0,1.e-20,cpspval,0) endif enddo enddo if (icolor.le.0) then call contour(plt,jmx,jmx,nzp,cint(ip),cmin(ip),cmax(ip)) else call conclr(plt,jmx,jmx,nzp,cint(ip),cmin(ip),cmax(ip)) endif call labrect(gcmlat,jmx,gcmzp(izprange(1)),nzp,'LATITUDE', + 'ZP',0.) c c Top label: if (slon(i).ne.zmlon) then if (wtime(ip).gt.0..or.ip.eq.itxne) then write(toplab,"(a8,' (% DIFFERENCE) LON=',f8.2, + ' UT=',f6.2,9x)") timelab_short(ip),rlon,utc else write(toplab,"(a8,' (RAW DIFFERENCE) LON=',f8.2, + ' UT=',f6.2,7x)") timelab_short(ip),rlon,utc endif else if (wtime(ip).gt.0..or.ip.eq.itxne) then write(toplab,"(a8,' (% DIFFERENCE) ZONAL MEANS UT=', + f6.2,9x)") timelab_short(ip),utc else write(toplab,"(a8,' (RAW DIFFERENCE) ZONAL MEANS UT=', + f6.2,7x)") timelab_short(ip),utc endif endif call wrlab(toplab(1:lenstr(toplab)),xmid,viewport(4)+0.05,0.) c c History vols label: write(lab,"(2x,'Difference of TIGCM histories ',a8, + ' minus ',a8,1x)") cpertvol,ccntrvol call wrlab(lab(1:lenstr(lab)),xmid,viewport(3)-.09,.012) call frame iframe = iframe+1 if (slon(i).ne.zmlon) then write(6,"('pltlatzp: frame ',i4,' field ',a8,' lon=',f8.2, + ' zprange=',2f8.2)") iframe,timelab_short(ip),rlon,zprange else write(6,"('pltlatzp: frame ',i4,' field ',a8, + ' (zonal means) zprange=',2f8.2)") + iframe,timelab_short(ip),zprange endif c c End selected longitude loop 100 continue c c End field loop: ip=1,ntimefld 200 continue c return end