c c------------------------------------------------------------------ c Begin file /home/sting/foster/timesdif/pltloc.f c------------------------------------------------------------------ c subroutine pltloc(iglbm,fld) c c Make line plots at selected locations, zp on y-axis, field on x-axis: c include 'gettime.h' include 'timesdif.h' dimension pltcol(kmx),fld(imx,kmx,jmx,nplfld) character*40 toplab c data linetyp/3/ ! x/log, y/linear data linetyp/1/ ! x/linear, y/linear c c Location loop: nnloc = nloc if (iglbm.gt.0) nnloc = 1 do l=1,nnloc if (iglbm.le.0) then ixlat = ixfind(gcmlat,jmx,rloc(1,l),dlat) if (ixlat.le.0) then write(6,"('>>> pltloc: bad lat=',f10.3,' l=',i3, + ' skipping this location')") rloc(1,l),l goto 100 endif ixlon = ixfind(gcmlon,imx,rloc(2,l),dlon) if (ixlon.le.0) then write(6,"('>>> pltloc: bad lon=',f10.3,' l=',i3, + ' skipping this location')") rloc(2,l),l goto 100 endif rlat = gcmlat(ixlat) rlon = gcmlon(ixlon) write(toplab,"('LAT,LON=',f5.1,',',f6.1, + ' (DIFFERENCE FIELD)',1x)") rlat,rlon else write(toplab,"('GLOBAL MEANS (DIFFERENCE FIELD)',9x)") endif c c Field loop: nzp = izprange(2)-izprange(1)+1 ixp = 0 do ip=1,ntimefld if (ipltime(ip).gt.0) then ixp = ixp+1 if (iglbm.le.0) then do k=izprange(1),izprange(2) pltcol(k-izprange(1)+1) = fld(ixlon,k,ixlat,ixp) enddo else ! global means do k=izprange(1),izprange(2) kk = k-izprange(1)+1 pltcol(kk) = 0. do j=1,jmx do i=1,imx-1 pltcol(kk) = pltcol(kk) + fld(i,k,j,ixp) enddo enddo pltcol(kk) = pltcol(kk) / float((imx-1)*jmx) enddo endif c c linetyp = 1 -> x-linear, y-linear c linetyp = 3 -> x-log, y-linear c (Do not do logs if doing difference fields) c linetyp = 1 if (itimelog(ip).gt.0) linetyp = 3 c c Check for low values anyway (e.g., no.dens mix ratio of ox from c a source history can go to 0): if (linetyp.eq.3) then do k=1,kmx if (pltcol(k).le.1.e-20) linetyp = 1 enddo endif call displa(1,1,linetyp) call anotat(timelab_short(ip),'ZP',0,1,-1,L) call ezxy(pltcol,gcmzp(izprange(1)),nzp,toplab) iframe = iframe+1 if (iglbm.le.0) then write(6,"('pltloc: line frame ',i3,' lat,lon=', + f5.1,f6.1,' field ',a,' zprange = ',2f6.2)") + iframe,rlat,rlon, + timelab_short(ip)(1:lenstr(timelab_short(ip))),zprange else write(6,"('pltloc: line frame ',i3,' (global means)', + ' field ',a,' zprange= ',2f5.1)") + iframe,timelab_short(ip)(1:lenstr(timelab_short(ip))), + zprange endif endif enddo 100 continue enddo return end