c c------------------------------------------------------------------ c Begin file /home/sting/foster/timegcm/mksrc/settime.f c------------------------------------------------------------------ c subroutine settime(j) c c Define timegcm fields: c timegcm: c common/timeix/itxt,itxu,itxv,itxo2,itxo1,itxn4s,itxnoz,itxco, c + itxco2,itxh2o,itxh2,itxhox,itxop,itxch4,itxo21d, c + itxno2,itxno,itxo3,itxnpo1,itxoh,itxho2,itxh, c + itxn2d,itxti,itxte,itxne,itxo2p,itxw,itxz c c 7/91: Modified from ~/timegcm/mksrc/settime.f for zp1=-13 to use c glbmean fields only (no tigcm) Note glbmean fields are in c number densities when read from the glbmean history c include 'mksrc.h' include 'glbm.h' dimension xno(imxp1,kmx),xno2(imxp1,kmx),xnn2(imxp1,kmx) c c Define f() for i=3->74 from glbmfld for current j: c c (Note all longitude values in f will be identical, because glbmean c is a 2d model.) c (Also note: f(imxp3,kmx,nfldst) and glbmfld(kmxglbm,nglbmfld), c thus kmx must = kmxglbm (=37 for time and 45 for times)) c If ixglbm(ip)=0 then fields is either a wind (u,v,w), in which case c it is zeroed out, or field is hox, defined below. c (Note ch4 (from glbmean) and o21d (special value) added 1/27/92) c do ip=1,nfldsd if (ixglbm(ip).gt.0) then do i=3,imxp1 f(i,:,ip) = glbmfld(:,ixglbm(ip)) enddo else do i=3,imxp1 f(i,:,ip) = 0. enddo endif enddo c c Convert heights from glbmean km to cm: c do i=3,imxp1 f(i,:,itxz) = f(i,:,itxz) * 1.e+5 enddo c c hox = oh + ho2 + h: c do i=3,imxp1 f(i,:,itxhox) = glbmfld(:,igmoh)+glbmfld(:,igmho2)+ + glbmfld(:,igmh) enddo c c o21d gets special value: c do i=3,imxp1 f(i,:,itxo21d) = 1.e-20 enddo c c Save o2,o,n2 number densities: c igmn2 = 10 do i=3,imxp1 xno2(i,:) = f(i,:,itxo2) xno(i,:) = f(i,:,itxo1) xnn2(i,:) = glbmfld(:,igmn2) enddo c c Convert species to mass mixing ratios for the timegcm history: c do ip=1,nfldsd if (gcmwtime(ip).gt.0.) then do i=3,imxp1 do k=1,kmx sumden = xno(i,k)*16. + xno2(i,k)*32. + xnn2(i,k)*28. f(i,k,ip) = f(i,k,ip) * gcmwtime(ip) / sumden enddo enddo endif enddo c return end