c c------------------------------------------------------------------ c Begin file /home/sting/foster/timegcm/mksrc/mkdatv.f c------------------------------------------------------------------ c subroutine mkdatv(j,it) include 'mksrc.h' data iseasav/0/, iutav/0/ save iseasav,iutav c c Define fdatv(imxp3,kmx,nflddat) -- array for data volume c at current latitude (j) c c nflddat = 6 = number of fields: c 1) perturbation heating (zeroed out in this code) c 2) Art's dynamo zonal ion velocity c 3) Art's dynamo meridional ion velocity c 4) Art's dynamo vertival ion velocity c 5) Art's electric potential (was o2 dissoc on old volumes) c 6) electron density c 7) added 9/91: lower boundaries (62 km) for the below species c from acd 2d model (see acd2d.f) (in speclb(jmx,nspec)) c h2o, h2, co, co2, h, oh, o, o3, ho2, no2, no c c As of 4/10/91 field 1 is zeros: c fdatv(:,:,1) = 0. c c Longitude loop (define 3->74): do i=1,imxm1 ii = i+2 c c Use igrf model (from library /FOSTER/lib/igrf.a) to find geomagnetic c coords and declination and inclination (see sting dir ~/igrf/ymp): c subroutine igrf(glat,glon,alt,year,gmaglat,gmaglon,dinc,decl) c altgrf = 300. yeargrf = 1985. call igrf(gcmlat(j),gcmlon(i),altgrf,yeargrf,gmlat,gmlon, + dip,dec) dipr = dip*dtr si = sin(dipr) ci = cos(dipr) c c Efield: day = iyd - iyd/1000*1000 call efield(gmlat,gmlon,day,ut(it),iseasav,iutav,pot,vu,ve) c c ui,vi,wi, and potential: fdatv(ii,:,2) = ve fdatv(ii,:,3) = vu*si fdatv(ii,:,4) = vu*ci fdatv(ii,:,5) = pot c c ne (iri): fdatv(ii,:,6) = f(ii,:,itxne) c enddo return end