! module cons use params implicit none real :: dtor,rtod,pi ! This was used in old glbmean, with exception of co2cool, which used 1.38066e-16 real,parameter :: ! | boltz = 1.38e-16 , ! boltzmann constant (was C(84)) | boltz = 1.38066e-16, ! boltzmann constant (was C(84)) | p0 = 5.e-4 , ! standard pressure (was C(81)) | avo = 6.023e23 , ! avogadro's number (was C(85)) | gask = 8.314e7 , ! gas constant (was C(57)) | grav = 945. , ! acceleration due to gravity (was C(54)) | re = 6371.e+5 , | cgm = 0.5 , | eff = 0.33 , | erg = 1.602E-12 , | brn2d = 0.6 , | brn4s = 1.-brn2d , | quench= 2.3e-11 , | a1d = 6.81e-3 , | a6300 = 5.15e-3 , | glat = 0. , | glon = 0. ! ! Volume mixing ratios at lower boundary: real,parameter :: | co2mix = 350.e-6 , ! old model orig (1993 concentrations) ! | co2mix = 360.e-6 , ! | co2mix = 720.e-6 , | xco2lb = co2mix , | xcolb = 1.1e-8 , | xnolb = 2.7e-9 , | xno2lb = 4.2e-9 , | xnoxlb = xnolb+xno2lb, | xch4lb = 6.7e-7 , | xh2lb = 0.5e-6 , | xh2olb = 4.4e-6 , | xhelb = 5.24e-6 , | xarglb = 9.34e-3 , | xo3lb = 8.3e-6 ! Remeber lower boundary TN=225.K in temp.F ! Remeber lower boundary for xncl*1.0 and xnclo*1.0 in restart.F ! ! Volume mixing ratios at lower boundary (2100 concentrations): ! | co2mix = 720.e-6 , ! | xco2lb = co2mix , ! | xcolb = 2.2e-8 , ! | xnolb =16.0e-9 , ! | xno2lb = 8.4e-9 , ! | xnoxlb = xnolb+xno2lb, ! | xch4lb = 1.34e-6 , ! | xh2lb = 1.0e-6 , ! | xh2olb = 8.8e-6 , ! | xhelb = 5.24e-6 , ! | xarglb = 9.34e-3 , ! | xo3lb = 4.15e-6 ! Remeber lower boundary TN=215.K in temp.F ! Remeber lower boundary for xncl*1.5 and xnclo*1.5 in restart.F ! real :: xn4slb ! set by sub chemistry (comp.F) ! ! Molecular weights: real,parameter :: | rmo2=32., rmo=16., rmn2=28., rmar=40., rmnat=23., rmhe=4., | rmno=30., rmn4s=14., rmch4=16., rmh2=2., rmco=28., rmco2=44., | rmh2o=18.,rmhox=1. , rmh=1. ! real :: zpcons(nlev) ! contains !----------------------------------------------------------------------- subroutine set_cons integer :: k do k=1,nlev zpcons(k) = zpb+(k-1)*dzp enddo dtor=atan(1.)/45. rtod=1./dtor pi=180./rtod end subroutine set_cons !----------------------------------------------------------------------- subroutine init_eddy use flds_modelz,only: zp use flds_fields,only: edy ! ! Calculate eddy diffusion edy(nlev) in module flds_fields. ! Edy was formerly in edyyyy.h. In the old code, glbmean overwrote ! edy that was read by restart. The new restart just reads a local ! array edyrd. Edy calculated here is used in comp (as difk), and ! will be written to output history. ! real :: turzp, zpmb2,zpmb1 integer :: k ! ! Eddy diffusion constants: real,parameter :: ! | eddyc = 2.5e-6, ! | eddymb2 = 2.0e-6, ! | eddymb1 = 3.0e-7, ! | eddylb = 1.0e-7 | eddyc = 0.8e-6, ! old model (also 2.5e-6, 4.e-6 12.e-6, 0.8e-6) | eddymb2 = 3.0e-6, ! old model | eddymb1 = 8.0e-7, ! old model (also 4.e-7) | eddylb = 5.0e-8 ! old model (also 5.e-7) ! ! Force an fpe for debug experiment: ! real,parameter :: eddyc = 100. ! turzp = -7.5 zpmb2 = -9.0 zpmb1 = -13.0 do k=1,nlev if (zp(k) >= turzp) edy(k) = eddyc*exp(turzp-zp(k)) if (zp(k) < turzp .and. zp(k) >= zpmb2) | edy(k) = eddymb2*exp(alog(eddyc/eddymb2)* | (zp(k)-zpmb2)/(turzp-zpmb2)) if (zp(k) < zpmb2 .and. zp(k) >= zpmb1) | edy(k)=eddymb1*exp(alog(eddymb2/eddymb1)* | (zp(k)-zpmb1)/(zpmb2-zpmb1)) if (zp(k) <= zpmb1) | edy(k)=eddylb*exp(alog(eddymb1/eddylb)* | (zp(k)-zp(1))/(zpmb1-zpb)) enddo ! k=1,nlev ! write(6,"(/,'init_eddy: edy=',/,(6e12.4))") edy end subroutine init_eddy !----------------------------------------------------------------------- end module cons