c c------------------------------------------------------------------ c Begin file /home/sting/foster/timegcm/mksrc/pltacd.f c------------------------------------------------------------------ c subroutine pltacd(acddata,mxspec,nspec,lmax,niz,acdalt, + acdlat,acdname,htlb,ixhtlb,ieqnx,ispecno, + ilog,cpspval,iframe) c c Contour and line plot acd 2d species (called from acd2d.f) c dimension acdlat(lmax),acdalt(niz),acddata(mxspec,lmax,niz), + ispecno(nspec) dimension viewport(4),plt(lmax,niz),pltj(lmax) character*8 acdname(nspec) character*56 toplab data toplab + /' '/ data viewport /.11,.89,.21,.86/ c c Contour (latitude on x-axis, altitude on y-axis): c call cpseti('SET',0) call cpseti('MAP',0) call cpsetr('XC1',acdlat(1)) call cpsetr('XCM',acdlat(lmax)) call cpsetr('YC1',acdalt(1)) call cpsetr('YCN',acdalt(niz)) xmid = 0.5*(viewport(1)+viewport(2)) call cpsetr('ILX',xmid) call cpsetr('ILY',-.20) do ip=1,nspec call set(viewport(1),viewport(2),viewport(3),viewport(4), + acdlat(1),acdlat(lmax),acdalt(1),acdalt(niz),1) if (ilog.gt.0) then do k=1,niz do i=1,lmax if (acddata(ispecno(ip),i,k).gt.1.e-20) then plt(i,k) = alog10(acddata(ispecno(ip),i,k)) else plt(i,k) = cpspval endif enddo enddo else plt(:,:) = acddata(ispecno(ip),:,:) endif call contour(plt,lmax,lmax,niz) call labrect(acdlat,lmax,acdalt,niz,'LATITUDE (ACD GRID)', + 'ALTITUDE',0.) if (ieqnx.gt.0) then write(toplab,"('LOG10 ACD ',a8,' (EQUINOX)',28x)") acdname(ip) else write(toplab,"('LOG10 ACD ',a8,' (SOLSTICE)',27x)")acdname(ip) endif call set(0.,1.,0.,1.,0.,1.,0.,1.,1) call wrlab(toplab(1:lenstr(toplab)),xmid,0.9,0.) call frame iframe = iframe+1 write(6,"('pltacd contour frame ',i3,': ip=',i3,' field=',a)") + iframe,ip,acdname(ip) enddo c c Line plots (lat on x-axis, field on y-axis): c do ip=1,nspec if (ieqnx.gt.0) then write(toplab,"('ACD FIELD ',a8,' AT ',f5.1,' KM', + ' (EQUINOX)',16x)") acdname(ip),htlb else write(toplab,"('ACD FIELD ',a8,' AT ',f5.1,' KM', + ' (SOLSTICE)',15x)") acdname(ip),htlb endif pltj(:) = acddata(ispecno(ip),:,ixhtlb) call displa(1,1,1) call anotat('LATITUDE (ACD GRID)',acdname(ip),0,1,-1,L) call ezxy(acdlat,pltj,lmax,toplab) iframe = iframe+1 write(6,"('pltacd frame ',i3,': ip=',i3,' line plot of ',a)") + iframe,ip,acdname(ip) enddo return end