c c------------------------------------------------------------------ c Begin file /home/sting/foster/timegcm/mksrc/wrdatv.f c------------------------------------------------------------------ c subroutine wrdatv(j) c c Write out a latitude slice to data vol: c include 'mksrc.h' parameter(nfdatv=12) dimension wrlb(jmx,ntndown+nfdatv) character*4 lbnames(nfdatv) data lbnames /'H2O ','H2 ','CO ','CO2 ','TNG ','TN ', + 'HT ','UN ','OX ','NOZ ','HOX ','CH4 '/ c c Buffer out the latitude slice: c lbtap = imxp3 * kmx * nflddat buffer out(ludatv,1) (fdatv,fdatv(lbtap)) if (unit(ludatv)) 220,225,225 220 write(6,"('Wrdatv: wrote latitude slice at j=',i3)") j c c 9/91: Add lower boundaries for the following: c h2o, h2, co, co2, tng, tn, ht, un, ox, noz, hox, ch4, tndown c Define wrlb(jmx,nfdatv+ntndown) for buffer out: c (nfdatv = 11 for first 11 fields, then tndown(jmx,ntndown) c if (j.eq.jmx) then do ip=1,4 wrlb(:,ip) = speclb(:,ip) enddo wrlb(:,5) = tng(:) wrlb(:,6) = tnlb(:) wrlb(:,7) = htlb(:) wrlb(:,8) = unlb(:) wrlb(:,9) = oxlb(:) wrlb(:,10) = rnozlb(:) wrlb(:,11) = hoxlb(:) wrlb(:,12) = speclb(:,12) ! ch4 low bound from acd2d do ip=1,ntndown wrlb(:,ip+nfdatv) = tndown(:,ip) enddo write(6,"('wrdatv: writing lower boundaries as follows:')") do ip=1,nfdatv write(6,"(' ')") write(6,"('Field ',a)") lbnames(ip) write(6,"(6e12.4)") (wrlb(j,ip),j=1,jmx) enddo write(6,"(' ')") do k=1,ntndown write(6,"('tndown at k=',i3,/(6e12.4))") + k,(wrlb(j,nfdatv+k),j=1,jmx) enddo buffer out(ludatv,1) (wrlb,wrlb(jmx,ntndown+nfdatv)) if (unit(ludatv)) 320,325,325 320 write(6,"('Wrdatv: wrote lower boundaries at end of data vol')") return 325 write(6,"('Wrdatv: error writing lower boundaries at j=',i3)") j stop 'wrdatvlb' endif return 225 write(6,"('Wrdatv: error writing latitude slice at j=',i3)") j stop 'wrdatv' return end