Upload
vuonghuong
View
214
Download
0
Embed Size (px)
Citation preview
The GEOS-Chem Column Chemistry Module
Bob Yantosca and Philippe Le Sager
School of Engineering and Applied Sciences, Harvard University
December 15, 2009
Contents
1 Routine/Function Prologues 61.1 Fortran: Module Interface Header files . . . . . . . . . . . . . . . . . . . . . 6
1.1.1 Include File smv errcode.h . . . . . . . . . . . . . . . . . . . . . . . 61.1.2 Include File smv dimension.h . . . . . . . . . . . . . . . . . . . . . . 81.1.3 Include File comode.h . . . . . . . . . . . . . . . . . . . . . . . . . . 81.1.4 Include File cmn fj.h . . . . . . . . . . . . . . . . . . . . . . . . . . 211.1.5 Include File jv cmn.h . . . . . . . . . . . . . . . . . . . . . . . . . . 221.1.6 Include File lai land info.h . . . . . . . . . . . . . . . . . . . . . . . 241.1.7 Include File drydep info.h . . . . . . . . . . . . . . . . . . . . . . . 241.1.8 Include File sea salt info.h . . . . . . . . . . . . . . . . . . . . . . . 27
1.2 Fortran: Module Interface gc type mod.f . . . . . . . . . . . . . . . . . . . 271.3 Fortran: Module Interface gc emissions type mod.f . . . . . . . . . . . . . . 321.4 Fortran: Module Interface gc interface mod . . . . . . . . . . . . . . . . . . 35
1.4.1 gc interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 361.4.2 read sst . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 401.4.3 get o3 column . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 411.4.4 error trap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 421.4.5 init cspec full . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 431.4.6 print mean oh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 441.4.7 germ init import state . . . . . . . . . . . . . . . . . . . . . . . . . . 44
1.5 Fortran: Module Interface acetone mod.f . . . . . . . . . . . . . . . . . . . 451.5.1 ocean source acet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 461.5.2 ocean sink acet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 471.5.3 emiss bioacet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
1.6 Fortran: Module Interface seasalt mod.f . . . . . . . . . . . . . . . . . . . . 491.6.1 emissseasalt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 501.6.2 srcsalt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 511.6.3 get alk . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 521.6.4 get 1d seasalt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 521.6.5 init seasalt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 531.6.6 cleanup seasalt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
1.7 Fortran: Module Interface schem mod . . . . . . . . . . . . . . . . . . . . . 531.7.1 schem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 541.7.2 schem read gc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
1
Source File: header title.txt, Date: Tue Dec 15 14:07:34 EST 2009 2
1.7.3 get schem data 1d . . . . . . . . . . . . . . . . . . . . . . . . . . . . 561.7.4 init schem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 571.7.5 init schem 1d . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 581.7.6 cleanup schem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 581.7.7 cleanup schem 1d . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 591.7.8 setemis.f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
1.8 Fortran: Module Interface gc emissions read mod . . . . . . . . . . . . . . 611.8.1 gc emissions read init . . . . . . . . . . . . . . . . . . . . . . . . . . 621.8.2 gc emissions read run . . . . . . . . . . . . . . . . . . . . . . . . . . 631.8.3 gc emissions final . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 641.8.4 germ init es fld 0d . . . . . . . . . . . . . . . . . . . . . . . . . . . . 641.8.5 germ init es fld 1d . . . . . . . . . . . . . . . . . . . . . . . . . . . . 651.8.6 germ init es fld 2d . . . . . . . . . . . . . . . . . . . . . . . . . . . . 651.8.7 germ init es fld 3d . . . . . . . . . . . . . . . . . . . . . . . . . . . . 661.8.8 germ setup es fld . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 661.8.9 germ final es fld 0d . . . . . . . . . . . . . . . . . . . . . . . . . . . . 671.8.10 germ final es fld 1d . . . . . . . . . . . . . . . . . . . . . . . . . . . . 671.8.11 germ final es fld 2d . . . . . . . . . . . . . . . . . . . . . . . . . . . . 671.8.12 germ final es fld 3d . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
1.9 Fortran: Module Interface dust input mod . . . . . . . . . . . . . . . . . . 681.9.1 src function ginoux . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
1.10 Fortran: Module Interface lai land input mod . . . . . . . . . . . . . . . . 701.10.1 read lai . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 711.10.2 read olson . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
1.11 Fortran: Module Interface lai land input mod . . . . . . . . . . . . . . . . 721.11.1 read lai . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 731.11.2 read olson . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
1.12 Fortran: Module Interface soil nox input mod . . . . . . . . . . . . . . . . 741.12.1 read soil fert . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
1.13 Fortran: Module Interface gc emissions mod . . . . . . . . . . . . . . . . . 751.13.1 gc emissions init . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 761.13.2 gc emissions run . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 771.13.3 gc emissions final . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 781.13.4 gem init es fld 0d . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 781.13.5 germ init es fld 1d . . . . . . . . . . . . . . . . . . . . . . . . . . . . 791.13.6 germ final es fld 0d . . . . . . . . . . . . . . . . . . . . . . . . . . . . 801.13.7 germ final es fld 1d . . . . . . . . . . . . . . . . . . . . . . . . . . . . 801.13.8 get column . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 811.13.9 get daily lai . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 821.13.10 get lai month . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 821.13.11 emiss gas phase . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 831.13.12 emiss aerosol phase . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
1.14 Fortran: Module Interface canopy nox mod . . . . . . . . . . . . . . . . . . 841.14.1 get canopy nox . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 861.14.2 diffg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 871.14.3 bio fit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 871.14.4 sun param . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
1.15 Fortran: Module Interface gc column mod . . . . . . . . . . . . . . . . . . 89
Source File: header title.txt, Date: Tue Dec 15 14:07:34 EST 2009 3
1.15.1 gc column run . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 901.15.2 gc column init . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 941.15.3 gc column final . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 961.15.4 its time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 971.15.5 convert units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
1.16 Fortran: Module Interface pbl mixing mod . . . . . . . . . . . . . . . . . . 991.16.1 compute pbl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 991.16.2 do pbl mixing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
1.17 Fortran: Module Interface cloud convection mod . . . . . . . . . . . . . . . 1011.17.1 do geos5 convection . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
1.18 Fortran: Module Interface drydep mod . . . . . . . . . . . . . . . . . . . . 1051.18.1 do drydep . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1071.18.2 dvz minval . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1081.18.3 depvel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1081.18.4 diffg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1101.18.5 bio fit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1111.18.6 sun param . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1121.18.7 aero sfcrsii . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1131.18.8 dust sfcrsi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1131.18.9 dust sfcrsii . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1141.18.10 diag drydep flux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1151.18.11 init drydep . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
1.19 Fortran: Module Interface wetdep mod . . . . . . . . . . . . . . . . . . . . 1161.19.1 make qq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1181.19.2 e ice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1181.19.3 compute l2g . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1191.19.4 compute updraft fsol . . . . . . . . . . . . . . . . . . . . . . . . . . . 1201.19.5 rainout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1201.19.6 get rainfrac . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1211.19.7 washout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1221.19.8 washfrac aerosol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1221.19.9 washfrac liq gas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1231.19.10 wetdep . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1241.19.11 ls k rain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1261.19.12 ls f prime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1261.19.13 conv f prime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1271.19.14 safety . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1271.19.15 init wetdep fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1281.19.16 init wetdep . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
1.20 Fortran: Module Interface chemdr.f . . . . . . . . . . . . . . . . . . . . . . 1291.20.1 chemdr col . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1301.20.2 rdust . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1341.20.3 rdaer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1351.20.4 sum for mean oh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
1.21 Fortran: Module Interface carbon chem mod.f . . . . . . . . . . . . . . . . 1371.21.1 chemcarbon . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1391.21.2 chem bcpo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1401.21.3 chem bcpi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
Source File: header title.txt, Date: Tue Dec 15 14:07:34 EST 2009 4
1.21.4 chem ocpo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1411.21.5 chem bcpi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1421.21.6 soa chemistry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1421.21.7 soa equil . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1441.21.8 zeroin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1451.21.9 soa para . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1461.21.10 chem nvoc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1471.21.11 soa partition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1481.21.12 soa lump . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1481.21.13 soa depo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1491.21.14 get doh col . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
1.22 Fortran: Module Interface dust mod . . . . . . . . . . . . . . . . . . . . . . 1501.22.1 chemdust . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1511.22.2 dry settling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1521.22.3 dry deposition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1531.22.4 emissdust box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1531.22.5 src dust ginoux box . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
1.23 Fortran: Module Interface seasalt chem mod.f . . . . . . . . . . . . . . . . 1561.23.1 chemseasalt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1571.23.2 wet settling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1591.23.3 dry deposition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
1.24 Fortran: Module Interface sulfate chem mod.f . . . . . . . . . . . . . . . . 1611.24.1 chemsulfate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1621.24.2 get vcldf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1631.24.3 get lwc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1641.24.4 grav settling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1641.24.5 chem so2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1651.24.6 seasalt chem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1661.24.7 aqchem so2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1671.24.8 chem so4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1691.24.9 chem msa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1691.24.10 chem nh3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1701.24.11 chem nh4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1701.24.12 chem nit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1711.24.13 get o3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
1.25 Fortran: Module Interface FAST-J Photolysis Code . . . . . . . . . . . . . 1721.25.1 blkslv . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1721.25.2 cldsrf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1721.25.3 efold . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1731.25.4 gaussp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1741.25.5 gen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1751.25.6 jratet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1751.25.7 jvalue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1761.25.8 legnd0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1771.25.9 matin4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1771.25.10 miesct . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1781.25.11 noabs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1791.25.12 opmie . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
Source File: header title.txt, Date: Tue Dec 15 14:07:34 EST 2009 5
1.25.13 rd tjpl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1801.25.14 sphere . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1821.25.15 xsec1d . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1821.25.16 xseco2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1831.25.17 xseco3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1831.25.18 fast j.f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1841.25.19 inphot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1851.25.20 jv index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1861.25.21 photoj . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1871.25.22 rd js . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1881.25.23 rd prof . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1891.25.24 set prof . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
1.26 Fortran: Module Interface SMVGEAR Support Routines . . . . . . . . . . 1911.26.1 arsl1k . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1911.26.2 backsub . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1921.26.3 calcrate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1941.26.4 n2o5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1971.26.5 decomp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1971.26.6 fyrno3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1991.26.7 gasconc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2001.26.8 get global ch4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2021.26.9 jsparse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2031.26.10 ksparse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2051.26.11 lump . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2071.26.12 partition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2081.26.13 pderiv . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2091.26.14 physproc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2111.26.15 readchem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2141.26.16 reader . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2151.26.17 setemdep . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2161.26.18 smvgear . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2171.26.19 subfun . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2221.26.20 update . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224
Source File: smv errcode.h, Date: Tue Dec 15 14:07:34 EST 2009 6
1 Routine/Function Prologues
1.1 Fortran: Module Interface Header files
Here follows a list of the header files for the GEOS-Chem column code. These are storedin the Headers subdirectory.
1.1.1 Include File smv errcode.h
This include file contains the various success or failure parameters for the GEOS-Chemcolumn chemistry code.
DEFINED PARAMETERS:
! Return w/ success
INTEGER, PARAMETER :: SMV_SUCCESS = 0
! Return w/ failure (general)
INTEGER, PARAMETER :: SMV_FAILURE = -1
INTEGER, PARAMETER :: SMV_FAIL_INTERFACE = -2
! Return codes for emissions readers & internal state routines
INTEGER, PARAMETER :: SMV_FAIL_EM_RD_INIT = -1000
INTEGER, PARAMETER :: SMV_FAIL_EM_RD_RUN = -1001
INTEGER, PARAMETER :: SMV_FAIL_EM_RD_FINAL = -1002
INTEGER, PARAMETER :: SMV_FAIL_EM_INIT = -1003
INTEGER, PARAMETER :: SMV_FAIL_EM_RUN = -1004
INTEGER, PARAMETER :: SMV_FAIL_EM_FINAL = -1005
! Return codes for initialization routines
INTEGER, PARAMETER :: SMV_FAIL_INIT_COL = -1100
INTEGER, PARAMETER :: SMV_FAIL_INIT_SCHEM = -1101
INTEGER, PARAMETER :: SMV_FAIL_SCHEM_READ = -1102
INTEGER, PARAMETER :: SMV_FAIL_READER = -1103
INTEGER, PARAMETER :: SMV_FAIL_READCHEM = -1104
INTEGER, PARAMETER :: SMV_FAIL_JSPARSE = -1105
INTEGER, PARAMETER :: SMV_FAIL_KSPARSE = -1106
INTEGER, PARAMETER :: SMV_FAIL_ILISOPOH = -1107
INTEGER, PARAMETER :: SMV_FAIL_SETTRACE = -1108
INTEGER, PARAMETER :: SMV_FAIL_SETEMDEP = -1109
! Return codes for column driver routines
INTEGER, PARAMETER :: SMV_FAIL_COLUMN = -1150
INTEGER, PARAMETER :: SMV_FAIL_CONV_UNITS = -1151
! Return codes for chemistry setup routines
INTEGER, PARAMETER :: SMV_FAIL_GASCONC = -1200
INTEGER, PARAMETER :: SMV_FAIL_PARTITION = -1201
Source File: smv errcode.h, Date: Tue Dec 15 14:07:34 EST 2009 7
INTEGER, PARAMETER :: SMV_FAIL_RDUST = -1202
INTEGER, PARAMETER :: SMV_FAIL_RDAER = -1203
INTEGER, PARAMETER :: SMV_FAIL_SETEMIS = -1204
! Return codes for FAST-J routines
INTEGER, PARAMETER :: SMV_FAIL_INPHOT = -1300
INTEGER, PARAMETER :: SMV_FAIL_FAST_J = -1301
INTEGER, PARAMETER :: SMV_FAIL_PHOTOJ = -1302
INTEGER, PARAMETER :: SMV_FAIL_SET_PROF = -1303
INTEGER, PARAMETER :: SMV_FAIL_JVALUE = -1304
INTEGER, PARAMETER :: SMV_FAIL_JRATET = -1305
INTEGER, PARAMETER :: SMV_FAIL_OPMIE = -1306
! Return codes for chemistry routines
INTEGER, PARAMETER :: SMV_FAIL_PHYSPROC = -1400
INTEGER, PARAMETER :: SMV_FAIL_CALCRATE = -1401
INTEGER, PARAMETER :: SMV_FAIL_SMVGEAR = -1402
INTEGER, PARAMETER :: SMV_FAIL_SUBFUN = -1403
INTEGER, PARAMETER :: SMV_FAIL_PDERIV = -1404
INTEGER, PARAMETER :: SMV_FAIL_DECOMP = -1405
INTEGER, PARAMETER :: SMV_FAIL_BACKSUB = -1406
INTEGER, PARAMETER :: SMV_FAIL_LUMP = -1407
INTEGER, PARAMETER :: SMV_FAIL_SCHEM = -1420
INTEGER, PARAMETER :: SMV_FAIL_CHEMDR = -1421
! Return codes for aerosol chemistry
INTEGER, PARAMETER :: SMV_FAIL_RPMARES = -1500
INTEGER, PARAMETER :: SMV_FAIL_CHEMSEASALT = -1500
INTEGER, PARAMETER :: SMV_FAIL_DUST = -1501
INTEGER, PARAMETER :: SMV_FAIL_GINOUX = -1502
INTEGER, PARAMETER :: SMV_FAIL_EMDUSTBOX = -1503
! Return codes for deposition
INTEGER, PARAMETER :: SMV_FAIL_DRYDEP = -1600
INTEGER, PARAMETER :: SMV_FAIL_DEPVEL = -1602
INTEGER, PARAMETER :: SMV_FAIL_DRYFLX = -1603
! Return codes for PBL mixing
INTEGER, PARAMETER :: SMV_FAIL_COMPUTE_PBL = -1700
INTEGER, PARAMETER :: SMV_FAIL_DO_PBL_MIX = -1701
! Return codes for wet deposition
INTEGER, PARAMETER :: SMV_FAIL_INIT_WD = -1800
INTEGER, PARAMETER :: SMV_FAIL_INIT_WDF = -1801
INTEGER, PARAMETER :: SMV_FAIL_MAKE_QQ = -1802
INTEGER, PARAMETER :: SMV_FAIL_WETDEP = -1803
! Return codes for soil NOx emissions
Source File: smv dimension.h, Date: Tue Dec 15 14:07:34 EST 2009 8
INTEGER, PARAMETER :: SMV_FAIL_CANOPYNOX = -1900
INTEGER, PARAMETER :: SMV_FAIL_SOILNOX = -1902
REVISION HISTORY:
20 Mar 2009 - R. Yantosca - Initial version
15 Jul 2009 - R. Yantosca - Updated w/ error codes for drydep,
wetdep, and PBL mixing routines
03 Nov 2009 - R. Yantosca - Added error codes for column & interface
14 Dec 2009 - R. Yantosca - Added error code for unit conversion
1.1.2 Include File smv dimension.h
This include file contains the various placeholder parameters that are required to replacereferences to GEOS-Chem grid parameters. This is necessary because several quantities inthe FAST-J and SMVGEAR codes are contained in common blocks, and we need to havethese parameters for sizing those arrays properly.
DEFINED PARAMETERS:
! Locally defined replacement for GEOS-Chem parameter "LLPAR"
!INTEGER, PARAMETER :: MAX_COLUMN = 72 ! Full GEOS-5 vertical grid
INTEGER, PARAMETER :: MAX_COLUMN = 47 ! Reduced GEOS-5 vertical grid
! Locally defined replacement for GEOS-Chem parameter "NNPAR"
INTEGER, PARAMETER :: MAX_TRACERS = 100
REVISION HISTORY:
24 Mar 2009 - R. Yantosca - Initial version
1.1.3 Include File comode.h
Header file COMODE contains common blocks and variables for the SMVGEAR II chem-istry package.
REMARKS:
*********************************************************************
************ WRITTEN BY MARK JACOBSON (1993) ************
*** (C) COPYRIGHT, 1993 BY MARK Z. JACOBSON ***
*** U.S. COPYRIGHT OFFICE REGISTRATION NO. TXu 670-279 ***
*** (650) 723-6836 ***
*********************************************************************
CCCCCCC OOOOOOO M M OOOOOOO DDDDDD EEEEEEE
C O O M M M M O O D D E
Source File: comode loop.h, Date: Tue Dec 15 14:07:34 EST 2009 9
C O O M M M O O D D EEEEEEE
C O O M M O O D D E
CCCCCCC OOOOOOO M M OOOOOOO DDDDDD EEEEEEE
*********************************************************************
* THIS IS THE COMMON BLOCK FOR "SMVGEAR" AND "MIE," TWO ORDINARY *
* DIFFERENTIAL EQUATION SOLVERS. THE REFERENCE FOR THE CODES IS *
* *
* JACOBSON M. Z. AND TURCO R. P. (1993) SMVGEAR: A SPARSE- *
* MATRIX, VECTORIZED GEAR CODE FOR ATMOSPHERIC MODELS. *
* SUBMITTED TO ATMOSPHERIC ENVIRONMENT, PART A. MAY 20, 1993 *
* *
* COMODE.H SETS PARAMETER VALUES AND SERVES AS A COMMON BLOCK FOR *
* ALL DIMENSIONED AND NON-DIMENSIONED VARIABLES. COMODE.H ALSO *
* DEFINES EACH PARAMETER, BUT DATA FILE DEFINE.DAT EXPLAINS NON- *
* DIMENSIONED VARIABLES. INDIVIDUAL SUBROUTINES DEFINE DIMENSIONED *
* VARIABLES. *
*********************************************************************
REVISION HISTORY:
17 Mar 2009 - R. Yantosca - Cleaned up, added ProTeX headers
DEFINED PARAMETERS:
!---------------------------------------------------------------
! Physical constants
!---------------------------------------------------------------
! Avogadro’s #
REAL*8, PARAMETER :: AVG = 6.02252d+23
! Boltzmann’s constant [erg/K]
REAL*8, PARAMETER :: BK = 1.38054d-16
REAL*8, PARAMETER :: BOLTG = 1.38054d-16
! Condensation vapor pressure ??????
REAL*8, PARAMETER :: CONSVAP = 6.1078d+03 / BOLTG
! PI (same value as in CMN_GCTM) and related quantities
REAL*8, PARAMETER :: ONEPI = 3.14159265358979323d0
REAL*8, PARAMETER :: EIGHTDPI = 8.d0 / ONEPI
! Gas constant [erg/K/mole]
REAL*8, PARAMETER :: RGAS = BOLTG * AVG
! Universal gas constant [g/cm2/s2/mole/K]
REAL*8, PARAMETER :: RSTARG = 8.31450d+07
! Seconds per day
Source File: comode loop.h, Date: Tue Dec 15 14:07:34 EST 2009 10
REAL*8, PARAMETER :: SCDAY = 86400.0d0
! Molecular weight of air
REAL*8, PARAMETER :: WTAIR = 28.966d0
!---------------------------------------------------------------
! Flags etc. mostly from "reader.f"
!---------------------------------------------------------------
! Call chemistry solver
INTEGER, PARAMETER :: IFSOLVE = 1
! Chemistry mechanism goes in urban slot
! (NCSGAS is max # of slots that are used, set to 1)
INTEGER, PARAMETER :: IFURBAN = 1
INTEGER, PARAMETER :: NCSURBAN = 1
! Nothing goes in trop slot
INTEGER, PARAMETER :: IFTROP = 0
INTEGER, PARAMETER :: NCSTROP = 0
! Nothing goes in strat slot
INTEGER, PARAMETER :: IFSTRAT = 0
INTEGER, PARAMETER :: NCSSTRAT = 0
! Number of chemistry slots (set to NCSURBAN=1)
INTEGER, PARAMETER :: NCSGAS = NCSURBAN
! Max number of chemistry slots (set to NCSGAS=1)
INTEGER, PARAMETER :: NCSALL = NCSGAS
INTEGER, PARAMETER :: NCSTRST = NCSGAS
! Counter for the chemistry slot (NOTE: this was a DO loop variable
! in a common block, very bad coding style. We’ll just make this a
! parameter and rewrite the code to remove the do loops.
INTEGER, PARAMETER :: NCS = NCSURBAN
! Print species and reactions in readchem.f
INTEGER, PARAMETER :: IOSPEC = 1
INTEGER, PARAMETER :: IOREAC = 1
! Print out info from "reader.f"
INTEGER, PARAMETER :: IPREADER = 1
! We do not reorder boxes by stiffness
INTEGER, PARAMETER :: ISREORD = 0
!---------------------------------------------------------------
Source File: comode loop.h, Date: Tue Dec 15 14:07:34 EST 2009 11
! Small number tolerances
!---------------------------------------------------------------
REAL*8, PARAMETER :: SMAL1 = 1d-06
REAL*8, PARAMETER :: SMAL2 = 1.0d-99
REAL*8, PARAMETER :: SMAL3 = 1d-50
!---------------------------------------------------------------
! Placeholder parameters to size some common blocks
!---------------------------------------------------------------
! NOTE: KBLOOP has to be dimensioned as large as the max #
! of vertical levels in a column. The parameter MAX_COLUMN
! is contained w/in include file "smv_dimension.h"
INTEGER, PARAMETER :: KBLOOP = MAX_COLUMN
!---------------------------------------------------------------
! Gas-phase parameters
!---------------------------------------------------------------
! Maximum number of gases, active + inactive
INTEGER, PARAMETER :: IGAS = 125
! Maximum number of aqueous chemistry species
! (set = 1 here since no aqueous chemistry is included)
INTEGER, PARAMETER :: IAERTY = 1
! Maximum number of rates constants (max # reactions)
INTEGER, PARAMETER :: NMRATE = 360
! Maximum number of photo rates
INTEGER, PARAMETER :: IPHOT = 60
! Maximum number of kinetic + photo reactions
INTEGER, PARAMETER :: NMTRATE = NMRATE + IPHOT
! Maximum number of aqueous chemical reactions plus photo
! processes (set = 1 here since no aqueous chemistry included)
INTEGER, PARAMETER :: NMQRATE = 1
! Maximum number of species in a reaction rate
INTEGER, PARAMETER :: NMRPROD = 25
! Maximum number of dead species
INTEGER, PARAMETER :: NMDEAD = 100
! Maximum number of gains / losses for each chemical species
INTEGER, PARAMETER :: MAXGL = 430
Source File: comode loop.h, Date: Tue Dec 15 14:07:34 EST 2009 12
! An array dimension smaller than MAXGL
INTEGER, PARAMETER :: MAXGL2 = 50
! An array dimension smaller than MAXGL2
! NOTE: MAX_TRACERS is contained in include file "smv_dimension.h"
INTEGER, PARAMETER :: MAXGL3 = MAX_TRACERS
! An array dimension smaller than MAXGL2
INTEGER, PARAMETER :: MAXGL4 = 10
! Number OF TYPES OF CHEMISTRY (set to NCSGAS=1)
INTEGER, PARAMETER :: ICS = NCSGAS
! Types of chemistry * 2 (one for day, one for night)
INTEGER, PARAMETER :: ICP = 2*ICS
! Maximum order for gear parameters for dimension purposes
INTEGER, PARAMETER :: MORDER = 7
! Various other parameters
INTEGER, PARAMETER :: IPHOT8 = IPHOT + 8
! Dimension for XINP array
INTEGER, PARAMETER :: IMISC = 100
! Dimension for MBCOMP, WTMB, JMBCOMP arrays
INTEGER, PARAMETER :: IMASBAL = 9
! Dimension for ARRT, BRRT, KCRRT, etc. arrays
INTEGER, PARAMETER :: MXCOF = 5
!---------------------------------------------------------------
! Gas-phase parameters
!---------------------------------------------------------------
! Larger of IGAS, IAERTY
INTEGER, PARAMETER :: MXGSAER = IGAS
! Larger of NMTRATE, NMQRATE
INTEGER, PARAMETER :: MXRATE = NMTRATE
! Larger of MXGSAER, MXARRAY
INTEGER, PARAMETER :: MXARRAY = 3000
! Maximum one-dimensional array-length of sparse matrix
INTEGER, PARAMETER :: MXCC2 = MXARRAY
Source File: comode loop.h, Date: Tue Dec 15 14:07:34 EST 2009 13
! Various other array dimensions
INTEGER, PARAMETER :: MXCOUNT1 = MXGSAER * MAXGL3 * 3
INTEGER, PARAMETER :: MXCOUNT2 = MXGSAER * MAXGL3 * 7
INTEGER, PARAMETER :: MXCOUNT3 = MXGSAER * 50
INTEGER, PARAMETER :: MXCOUNT4 = MXGSAER * 20
INTEGER, PARAMETER :: MXHOLD = 250
PUBLIC DATA MEMBERS:
!---------------------------------------------------------------
! Character variables
!---------------------------------------------------------------
! 2-character variables
CHARACTER(LEN=2 ) :: SPECL(MXCOF)
COMMON /CHAR2/ SPECL
! 14-character scalars
CHARACTER(LEN=4 ) :: DINP
CHARACTER(LEN=14) :: JST
COMMON /CHAR14_0/ DINP, JST
! 14-character arrays #1
CHARACTER(LEN=14) :: XINP(IMISC)
CHARACTER(LEN=14) :: RINP(IMISC)
CHARACTER(LEN=14) :: SINP(IMISC)
COMMON /CHAR14_1/ XINP, RINP, SINP
! 14-character arrays #2
CHARACTER(LEN=14) :: NAMD (NMDEAD)
CHARACTER(LEN=14) :: NAMEMB (IMASBAL)
CHARACTER(LEN=14) :: CHEMTYP(ICS)
COMMON /CHAR14_2/ NAMEMB, CHEMTYP, NAMD
! 14-character arrays #3
CHARACTER(LEN=14) :: NAMESPEC(0:IGAS,ICS)
CHARACTER(LEN=14) :: NAMEGAS (0:IGAS)
CHARACTER(LEN=14) :: NAMENCS (0:MXGSAER,ICS)
COMMON /CHAR14_3/ NAMESPEC, NAMEGAS, NAMENCS
! 14-character arrays #4
CHARACTER(LEN=14) :: NAMEPHOT(NMRPROD,IPHOT)
COMMON /CHAR14_4/ NAMEPHOT
! 80-character variables
CHARACTER(LEN=80) :: HEADING, COMMENT
COMMON /CHAR80/ HEADING, COMMENT
!---------------------------------------------------------------
Source File: comode loop.h, Date: Tue Dec 15 14:07:34 EST 2009 14
! INTEGER and REAL*8 scalars
!---------------------------------------------------------------
INTEGER :: NTSPECGAS, NMASBAL
COMMON /CTLLOOP/ NTSPECGAS, NMASBAL
! /CTLLOOP2/ needs to be declared THREADPRIVATE (bmy, 7/16/03)
INTEGER :: KTLOOP, IFSUN
COMMON /CTLLOOP2/ KTLOOP, IFSUN
REAL*8 :: TINTERVAL, CHEMINTV, TIME, OXYCONS
REAL*8 :: HMAXNIT, FRACDEC
COMMON /XYGRID/ TINTERVAL, CHEMINTV, TIME, OXYCONS,
& HMAXNIT, FRACDEC
INTEGER :: IHOUR, IRCHEM
INTEGER :: NPHOTALL, IFDID, IFNEVER, IFNONE
COMMON /IXYGD/ IHOUR, IRCHEM,
& NPHOTALL, IFDID, IFNEVER, IFNONE
! /IXYGD2/ needs to be held THREADPRIVATE.
INTEGER :: NCSP
COMMON /IXYGD2/ NCSP
REAL*8 :: HMIN
COMMON /DGEAR/ HMIN
! /DGEAR2/ needs to be held THREADPRIVATE (hamid, bmy, 7/16/03)
REAL*8 :: HMAX, R1DELT, DELT, TIMREMAIN
REAL*8 :: XELAPS, TOLD, RDELT, XELAPLAST
REAL*8 :: RMSERR
COMMON /DGEAR2/ HMAX, R1DELT, DELT, TIMREMAIN,
& XELAPS, TOLD, RDELT, XELAPLAST,
& RMSERR
INTEGER :: NSFTOT, NPDTOT, NSTTOT
INTEGER :: IFAILTOT, LFAILTOT, NFAILTOT
COMMON /IGEAR/ NSFTOT, NPDTOT, NSTTOT,
& IFAILTOT, LFAILTOT, NFAILTOT
! /IGEAR2/ has to be declared THREADPRIVATE (bmy, 7/16/03)
INTEGER :: NQQ, NSUBFUN, NPDERIV
INTEGER :: NFAIL, IFAIL, LFAIL
COMMON /IGEAR2/ NQQ, NSUBFUN, NPDERIV,
& NFAIL, IFAIL, LFAIL
INTEGER :: NPHOT, NPRODLO, NPRODHI, MSTEP
INTEGER :: MAXORD, MBETWEEN, IC3H8, IC2H6
Source File: comode loop.h, Date: Tue Dec 15 14:07:34 EST 2009 15
COMMON /CHEM2/ NPHOT, NPRODLO, NPRODHI, MSTEP,
& MAXORD, MBETWEEN, IC3H8, IC2H6
! /CHEM2A/ has to be held THREADPRIVATE (bmy, 7/16/03)
INTEGER :: ISCHAN, NFDH3, NFDL2, NFDH2
INTEGER :: NFDL1, NFDH1, NFDREP, NFDREP1
INTEGER :: NFDL0, NALLR
COMMON /CHEM2A/ ISCHAN, NFDH3, NFDL2, NFDH2,
& NFDL1, NFDH1, NFDREP, NFDREP1,
& NFDL0, NALLR
INTEGER :: NGAS, NMREAC
COMMON /CHEM3/ NGAS, NMREAC
! Added NNADDG to /CHEM4/ for DMS+OH+O2 rxn (bdf, bmy, 4/18/03)
! Add NKN2O5 to /CHEM4/ to flag N2O5 hydrolysis rxn (mje, bmy, 8/7/03)
INTEGER :: NNADD1, NNADDA, NNADDB
INTEGER :: NNADDC, NNADDD, NNADDK
INTEGER :: NNADDV, NNADDZ, NKO3PHOT
INTEGER :: NNADDG, NEMIS, NDRYDEP
INTEGER :: NKHNO4, NKN2O5
COMMON /CHEM4/ NNADD1, NNADDA(ICS), NNADDB( ICS),
& NNADDC(ICS), NNADDD(ICS), NNADDK( ICS),
& NNADDV(ICS), NNADDZ, NKO3PHOT(ICS),
& NNADDG(ICS), NEMIS( ICS), NDRYDEP( ICS),
& NKHNO4(ICS), NKN2O5
INTEGER :: IH2O, IOXYGEN, MB1, MB2
COMMON /SPECIES/ IH2O, IOXYGEN, MB1, MB2
! Added for interannually-varying Methane (bnd, bmy, 7/1/03)
INTEGER :: ICH4
COMMON /SPECIE2/ ICH4
! Added for interannually-varying Methane (bnd, bmy, 7/1/03)
REAL*8 :: C3090S, C0030S, C0030N, C3090N
COMMON /SPECIE3/ C3090S, C0030S, C0030N, C3090N
! Added for tracking oxidation of ISOP by OH (dkh, bmy, 6/1/06)
INTEGER :: ILISOPOH
COMMON /SPECIE4/ ILISOPOH
INTEGER :: IOUT, KGLC, KCPD, IO93
COMMON /FILES/ IOUT, KGLC, KCPD, IO93
!---------------------------------------------------------------
! INTEGER and REAL*8 arrays
!---------------------------------------------------------------
Source File: comode loop.h, Date: Tue Dec 15 14:07:34 EST 2009 16
! Add NKSPECG for DMS+OH+O2 rxn (bdf, bmy, 4/18/03)
INTEGER NMOTH,NTSPEC,JPHOTRAT,ISGAINR,ISPORL,NOGAINE,NOUSE
INTEGER NSPEC,NTRATES,ISGAINE,NTLOOPNCS,NSPCSOLV,ISCHANG,NRATES
INTEGER NM3BOD,ITWOR,ITHRR,INOREP,NRATCUR,NSURFACE,NPRESM,NMAIR
INTEGER NMO2,NMN2,NNEQ,NARR,NABR,NACR,NABC,NKSPECW,NKSPECX
INTEGER NKSPECY,NKSPECZ,NKSPECV,ISLOSSR,NKSPECA,NKSPECB,NKSPECC
INTEGER NKSPECD,NKSPECK,NKSPECG
COMMON /IDICS/
1 NMOTH( ICS), NTSPEC( ICS), JPHOTRAT(ICS),
3 ISGAINR( ICS), ISPORL( ICS), NOGAINE( ICS), NOUSE( ICS),
4 NSPEC( ICS), NTRATES(ICS), ISGAINE( ICS), NTLOOPNCS(ICS),
5 NSPCSOLV(ICS), ISCHANG(ICS), NRATES( ICS), NM3BOD( ICS),
7 ITWOR( ICS), ITHRR( ICS), INOREP( ICS), NRATCUR( ICS),
8 NSURFACE(ICS), NPRESM( ICS), NMAIR( ICS), NMO2( ICS),
9 NMN2( ICS), NNEQ( ICS), NARR( ICS), NABR( ICS),
1 NACR( ICS), NABC( ICS), NKSPECW( ICS), NKSPECX( ICS),
2 NKSPECY( ICS), NKSPECZ(ICS), NKSPECV(MAXGL2,ICS),ISLOSSR(ICS),
3 NKSPECA( MAXGL3,ICS), NKSPECB( MAXGL3,ICS),
4 NKSPECC(MAXGL3,ICS),NKSPECD(MAXGL3,ICS),NKSPECK(MAXGL3,ICS),
5 NKSPECG(MAXGL2,ICS)
! re-define some nkspec* arrays for harvard chem mechanism (bdf)
INTEGER :: NOLOSP, NGNFRAC, NOLOSRAT
INTEGER :: IARRAY, NALLRAT, KZTLO
INTEGER :: KZTHI, IONER, NPLLO
INTEGER :: NPLHI, NFRLO, NFRHI
INTEGER :: NPDLO, NPDHI, IZLO
INTEGER :: JZLO, JLLO, JGLO
INTEGER :: IRMCT
COMMON /IICP/ NOLOSP(ICP), NGNFRAC(ICP), NOLOSRAT(ICP),
& IARRAY(ICP), NALLRAT(ICP), KZTLO( ICP),
& KZTHI( ICP), IONER( ICP), NPLLO( ICP),
& NPLHI( ICP), NFRLO( ICP), NFRHI( ICP),
& NPDLO( ICP), NPDHI( ICP), IZLO ( ICP),
& JZLO ( ICP), JLLO( ICP), JGLO( ICP),
& IRMCT( ICP)
REAL*8 :: ABTOL, ABST2
REAL*8 :: ERRMAX, HMAXUSE, TIMEINTV
COMMON /DICS/ ABTOL(6,ICS), ABST2(ICS),
& ERRMAX(ICS), HMAXUSE(ICP), TIMEINTV(ICS)
REAL*8 :: WTGAS, GQSUMINI
REAL*8 :: BSUMCHEM, GQSUM, QBKGAS
COMMON /DIGAS/ WTGAS(IGAS), GQSUMINI(IGAS),
& BSUMCHEM(IGAS), GQSUM( IGAS), QBKGAS(IGAS)
Source File: comode loop.h, Date: Tue Dec 15 14:07:34 EST 2009 17
REAL*8 :: CPREV, CMODEL, APORL
COMMON /DMXGAER1/ CPREV(MXGSAER), CMODEL(MXGSAER), APORL(MXGSAER)
INTEGER :: IFPRGAS, LGNUM, NGMIX
COMMON /IIGAS/ IFPRGAS(IGAS), LGNUM(IGAS), NGMIX(IGAS)
REAL*8 :: DEFPRAT
COMMON /DIPHOT/ DEFPRAT(MXRATE,ICS)
REAL*8 :: ARRT, BRRT
REAL*8 :: FCVT, FCT1T, FCT2T
COMMON /DMXCOF/ ARRT(MXCOF), BRRT( MXCOF),
& FCVT(MXCOF), FCT1T(MXCOF), FCT2T(MXCOF)
INTEGER :: KCRRT
COMMON /IMXCOF/ KCRRT(MXCOF)
INTEGER NKARR,NKABR,NKACR,NKABC,IRORD
COMMON /INMRAT2/
1 NKARR(NMTRATE,ICS), NKABR(NMTRATE,ICS), NKACR(NMTRATE,ICS),
2 NKABC(NMTRATE,ICS), IRORD(NMTRATE,ICS)
REAL*8 ARR,BRR,FCV,FCTEMP1,FCTEMP2
COMMON /DNMTRATE/
1 ARR( NMTRATE, ICS), BRR( NMTRATE, ICS),
2 FCV( NMTRATE, ICS), FCTEMP1(NMTRATE, ICS),
3 FCTEMP2(NMTRATE, ICS)
INTEGER IAPROD,NOLOSRN,NRUSE,NRREP,NPRODUC,IALLOSN,NCEQUAT
INTEGER NEWFOLD,NKONER,NKTWOR,NKTHRR,IRMA,IRMB,KCRR,LSKIP,IRMC
INTEGER JPHOTNK,IUSED,NOLDFNEW
COMMON /INMTRATE/
2 IAPROD( NMTRATE, ICS), NOLOSRN( NMTRATE, ICS),
3 NRUSE( NMTRATE, ICS), NRREP( NMTRATE, ICS),
4 NPRODUC(NMTRATE, ICS), IALLOSN( MXRATE, ICS),
5 NCEQUAT(NMTRATE, ICS), NOLDFNEW(NMTRATE, ICS),
6 NEWFOLD(NMTRATE*2,ICS), NKONER( NMTRATE, ICS),
7 NKTWOR( NMTRATE, ICS), NKTHRR( NMTRATE, ICS),
9 KCRR( NMTRATE, ICS), LSKIP( MXRATE, ICS),
1 IRMC( NMTRATE ), JPHOTNK( NMTRATE, ICS),
2 IUSED( MXRATE, ICS)
! For COMPAQ, put IRMA, IRMB in /INMTRATE2/ (Q. Liang, bmy, 10/17/05)
COMMON /INMTRATE2/
& IRMA( NMTRATE ), IRMB( NMTRATE )
INTEGER :: NEWNK
COMMON /IMAXGL3/ NEWNK(MAXGL)
Source File: comode loop.h, Date: Tue Dec 15 14:07:34 EST 2009 18
REAL*8 :: FRACP
COMMON /DMAXGL2/ FRACP(MAXGL, ICS)
INTEGER NREACOTH,LGASBINO,NKNLOSP,LOSINACP,IGNFRAC,NKGNFRAC
INTEGER NREACAIR,NREAC3B,NREACEQ,NREQOTH,NREACN2,NREACO2,NREACPM
INTEGER LGAS3BOD,NKSURF,NCOATG
COMMON /IMAXGL2/
1 NREACOTH(MAXGL2,ICS), LGASBINO(MAXGL2,ICS),
2 NKNLOSP( MAXGL3,ICS), LOSINACP(MAXGL3,ICS),
3 IGNFRAC( MAXGL, ICS), NKGNFRAC(MAXGL, ICS),
4 NREACAIR(MAXGL3,ICS), NREAC3B( MAXGL3,ICS),
5 NREACEQ( MAXGL3,ICS), NREQOTH( MAXGL3,ICS),
6 NREACN2( MAXGL3,ICS), NREACO2( MAXGL3,ICS),
7 NREACPM( MAXGL3,ICS), LGAS3BOD(MAXGL3,ICS),
8 NKSURF( MAXGL4 ), NCOATG( MAXGL4 )
INTEGER :: MBCOMP, MBTRACE
COMMON /IIMASBAL/ MBCOMP(IMASBAL,2), MBTRACE(IMASBAL)
! /DKBLOOP2/ needs to be declared THREADPRIVATE
REAL*8 CNEW,CEST,GLOSS,CHOLD,VDIAG,CBLK,DTLOS,EXPLIC,CONC
REAL*8 RRATE,URATE,TRATE,CORIG
COMMON /DKBLOOP2/
2 CNEW( KBLOOP, MXGSAER),
3 CEST( KBLOOP, MXGSAER),
4 GLOSS( KBLOOP, MXGSAER),
5 CHOLD( KBLOOP, MXGSAER),
6 VDIAG( KBLOOP, MXGSAER), CBLK( KBLOOP,MXGSAER),
7 DTLOS( KBLOOP, MXGSAER), EXPLIC(KBLOOP,MXGSAER),
1 CONC( KBLOOP,MXGSAER*7),
2 RRATE( KBLOOP, NMTRATE),
3 URATE( KBLOOP,NMTRATE,3),
4 TRATE( KBLOOP,NMTRATE*2),
7 CORIG( KBLOOP, MXGSAER)
! /DKBLOOP0/ needs to be held THREADPRIVATE
REAL*8 :: CC2
COMMON /DKBLOOP0/ CC2(KBLOOP,0:MXARRAY)
INTEGER NKPHOTRAT,NPPHOTRAT,NKNPHOTRT
COMMON /DIPHOT2/
1 NKPHOTRAT(IPHOT,ICS), NPPHOTRAT(IPHOT,ICS),
2 NKNPHOTRT(IPHOT,ICS)
REAL*8 :: FRACGAIN, QBKCHEM
COMMON /DIMXGS2/ FRACGAIN(MXGSAER,ICS), QBKCHEM( MXGSAER,ICS)
Source File: comode loop.h, Date: Tue Dec 15 14:07:34 EST 2009 19
INTEGER NUMLOST,NUMGFRT,NUMLOSS,JPORL,NUMGAINT,NGAINE,NUMGAIN
INTEGER IGAINR,IPORL,IGAINE,ISOLVSPC,INEWOLD,MAPPL,ISAPORL,NUMPORL
INTEGER ISPARDER,JLOSST
COMMON /IIMXGS2/
1 NUMLOST( MXGSAER, ICS), NUMGFRT( MXGSAER, ICS),
2 NUMLOSS( MXGSAER, ICP), JPORL( MXGSAER,MAXGL, ICS),
3 NUMGAINT(MXGSAER, ICS), NGAINE( MXGSAER, ICS),
4 NUMGAIN( MXGSAER, ICP), IGAINR( MXGSAER, ICS),
9 IPORL( MXGSAER, ICS), IGAINE( MXGSAER, ICS),
2 ISOLVSPC(MXGSAER, ICS), INEWOLD( MXGSAER, ICS),
3 MAPPL( MXGSAER, ICS), ISAPORL( MXGSAER ),
7 NUMPORL( MXGSAER, ICP), ISPARDER(MXGSAER,MXGSAER ),
8 JLOSST( MXGSAER,MAXGL,ICS)
INTEGER JZILCH,KZILCH,MZILCH
COMMON /IGMXGLS/
& JZILCH(MXGSAER), KZILCH(MXGSAER), MZILCH(MXGSAER)
INTEGER LZERO,JARRAYPT,IZILCH,JARRDIAG,JLOZ1,JHIZ1,IJTLO
INTEGER IJTHI,IMZTOT,IFREPRO,IZLO1,IZLO2,IZHI0,IZHI1
COMMON /IGMXGS2/
1 LZERO( MXGSAER,MXGSAER), JARRAYPT(MXGSAER,MXGSAER),
2 IZILCH( MXGSAER,MXGSAER), JARRDIAG(MXGSAER, ICP),
3 JLOZ1( MXGSAER, ICP), JHIZ1( MXGSAER, ICP),
4 IJTLO( MXGSAER, ICP), IJTHI( MXGSAER, ICP),
5 IMZTOT( MXGSAER, ICP), IFREPRO( MXGSAER,MXRATE, ICS),
6 IZLO1( MXGSAER,ICP),
7 IZLO2( MXGSAER,ICP), IZHI0( MXGSAER,ICP), IZHI1( MXGSAER,ICP)
REAL*8 :: FRACNFR, FRACPL
COMMON /DMXCOUN/ FRACNFR(MXCOUNT4), FRACPL(MXCOUNT2)
INTEGER JZERO,KZERO,MZERO,IZEROK,JZEROA,IKDECA,KJDECA,LOSSRA
INTEGER IKDECB,KJDECB,LOSSRB,IKDECC,KJDECC,LOSSRC,IKDECD,KJDECD
INTEGER LOSSRD,IKDECE,KJDECE,LOSSRE,KZEROA,MZEROA,KZEROB,MZEROB
INTEGER KZEROC,MZEROC,KZEROD,MZEROD,KZEROE,MZEROE,IPOSPD,IIALPD
INTEGER NKPDTERM,IJVAL,IKZTOT,JSPNPL,NKNFR,JSPCNFR
COMMON /IMXCOUN/
1 JZERO( MXCOUNT3), KZERO( MXCOUNT3), MZERO( MXCOUNT3),
2 IZEROK(MXCOUNT2), JZEROA( MXCOUNT3),
3 IKDECA(MXCOUNT3), KJDECA( MXCOUNT3), LOSSRA( MXCOUNT4),
4 IKDECB(MXCOUNT3), KJDECB( MXCOUNT3), LOSSRB( MXCOUNT4),
5 IKDECC(MXCOUNT3), KJDECC( MXCOUNT3), LOSSRC( MXCOUNT4),
6 IKDECD(MXCOUNT3), KJDECD( MXCOUNT3), LOSSRD( MXCOUNT4),
7 IKDECE(MXCOUNT3), KJDECE( MXCOUNT3), LOSSRE( MXCOUNT4),
8 KZEROA(MXCOUNT4), MZEROA( MXCOUNT4),
9 KZEROB(MXCOUNT4), MZEROB( MXCOUNT4),
1 KZEROC(MXCOUNT4), MZEROC( MXCOUNT4),
Source File: comode loop.h, Date: Tue Dec 15 14:07:34 EST 2009 20
2 KZEROD(MXCOUNT4), MZEROD( MXCOUNT4),
3 KZEROE(MXCOUNT4), MZEROE( MXCOUNT4),
4 IPOSPD(MXCOUNT2), IIALPD( MXCOUNT2), NKPDTERM(MXCOUNT2),
5 IJVAL( MXCOUNT3), IKZTOT( MXCOUNT4), JSPNPL( MXCOUNT4),
7 NKNFR( MXCOUNT4), JSPCNFR(MXCOUNT4)
INTEGER IDH5,IDH4,IDH3,IDH2,IDH1,IDL5,IDL4,IDL3,IDL2,IDL1,KBH5
INTEGER KBH4,KBH3,KBH2,KBH1,KBL5,KBL4,KBL3,KBL2,KBL1,MBH5,MBH4
INTEGER MBH3,MBH2,MBH1,MBL5,MBL4,MBL3,MBL2,MBL1,NPH5,NPH4,NPH3
INTEGER NPH2,NPH1,NPL5,NPL4,NPL3,NPL2,NPL1
COMMON /IMXCOU2/
1 IDH5( MXCOUNT3), IDH4( MXCOUNT3), IDH3( MXCOUNT3),
2 IDH2( MXCOUNT3), IDH1( MXCOUNT3), IDL5( MXCOUNT3),
3 IDL4( MXCOUNT3), IDL3( MXCOUNT3), IDL2( MXCOUNT3),
4 IDL1( MXCOUNT3),
5 KBH5( MXCOUNT4), KBH4( MXCOUNT4), KBH3( MXCOUNT4),
6 KBH2( MXCOUNT4), KBH1( MXCOUNT4), KBL5( MXCOUNT4),
7 KBL4( MXCOUNT4), KBL3( MXCOUNT4), KBL2( MXCOUNT4),
8 KBL1( MXCOUNT4),
9 MBH5( MXCOUNT4), MBH4( MXCOUNT4), MBH3( MXCOUNT4),
1 MBH2( MXCOUNT4), MBH1( MXCOUNT4), MBL5( MXCOUNT4),
2 MBL4( MXCOUNT4), MBL3( MXCOUNT4), MBL2( MXCOUNT4),
3 MBL1( MXCOUNT4),
4 NPH5( MXCOUNT4), NPH4( MXCOUNT4), NPH3( MXCOUNT4),
5 NPH2( MXCOUNT4), NPH1( MXCOUNT4), NPL5( MXCOUNT4),
6 NPL4( MXCOUNT4), NPL3( MXCOUNT4), NPL2( MXCOUNT4),
7 NPL1( MXCOUNT4)
REAL*8 :: WTMB
COMMON /DIMASBAL2/ WTMB(IMASBAL,MXGSAER,2)
INTEGER :: JMBCOMP
COMMON /IIMASBAL2/ JMBCOMP(IMASBAL,MXGSAER,2)
REAL*8 :: FKOEF
REAL*8 :: FK2
COMMON /DNMRPROD2/ FKOEF(NMRPROD,NMTRATE,ICS),
& FK2( NMRPROD,NMTRATE,ICS)
INTEGER :: IRM
INTEGER :: IRM2
COMMON /INMRPROD2/ IRM( NMRPROD,NMTRATE,ICS),
& IRM2(NMRPROD,NMTRATE,ICS)
REAL*8 :: ASET, PINP, CVAR, O3DOBS
COMMON /DMISC/ ASET(10,8), PINP(20), CVAR(15), O3DOBS(12)
REAL*8 :: ENQQ2, ENQQ3, CONPST
Source File: cmn fj loop.h, Date: Tue Dec 15 14:07:34 EST 2009 21
REAL*8 :: ENQQ1, CONP15
COMMON /IORDR/ ENQQ2(MORDER), ENQQ3( MORDER), CONPST(MORDER),
& ENQQ1(MORDER), CONP15(MORDER)
REAL*8 :: PERTS2, PERTST
COMMON /DMORD/ PERTS2(MORDER,3), PERTST(MORDER,3)
REAL*8 :: XGDFCF, ASTKCF, RUARSL, RH100
COMMON /XARSOL/ XGDFCF, ASTKCF, RUARSL, RH100
INTEGER :: IARSFA, MWARSL, MNTHARS
COMMON /IARSOL/ IARSFA, MWARSL, MNTHARS
INTEGER :: NKEMIS, NTEMIS
INTEGER :: NKDRY, NTDEP
COMMON /IMAXGL4/ NKEMIS(MAXGL3,ICS), NTEMIS(MAXGL3,ICS),
& NKDRY (MAXGL3,ICS), NTDEP( MAXGL3)
!=================================================================
! Declare some common blocks THREADPRIVATE for the OpenMP
! parallelization (bdf, bmy, 4/1/03)
!=================================================================
$OMP THREADPRIVATE( /CHEM2A/ )
$OMP THREADPRIVATE( /CTLLOOP2/ )
$OMP THREADPRIVATE( /DGEAR2/ )
$OMP THREADPRIVATE( /DKBLOOP0/ )
$OMP THREADPRIVATE( /DKBLOOP2/ )
$OMP THREADPRIVATE( /IGEAR2/ )
$OMP THREADPRIVATE( /IXYGD2/ )
#if defined( COMPAQ )
For COMPAQ, declare /INMTRATE2/ threadprivate (Q. Liang, bmy, 10/17/05)
$OMP THREADPRIVATE( /INMTRATE2/ )
#endif
1.1.4 Include File cmn fj.h
Header file containing parameters and common blocks used to interface between Harvardchemistry and UC-Irvine Fast-J photolysis programs.
REMARKS:
Based on code from Oliver Wild (9 Jul 1999)
(1 ) Uses Fortran 90 declarations for parameters and variables
(2 ) Pass CTM size parameters and preprocessor switches via CMN_SIZE.
(3 ) Update JPMAX for new chemistry mechanism (amf, bmy, 4/20/00)
Source File: jv cmn loop.h, Date: Tue Dec 15 14:07:34 EST 2009 22
(4 ) Return JPMAX to original setting (bmy, 9/25/00)
(5 ) Return JPMAX to 55 for peroxy recycling (again) (bmy, 12/20/00)
(6 ) Now need to use the window parameters IIPAR,JJPAR,LLPAR (bmy, 9/25/01)
(7 ) Changed RCS ID tag comment character from "C" to "!" to allow freeform
compilation. (bmy, 6/25/02)
(8 ) Replaced ESIG array with ETAA and ETAB arrays for the hybrid
pressure formulation. Also deleted PREST, since we don’t need that
anymore. (bmy, 8/23/02)
(9 ) Removed ETAA and ETAB arrays. We now compute PJ directly from the
GET_PEDGE routine. (bmy, 10/30/07)
- Bob Yantosca [[email protected]], 30 Oct 2007
REVISION HISTORY:
24 Mar 2009 - R. Yantosca - Columnized and cleaned up
- Now replace LLPAR w/ MAX_COLUMN so as to remove
all references to GEOS-Chem grid sizes.
DEFINED PARAMETERS:
! Number of grid boxes in the vertical column
INTEGER, PARAMETER :: LPAR = MAX_COLUMN
! max # of photolysis rxns = 4 + IPHOT (see comode.h)
INTEGER, PARAMETER :: JPMAX = 55
PUBLIC DATA MEMBERS:
! Variables for number of layers and number of photolysis rxns
INTEGER :: JPNL, JPPJ
COMMON /FJ_INTEG/ JPNL, JPPJ
! Branches for photolysis species
INTEGER :: BRANCH
COMMON /FJ_BRANCH/ BRANCH(JPMAX)
! Names of photolysis species
CHARACTER (LEN=4) :: RNAMES
COMMON /FJ_NAME/ RNAMES(JPMAX)
! Mapping array from Harvard species names to UCI species names
INTEGER :: RINDEX
COMMON /FJ_INDX/ RINDEX(JPMAX)
1.1.5 Include File jv cmn.h
Common blocks for FAST-J code (wild/prather 7/99)
DEFINED PARAMETERS:
Source File: jv cmn loop.h, Date: Tue Dec 15 14:07:34 EST 2009 23
! NB: Number of levels in CTM plus one for above model top
INTEGER, PARAMETER :: NB = LPAR+1
! NC: Number of levels in the fundamental Fast-J grid
INTEGER, PARAMETER :: NC = 2*NB
! NS: Maximum number of species which require J-values calculating
INTEGER, PARAMETER :: NS = 51
! NW: Maximum number of wavelength bins that can be used
INTEGER, PARAMETER :: NW = 15
! NP: Maximum number of aerosol/cloud types that can be used
INTEGER, PARAMETER :: NP = 56
! MX: Number of aerosol/cloud types supplied from CTM
INTEGER, PARAMETER :: MX = 35
! Other parameters for FAST-J
REAL*8, PARAMETER :: RAD = 6375.d5
REAL*8, PARAMETER :: ZZHT = 5.d5
REAL*8, PARAMETER :: dtaumax = 1.d0
REAL*8, PARAMETER :: dtausub = 1.d0
REAL*8, PARAMETER :: dsubdiv = 10.d0
REAL*8, PARAMETER :: szamax = 98.0d0
PUBLIC DATA MEMBERS:
CHARACTER*20 TITLEA(NP)
CHARACTER*78 TITLE0
CHARACTER*7 TITLEJ(3,NS), jlabel(JPMAX)
INTEGER jind(JPMAX),jadsub(nc)
INTEGER NJVAL,NW1,NW2,MIEDX,NAA,NLBATM,npdep,jpdep(NS)
REAL*8 TJ,PJ,DM,DO3,Z,AER,AMF,RFLECT,SZA,U0,TANHT
REAL*8 WBIN,WL,FL,QO2,QO3,Q1D,QQQ,QRAYL,TQQ,FFF,VALJ,WAA,QAA,PAA
REAL*8 RAA,SSA,TREF,OREF,BREF,QBC,DBC,zpdep(NW,3)
REAL*8 zj(LPAR,JPMAX),jfacta(JPMAX)
------------------------------------------------------------------------------
These common blocks MUST NOT be held local (bmy, 5/2/00)
COMMON /TITLS/TITLE0,TITLEJ,TITLEA
COMMON /CCWVL/WBIN(NW+1),WL(NW),FL(NW),QO2(NW,3),QO3(NW,3),
& Q1D(NW,3),QQQ(NW,2,NS-3),QRAYL(NW),TQQ(3,NS),
& WAA(4,NP),QAA(4,NP),
& PAA(8,4,NP),RAA(4,NP),SSA(4,NP),QBC(NW),
& NJVAL,NW1,NW2,NAA,NLBATM
COMMON /CLIM/ TREF(51,18,12),OREF(51,18,12),BREF(51)
%%% NOTE: Removed 3-D arrays ODMDUST and ODAER, since these are now
%%% passed to FAST-J as column arguments (bmy, 3/25/09)
Source File: lai land info.h, Date: Tue Dec 15 14:07:34 EST 2009 24
COMMON /JVALS/jfacta,zpdep,npdep,jpdep,jind,jlabel
COMMON /JVIDX/MIEDX(MX)
------------------------------------------------------------------------------
These common blocks MUST be held local for the parallelization (bmy, 5/2/00)
COMMON /ATMOS/TJ(NB),PJ(NB+1),DM(NB),DO3(NB),DBC(NB),Z(NB),
& AER(MX,NB),AMF(NB,NB),RFLECT,SZA,U0,TANHT
COMMON /JVLOC/zj
COMMON /WLLOC/FFF(NW,lpar),VALJ(NS)
COMMON /JVSUB/jadsub
!=================================================================
! Declare the following common blocks as THREADPRIVATE for the
! OpenMP parallelization on all platforms (bmy, 3/23/03)
!=================================================================
$OMP THREADPRIVATE( /ATMOS/ )
$OMP THREADPRIVATE( /JVLOC/ )
$OMP THREADPRIVATE( /WLLOC/ )
$OMP THREADPRIVATE( /JVSUB/ )
REVISION HISTORY:
25 Mar 2009 - R. Yantosca - Columnized & cleaned up.
- Removed ODMDUST & ODAER
1.1.6 Include File lai land info.h
This include file contains the various dimensions for the leaf-area-index and Olson land typedata.
DEFINED PARAMETERS:
! Number of Olson land types
INTEGER, PARAMETER :: N_OLSON_TYPES = 74
! Max # of Olson land types that can fit into any one grid box
INTEGER, PARAMETER :: N_OLSON_LOCAL = 15
REVISION HISTORY:
24 Mar 2009 - R. Yantosca - Initial version
1.1.7 Include File drydep info.h
Header file containing parameters and arrays for the GEOS-Chem dry deposition routines.These were taken from the input files drydep.coef and drydep.table.
REMARKS:
Source File: drydep info.h, Date: Tue Dec 15 14:07:34 EST 2009 25
NOTE: You should make sure that these values match up with those in
"drydep.coef" and "drydep.table". However, these values are unlikely
to change anytime soon.
Dry deposition land types:
-------------------------------------
1 Snow/Ice (Wesely) - listed first.
2 Deciduous forest (Wesely)
3 Coniferous forest (Wesely)
4 Agricultural land (Wesely)
5 Shrub/grassland (Wesely)
6 Amazon forest (Jacob & Wofsy, JGR 1990)
7 Tundra (Jacob et al., JGR 1992)
8 Desert (Wesely)
9 Wetland (Wesely)
10 Urban (Wesely)
11 Water (Wesely)
DEFINED PARAMETERS:
INTEGER, PARAMETER :: N_DLAND = 11 ! # of drydep land types
INTEGER, PARAMETER :: N_POLY = 20 ! # of Baldocchi coefficients
INTEGER, PARAMETER :: N_VEGTYPE = 74 ! # of Olson land types
INTEGER, PARAMETER :: N_WATER = 6 ! # of Olson types that are water
PUBLIC DATA MEMBERS:
!-----------------------------------------------------------------
! Baldocchi dry deposition coefficients (from "drydep.coef")
!-----------------------------------------------------------------
REAL*8, PARAMETER :: DRYCOEFF(N_POLY) =
& (/ -3.58d-01, 3.02d+00, 3.85d+00, -9.78d-02, -3.66d+00,
& 1.20d+01, 2.52d-01, -7.80d+00, 2.26d-01, 2.74d-01,
& 1.14d+00, -2.19d+00, 2.61d-01, -4.62d+00, 6.85d-01,
& -2.54d-01, 4.37d+00, -2.66d-01, -1.59d-01, -2.06d-01 /)
!-----------------------------------------------------------------
! Resistances (R*) and max drydep velocities (Vsmax) for each of
! the dry deposition land types (from "drydep.table")
!-----------------------------------------------------------------
! Ri
INTEGER, PARAMETER :: IRI(N_DLAND) = (/ 9999, 200, 400, 200,
& 200, 200, 200, 9999,
& 200, 9999, 9999
& /)
! Rlu
INTEGER, PARAMETER :: IRLU(N_DLAND) = (/ 9999, 9000, 9000, 9000,
& 9000, 1000, 4000, 9999,
Source File: drydep info.h, Date: Tue Dec 15 14:07:34 EST 2009 26
& 9000, 9999, 9999
& /)
! Rac
INTEGER, PARAMETER :: IRAC(N_DLAND) = (/ 0, 2000, 2000, 200,
& 100, 2000, 0, 0,
& 300, 100, 0
& /)
! Rgss
INTEGER, PARAMETER :: IRGSS(N_DLAND) = (/ 100, 500, 500, 150,
& 350, 200, 340, 1000,
& 0, 400, 0
& /)
! Rgso
INTEGER, PARAMETER :: IRGSO(N_DLAND) = (/ 3500, 200, 200, 150,
& 200, 200, 340, 400,
& 1000, 300, 2000
& /)
! Rcls
INTEGER, PARAMETER :: IRCLS(N_DLAND) = (/ 9999, 2000, 2000, 2000,
& 2000, 9999, 9999, 9999,
& 2500, 9999, 9999
& /)
! Rclo
INTEGER, PARAMETER :: IRCLO(N_DLAND) = (/ 1000, 1000, 1000, 1000,
& 1000, 9999, 9999, 9999,
& 1000, 9999, 9999
& /)
! Vsmax
INTEGER, PARAMETER :: IVSMAX(N_DLAND) = (/ 100, 100, 100, 100,
& 100, 100, 100, 10,
& 100, 100, 10
& /)
!-----------------------------------------------------------------
! Mapping between dry deposition land types <--> Olson land types
! (from "drydep.table")
!-----------------------------------------------------------------
! Dry deposition landtypes corresponding to Olson landtypes
INTEGER, PARAMETER :: IDEP(N_VEGTYPE) = (/ 11, 10, 5, 1, 1, 1,
& 2, 1, 8, 1, 1, 1,
& 1, 1, 1, 1, 5, 1,
Source File: sea salt info.h, Date: Tue Dec 15 14:07:34 EST 2009 27
& 1, 1, 3, 3, 3, 3,
& 2, 2, 2, 3, 2, 2,
& 4, 4, 2, 6, 1, 1,
& 9, 4, 4, 4, 5, 5,
& 5, 5, 5, 9, 5, 5,
& 5, 5, 8, 8, 5, 7,
& 6, 2, 2, 2, 2, 2,
& 3, 3, 3, 5, 5, 11,
& 11, 11, 11, 8, 1, 8,
& 9, 11 /)
! Indices of Olson Land Types that are water
INTEGER, PARAMETER :: IWATER(N_WATER) = (/ 1, 66, 67,
& 68, 69, 74 /)
REVISION HISTORY:
24 Jun 2009 - R. Yantosca - Initial version
1.1.8 Include File sea salt info.h
Header file containing the min and max radii for the accumulation mode and coarse modesize bins for sea salt aerosols.
DEFINED PARAMETERS:
! Number of sea salt size bins
INTEGER, PARAMETER :: NSALT = 2
! Accumulation mode bin edges [um] min max
REAL*8, PARAMETER :: SALA_REDGE_um(2) = (/ 0.1d0, 0.5d0 /)
! Coarse mode bin edges [um] min max
REAL*8, PARAMETER :: SALC_REDGE_um(2) = (/ 0.5d0, 10.0d0 /)
! Sea salt density [kg/m3] accum coarse
REAL*8, PARAMETER :: SS_DEN(NSALT) = (/ 2200.d0, 2200.d0 /)
REVISION HISTORY:
24 Jun 2009 - R. Yantosca - Initial version
1.2 Fortran: Module Interface gc type mod.f
Module GC TYPE MOD contains derived type definitions for GEOS-Chem. These defini-tions are used to create objects for:
• ID flags for chemical species
Source File: gc type mod.F, Date: Tue Dec 15 14:07:34 EST 2009 28
• ID flags for advected tracers
• Coefficients & other quantities that translate between chemical species and advectedtracers
• ID flags for advected tracers that dry deposit
• Logical flags for selecting the various GEOS-Chem options
• GEOS-Chem columnized meteorological fields and related quantities
INTERFACE:
MODULE GC_TYPE_MOD
USES:
IMPLICIT NONE
PUBLIC
PUBLIC TYPES:
!-----------------------------------------------------------------
! ID flags for SMVGEAR species
!-----------------------------------------------------------------
TYPE :: ID_SPEC
INTEGER :: O3, NO2, NO3, N2O5, HNO4
INTEGER :: Ox, NOx, HC1, NO, HNO2
INTEGER :: CO, PRPE, ISOP, ALK4, C3H8
INTEGER :: PAN, GLPAN, GPAN, PMN, PPN
INTEGER :: HNO3, OH, HO2, H2O2, ACET
INTEGER :: MEK, ALD2, RCHO, MVK, MACR
INTEGER :: ISN2, R4N2, CH2O, C2H6, MP
INTEGER :: DMS, SO2, SO4, MSA, LISOPOH
INTEGER :: DRYO3, DRYPAN, DRYNO2, SO4s
END TYPE ID_SPEC
!-----------------------------------------------------------------
! ID flags for advected tracers
!-----------------------------------------------------------------
TYPE :: ID_TRAC
INTEGER :: NOx, Ox, PAN, CO, ALK4
INTEGER :: ISOP, HNO3, H2O2, ACET, MEK
INTEGER :: ALD2, RCHO, MVK, MACR, PMN
INTEGER :: PPN, R4N2, PRPE, C3H8, CH2O
INTEGER :: C2H6, N2O5, HNO4, MP, DMS
INTEGER :: SO2, SO4, SO4s, MSA, NH3
INTEGER :: NH4, NIT, NITs, BCPI, BCPO
INTEGER :: OCPI, OCPO, ALPH, LIMO, ALCO
INTEGER :: SOG1, SOG2, SOG3, SOG4, SOA1
INTEGER :: SOA2, SOA3, SOA4, DST1, DST2
INTEGER :: DST3, DST4, SALA, SALC
END TYPE ID_TRAC
Source File: gc type mod.F, Date: Tue Dec 15 14:07:34 EST 2009 29
!-----------------------------------------------------------------
! Coefficients & arrays that link species & tracers
!-----------------------------------------------------------------
TYPE :: SPEC_2_TRAC
REAL*8, POINTER :: SPEC_COEF(:,:)
INTEGER, POINTER :: SPEC_ID(:,:)
INTEGER, POINTER :: SPEC_EMITTED(:)
INTEGER, POINTER :: SPEC_PER_TRAC(:)
REAL*8, POINTER :: TRAC_COEF(:)
REAL*8, POINTER :: MOLWT_KG(:)
REAL*8, POINTER :: XNUMOL(:)
END TYPE SPEC_2_TRAC
!-----------------------------------------------------------------
! ID flags for advected tracers that dry deposit
!-----------------------------------------------------------------
TYPE :: ID_DRYD
INTEGER :: NOx, Ox, PAN, HNO3, H2O2
INTEGER :: PMN, PPN, R4N2, CH2O, N2O5
INTEGER :: SO2, SO4, SO4s, MSA, NH3
INTEGER :: NH4, NIT, NITs, BCPI, BCPO
INTEGER :: OCPI, OCPO, ALPH, LIMO, ALCO
INTEGER :: SOG1, SOG2, SOG3, SOG4, SOA1
INTEGER :: SOA2, SOA3, SOA4, DST1, DST2
INTEGER :: DST3, DST4, SALA, SALC
END TYPE ID_DRYD
!-----------------------------------------------------------------
! ID flags for advected tracers that wet deposit
!-----------------------------------------------------------------
TYPE :: ID_WETD
INTEGER :: HNO3, H2O2, CH2O, MP
INTEGER :: SO2, SO4, SO4s, MSA, NH3
INTEGER :: NH4, NIT, NITs, BCPI, OCPI
INTEGER :: BCPO, OCPO, ALPH, LIMO, ALCO
INTEGER :: SOG1, SOG2, SOG3, SOG4, SOA1
INTEGER :: SOA2, SOA3, SOA4, DST1, DST2
INTEGER :: DST3, DST4, SALA, SALC
END TYPE ID_WETD
!-----------------------------------------------------------------
! Logical flags that turn various options on/off
!-----------------------------------------------------------------
TYPE :: GC_OPTIONS
LOGICAL :: USE_ANTHRO
LOGICAL :: USE_ANTHRO_BRAVO
LOGICAL :: USE_ANTHRO_CAC
Source File: gc type mod.F, Date: Tue Dec 15 14:07:34 EST 2009 30
LOGICAL :: USE_ANTHRO_EDGAR
LOGICAL :: USE_ANTHRO_EPA
LOGICAL :: USE_ANTHRO_VISTAS
LOGICAL :: USE_ANTHRO_EMEP
LOGICAL :: USE_BIOGENIC
LOGICAL :: USE_BIOMASS
LOGICAL :: USE_BIOMASS_GFED2
LOGICAL :: USE_CARBON_AEROSOLS
LOGICAL :: USE_CHEMISTRY
LOGICAL :: USE_CONVECTION
LOGICAL :: USE_DEAD_DUST
LOGICAL :: USE_DEBUG_PRINT
LOGICAL :: USE_DRYDEP
LOGICAL :: USE_DUST_AEROSOLS
LOGICAL :: USE_EMISSIONS
LOGICAL :: USE_NOx_AIRCRAFT
LOGICAL :: USE_NOx_LIGHTNING
LOGICAL :: USE_NOx_SOIL
LOGICAL :: USE_PBL_MIXING
LOGICAL :: USE_SEC_ORG_AEROSOLS
LOGICAL :: USE_SHIP_ARCTAS
LOGICAL :: USE_SEASALT_AEROSOLS
LOGICAL :: USE_SULFATE_AEROSOLS
LOGICAL :: USE_WETDEP
END TYPE GC_OPTIONS
!-----------------------------------------------------------------
! Time & date values
!-----------------------------------------------------------------
TYPE :: GC_TIME
INTEGER :: YEAR ! Current year (YYYY)
INTEGER :: MONTH ! Current month (1-12)
INTEGER :: DAY ! Current day (1-31)
INTEGER :: DOY ! Day of year (0-365/366)
INTEGER :: HOUR ! Current hour (0-23)
INTEGER :: MINUTE ! Current minute (0-59)
LOGICAL :: FIRST_TIME ! Is it the first timestep?
REAL*8 :: T_ELAPSED ! Elapsed simulation time
REAL*8 :: TS_DYN ! Dynamic timestep [min]
REAL*8 :: TS_CHEM ! Chemistry timestep [min]
END TYPE GC_TIME
!-----------------------------------------------------------------
! Geographic location
!-----------------------------------------------------------------
TYPE :: GC_GEOLOC
REAL*8 :: LON ! Longitude [degrees]
REAL*8 :: LAT ! Latitude [degrees]
Source File: gc type mod.F, Date: Tue Dec 15 14:07:34 EST 2009 31
REAL*8 :: LOCALTIME ! Local solar time [hrs]
END TYPE GC_GEOLOC
!-----------------------------------------------------------------
! Geographic location
!-----------------------------------------------------------------
TYPE :: GC_DIMS
INTEGER :: N_AER ! # of aerosol tracers
INTEGER :: N_DRYDEP ! # of dry deposited tracers
INTEGER :: N_DUST ! # of dust tracers
INTEGER :: N_RH ! # of RH bins for photolysis
INTEGER :: N_TRACERS ! # of advected tracers
INTEGER :: N_WETDEP ! # of wet deposited tracers
END TYPE GC_DIMS
!-----------------------------------------------------------------
! Column met fields
!-----------------------------------------------------------------
TYPE :: GC_MET_1D
REAL*8 :: ALBD ! Visible surface albedo [unitless]
REAL*8 :: AREA_M2 ! Grid box surface area [cm2]
REAL*8 :: CLDFRC ! Column cloud fraction [unitless]
REAL*8 :: GWETTOP ! Top soil moisture [
REAL*8 :: HFLUX ! Sensible heat flux [W/m2]
REAL*8 :: LWI ! Land/water indices [unitless]
REAL*8 :: PARDR ! Direct photsyn active rad [W/m2]
REAL*8 :: PARDF ! Diffuse photsyn active rad [W/m2]
REAL*8 :: PBLH ! PBL height [m]
REAL*8 :: PRECCON ! Conv precip @ ground [kg/m2/s]
REAL*8 :: PRECTOT ! Total precip @ ground [kg/m2/s]
REAL*8 :: RADSWG ! Solar radiation @ ground [W/m2]
REAL*8 :: SST ! Sea surface temperature [K]
REAL*8 :: SUNCOS ! Cosine of solar zenith angle
REAL*8 :: TROPP ! Tropopause pressure [hPa]
REAL*8 :: TS ! Surface temperature [K]
REAL*8 :: U10M ! E/W wind speed @ 10m height [m/s]
REAL*8 :: USTAR ! Friction velocity [m/s]
REAL*8 :: UVALBEDO ! UV surface albedo [unitless]
REAL*8 :: V10M ! N/S wind speed @ 10m height [m/s]
REAL*8 :: Z0 ! Surface roughness height [m]
REAL*8, POINTER :: AD(:) ! Air mass [kg]
REAL*8, POINTER :: AIRDENS(:) ! Air density [kg/m3]
REAL*8, POINTER :: AIRVOL(:) ! Grid box volume [m3]
REAL*8, POINTER :: BXHEIGHT(:) ! Grid box height [m]
REAL*8, POINTER :: CLDF(:) ! 3-D cloud fraction [unitless]
REAL*8, POINTER :: CMFMC(:) ! Cloud mass flux [kg/m2/s]
REAL*8, POINTER :: DTRAIN(:) ! Detrainment flux [kg/m2/s]
REAL*8, POINTER :: MOISTQ(:) ! Tendency in sp. humidity [kg/kg/s]
Source File: gc emissions type mod.F, Date: Tue Dec 15 14:07:34 EST 2009 32
REAL*8, POINTER :: OPTD(:) ! Visible optical depth [unitless]
REAL*8, POINTER :: PEDGE(:) ! Pressure @ level edges [Pa]
REAL*8, POINTER :: PMID(:) ! Pressure @ level centers [Pa]
REAL*8, POINTER :: RH(:) ! Relative humidity [unitless]
REAL*8, POINTER :: SPHU(:) ! Specific humidity [kg/kg]
REAL*8, POINTER :: T(:) ! Temperature [K]
END TYPE GC_MET_1D
REVISION HISTORY:
24 Mar 2009 - R. Yantosca - Initial version
21 Apr 2009 - R. Yantosca - Renamed from "id_type_mod.f" to
"gc_type_mod.f"; added type GC_OPTIONS
05 Jun 2009 - R. Yantosca - added LISOPOH to ID_SPEC
- added MOLWT, XNUMOL to SPEC_2_TRAC
08 Jul 2009 - R. Yantosca - Added USE_CONVECTION, USE_PBL_MIXING,
USE_WETDEP, USE_EMISSIONS flags to GC_OPTIONS
24 Aug 2009 - R. Yantosca - Added GC_TIME type
30 Oct 2008 - R. Yantosca - Added GC_GEOLOC type
05 Nov 2009 - R. Yantosca - Added GC_MET_1D type
1.3 Fortran: Module Interface gc emissions type mod.f
Module GC EMISSIONS TYPE MOD contains derived type definitions that are specific tothe GEOS-Chem emissions inventories.
INTERFACE:
MODULE GC_EMISSIONS_TYPE_MOD
USES:
USE GC_TYPE_MOD
IMPLICIT NONE
PRIVATE
PUBLIC DATA MEMBERS:
INTEGER, PARAMETER, PUBLIC :: MAX_CHAR = 255 ! Maximum char length
PUBLIC TYPES:
PUBLIC :: GC_EM_3D
PUBLIC :: GC_EM_1D
PUBLIC :: GC_EM_IMPORT
PUBLIC :: GC_EM_EXPORT
PUBLIC :: GC_COL_EXPORT
PUBLIC :: GC_COL_INPUT
Source File: gc emissions type mod.F, Date: Tue Dec 15 14:07:34 EST 2009 33
!------------------------------------------------------------------
! Generic type for individual emission inventories: 3-D data
!------------------------------------------------------------------
TYPE :: GC_EM_3D
INTEGER :: DIM(3) ! # of dimensions for obj
INTEGER :: I1, I2 ! Min & max lon indices
INTEGER :: J1, J2 ! Min & max lat indices
INTEGER :: L1, L2 ! Min & max alt indices
INTEGER :: LOCALPET ! Processor # we are on now
INTEGER :: YEAR ! Year, month, and day
INTEGER :: MONTH ! of the emissions
INTEGER :: DAY ! (Not of the current day!)
REAL*8, POINTER :: DATA(:,:,:) ! Data array
CHARACTER(LEN=MAX_CHAR) :: NAME ! Name of emission species
CHARACTER(LEN=MAX_CHAR) :: UNITS ! Units of emission species
CHARACTER(LEN=MAX_CHAR) :: FILENAME ! Filename /w emission data
LOGICAL :: USE_MASK ! Use geographic mask? (T/F)
END TYPE GC_EM_3D
!------------------------------------------------------------------
! Generic type for individual emission inventories: column data
!------------------------------------------------------------------
TYPE :: GC_EM_1D
INTEGER :: LOCALPET ! Processor # we are on now
INTEGER :: YEAR ! Year, month, and day
INTEGER :: MONTH ! of the emissions
INTEGER :: DAY ! (Not of the current day!)
REAL*8, POINTER :: DATA(:) ! Data array
CHARACTER(LEN=MAX_CHAR) :: NAME ! Name of emission species
CHARACTER(LEN=MAX_CHAR) :: UNITS ! Units of emission species
CHARACTER(LEN=MAX_CHAR) :: FILENAME ! Filename /w emission data
LOGICAL :: USE_MASK ! Use geographic mask? (T/F)
END TYPE GC_EM_1D
!-----------------------------------------------------------------
! Type for the import state of gc_emissions_read_mod.f
!-----------------------------------------------------------------
TYPE :: GC_EM_IMPORT
TYPE(GC_EM_3D) :: DUST_SRC_FN ! Src fn for dust emissions
TYPE(GC_EM_3D) :: E_DUST ! Dust emissions
TYPE(GC_EM_3D) :: E_SOIL ! Soil emissions
TYPE(GC_EM_3D) :: FERTSCL ! Fertilizers
TYPE(GC_EM_3D) :: FRCLND ! Fraction of land in box
TYPE(GC_EM_3D) :: IREG ! # of Olson land types/box
TYPE(GC_EM_3D) :: ILAND ! Olson type indices/box
TYPE(GC_EM_3D) :: IUSE ! Frac of Olson types/box
TYPE(GC_EM_3D) :: LAI ! Leaf area indices
TYPE(GC_EM_3D) :: LAI_DLY ! Daily leaf area indices
Source File: gc emissions type mod.F, Date: Tue Dec 15 14:07:34 EST 2009 34
TYPE(GC_EM_3D) :: SOILPRC ! Soil precipitation
END TYPE GC_EM_IMPORT
!-----------------------------------------------------------------
! Type for the export state of gc_emissions_read_mod.f
! This will be used to create an object for 3-D emissions etc.
!-----------------------------------------------------------------
TYPE :: GC_EM_EXPORT
TYPE(GC_EM_3D), POINTER :: DUST_SRC_FN(:) ! Src fn for dust emissions
TYPE(GC_EM_3D), POINTER :: E_DUST(:) ! Aerosol dust emissions
TYPE(GC_EM_3D) :: E_SOIL ! NOx emiss from soils
TYPE(GC_EM_3D) :: FERTSCL ! Fertilizers
TYPE(GC_EM_3D) :: FRCLND ! Fraction of land in box
TYPE(GC_EM_3D) :: IREG ! # of Olson land types/box
TYPE(GC_EM_3D), POINTER :: ILAND(:) ! Olson type indices/box
TYPE(GC_EM_3D), POINTER :: IUSE(:) ! Frac of Olson types/box
TYPE(GC_EM_3D), POINTER :: LAI(:,:) ! Leaf area indices (LAI)
TYPE(GC_EM_3D), POINTER :: LAI_DLY(:) ! Daily-interpolated LAI
TYPE(GC_EM_3D), POINTER :: SOILPRC(:) ! Soil precipitation
END TYPE GC_EM_EXPORT
!-----------------------------------------------------------------
! Type for passing various inputs down to gc_emissions_mod.f
!-----------------------------------------------------------------
TYPE :: GC_COL_INPUT
INTEGER :: PET ! # of the CPU we are on
TYPE(GC_DIMS), POINTER :: DIMINFO ! Dimension info
TYPE(GC_GEOLOC), POINTER :: GEOLOC ! Lon/lat/localtime info
TYPE(ID_DRYD), POINTER :: IDD ! Drydep species ID flags
TYPE(ID_WETD), POINTER :: IDW ! Wetdep species ID flags
TYPE(ID_SPEC), POINTER :: IDS ! Chem species ID flags
TYPE(ID_TRAC), POINTER :: IDT ! Tracer ID flags
TYPE(GC_OPTIONS), POINTER :: OPTIONS ! Flags for runtime options
TYPE(GC_TIME), POINTER :: TIMING ! Timing info
END TYPE GC_COL_INPUT
!-----------------------------------------------------------------
! Type for the export state of gc_emissions_mod.f
! This will be used to create an object for 1-D emissions etc
!-----------------------------------------------------------------
TYPE :: GC_COL_EXPORT
TYPE(GC_COL_INPUT), POINTER :: INPUT ! Pointer to input fields
TYPE(GC_EM_1D), POINTER :: DUST_SRC_FN(:) ! Dust source function
TYPE(GC_EM_1D), POINTER :: E_DUST(:) ! Dust aerosol emissions
TYPE(GC_EM_1D) :: E_SOIL ! Soil NOx emissions
TYPE(GC_EM_1D) :: FERTSCL ! Fertilizers
TYPE(GC_EM_1D) :: FRCLND ! Fraction of land in box
TYPE(GC_EM_1D) :: IREG ! # of Olson land types/box
Source File: gc interface mod.F, Date: Tue Dec 15 14:07:34 EST 2009 35
TYPE(GC_EM_1D), POINTER :: ILAND(:) ! Olson type indices/box
TYPE(GC_EM_1D), POINTER :: IUSE(:) ! Frac of Olson types/box
TYPE(GC_EM_1D), POINTER :: LAI_DLY(:) ! Daily-interpolated LAI
TYPE(GC_EM_1D), POINTER :: SOILPRC(:) ! Soil precipitation
END TYPE GC_COL_EXPORT
REVISION HISTORY:
20 Aug 2009 - R. Yantosca - Initial version
28 Oct 2009 - R. Yantosca - Added GEOLOC field to GC_COL_EXPORT
12 Nov 2009 - R. Yantosca - Add OPTIONS field to GC_COL_EXPORT
13 Nov 2009 - R. Yantosca - Add DUST_SRC_FN to GC_EM_EXPORT and
GC_COL_EXPORT types
16 Nov 2009 - R. Yantosca - Added E_DUST sub-object to GC_COL_EXPORT
17 Nov 2009 - R. Yantosca - Added LAI_DLY sub-objects to GC_COL_EXPORT
and GC_EM_EXPORT types
1.4 Fortran: Module Interface gc interface mod
Module GC INTERFACE MOD is the interface between the GEOS-Chem model and theGEOS-Chem column code.
NOTE: This is mostly for testing the column code in the current GEOS-Chem. Manyof these inputs will come from the GEOS-5 interface.
INTERFACE:
MODULE GC_INTERFACE_MOD
USES:
USE GC_TYPE_MOD ! Various derived type definitions
USE GC_EMISSIONS_TYPE_MOD ! 3-D and 1-D emissions types
USE SCHEM_MOD, ONLY : SCOX ! 3-D type for simple strat chem
USE SCHEM_MOD, ONLY : SCOX_1d ! 1-D type for simple strat chem
IMPLICIT NONE
PRIVATE
PUBLIC MEMBER FUNCTIONS:
PUBLIC :: GC_INTERFACE
PRIVATE MEMBER FUNCTIONS:
PRIVATE :: ERROR_TRAP
PRIVATE :: GERM_INIT_IMPORT_STATE
PRIVATE :: GET_O3_COLUMN
PRIVATE :: INIT_CSPEC_FULL
REVISION HISTORY:
Source File: gc interface mod.F, Date: Tue Dec 15 14:07:34 EST 2009 36
03 Apr 2009 - R. Yantosca & P. Le Sager - Columnized & cleaned up.
03 Nov 2009 - R. Yantosca - Created emissions internal state
05 Nov 2009 - R. Yantosca - Activated columnized soil NOx emissions
13 Nov 2009 - R. Yantosca - Added routine GERM_INIT_IMPORT_STATE
14 Dec 2009 - R. Yantosca - Now trap errors in the GC_COLUMN_RUN routines
1.4.1 gc interface
Subroutine GC INTERFACE is the driver routine which calls the GEOS-Chem column codedriver. Various quantities from GEOS-Chem are collected here and passed to the columncode via the argument list.
INTERFACE:
SUBROUTINE GC_INTERFACE( H2O2s_init, SO2s_init )
USES:
!-----------------------------------------------------------------
! Routines and variables from GEOS-Chem
!-----------------------------------------------------------------
! GEOS-Chem grid parameters
USE GRID_MOD, ONLY : GET_XMID
USE GRID_MOD, ONLY : GET_YMID
USE GRID_MOD, ONLY : GET_AREA_CM2
! GEOS-Chem logical flags
USE LOGICAL_MOD, ONLY : LAIRNOX, LANTHRO, LARCSHIP
USE LOGICAL_MOD, ONLY : LBIOFUEL, LBIOGENIC, LBIOMASS
USE LOGICAL_MOD, ONLY : LBRAVO, LCAC, LCARB
USE LOGICAL_MOD, ONLY : LCHEM, LCONV, LDEAD
USE LOGICAL_MOD, ONLY : LDRYD, LDUST, LGFED2BB
USE LOGICAL_MOD, ONLY : LEDGAR, LEMEP, LEMIS
USE LOGICAL_MOD, ONLY : LLIGHTNOx, LNEI99, LPRT
USE LOGICAL_MOD, ONLY : LSOA, LSOILNOX, LSSALT
USE LOGICAL_MOD, ONLY : LSULF, LTURB, LVISTAS
USE LOGICAL_MOD, ONLY : LWETD
! GEOS-Chem tracers and related quantities
USE TRACER_MOD, ONLY : N_TRACERS
USE TRACER_MOD, ONLY : STT
USE TRACER_MOD, ONLY : TCVV
USE TRACER_MOD, ONLY : XNUMOL
USE TRACER_MOD, ONLY : TRACER_NAME
USE TRACERID_MOD, ONLY : SETTRACE
USE TRACERID_MOD, ONLY : IDEMIS
Source File: gc interface mod.F, Date: Tue Dec 15 14:07:34 EST 2009 37
! GEOS-Chem met fields and pressure quantities
USE DAO_MOD, ONLY : CLDF, DELP, SPHU
USE DAO_MOD, ONLY : OPTDEP, OPTD, T
USE DAO_MOD, ONLY : AD, AIRVOL, ALBD
USE DAO_MOD, ONLY : BXHEIGHT, SUNCOS, RH
USE DAO_MOD, ONLY : TROPP, GWETTOP, Z0
USE DAO_MOD, ONLY : PARDF, PARDR, CLDFRC
USE DAO_MOD, ONLY : RADSWG, HFLUX, USTAR
USE DAO_MOD, ONLY : TS, U10M, V10M
USE DAO_MOD, ONLY : PBL, LWI, MOISTQ
USE DAO_MOD, ONLY : PREACC, PRECON, CMFMC
USE DAO_MOD, ONLY : CMFMC, DTRAIN
USE OPTDEPTH_MOD, ONLY : OPTDEPTH
USE PRESSURE_MOD, ONLY : GET_PCENTER
USE PRESSURE_MOD, ONLY : GET_PEDGE
USE PBL_MIX_MOD, ONLY : GET_PBL_TOP_hPa
USE PBL_MIX_MOD, ONLY : GET_PBL_TOP_m
USE PBL_MIX_MOD, ONLY : GET_FRAC_UNDER_PBLTOP
! GEOS-Chem time/date functions
USE TIME_MOD, ONLY : GET_MONTH
USE TIME_MOD, ONLY : GET_YEAR
USE TIME_MOD, ONLY : GET_DAY
USE TIME_MOD, ONLY : GET_DAY_OF_YEAR
USE TIME_MOD, ONLY : GET_HOUR
USE TIME_MOD, ONLY : GET_MINUTE
USE TIME_MOD, ONLY : GET_LOCALTIME
USE TIME_MOD, ONLY : GET_TS_CHEM
USE TIME_MOD, ONLY : GET_TS_DYN
USE TIME_MOD, ONLY : GET_ELAPSED_MIN
USE TIME_MOD, ONLY : GET_TAUe
USE TIME_MOD, ONLY : GET_TAU
! GEOS-Chem tropopause
USE TROPOPAUSE_MOD, ONLY : ITS_IN_THE_TROP
! GEOS-Chem routines for internal state w/ 3D emissions fields
USE GC_EMISSIONS_READ_MOD, ONLY : GC_EMISSIONS_READ_INIT
USE GC_EMISSIONS_READ_MOD, ONLY : GC_EMISSIONS_READ_RUN
USE GC_EMISSIONS_READ_MOD, ONLY : GC_EMISSIONS_READ_FINAL
! GEOS-Chem routines for internal state w/ 1D emissions fields
USE GC_EMISSIONS_MOD, ONLY : GC_EMISSIONS_INIT
USE GC_EMISSIONS_MOD, ONLY : GC_EMISSIONS_RUN
USE GC_EMISSIONS_MOD, ONLY : GC_EMISSIONS_FINAL
! GEOS-Chem emissions and deposition
Source File: gc interface mod.F, Date: Tue Dec 15 14:07:34 EST 2009 38
USE ACETONE_MOD, ONLY : OCEAN_SOURCE_ACET
USE ACETONE_MOD, ONLY : EMISS_BIOACET
USE AIRCRAFT_NOX_MOD, ONLY : EMIS_AC_NOX
USE BIOMASS_MOD, ONLY : BIOMASS
USE BIOFUEL_MOD, ONLY : BIOFUEL
USE CANOPY_NOX_MOD, ONLY : GET_CANOPY_NOx
USE LIGHTNING_NOX_MOD, ONLY : EMIS_LI_NOX
USE SOIL_NOX_MOD, ONLY : SOIL_NOX_EMISSION
USE WETSCAV_MOD, ONLY : GET_WETDEP_NSOL
USE WETSCAV_MOD, ONLY : GET_WETDEP_IDWETD
! GEOS-Chem setup routines for photolysis
USE TOMS_MOD, ONLY : READ_TOMS
USE TOMS_MOD, ONLY : TOMS
USE TOMS_MOD, ONLY : DTOMS1
USE TOMS_MOD, ONLY : DTOMS2
USE UVALBEDO_MOD, ONLY : UVALBEDO
! GEOS-Chem simple strat chem
USE SCHEM_MOD, ONLY : INIT_SCHEM
USE SCHEM_MOD, ONLY : CLEANUP_SCHEM
! GEOS-Chem utility functions
USE ERROR_MOD, ONLY : DEBUG_MSG
! GEOS-Chem directory structure
USE DIRECTORY_MOD
!-----------------------------------------------------------------
! Columnized routines
!-----------------------------------------------------------------
! Column chemistry
USE GC_COLUMN_MOD, ONLY : GC_COLUMN_INIT
USE GC_COLUMN_MOD, ONLY : GC_COLUMN_RUN
USE GC_COLUMN_MOD, ONLY : GC_COLUMN_FINAL
! Column emissions
USE MEGAN_COL_MOD, ONLY : GET_EMMBO_MEGAN_BOX
USE MEGAN_COL_MOD, ONLY : GET_EMMONOT_MEGAN_BOX
USE MEGAN_COL_MOD, ONLY : GET_EMISOP_MEGAN_BOX
USE DUST_MOD, ONLY : EMISSDUST_BOX
! Simple stratospheric chemistry
USE SCHEM_MOD, ONLY : SCHEM_READ_GC
USE SCHEM_MOD, ONLY : GET_SCHEM_DATA_1d
USE SCHEM_MOD, ONLY : INIT_SCHEM_1d
USE SCHEM_MOD, ONLY : CLEANUP_SCHEM_1d
Source File: gc interface mod.F, Date: Tue Dec 15 14:07:34 EST 2009 39
!-----------------------------------------------------------------
! Routines and variables for the internal state
!-----------------------------------------------------------------
! For aerosol chemistry
USE CARBON_MOD, ONLY : GET_1D_CARBON
USE CARBON_MOD, ONLY : SET_1D_CARBON
USE SEASALT_MOD, ONLY : GET_1D_SEASALT
USE DUST_INPUT_MOD, ONLY : SRC_FUNCTION_GINOUX
! For MEGAN biogenic emissions
USE LAI_MOD, ONLY : ISOLAI_2D => ISOLAI
USE LAI_MOD, ONLY : MISOLAI_2D => MISOLAI
USE LAI_MOD, ONLY : PMISOLAI_2D => PMISOLAI
USE LAI_MOD, ONLY : DAYS_BTW_M
USE MEGAN_MOD, ONLY : AEF_ISOP_2D => AEF_ISOP
USE MEGAN_MOD, ONLY : AEF_MONOT_2D => AEF_MONOT
USE MEGAN_MOD, ONLY : AEF_MBO_2D => AEF_MBO
USE MEGAN_MOD, ONLY : T_15_AVG_2D => T_15_AVG
! For acetone
USE ACETONE_INPUT_MOD, ONLY : READ_RESP
USE ACETONE_INPUT_MOD, ONLY : READ_JO1D
!-----------------------------------------------------------------
! GEOS-Chem diagnostics (for code testing!)
!-----------------------------------------------------------------
USE DIAG_MOD, ONLY : AD44
USE DIAG_MOD, ONLY : AD39
USE ERROR_MOD, ONLY : IT_IS_NAN
!-----------------------------------------------------------------
! OpenMP external functions
!-----------------------------------------------------------------
USE OMP_LIB
IMPLICIT NONE
# include "CMN_SIZE" ! Size parameters
# include "CMN_O3_loop" ! EMISRR, EMISRRN
# include "smv_dimension.h" ! Dimensions for common blocks
# include "comode_loop.h" ! SMVGEAR common blocks
# include "CMN_DEP" ! FRCLND
# include "smv_errcode.h" ! Error codes
# include "CMN_DIAG" ! ND44, ND39, LD39
# include "bmy_debug.h" !### FOR DEBUGGING ONLY! ###
Source File: gc interface mod.F, Date: Tue Dec 15 14:07:34 EST 2009 40
INPUT PARAMETERS:
REAL*8, INTENT(IN) :: H2O2s_init(:,:,:) ! Initial values of H2O2s and
REAL*8, INTENT(IN) :: SO2s_init(:,:,:) ! SO2s from main.f [v/v]
REVISION HISTORY:
03 Apr 2009 - R. Yantosca & P. Le Sager - Columnized & cleaned up.
24 Aug 2009 - R. Yantosca - Added emissions internal state
05 Oct 2009 - P. Le Sager - Made TIMING & EM_DATA_1d firstprivate for OMP
20 Oct 2009 - R. Yantosca - Now compute TO3 here
21 Oct 2009 - R. Yantosca - Now add Mean OH fields to internal state
03 Nov 2009 - R. Yantosca - Fixes for EM_DATA_1d object in OMP loop
03 Nov 2009 - R. Yantosca - Now use LAI, IREG, ILAND, IUSE, FRCLND,
SOILFRT, SOILPRC from the EM_DATA_1d object
03 Nov 2009 - R. Yantosca - Activated the derived type objects EM_DATA_3d
(for emissions internal state) and EM_DATA_1d
(for passing emissions to column code).
03 Nov 2009 - R. Yantosca - Removed references to some header files
03 Nov 2009 - R. Yantosca - Updated comments
05 Nov 2009 - R. Yantosca - Activated columnized soil NOx emissions
06 Nov 2009 - R. Yantosca - Now pass column met fields to GC_COLUMN_RUN
via the MET_1d derived type object
12 Nov 2009 - R. Yantosca - Now create a INPUT object to point to the
individual TIMING, GEOLOC, OPTIONS, ID_*
objects. This is passed down to the routine
GC_EMISSIONS_INIT so that a pointer reference
to it can be made in the EM_DATA_1d%INPUT field.
This is an efficient way to pass down the
various inputs to the 1-D emissions code.
13 Nov 2009 - R. Yantosca - Now define the EM_IMPORT object (which is the
import state to the GC_EMISSIONS_READ_INIT
method) with routine GERM_INIT_IMPORT_STATE.
17 Nov 2009 - R. Yantosca - Simplify emissions internal-state objects.
Fields in EM_DATA_1D now just points to
the memory allocated the corresponding fields
of EM_DATA_3D.
1.4.2 read sst
Subroutine READ SST reads monthly mean sea surface temperatures. Original GEOS-Chem code written by Rokjin Park.
INTERFACE:
SUBROUTINE READ_SST( THISMONTH, THISYEAR, SSTEMP )
USES:
Source File: gc interface mod.F, Date: Tue Dec 15 14:07:34 EST 2009 41
! References to F90 modules
USE BPCH2_MOD, ONLY : GET_NAME_EXT_2D, GET_RES_EXT
USE BPCH2_MOD, ONLY : GET_TAU0, READ_BPCH2
USE DIRECTORY_MOD, ONLY : DATA_DIR, DATA_DIR_1x1
USE REGRID_1x1_MOD, ONLY : DO_REGRID_1x1
USE TRANSFER_MOD, ONLY : TRANSFER_2D
IMPLICIT NONE
# include "CMN_SIZE" ! Size parameters
INPUT PARAMETERS:
! Current month & year
INTEGER, INTENT(IN) :: THISMONTH, THISYEAR
OUTPUT PARAMETERS:
! Sea surface temperature [K]
REAL*8, INTENT(OUT) :: SSTEMP(IIPAR,JJPAR)
REVISION HISTORY:
03 Apr 2009 - R. Yantosca & P. Le Sager - Columnized & cleaned up.
1.4.3 get o3 column
This routine returns a resultant total overhead O3 column from the TOMS data for a givenday of the month.
INTERFACE:
SUBROUTINE GET_O3_COLUMN( DAY, TOMS, DTOMS1, DTOMS2, TO3, RC )
USES:
IMPLICIT NONE
# include "smv_errcode.h"
INPUT PARAMETERS:
! Day of month
INTEGER, INTENT(IN) :: DAY
! TOMS overhead O3 column [DU]
REAL*8, INTENT(IN) :: TOMS
! Rate of change of TOMS O3 column, 1st half of month [DU/day]
REAL*8, INTENT(IN) :: DTOMS1
! Rate of change of TOMS O3 column, 2nd half of month [DU/day]
REAL*8, INTENT(IN) :: DTOMS2
Source File: gc interface mod.F, Date: Tue Dec 15 14:07:34 EST 2009 42
OUTPUT PARAMETERS:
! Resultant total overhead column [DU]
REAL*8, INTENT(OUT) :: TO3
! Error code
INTEGER, INTENT(OUT) :: RC
REMARKS:
Reference for the TOMS/SBUV merged O3 columns:
1985 - 2005 are taken from:
http://code916.gsfc.nasa.gov/Data_services/merged/index.html
TOMS/SBUV MERGED TOTAL OZONE DATA, Version 8, Revision 3.
Resolution: 5 x 10 deg.
Contact person for the merged data product:
Stacey Hollandsworth Frith ([email protected])
2006 and 2007 are taken from:
http://code916.gsfc.nasa.gov/Data_services/merged/index.html
Version 8 Merged Ozone Data Sets
Revision 04
DATA THROUGH: SEP 2008
LAST MODIFIED: 20 OCT 2008
REVISION HISTORY:
20 Oct 2009 - R. Yantosca - Initial version, pulled code out from
the FAST-J routine SET_PROF.
1.4.4 error trap
This routine stops the run and prints the name of the offending routine if an error conditionis returned.
INTERFACE:
SUBROUTINE ERROR_TRAP( I, J, RC )
USES:
IMPLICIT NONE
# include "smv_errcode.h"
Source File: gc interface mod.F, Date: Tue Dec 15 14:07:34 EST 2009 43
INPUT PARAMETERS:
! Grid box lon & lat indices
INTEGER, INTENT(IN) :: I, J
! Error code
INTEGER, INTENT(IN) :: RC
REVISION HISTORY:
22 Jun 2009 - R. Yantosca - Initial version
15 Jul 2009 - R. Yantosca - Updated for drydep, wetdep, PBL mixing
24 Aug 2009 - R. Yantosca - Updated for emissions reader etc. routines
03 Nov 2009 - R. Yantosca - Now trap error in the GC_INTERFACE
03 Nov 2009 - R. Yantosca - Cosmetic changes
14 Dec 2009 - R. Yantosca - Now trap errors in the GC_COLUMN routines
1.4.5 init cspec full
Subroutine INIT CSPEC FULL initializes the CSPEC FULL array, which is the internalstate array that holds the chemical concentrations from the previous timestep. The initialvalues come from the ”globchem.dat” file.
INTERFACE:
SUBROUTINE INIT_CSPEC_FULL( IMX, JMX, LMX,
& N_GAS, FRCLND, PMID,
& T, ITS_TROP, CSPEC_FULL )
# include "smv_dimension.h" ! Dimensions for arrays
# include "comode_loop.h" ! SMVGEAR common blocks
# include "smv_errcode.h" ! Error codes
INPUT PARAMETERS:
! Number of longitude, latitude, altitudes
INTEGER, INTENT(IN) :: IMX, JMX, LMX
! Number of gas species
INTEGER, INTENT(IN) :: N_GAS
! Land fraction
REAL*8, INTENT(IN) :: FRCLND(IMX,JMX)
! Pressure at the center of each box [Pa]
REAL*8, INTENT(IN) :: PMID(IMX,JMX,LMX)
! Temperature [K]
REAL*8, INTENT(IN) :: T(IMX,JMX,LMX)
Source File: gc interface mod.F, Date: Tue Dec 15 14:07:34 EST 2009 44
! Temperature [K]
LOGICAL, INTENT(IN) :: ITS_TROP(IMX,JMX,LMX)
INPUT/OUTPUT PARAMETERS:
! Array to save chemical concentrations
REAL*8, INTENT(INOUT) :: CSPEC_FULL(IMX,JMX,LMX,N_GAS)
!LOCAL VARIABLES
INTEGER :: IX, IY, IZ, JGAS
REAL*8 :: CONST
REVISION HISTORY:
03 Apr 2009 - R. Yantosca - Initial version
06 Nov 2009 - R. Yantosca - Change units of PMID from [hPa] to [Pa],
and also modify equation for CONST accordingly.
1.4.6 print mean oh
Subroutine PRINT MEAN OH prints the average mass-weighted OH concentration at theend of a simulation.
INTERFACE:
SUBROUTINE PRINT_MEAN_OH( AIR_MASS, OH_MASS )
INPUT PARAMETERS:
REAL*8, INTENT(IN) :: AIR_MASS(:,:,:) ! Air mass [molec air]
REAL*8, INTENT(IN) :: OH_MASS(:,:,:) ! Mass-weighted OH
! [molec OH/cm3 * molec air]
REVISION HISTORY:
03 Apr 2009 - R. Yantosca - Initial version
1.4.7 germ init import state
Subroutine GERM INIT IMPORT STATE initializes the import state object (which con-tains information about the size, name, units, and file names) for the 3-D quantities thatcomprise the emissions internal-state. The import-state object is passed as input to routineGC EMISSIONS READ INIT.
INTERFACE:
SUBROUTINE GERM_INIT_IMPORT_STATE( IX , JX,
& LX, LOCALPET,
& DATA_DIR, DATA_DIR_1x1,
& IS, RC )
Source File: acetone mod.F, Date: Tue Dec 15 14:07:34 EST 2009 45
USES:
# include "lai_land_info.h" ! Landtype parameters
# include "smv_errcode.h" ! Error codes
INPUT PARAMETERS:
INTEGER, INTENT(IN) :: IX, JX, LX ! Dimensions
INTEGER, INTENT(IN) :: LOCALPET ! Processor #
CHARACTER(LEN=*), INTENT(IN) :: DATA_DIR ! 4x5 data dir
CHARACTER(LEN=*), INTENT(IN) :: DATA_DIR_1x1 ! 1x1 data dir
INPUT/OUTPUT PARAMETERS:
TYPE(GC_EM_IMPORT), INTENT(INOUT) :: IS ! Import state
OUTPUT PARAMETERS:
INTEGER, INTENT(OUT) :: RC ! Error code
REMARKS:
This is hardwired for GEOS-Chem. A similar process would be done at this
interface level when we couple the column code to the GEOS-5 GCM. The
basic idea is that the inputs should be defined here at the interface
level and not at a lower-down level. This allows us to keep things
very general. (bmy, 11/13/09)
REVISION HISTORY:
13 Nov 2009 - R. Yantosca - Initial version
1.5 Fortran: Module Interface acetone mod.f
Module ACETONE MOD contains subroutines to emit the biogenic flux of acetone intothe full chemistry simulation. Original GEOS-Chem code written by Brendan Field.
INTERFACE:
MODULE ACETONE_MOD
USES:
IMPLICIT NONE
PRIVATE
PUBLIC MEMBER FUNCTIONS:
PUBLIC :: EMISS_BIOACET
PUBLIC :: OCEAN_SINK_ACET
PUBLIC :: OCEAN_SOURCE_ACET
REMARKS:
Source File: acetone mod.F, Date: Tue Dec 15 14:07:34 EST 2009 46
References:
============================================================================
(1 ) Jacob, D.J., B.D. Field, E. Jin, I. Bey, Q. Li, J.A. Logan, and
R.M. Yantosca, "Atmospheric budget of acetone", Geophys. Res. Lett.,
107(D11), 4100, 2002.
(2 ) Nightingale et al [2000a], J. Geophys. Res, 14, 373-387
(3 ) Nightingale et al [2000b], Geophys. Res. Lett, 27, 2117-2120
REVISION HISTORY:
28 Apr 2009 - P. Le Sager & R. Yantosca - Columnized and cleaned up.
1.5.1 ocean source acet
Subroutine OCEAN SOURCE ACET specifies the ocean source of acetone. Original GEOS-Chem code written by Brendan Field.
INTERFACE:
SUBROUTINE OCEAN_SOURCE_ACET( ACETONE, JO1D, AREA_CM2, ALBD,
& FRCLND, TEMP, TS_CHEM, U10M,
& V10M, RC )
USES:
# include "smv_errcode.h" ! Error codes
INPUT PARAMETERS:
! J-Values for O1D [s-1]
REAL*8, INTENT(IN) :: JO1D
! Grid box area [cm2]
REAL*8, INTENT(IN) :: AREA_CM2
! Albedo
REAL*8, INTENT(IN) :: ALBD
! Land fraction [-]
REAL*8, INTENT(IN) :: FRCLND
! Temperature [K]
REAL*8 :: TEMP
! Chemistry timestep [min]
REAL*8, INTENT(IN) :: TS_CHEM
Source File: acetone mod.F, Date: Tue Dec 15 14:07:34 EST 2009 47
! Wind the anemometer level (10meters) [m/s]
REAL*8, INTENT(IN) :: U10M, V10M
INPUT/OUTPUT PARAMETERS:
! Acetone emission at grid box [atoms C/box/s]
REAL*8, INTENT(INOUT) :: ACETONE
OUTPUT PARAMETERS:
! Return code
INTEGER, INTENT(OUT) :: RC
REVISION HISTORY:
5 May 2009 - P. Le Sager - Columnized.
1.5.2 ocean sink acet
Subroutine OCEAN SINK ACET applies the ocean sink to global acetone concentrations.Original GEOS-Chem code written by Brendan Field.
INTERFACE:
SUBROUTINE OCEAN_SINK_ACET( ACETONE, AIRVOL, AREA_CM2, ALBD,
& FRCLND, TEMP, TS_CHEM, U10M,
& V10M, RC )
USES:
# include "smv_errcode.h" ! Error codes
INPUT PARAMETERS:
! Air Volume in surface box [m3]
REAL*8, INTENT(IN) :: AIRVOL
! Grid box area [cm2]
REAL*8, INTENT(IN) :: AREA_CM2
! Albedo
REAL*8, INTENT(IN) :: ALBD
! Land fraction [-]
REAL*8, INTENT(IN) :: FRCLND
! Temperature [K]
REAL*8 :: TEMP
Source File: acetone mod.F, Date: Tue Dec 15 14:07:34 EST 2009 48
! Chemistry timestep [min]
REAL*8, INTENT(IN) :: TS_CHEM
! Wind the anemometer level (10meters) [m/s]
REAL*8, INTENT(IN) :: U10M, V10M
INPUT/OUTPUT PARAMETERS:
! Tracer concentrations [kg C]
REAL*8, INTENT(INOUT) :: ACETONE
OUTPUT PARAMETERS:
! Return code
INTEGER, INTENT(OUT) :: RC
REMARKS:
Older comments:
(3 ) Now declare OCEANSINK_SCALE = 0.15 as a parameter. This is the
optimized value of BETA from Emily Jin’s analysis. Also updated
comments. (bdf, bmy, 9/5/01)
(6 ) Bug fix: Zero the ocean sink of acetone in grid boxes where there
is less than 50% of ocean, and where there is ice on the surface.
Bug fix: Make sure -5 <= TC <= 30, in order to prevent the power
series for Schmidt # from going negative. Also eliminate IREF,
JREF, we don’t need them. (mje, rvm, bmy, 11/26/01)
(12) Now use Nightingale et al 2000b formulation for piston velocity KL.
(swu, bmy, 8/16/05)
REVISION HISTORY:
27 Apr 2009 - P. Le Sager - Columnized.
1.5.3 emiss bioacet
Subroutine EMISS BIOACET computes the biogenic emissions of ACETONE from monoter-penes, isoprene, methyl butenol, dry leaf matter, and grasslands. Original GEOS-Chemcode written by Brendan Field.
INTERFACE:
SUBROUTINE EMISS_BIOACET( LAT, LON, AREA_CM2, TS_EMIS,
& XRESP, TMMP, EMMO, EMIS,
& EMMB, GRASS, ACETONE, RC )
USES:
# include "smv_errcode.h" ! Error codes
Source File: carbon mod.F, Date: Tue Dec 15 14:07:34 EST 2009 49
INPUT PARAMETERS:
! Latitude [degrees]
REAL*8, INTENT(IN) :: LAT
! Longitude [degrees]
REAL*8, INTENT(IN) :: LON
! Surface area of column [cm2]
REAL*8, INTENT(IN) :: AREA_CM2
! Emissions timestep [minutes]
REAL*8, INTENT(IN) :: TS_EMIS
! Heterotrophic respiration [g C/m2/s]
REAL*8, INTENT(IN) :: XRESP
! Surface temperature [K]
REAL*8, INTENT(IN) :: TMMP
! Monoterpene emission [atoms C/emission timestep]
REAL*8, INTENT(IN) :: EMMO
! Isoprene emission [atoms C/emission timestep]
REAL*8, INTENT(IN) :: EMIS
! Methyl butenol emission [atoms C/emission timestep]
REAL*8, INTENT(IN) :: EMMB
! Isoprene emission from grasslands [atoms C/emission timestep]
REAL*8, INTENT(IN) :: GRASS
INPUT/OUTPUT PARAMETERS:
! Total biogenic acetone emission [atoms C/box/s]
REAL*8, INTENT(INOUT) :: ACETONE
OUTPUT PARAMETERS:
INTEGER, INTENT(OUT) :: RC
REVISION HISTORY:
6 May 2009 - P. Le Sager - Columnized.
1.6 Fortran: Module Interface seasalt mod.f
Module SEASALT MOD contains arrays and routines for emitting sea salt aerosols. Orig-inal code taken from Mian Chin’s GOCART model and modified accordingly by Becky
Source File: seasalt mod.F, Date: Tue Dec 15 14:07:34 EST 2009 50
Alexander et al.
References:
1. Chin, M., P. Ginoux, S. Kinne, B. Holben, B. Duncan, R. Martin, J. Logan, A. Hig-urashi, and T. Nakajima, Tropospheric aerosol optical thickness from the GOCART
model and comparisons with satellite and sunphotometers measurements, J. Atmos Sci.,2001.
2. Gong, S., L. Barrie, and J.-P. Blanchet, Modeling sea-salt aerosols in the atmosphere.
1. Model development, J. Geophys. Res., 102, 3805-3818, 1997.
INTERFACE:
MODULE SEASALT_MOD
USES:
IMPLICIT NONE
PRIVATE
PUBLIC MEMBER FUNCTIONS:
PUBLIC :: EMISSSEASALT
PUBLIC :: CLEANUP_SEASALT
PUBLIC :: GET_ALK
PUBLIC :: GET_1D_SEASALT
PUBLIC :: INIT_SEASALT
REMARKS:
Seasalt aerosol species: (1) Accumulation mode (0.1 - 0.5 um)
(2) Coarse mode (0.5 - 10.0 um)
The size bin definitions for accumulation & coarse modes are contained
in the include file "sea_salt_info.h"
REVISION HISTORY:
12 Jun 2009 - P. Le Sager & R. Yantosca - Columnized and cleaned up.
1.6.1 emissseasalt
Subroutine Emissseasalt is the interface between the GEOS-CHEM model and the SEASALTemissions routines. Original GEOS-Chem code written by Becky Alexander and RokjinPark.
INTERFACE:
SUBROUTINE EMISSSEASALT
USES:
Source File: seasalt mod.F, Date: Tue Dec 15 14:07:34 EST 2009 51
! References to F90 modules
USE ERROR_MOD, ONLY : DEBUG_MSG
USE LOGICAL_MOD, ONLY : LPRT
USE TRACER_MOD, ONLY : STT
USE TRACERID_MOD, ONLY : IDTSALA, IDTSALC
# include "CMN_SIZE" ! Size parameters
REVISION HISTORY:
12 Jun 2009 - R. Yantosca & P. Le Sager - Columnized & cleaned up.
1.6.2 srcsalt
Subroutine SRCSALT updates the surface mixing ratio of dry sea salt aerosols for NSALTsize bins. The generation of sea salt aerosols has been parameterized following Monahan etal. [1986] parameterization as described by Gong et al. [1997].
INTERFACE:
SUBROUTINE SRCSALT( TC, N )
USES:
USE DAO_MOD, ONLY : PBL, AD, IS_WATER, AIRVOL
USE DIAG_MOD, ONLY : AD08
USE ERROR_MOD, ONLY : DEBUG_MSG, ERROR_STOP
USE GRID_MOD, ONLY : GET_AREA_M2
USE PBL_MIX_MOD, ONLY : GET_FRAC_OF_PBL, GET_PBL_TOP_L
USE TIME_MOD, ONLY : GET_TS_EMIS
USE TRACER_MOD, ONLY : SALA_REDGE_um, SALC_REDGE_um, XNUMOL
# include "CMN_SIZE" ! Size parameters
# include "CMN_DIAG" ! ND44, ND08
# include "CMN_GCTM" ! PI
INPUT PARAMETERS:
! N=1 denotes accumulation mode; N=2 denotes coarse mode
INTEGER, INTENT(IN) :: N
INPUT/OUTPUT PARAMETERS:
! Sea salt concentration [v/v]
REAL*8, INTENT(INOUT) :: TC(IIPAR,JJPAR,LLPAR)
REVISION HISTORY:
12 Jun 2009 - R. Yantosca & P. Le Sager - Columnized & cleaned up.
Source File: seasalt mod.F, Date: Tue Dec 15 14:07:34 EST 2009 52
1.6.3 get alk
Function GET ALK returns the seasalt alkalinity emitted at each timestep to sulfate mod.ffor chemistry on seasalt aerosols.
INTERFACE:
SUBROUTINE GET_ALK( ALK1, ALK2, Kt1, Kt2, Kt1N, Kt2N,
$ rh, ALK_EMIS_1d, n_dens_1d)
USES:
# include "sea_salt_info.h"
INPUT PARAMETERS:
real*8, intent(in):: rh, ALK_EMIS_1d(nsalt), n_dens_1d(nsalt)
! Return value
REAL*8, INTENT(OUT) :: ALK1, ALK2 ! [kg]
REAL*8, INTENT(OUT) :: Kt1, Kt2, Kt1N, Kt2N ! [s-1]
REVISION HISTORY:
03 Apr 2009 - R. Yantosca & P. Le Sager - Columnized & cleaned up.
REMARKS:
called by CHEM_SO2 (sulfate_chem_mod.f)
1.6.4 get 1d seasalt
Function GET 1D SEASALT returns column values of alkalinity and sea salt number den-sity from the internal state.
INTERFACE:
SUBROUTINE GET_1D_SEASALT( I, J, ALK_EMIS_1D, N_DENS_1D )
INPUT PARAMETERS:
! Lon and lat grid box indices
INTEGER, INTENT(IN) :: I, J
OUTPUT PARAMETERS:
! Alkalinity
REAL*8, INTENT(OUT) :: ALK_EMIS_1D(:,:)
! Number density
REAL*8, INTENT(OUT) :: N_DENS_1D(:,:)
REVISION HISTORY:
12 Jun 2009 - R. Yantosca & P. Le Sager - Columnized & cleaned up.
Source File: schem mod.F, Date: Tue Dec 15 14:07:34 EST 2009 53
1.6.5 init seasalt
Subroutine INIT SEASALT initializes and zeroes all module arrays.
INTERFACE:
SUBROUTINE INIT_SEASALT
USES:
! References to F90 modules
USE ERROR_MOD, ONLY : ALLOC_ERR
# include "CMN_SIZE"
REVISION HISTORY:
12 Jun 2009 - R. Yantosca & P. Le Sager - Columnized & cleaned up.
1.6.6 cleanup seasalt
Subroutine CLEANUP SEASALT deallocates all module arrays.
INTERFACE:
SUBROUTINE CLEANUP_SEASALT
REVISION HISTORY:
12 Jun 2009 - R. Yantosca & P. Le Sager - Columnized & cleaned up.
1.7 Fortran: Module Interface schem mod
This module contains routines and data objects for the GEOS-Chem simple stratosphericchemistry loss mechanism.
INTERFACE:
MODULE SCHEM_MOD
USES:
IMPLICIT NONE
PRIVATE
PUBLIC MEMBER FUNCTIONS:
PUBLIC :: CLEANUP_SCHEM
PUBLIC :: CLEANUP_SCHEM_1d
PUBLIC :: GET_SCHEM_DATA_1d
PUBLIC :: INIT_SCHEM
PUBLIC :: INIT_SCHEM_1d
PUBLIC :: SCHEM
PUBLIC :: SCHEM_READ_GC
Source File: schem mod.F, Date: Tue Dec 15 14:07:34 EST 2009 54
PUBLIC TYPES:
! Type for oxidant fields, for internal state
PUBLIC :: scox
TYPE :: scox
REAL*8, POINTER :: OH(:,:)
REAL*8, POINTER :: JVALUE(:,:,:)
REAL*8, POINTER :: PCO(:,:)
REAL*8, POINTER :: LCO(:,:)
END TYPE
! Type for oxidant fields, column arrays
PUBLIC :: scox_1d
TYPE :: scox_1d
REAL*8, POINTER :: OH(:)
REAL*8, POINTER :: JVALUE(:,:)
REAL*8, POINTER :: PCO(:)
REAL*8, POINTER :: LCO(:)
END TYPE
DEFINED PARAMETERS:
! Number of species w/ defined photolysis loss (currently is 13)
INTEGER, PARAMETER :: N_PHOTO = 13
! Tracers that undergo photolysis loss in the stratosphere
INTEGER :: JV_ID(N_PHOTO) = (/ 3, 8, 9, 10, 11,
& 12, 13, 14, 17, 20,
& 22, 23, 24 /)
REVISION HISTORY:
20 Apr 2009 - R. Yantosca - Columnized & cleaned up, made into module
2 Oct 2009 - P. Le Sager - Now 1D data point to instead of copy a
chunk of the 3D data
1.7.1 schem
Subroutine SCHEM performs simplified stratospheric chemistry, which means only reac-tions with OH and photolysis are considered. The production and loss of CO and NOy inthe stratosphere are taken from Dylan Jones’ 2-D model. (qli, bmy, 11/20/1999, 10/25/05)
INTERFACE:
SUBROUTINE SCHEM( ID_TRACERS, L_COLUMN, N_TRACERS,
& AIRDENS_1d, ITS_IN_TROP, OXIDANTS_1d,
& T_1d, TS_CHEM, VOLUME_1d,
& TRACER_1d, RC )
USES:
Source File: schem mod.F, Date: Tue Dec 15 14:07:34 EST 2009 55
USE GC_TYPE_MOD ! Tracer flag type definition
# include "smv_errcode.h" ! Error codes
INPUT PARAMETERS:
! Object for tracer flags
TYPE(ID_TRAC), INTENT(IN) :: ID_TRACERS
! Number of boxes in the vertical column
INTEGER, INTENT(IN) :: L_COLUMN
! Number of tracers
INTEGER, INTENT(IN) :: N_TRACERS
! Air density [molec/cm3]
REAL*8, INTENT(IN) :: AIRDENS_1d(L_COLUMN)
! Array of flags to denote if each grid box is in the troposphere
LOGICAL, INTENT(IN) :: ITS_IN_TROP(L_COLUMN)
! Object containing oxidant fields for simple strat chem
TYPE(SCOX_1d), INTENT(IN) :: OXIDANTS_1d
! Temperature [K]
REAL*8, INTENT(IN) :: T_1d(L_COLUMN)
! Chemistry timestep [minutes]
REAL*8, INTENT(IN) :: TS_CHEM
! Grid box volume [cm3]
REAL*8, INTENT(IN) :: VOLUME_1d(L_COLUMN)
INPUT/OUTPUT PARAMETERS:
! Tracer concentration [kg/box]
REAL*8, INTENT(INOUT) :: TRACER_1d(L_COLUMN,N_TRACERS)
OUTPUT PARAMETERS:
! Return code
INTEGER, INTENT(OUT) :: RC
REVISION HISTORY:
20 Apr 2009 - R. Yantosca - Columnized and cleaned up
1.7.2 schem read gc
Subroutine SCHEM READ GC reads in required oxidant fields from disk. This subroutineis specific to GEOS-Chem.
Source File: schem mod.F, Date: Tue Dec 15 14:07:34 EST 2009 56
INTERFACE:
SUBROUTINE SCHEM_READ_GC( L_COLUMN, MONTH, OXIDANTS, RC )
USES:
! NOTE: These are all GEOS-Chem specific routines & variables
USE BPCH2_MOD, ONLY : GET_NAME_EXT, GET_RES_EXT
USE BPCH2_MOD, ONLY : GET_TAU0, READ_BPCH2
USE DIRECTORY_MOD, ONLY : DATA_DIR
# include "smv_errcode.h" ! Error codes
# include "CMN_SIZE" ! GEOS-Chem dimensions
INPUT PARAMETERS:
! Number of boxes in the vertical column
INTEGER, INTENT(IN) :: L_COLUMN
! Current month
INTEGER, INTENT(IN) :: MONTH
INPUT/OUTPUT PARAMETERS:
! Object containing oxidant fields for simple strat chemistry
TYPE(SCOX), INTENT(INOUT) :: OXIDANTS
OUTPUT PARAMETERS:
! Return code
INTEGER, INTENT(OUT) :: RC
REVISION HISTORY:
20 Apr 2009 - R. Yantosca - Split file reading part off from SCHEM.
1.7.3 get schem data 1d
Subroutine GET SCHEM DATA 1d extracts a single column of oxidant fields from the in-ternal state for passing down to the column chemistry code.
INTERFACE:
SUBROUTINE GET_SCHEM_DATA_1d( J, OXIDANTS, OXIDANTS_1d, RC )
USES:
# include "smv_errcode.h" ! Error codes
INPUT PARAMETERS:
Source File: schem mod.F, Date: Tue Dec 15 14:07:34 EST 2009 57
! Latitude index
INTEGER, INTENT(IN) :: J
! Object w/ oxidant fields for internal state
TYPE(SCOX), INTENT(IN) :: OXIDANTS
INPUT/OUTPUT PARAMETERS:
! Object w/ oxidant fields for column code
TYPE(SCOX_1d), INTENT(INOUT) :: OXIDANTS_1d
INPUT/OUTPUT PARAMETERS:
! Return code
INTEGER, INTENT(OUT) :: RC
REVISION HISTORY:
20 Apr 2009 - R. Yantosca - Columnized and cleaned up
2 Oct 2009 - P. Le Sager - Point instead of copy
1.7.4 init schem
Subroutine INIT SCHEM allocates the pointer fields of the OXIDANTS object.
INTERFACE:
SUBROUTINE INIT_SCHEM( JMX, LMX, OXIDANTS, RC )
USES:
# include "smv_errcode.h" ! Error codes
INPUT PARAMETERS:
! Number of grid boxes in latitude
INTEGER, INTENT(IN) :: JMX
! Number of grid boxes in the vertical column
INTEGER, INTENT(IN) :: LMX
INPUT/OUTPUT PARAMETERS:
! Object w/ oxidant fields for internal state
TYPE(SCOX), INTENT(INOUT) :: OXIDANTS
OUTPUT PARAMETERS:
! Return code
INTEGER, INTENT(OUT) :: RC
REVISION HISTORY:
20 Apr 2009 - R. Yantosca - Columnized and cleaned up
Source File: schem mod.F, Date: Tue Dec 15 14:07:34 EST 2009 58
1.7.5 init schem 1d
Subroutine INIT SCHEM 1d allocates the pointer fields of the OXIDANTS 1d object. Thishas to be called w/in each loop iteration for OpenMP parallelization.
INTERFACE:
SUBROUTINE INIT_SCHEM_1d( LMX, OXIDANTS_1d, RC )
USES:
# include "smv_errcode.h" ! Error codes
INPUT PARAMETERS:
! Number of grid boxes in longitude
INTEGER, INTENT(IN) :: LMX
INPUT/OUTPUT PARAMETERS:
! Object w/ oxidant fields for column code
TYPE(SCOX_1d), INTENT(INOUT) :: OXIDANTS_1d
OUTPUT PARAMETERS:
! Return code
INTEGER, INTENT(OUT) :: RC
REVISION HISTORY:
20 Apr 2009 - R. Yantosca - Columnized and cleaned up
1.7.6 cleanup schem
Subroutine CLEANUP SCHEM deallocates the pointer fields of the OXIDANTS object.
INTERFACE:
SUBROUTINE CLEANUP_SCHEM( OXIDANTS, OXIDANTS_1d )
INPUT/OUTPUT PARAMETERS:
! Object w/ oxidant fields for internal state
TYPE(SCOX), INTENT(INOUT) :: OXIDANTS
! Object w/ oxidant fields for column code
TYPE(SCOX_1d), INTENT(INOUT) :: OXIDANTS_1d
REVISION HISTORY:
20 Apr 2009 - R. Yantosca - Columnized and cleaned up
2 Oct 2009 - P. Le Sager - Nullify instead of deallocate
Source File: setemis.F, Date: Tue Dec 15 14:07:34 EST 2009 59
1.7.7 cleanup schem 1d
Subroutine CLEANUP SCHEM 1d deallocates the pointer fields of the OXIDANTS 1d ob-ject. This has to be called w/in each loop iteration for OpenMP parallelization.
INTERFACE:
SUBROUTINE CLEANUP_SCHEM_1d( OXIDANTS_1d )
INPUT/OUTPUT PARAMETERS:
! Object w/ oxidant fields for column code
TYPE(SCOX_1d), INTENT(INOUT) :: OXIDANTS_1d
REVISION HISTORY:
20 Apr 2009 - R. Yantosca - Columnized and cleaned up
2 Oct 2009 - P. Le Sager - Nullify instead of deallocate
1.7.8 setemis.f
Subroutine SETEMIS places emissions computed from GEOS-Chem subroutines into arraysfor SMVGEAR II chemistry.
SETEMIS converts from units of [molec tracer/box/s] to units of [molec chemical species/cm3/s],and stores in the REMIS array. For hydrocarbons that are carried through the GEOS-CHEM model as [molec C], these are converted back to [molec hydrocarbon], and thenstored in REMIS.
INTERFACE:
SUBROUTINE SETEMIS( PBL_1d, MET_1d, L_COLUMN,
& N_EMISSION, N_TRACERS, ID_EMISSION,
& BIOFUEL_1d, BIOMASS_1d, AC_NOx_1d,
& LI_NOx_1d, SOIL_NOx_1d, EMISRR_1d,
& COEF, TS_CHEM, BXHEIGHT,
& EMISSION_1d, RC )
USES:
USE GC_TYPE_MOD ! Types for species & tracer properties
IMPLICIT NONE
# include "smv_errcode.h" ! Error codes
# include "bmy_debug.h"
INPUT PARAMETERS:
! Coefficients etc. that link species to tracers
TYPE(SPEC_2_TRAC), INTENT(IN) :: COEF
Source File: setemis.F, Date: Tue Dec 15 14:07:34 EST 2009 60
! Column met fields
TYPE(GC_MET_1D), INTENT(IN) :: MET_1d
! Number of boxes in the atmospheric column
INTEGER, INTENT(IN) :: L_COLUMN
! Number of emission species
INTEGER, INTENT(IN) :: N_EMISSION
! Number of transported tracers
INTEGER, INTENT(IN) :: N_TRACERS
! Soil NOx emissions [molec/cm3/s]
REAL*8, INTENT(IN) :: SOIL_NOx_1d
! PBL top pressure [hPa]
REAL*8, INTENT(IN) :: PBL_1d
! Chemistry timestep (same as emission timestep) [min]
REAL*8, INTENT(IN) :: TS_CHEM
! Aircraft NOx emissions [molec/cm3/s]
REAL*8, INTENT(IN) :: AC_NOx_1d (L_COLUMN )
! Lightning NOx emissions [molec/cm3/s]
REAL*8, INTENT(IN) :: LI_NOx_1d (L_COLUMN )
! Grid box height [m]
REAL*8, INTENT(IN) :: BXHEIGHT (L_COLUMN )
! Index of tracer numbers in the EMISRR, BIOFUEL, BIOMASS arrays
INTEGER, INTENT(IN) :: ID_EMISSION(N_EMISSION)
! Biomass emissions [molec/cm2/s]
REAL*8, INTENT(IN) :: BIOFUEL_1d (N_EMISSION)
! Biofuel emissions [molec/cm3/s]
REAL*8, INTENT(IN) :: BIOMASS_1d (N_EMISSION)
! Anthropogenic emission array [molec/s]
REAL*8, INTENT(IN) :: EMISRR_1d (N_EMISSION)
INPUT/OUTPUT PARAMETERS:
! Emissions [kg species/m2/s]
REAL*8, INTENT(INOUT) :: EMISSION_1d(L_COLUMN,N_TRACERS)
OUTPUT PARAMETERS:
Source File: gc emissions read mod.F, Date: Tue Dec 15 14:07:34 EST 2009 61
! Return code
INTEGER, INTENT(OUT) :: RC
REMARKS:
Developers: lwh, jyl, gmg, djj, bdf, bmy, 6/8/98, 6/11/08
This is a temporary routine to pass an emissions array down to the
column code. We are going to rewrite our emissions component very soon.
REVISION HISTORY:
24 Mar 2009 - R. Yantosca - Columnized and cleaned up
30 Sep 2009 - R. Yantosca - Now pass out EMISSION_1d array, and
convert to [kg species]
05 Nov 2009 - R. Yantosca - Now pass various met fields via MET_1d object
1.8 Fortran: Module Interface gc emissions read mod
Module GC EMISSIONS READ MOD contains routines to read global emissions data intoan object, which will form part of the GEOS-Chem internal state.
INTERFACE:
MODULE GC_EMISSIONS_READ_MOD
USES:
USE GC_EMISSIONS_TYPE_MOD ! Derived types for emissions routines
IMPLICIT NONE
PRIVATE
# include "smv_errcode.h" ! Error codes
PUBLIC MEMBER FUNCTIONS:
PUBLIC :: GC_EMISSIONS_READ_INIT
PUBLIC :: GC_EMISSIONS_READ_RUN
PUBLIC :: GC_EMISSIONS_READ_FINAL
PRIVATE MEMBER FUNCTIONS:
PRIVATE :: GERM_FINAL_ES_FLD_0d
PRIVATE :: GERM_FINAL_ES_FLD_1d
PRIVATE :: GERM_FINAL_ES_FLD_2d
PRIVATE :: GERM_FINAL_ES_FLD_3d
PRIVATE :: GERM_INIT_ES_FLD_0d
PRIVATE :: GERM_INIT_ES_FLD_1d
PRIVATE :: GERM_INIT_ES_FLD_2d
PRIVATE :: GERM_INIT_ES_FLD_3d
Source File: gc emissions read mod.F, Date: Tue Dec 15 14:07:34 EST 2009 62
PRIVATE :: GERM_SETUP_ES_FLD
INTERFACE GERM_INIT_ES_FLD
MODULE PROCEDURE GERM_INIT_ES_FLD_0d
MODULE PROCEDURE GERM_INIT_ES_FLD_1d
MODULE PROCEDURE GERM_INIT_ES_FLD_2d
MODULE PROCEDURE GERM_INIT_ES_FLD_3d
END INTERFACE
INTERFACE GERM_FINAL_ES_FLD
MODULE PROCEDURE GERM_FINAL_ES_FLD_0d
MODULE PROCEDURE GERM_FINAL_ES_FLD_1d
MODULE PROCEDURE GERM_FINAL_ES_FLD_2d
MODULE PROCEDURE GERM_FINAL_ES_FLD_3d
END INTERFACE
REMARKS:
REVISION HISTORY:
19 Aug 2009 - R. Yantosca - Initial Version
28 Oct 2009 - R. Yantosca - Updated comments, cosmetic changes
13 Nov 2009 - R. Yantosca - Added internal routine GERM_INIT_ES_FLD
18 Nov 2009 - R. Yantosca - Removed READ_LAI, READ_OLSON, READ_SOIL_FERT
18 Nov 2009 - R. Yantosca - Rewritten to make init/finalize more general
1.8.1 gc emissions read init
Subroutine GC EMISSIONS READ INIT initializes the import-state and export-state ob-jects for the GC EMISSIONS READ RUN method.
INTERFACE:
SUBROUTINE GC_EMISSIONS_READ_INIT( IS, ES, RC )
USES:
USE CHARPAK_MOD, ONLY : STRREPL ! For text replacement
INPUT PARAMETERS:
TYPE(GC_EM_IMPORT), INTENT(IN) :: IS ! Input state
INPUT/OUTPUT PARAMETERS:
TYPE(GC_EM_EXPORT), INTENT(INOUT) :: ES ! Export state
OUTPUT PARAMETERS:
Source File: gc emissions read mod.F, Date: Tue Dec 15 14:07:34 EST 2009 63
INTEGER, INTENT(OUT) :: RC ! Return code
REVISION HISTORY:
19 Aug 2009 - R. Yantosca - Initial Version
02 Oct 2009 - P. Le Sager - Do not allocate scalar
13 Nov 2009 - R. Yantosca - Now initalize sub-object fields of ES with
routine GERM_INIT_ES_FLD
18 Nov 2009 - R. Yantosca - Rewritten to make init/finalize more general
1.8.2 gc emissions read run
Subroutine GC EMISSIONS READ RUN reads global emission data into an export state.This global emission data will be stored as part of the GEOS-Chem internal state.
INTERFACE:
SUBROUTINE GC_EMISSIONS_READ_RUN( ES, RC )
USES:
USE DUST_INPUT_MOD, ONLY : SRC_FUNCTION_GINOUX
USE LAI_LAND_INPUT_MOD, ONLY : READ_LAI
USE LAI_LAND_INPUT_MOD, ONLY : READ_OLSON
USE SOIL_NOX_INPUT_MOD, ONLY : READ_SOIL_FERT
INPUT/OUTPUT PARAMETERS:
TYPE(GC_EM_EXPORT), INTENT(INOUT) :: ES ! Export state
OUTPUT PARAMETERS:
INTEGER, INTENT(OUT) :: RC ! Return code
REMARKS:
GC_EMISSIONS_READ_RUN calls the various reader routines from external
modules. The naming convention for these modules is is "__input_mod.f".
REVISION HISTORY:
19 Aug 2009 - R. Yantosca - Initial Version
28 Oct 2009 - R. Yantosca - Updated comments
18 Nov 2009 - R. Yantosca - Now call READ_LAI, READ_OLSON, READ_SOIL_FERT
from external modules
Source File: gc emissions read mod.F, Date: Tue Dec 15 14:07:34 EST 2009 64
1.8.3 gc emissions final
Subroutine GC EMISSIONS READ FINAL finalizes the import-state and export-state ob-jects that are used by GC EMISSIONS READ RUN.
INTERFACE:
SUBROUTINE GC_EMISSIONS_READ_FINAL( IS, ES, RC )
INPUT PARAMETERS:
TYPE(GC_EM_IMPORT), INTENT(IN) :: IS ! Input state
INPUT/OUTPUT PARAMETERS:
TYPE(GC_EM_EXPORT), INTENT(INOUT) :: ES ! Export state
OUTPUT PARAMETERS:
INTEGER, INTENT(OUT) :: RC ! Return code
REVISION HISTORY:
19 Aug 2009 - R. Yantosca - Initial Version
28 Oct 2009 - R. Yantosca - Updated comments, cosmetic changes
13 Nov 2009 - R. Yantosca - Now also finalize ES%DUST_SRC_FN
18 Nov 2009 - R. Yantosca - Rewritten to call GERM_FINAL_ES_FLD (and the
associated subroutines) to finalize each
export-state sub-object.
1.8.4 germ init es fld 0d
Subroutine GERM INIT ES FLD 0d does the following:
• Calls routine GERM INIT ES FLD to copy metadata from the import-state sub-object (IS FLD) to the export-state sub-object (ES FLD).
• Nullifies the DATA field in the export-state sub-object (ES FLD)
INTERFACE:
SUBROUTINE GERM_INIT_ES_FLD_0d( IS_FLD, ES_FLD, RC )
INPUT PARAMETERS:
TYPE(GC_EM_3D), INTENT(IN) :: IS_FLD ! Import state sub-obj
INPUT/OUTPUT PARAMETERS:
TYPE(GC_EM_3D), INTENT(INOUT) :: ES_FLD ! Export state field
OUTPUT PARAMETERS:
INTEGER, INTENT(OUT) :: RC ! Return code
REVISION HISTORY:
18 Nov 2009 - R. Yantosca - Initial version
Source File: gc emissions read mod.F, Date: Tue Dec 15 14:07:34 EST 2009 65
1.8.5 germ init es fld 1d
Subroutine GERM INIT ES FLD 1d does the following:
• Allocates an export-state sub-object (ES FLD) that has one dimension.
• Calls routine GERM INIT ES FLD to copy metadata from the import-state sub-object (IS FLD) to the export-state sub-object (ES FLD).
• Nullifies the DATA field in the export-state sub-object (ES FLD)
INTERFACE:
SUBROUTINE GERM_INIT_ES_FLD_1d( IS_FLD, ES_FLD, RC )
INPUT PARAMETERS:
TYPE(GC_EM_3D), INTENT(IN) :: IS_FLD ! Import state field
INPUT/OUTPUT PARAMETERS:
TYPE(GC_EM_3D), POINTER :: ES_FLD(:) ! Export state field
OUTPUT PARAMETERS:
INTEGER, INTENT(OUT) :: RC ! Return code
REVISION HISTORY:
18 Nov 2009 - R. Yantosca - Initial version
1.8.6 germ init es fld 2d
Subroutine GERM INIT ES FLD 2d does the following:
• Allocates an export-state sub-object (ES FLD) that has two dimensions.
• Calls routine GERM INIT ES FLD to copy metadata from the import-state sub-object (IS FLD) to the export-state sub-object (ES FLD).
• Nullifies the DATA field in the export-state sub-object (ES FLD)
INTERFACE:
SUBROUTINE GERM_INIT_ES_FLD_2d( IS_FLD, ES_FLD, RC )
INPUT PARAMETERS:
TYPE(GC_EM_3D), INTENT(IN) :: IS_FLD ! Import-state sub-object
INPUT/OUTPUT PARAMETERS:
TYPE(GC_EM_3D), POINTER :: ES_FLD(:,:) ! Export-state sub-object
OUTPUT PARAMETERS:
INTEGER, INTENT(OUT) :: RC ! Return code
REVISION HISTORY:
18 Nov 2009 - R. Yantosca - Initial version
Source File: gc emissions read mod.F, Date: Tue Dec 15 14:07:34 EST 2009 66
1.8.7 germ init es fld 3d
Subroutine GERM SETUP ES FLD 3d does the following:
• Allocates an export-state sub-object (ES FLD) that has three dimensions.
• Calls routine GERM INIT ES FLD to copy metadata from the import-state sub-object (IS FLD) to the export-state sub-object (ES FLD).
• Nullifies the DATA field in the export-state sub-object (ES FLD)
INTERFACE:
SUBROUTINE GERM_INIT_ES_FLD_3d( IS_FLD, ES_FLD, RC )
INPUT PARAMETERS:
TYPE(GC_EM_3D), INTENT(IN) :: IS_FLD ! Import-state sub-object
INPUT/OUTPUT PARAMETERS:
TYPE(GC_EM_3D), POINTER :: ES_FLD(:,:,:) ! Export-state sub-object
OUTPUT PARAMETERS:
INTEGER, INTENT(OUT) :: RC ! Return code
REVISION HISTORY:
18 Nov 2009 - R. Yantosca - Initial version
1.8.8 germ setup es fld
Subroutine GERM SETUP ES FLD copies metadata from the import state sub-object tothe export-state sub-object. It also sets the export-state sub-object data pointer to NULL.This is called from the allocation routines GERM INIT ES FLD *d.
INTERFACE:
SUBROUTINE GERM_SETUP_ES_FLD( IS_FLD, ES_FLD, RC )
INPUT PARAMETERS:
TYPE(GC_EM_3D), INTENT(IN) :: IS_FLD ! Import state sub-object
INPUT/OUTPUT PARAMETERS:
TYPE(GC_EM_3D), INTENT(INOUT) :: ES_FLD ! Export state sub-object
OUTPUT PARAMETERS:
INTEGER, INTENT(OUT) :: RC ! Return code
REMARKS:
Original code: subroutine "readlai.f" from GEOS-Chem.
REVISION HISTORY:
13 Nov 2009 - R. Yantosca - Initial version
Source File: gc emissions read mod.F, Date: Tue Dec 15 14:07:34 EST 2009 67
1.8.9 germ final es fld 0d
Subroutine GERM FINAL ES FLD 0D deallocates the DATA pointer in an 0-dimensionalexport-state sub-object field.
INTERFACE:
SUBROUTINE GERM_FINAL_ES_FLD_0d( ES_FLD, RC )
INPUT/OUTPUT PARAMETERS:
TYPE(GC_EM_3D), INTENT(INOUT) :: ES_FLD ! Export state field
OUTPUT PARAMETERS:
INTEGER, INTENT(OUT) :: RC ! Return code
REVISION HISTORY:
18 Nov 2009 - R. Yantosca - Initial version
1.8.10 germ final es fld 1d
Subroutine GERM FINAL ES FLD 1d deallocates the DATA pointer in an 1-dimensionalexport-state sub-object field.
INTERFACE:
SUBROUTINE GERM_FINAL_ES_FLD_1d( ES_FLD, RC )
INPUT/OUTPUT PARAMETERS:
TYPE(GC_EM_3D), POINTER :: ES_FLD(:) ! Export state sub-obj
OUTPUT PARAMETERS:
INTEGER, INTENT(OUT) :: RC ! Return code
REVISION HISTORY:
18 Nov 2009 - R. Yantosca - Initial version
1.8.11 germ final es fld 2d
Subroutine GERM FINAL ES FLD 2d frees the memory from a 2-dimensional export-statesub-object field.
INTERFACE:
SUBROUTINE GERM_FINAL_ES_FLD_2d( ES_FLD, RC )
INPUT/OUTPUT PARAMETERS:
Source File: dust input mod.F, Date: Tue Dec 15 14:07:34 EST 2009 68
TYPE(GC_EM_3D), POINTER :: ES_FLD(:,:) ! Export state sub-obj
OUTPUT PARAMETERS:
INTEGER, INTENT(OUT) :: RC ! Return code
REVISION HISTORY:
18 Nov 2009 - R. Yantosca - Initial version
1.8.12 germ final es fld 3d
Subroutine GERM FINAL ES FLD 3d frees the memory from a 3-dimensional export-statesub-object field.
INTERFACE:
SUBROUTINE GERM_FINAL_ES_FLD_3d( ES_FLD, RC )
INPUT/OUTPUT PARAMETERS:
TYPE(GC_EM_3D), POINTER :: ES_FLD(:,:,:) ! Export state sub-obj
OUTPUT PARAMETERS:
INTEGER, INTENT(OUT) :: RC ! Return code
REVISION HISTORY:
18 Nov 2009 - R. Yantosca - Initial version
1.9 Fortran: Module Interface dust input mod
Module DUST INPUT MOD contains routines for getting I/O data for dust aerosol emis-sions. This was extracted from the original dust mod.f to deal with I/O outside the columnmodel.
References:
• Ginoux, P., M. Chin, I. Tegen, J. Prospero, B. Hoben, O. Dubovik, and S.-J. Lin,Sources and distributions of dust aerosols simulated with the GOCART model, J. Geophys. Res.,2001
• Chin, M., P. Ginoux, S. Kinne, B. Holben, B. Duncan, R. Martin, J. Logan, A. Hig-urashi, and T. Nakajima, Tropospheric aerosol optical thickness from the GOCART
model and comparisons with satellite and sunphotometers measurements, J. Atmos Sci.,2001.
INTERFACE:
MODULE DUST_INPUT_MOD
Source File: dust input mod.F, Date: Tue Dec 15 14:07:34 EST 2009 69
USES:
USE GC_EMISSIONS_TYPE_MOD
USE GC_TYPE_MOD
IMPLICIT NONE
PRIVATE
PUBLIC MEMBER FUNCTIONS:
PUBLIC :: SRC_FUNCTION_GINOUX
REMARKS:
NOTE: Only the GINOUX I/O is taken care of so far. The DEAD (Zender) I/O
has not been throroughly implemented.
REVISION HISTORY:
24 Jul 2009 - P. Le Sager - Initial version
16 Nov 2009 - R. Yantosca - Added ProTeX header, updated comments
1.9.1 src function ginoux
Subroutine SRC FUNCTION GINOUX implements the Paul GINOUX dust source func-tion. TAKEN FROM ORIGINAL SRC DUST GINOUX (phs, 28/04/09)
INTERFACE:
SUBROUTINE SRC_FUNCTION_GINOUX( ES, RC )
USES:
# include "smv_errcode.h" ! Error codes
INPUT PARAMETERS:
TYPE(GC_EM_EXPORT) :: ES
OUTPUT PARAMETERS:
INTEGER, INTENT(OUT) :: RC ! Error code
REMARKS:
This subroutine updates the surface mixing ratio of dust aerosols for
NDSTBIN size bins. The uplifting of dust depends in space on the source
function, and in time and space on the soil moisture and surface
wind speed (10 meters). Dust is uplifted if the wind speed is greater
than a threshold velocity which is calculated with the formula of
Marticorena et al. (JGR, v.102, p 23277-23287, 1997).
Source File: lai land input mod.F, Date: Tue Dec 15 14:07:34 EST 2009 70
To run this subroutine you need the source function which can be
obtained by contacting Paul Ginoux at [email protected]
If you are not using GEOS DAS met fields, you will most likely need
to adapt the adjusting parameter.
.
Contact: Paul Ginoux ([email protected])
.
OUTPUT:
SRCE_FUNK Source function
for 1: Sand, 2: Silt, 3: Clay
.
Parameters used in GEOS-CHEM
.
Longitude: IX
Latitude : JX
Size bins: NDSTBIN = 4
.
Dust properties used in GOCART
.
Size classes: 01-1, 1-1.8, 1.8-3, 3-6 (um)
Radius: 0.7, 1.5, 2.5, 4 (um)
Density: 2500, 2650, 2650, 2650 (kg/m3)
.
REVISION HISTORY:
24 Jul 2009 - P. Le Sager - Initial version
16 Nov 2009 - R. Yantosca - Now pass the external state ES
16 Nov 2009 - R. Yantosca - Added ProTeX header, updated comments
1.10 Fortran: Module Interface lai land input mod
Module LAI LAND INPUT MOD contains routines to read in the Olson land type mapsand leaf area index information from disk.
INTERFACE:
MODULE LAI_LAND_INPUT_MOD
USES:
USE GC_EMISSIONS_TYPE_MOD ! Derived types for emissions routines
USE GC_TYPE_MOD ! General derived types
IMPLICIT NONE
PRIVATE
# include "lai_land_info.h" ! Dimensions for Olson land types
# include "smv_errcode.h" ! Error codes
Source File: lai land input mod.F, Date: Tue Dec 15 14:07:34 EST 2009 71
PUBLIC MEMBER FUNCTIONS:
PUBLIC :: READ_LAI
PUBLIC :: READ_OLSON
DEFINED PARAMETERS:
INTEGER, PARAMETER :: LUN = 65 ! Reusable file LUN
REVISION HISTORY:
18 Nov 2009 - R. Yantosca - Split off from GC_EMISSIONS_READ_MOD
1.10.1 read lai
Subroutine READ LAI reads the leaf area indices from disk into LAI sub-object of theGEOS-Chem emissions state.
INTERFACE:
SUBROUTINE READ_LAI( ES, RC )
INPUT/OUTPUT PARAMETERS:
TYPE(GC_EM_EXPORT), INTENT(INOUT) :: ES ! Export state
OUTPUT PARAMETERS:
INTEGER, INTENT(OUT) :: RC ! Return code
REMARKS:
Original code: subroutine "readlai.f" from GEOS-Chem.
REVISION HISTORY:
19 Aug 2009 - R. Yantosca - Columnized and cleaned up
18 Nov 2009 - R. Yantosca - Split off from GC_EMISSIONS_READ_MOD
1.10.2 read olson
Subroutine READ OLSON reads Olson land type information from disk into the FRCLND,IREG, ILAND, IUSE sub-objects of the GEOS-Chem emissions state.
INTERFACE:
SUBROUTINE READ_OLSON( ES, RC )
INPUT/OUTPUT PARAMETERS:
TYPE(GC_EM_EXPORT), INTENT(INOUT) :: ES ! Export state
Source File: lai land input mod.F, Date: Tue Dec 15 14:07:34 EST 2009 72
OUTPUT PARAMETERS:
INTEGER, INTENT(OUT) :: RC ! Return code
REMARKS:
Original code: subroutine "RDLAND" from GEOS-Chem.
REVISION HISTORY:
19 Aug 2009 - R. Yantosca - Columnized and cleaned up
18 Nov 2009 - R. Yantosca - Split off from GC_EMISSIONS_READ_MOD
1.11 Fortran: Module Interface lai land input mod
Module LAI LAND INPUT MOD contains routines to read in the Olson land type mapsand leaf area index information from disk.
INTERFACE:
MODULE LAI_LAND_INPUT_MOD
USES:
USE GC_EMISSIONS_TYPE_MOD ! Derived types for emissions routines
USE GC_TYPE_MOD ! General derived types
IMPLICIT NONE
PRIVATE
# include "lai_land_info.h" ! Dimensions for Olson land types
# include "smv_errcode.h" ! Error codes
PUBLIC MEMBER FUNCTIONS:
PUBLIC :: READ_LAI
PUBLIC :: READ_OLSON
DEFINED PARAMETERS:
INTEGER, PARAMETER :: LUN = 65 ! Reusable file LUN
REVISION HISTORY:
18 Nov 2009 - R. Yantosca - Split off from GC_EMISSIONS_READ_MOD
Source File: soil nox input mod.F, Date: Tue Dec 15 14:07:34 EST 2009 73
1.11.1 read lai
Subroutine READ LAI reads the leaf area indices from disk into LAI sub-object of theGEOS-Chem emissions state.
INTERFACE:
SUBROUTINE READ_LAI( ES, RC )
INPUT/OUTPUT PARAMETERS:
TYPE(GC_EM_EXPORT), INTENT(INOUT) :: ES ! Export state
OUTPUT PARAMETERS:
INTEGER, INTENT(OUT) :: RC ! Return code
REMARKS:
Original code: subroutine "readlai.f" from GEOS-Chem.
REVISION HISTORY:
19 Aug 2009 - R. Yantosca - Columnized and cleaned up
18 Nov 2009 - R. Yantosca - Split off from GC_EMISSIONS_READ_MOD
1.11.2 read olson
Subroutine READ OLSON reads Olson land type information from disk into the FRCLND,IREG, ILAND, IUSE sub-objects of the GEOS-Chem emissions state.
INTERFACE:
SUBROUTINE READ_OLSON( ES, RC )
INPUT/OUTPUT PARAMETERS:
TYPE(GC_EM_EXPORT), INTENT(INOUT) :: ES ! Export state
OUTPUT PARAMETERS:
INTEGER, INTENT(OUT) :: RC ! Return code
REMARKS:
Original code: subroutine "RDLAND" from GEOS-Chem.
REVISION HISTORY:
19 Aug 2009 - R. Yantosca - Columnized and cleaned up
18 Nov 2009 - R. Yantosca - Split off from GC_EMISSIONS_READ_MOD
Source File: gc emissions mod.F, Date: Tue Dec 15 14:07:34 EST 2009 74
1.12 Fortran: Module Interface soil nox input mod
Module SOIL NOX INPUT MOD contains routines to read in the soil moisture and fertil-izer data from disk.
INTERFACE:
MODULE SOIL_NOX_INPUT_MOD
USES:
USE GC_EMISSIONS_TYPE_MOD ! Derived types for emissions routines
USE GC_TYPE_MOD ! General derived types
IMPLICIT NONE
PRIVATE
# include "smv_errcode.h" ! Error codes
PUBLIC MEMBER FUNCTIONS:
PUBLIC :: READ_SOIL_FERT
DEFINED PARAMETERS:
INTEGER, PARAMETER :: LUN = 65 ! Reusable file LUN
REVISION HISTORY:
18 Nov 2009 - R. Yantosca - Split off from GC_EMISSIONS_READ_MOD
1.12.1 read soil fert
Subroutine READ SOIL FERT reads in fertilizer data and monthly soil precipitation data.
INTERFACE:
SUBROUTINE READ_SOIL_FERT( ES, RC )
INPUT/OUTPUT PARAMETERS:
TYPE(GC_EM_EXPORT), INTENT(INOUT) :: ES ! Export state
OUTPUT PARAMETERS:
INTEGER, INTENT(OUT) :: RC ! Return code
REMARKS:
Original code: subroutine "RDSOIL" from GEOS-Chem.
REVISION HISTORY:
24 Aug 2009 - R. Yantosca - Columnized and cleaned up
18 Nov 2009 - R. Yantosca - Split off from GC_EMISSIONS_READ_MOD
Source File: gc emissions mod.F, Date: Tue Dec 15 14:07:34 EST 2009 75
1.13 Fortran: Module Interface gc emissions mod
Module GC EMISSIONS MOD contains routines which do the following:
• Extract a single column of emissions etc. data from the GEOS-Chem internal state
• Apply regional masks (if necessary)
• Apply monthly scale factors (if necessary)
• Apply annual scale factors (if necessary)
• Place the processed data into an export-state object which will be passed to theGEOS-Chem column module
INTERFACE:
MODULE GC_EMISSIONS_MOD
USES:
USE GC_TYPE_MOD ! General derived types
USE GC_EMISSIONS_TYPE_MOD ! Derived types for emissions routines
IMPLICIT NONE
PRIVATE
# include "smv_errcode.h" ! Error codes
PUBLIC MEMBER FUNCTIONS:
PUBLIC :: GC_EMISSIONS_INIT
PUBLIC :: GC_EMISSIONS_RUN
PUBLIC :: GC_EMISSIONS_FINAL
PRIVATE MEMBER FUNCTIONS:
PRIVATE :: EMISS_GAS_PHASE
PRIVATE :: EMISS_AER_PHASE
PRIVATE :: GEM_FINAL_ES_FLD_0d
PRIVATE :: GEM_FINAL_ES_FLD_1d
PRIVATE :: GEM_INIT_ES_FLD_0d
PRIVATE :: GEM_INIT_ES_FLD_1d
PRIVATE :: GET_COLUMN
PRIVATE :: GET_DAILY_LAI
PRIVATE :: GET_LAI_MONTH
INTERFACE GEM_INIT_ES_FLD
MODULE PROCEDURE GEM_INIT_ES_FLD_0d
MODULE PROCEDURE GEM_INIT_ES_FLD_1d
END INTERFACE
Source File: gc emissions mod.F, Date: Tue Dec 15 14:07:34 EST 2009 76
INTERFACE GEM_FINAL_ES_FLD
MODULE PROCEDURE GEM_FINAL_ES_FLD_0d
MODULE PROCEDURE GEM_FINAL_ES_FLD_1d
END INTERFACE
REMARKS:
Based on "emissions_mod.f" from the GEOS-Chem source code
REVISION HISTORY:
11 Aug 2009 - R. Yantosca & P. Le Sager - Columnized and cleaned up
30 Sep 2009 - P. Le Sager - Overhaul so that 1D data point to
(instead of copy) a chunk of the 3D data
28 Oct 2009 - R. Yantosca - Updated comments, cosmetic changes
30 Oct 2009 - R. Yantosca - Now interpolate daily LAI fields
09 Nov 2009 - R. Yantosca - Activate internal routine EMISS_GAS_PHASE
10 Nov 2009 - R. Yantosca - Activate internal routine GEM_CREATE_METADATA
01 Dec 2009 - R. Yantosca - Removed ALLOC_EXP_COL_PT
01 Dec 2009 - R. Yantosca - Removed DEALLOC_EXP_COL_PT
01 Dec 2009 - R. Yantosca - Added interface GEM_INIT_ES_FLD
01 Dec 2009 - R. Yantosca - Added interface GEM_FINAL_ES_FLD
1.13.1 gc emissions init
Subroutine GC EMISSIONS INIT initializes the export-state object that is used by sub-routine GC EMISSIONS RUN, which is the main emissions driver for GEOS-Chem.
INTERFACE:
SUBROUTINE GC_EMISSIONS_INIT( INPUT, IS, ES, RC )
USES:
# include "lai_land_info.h"
INPUT PARAMETERS:
TYPE(GC_COL_INPUT), TARGET, INTENT(IN) :: INPUT ! Inputs
TYPE(GC_EM_EXPORT), INTENT(IN) :: IS ! Imp state/3D data
INPUT/OUTPUT PARAMETERS:
TYPE(GC_COL_EXPORT), INTENT(INOUT) :: ES ! Exp state/1D data
OUTPUT PARAMETERS:
INTEGER, INTENT(OUT) :: RC ! Return code
REVISION HISTORY:
Source File: gc emissions mod.F, Date: Tue Dec 15 14:07:34 EST 2009 77
11 Aug 2009 - R. Yantosca - Columnized and cleaned up
30 Sep 2009 - P. Le Sager - Allocate only arrays of pointers in
the export state. Scalars of sub-type
are copied form 3D, 1D arrays point to
a chunk of the 3D ones.
28 Oct 2009 - R. Yantosca - Now pass lon/lat info via the GEOLOC object
28 Oct 2009 - R. Yantosca - Updated comments, cosmetic changes
12 Nov 2009 - R. Yantosca - Now pass INPUT object with pointers to TIMING,
ID_* objects. We will set the ES%INPUT field
to point to this object.
13 Nov 2009 - R. Yantosca - Now initialize the ES%DUST_SRC_FN sub-object
01 Dec 2009 - R. Yantosca - Now call GEM_INIT_ES_FLD for initializations
1.13.2 gc emissions run
Subroutine DO EMISSIONS is the driver routine which calls the appropriate emissions sub-routine for the various GEOS-Chem simulations.
INTERFACE:
SUBROUTINE GC_EMISSIONS_RUN( I, J, MET_1d, IS, ES, RC )
INPUT PARAMETERS:
INTEGER, INTENT(IN) :: I, J ! Lon & lat indices
TYPE(GC_MET_1d), INTENT(IN) :: MET_1d ! Obj w/ 1-D met fields
TYPE(GC_EM_EXPORT), INTENT(IN) :: IS ! Import state w/ 3D data
INPUT/OUTPUT PARAMETERS:
TYPE(GC_COL_EXPORT), INTENT(INOUT) :: ES ! Export state w/ 1D data
OUTPUT PARAMETERS:
INTEGER, INTENT(OUT) :: RC ! Return code
REMARKS:
NOTE: Subroutine GET_COLUMN sets the ES%TIMING and ES%GEOLOC fields.
REVISION HISTORY:
11 Feb 2003 - R. Yantosca - Initial Version (DO_EMISSIONS) in GEOS-Chem code
11 Aug 2009 - R. Yantosca - Columnized and cleaned up
28 Oct 2009 - R. Yantosca - Now pass lon/lat info in a separate GEOLOC
object. This can be held PRIVATE in the
calling routine, thus allowing us to separate
off the non-PRIVATE fields in the TIMING object.
10 Nov 2009 - R. Yantosca - Now activated call to EMISS_GAS_PHASE
10 Nov 2009 - R. Yantosca - Now activated call to EMISS_AEROSOL_PHASE
12 Nov 2009 - R. Yantosca - Now remove references to the TIMING object,
Source File: gc emissions mod.F, Date: Tue Dec 15 14:07:34 EST 2009 78
since the TIMING, GEOLOC, OPTIONS, ID_*
objects are now pointed to by ES%INPUT.
12 Nov 2009 - R. Yantosca - Removed PET as an argument, since it has now
been replaced by ES%INPUT%PET
1.13.3 gc emissions final
Subroutine GC EMISSIONS FINAL nullifies the pointer fields of the export-state used bysubroutine GC EMISSIONS RUN. GC EMISSIONS FINAL is called at the end of the par-allel loop over grid boxes in the interface code.
INTERFACE:
SUBROUTINE GC_EMISSIONS_FINAL( ES, RC )
INPUT/OUTPUT PARAMETERS:
TYPE(GC_COL_EXPORT), INTENT(INOUT) :: ES ! Export state w/ 1D data
OUTPUT PARAMETERS:
INTEGER, INTENT(OUT) :: RC ! Return code
REVISION HISTORY:
11 Aug 2009 - R. Yantosca - Columnized and cleaned up
30 Sep 2009 - P. Le Sager - Call DEALLOC_COL_EXP_PT subroutine
28 Oct 2009 - R. Yantosca - Updated comments, cosmetic changes
30 Oct 2009 - R. Yantosca - Now can call DEALLOC_EXP_COL_PT with
DO_DEALLOC=.TRUE. to DEALLOCATE instead
of NULLIFYing pointer fields
10 Nov 2009 - R. Yantosca - Now DEALLOCATE the ES%E_SOIL%DATA field
13 Nov 2009 - R. Yantosca - Now finalize the ES%DUST_SRC_FN sub-object
17 Nov 2009 - R. Yantosca - Now NULLIFY all fields instead of DEALLOCATEing
01 Dec 2009 - R. Yantosca - Now call GEM_FINAL_ES_FLD for all finalizing
1.13.4 gem init es fld 0d
Subroutine GEM INIT ES FLD 0d initializes a scalar export-state sub-object (ES FLD).Metadata fields are copied from the corresponding import-state sub-object field (IS FLD).The DATA array pointer memory is freed with NULLIFY.
INTERFACE:
SUBROUTINE GEM_INIT_ES_FLD_0d( PET, IS_FLD, ES_FLD, RC )
INPUT PARAMETERS:
INTEGER, INTENT(IN) :: PET ! CPU index #
TYPE(GC_EM_3D), INTENT(IN) :: IS_FLD ! Import state sub-obj
Source File: gc emissions mod.F, Date: Tue Dec 15 14:07:34 EST 2009 79
INPUT/OUTPUT PARAMETERS:
TYPE(GC_EM_1D), INTENT(INOUT) :: ES_FLD ! Export state field
OUTPUT PARAMETERS:
INTEGER, INTENT(OUT) :: RC ! Return code
REMARKS:
This routine is overloaded by interface GEM_INIT_ES_FLD. This allows
us to make the same function call whether or not the argument ES_FLD
is scalar-valued or vector-valued.
REVISION HISTORY:
01 Dec 2009 - R. Yantosca - Initial version
1.13.5 germ init es fld 1d
Subroutine GERM INIT ES FLD 1d initializes a vector-valued export-state sub-object (ES FLD).Metadata fields are copied from the corresponding import-state sub-object field (IS FLD).The DATA array pointer memory is freed with NULLIFY.
INTERFACE:
SUBROUTINE GEM_INIT_ES_FLD_1d( PET, IS_FLD, ES_FLD, RC )
INPUT PARAMETERS:
INTEGER, INTENT(IN) :: PET
TYPE(GC_EM_3D), POINTER :: IS_FLD(:) ! Import state sub-obj
INPUT/OUTPUT PARAMETERS:
TYPE(GC_EM_1D), POINTER :: ES_FLD(:) ! Export state field
OUTPUT PARAMETERS:
INTEGER, INTENT(OUT) :: RC ! Return code
REMARKS:
This routine is overloaded by interface GEM_INIT_ES_FLD. This allows
us to make the same function call whether or not the argument ES_FLD
is scalar-valued or vector-valued.
REVISION HISTORY:
01 Dec 2009 - R. Yantosca - Initial version, replaces ALLOC_COL_EXP_PT
Source File: gc emissions mod.F, Date: Tue Dec 15 14:07:34 EST 2009 80
1.13.6 germ final es fld 0d
Subroutine GERM FINAL ES FLD 0d finalizes a scalar-valued export-state sub-object (ES FLD).All metadata is cleared and the DATA pointer array is nullified.
INTERFACE:
SUBROUTINE GEM_FINAL_ES_FLD_0d( ES_FLD, RC )
INPUT/OUTPUT PARAMETERS:
TYPE(GC_EM_1D), INTENT(INOUT) :: ES_FLD ! Export state sub-object
OUTPUT PARAMETERS:
INTEGER, INTENT(OUT) :: RC ! Return code
REMARKS:
This routine is overloaded by interface GEM_FINAL_ES_FLD. This allows
us to make the same function call whether or not the argument ES_FLD
is scalar-valued or vector-valued.
REVISION HISTORY:
18 Nov 2009 - R. Yantosca - Initial version
1.13.7 germ final es fld 1d
Subroutine GEM FINAL ES FLD 1d finalizes a vector-valued export-state sub-object (ES FLD).The individual DATA pointers (e.g. ES FLDis deallocated.
•
INTERFACE:
SUBROUTINE GEM_FINAL_ES_FLD_1d( ES_FLD, RC )
INPUT/OUTPUT PARAMETERS:
TYPE(GC_EM_1D), POINTER :: ES_FLD(:) ! Export-state sub-object
OUTPUT PARAMETERS:
INTEGER, INTENT(OUT) :: RC ! Return code
REMARKS:
This routine is overloaded by interface GEM_FINAL_ES_FLD. This allows
us to make the same function call whether or not the argument ES_FLD
is scalar-valued or vector-valued.
REVISION HISTORY:
01 Dec 2009 - R. Yantosca - Initial version, replaces DEALLOC_COL_EXP_PT
Source File: gc emissions mod.F, Date: Tue Dec 15 14:07:34 EST 2009 81
1.13.8 get column
Subroutine GET COLUMN extracts the data for the given longitude, latitude, and monthfrom the 3-D emissions ”import-state” object and copies it (via pointer assignment) it tothe 1-D emissions ”export-state” object.
INTERFACE:
SUBROUTINE GET_COLUMN( I, J, IS, ES, RC )
INPUT PARAMETERS:
INTEGER, INTENT(IN) :: I, J ! Lon & lat indices
TYPE(GC_EM_EXPORT), INTENT(IN) :: IS ! 3-D import-state obj
INPUT/OUTPUT PARAMETERS:
TYPE(GC_COL_EXPORT), INTENT(INOUT) :: ES ! 1-D export state obj
OUTPUT PARAMETERS:
INTEGER, INTENT(OUT) :: RC ! Return code
REMARKS:
NOTE: The data storage is actually in the import-state. We simply set
pointers to the corresponding DATA arrays in the various import-state
sub-objects [i.e. ES%IREG%DATA => IS%IREG%DATA(I,J,:)]. This is very
memory-efficient, as we are not allocating any further memory in the
export-state object (except to hold metadata, etc.). It also means we are
not physically copying data from one array to another, which is wasteful
of both CPU cycles and memory.
REVISION HISTORY:
11 Aug 2009 - R. Yantosca - Columnized and cleaned up
30 Sep 2009 - P. Le Sager - Use pointer assignement as alias
instead of copying data.
28 Oct 2009 - R. Yantosca - Updated comments, cosmetic changes.
03 Nov 2009 - R. Yantosca - ES%SOILPRC now has 12 elements (i.e. months)
04 Nov 2009 - R. Yantosca - Now zero ES%LAI(K)%DATA fields
12 Nov 2009 - R. Yantosca - Removed PET from the arg list since this is
now replaced by ES%INPUT%PET
17 Nov 2009 - R. Yantosca - Now point to ES%LAI_DLY(K)%DATA fields
01 Dec 2009 - R. Yantosca - Removed calls to GEM_COPY_METADATA; all
metadata fields are copied at initialization
01 Dec 2009 - R. Yantosca - Greatly simplified setting data pointers
Source File: gc emissions mod.F, Date: Tue Dec 15 14:07:34 EST 2009 82
1.13.9 get daily lai
Subroutine GET DAILY LAI computes the leaf area index for a given date. Uses the LAIdata stored in the GEOS-Chem emissions internal state.
INTERFACE:
SUBROUTINE GET_DAILY_LAI( I, J, IS, ES, RC )
INPUT PARAMETERS:
INTEGER, INTENT(IN) :: I, J ! Lon & lat indices
TYPE(GC_EM_EXPORT), INTENT(IN) :: IS ! 3-D import-state object
INPUT/OUTPUT PARAMETERS:
TYPE(GC_COL_EXPORT), INTENT(INOUT) :: ES ! 1-D export-state object
OUTPUT PARAMETERS:
INTEGER, INTENT(OUT) :: RC ! Return code
AUTHOR:
HARVARD ATMOSPHERIC CHEMISTRY MODELING GROUP
MODULE FOR SOIL NOx EMISSIONS
by Yuhang Wang, Gerry Gardner and Prof. Daniel Jacob
REMARKS:
Original code: subroutine "RDLAI" from GEOS-Chem.
Original GEOS-Chem algorithm replaced with the algorithm from GMI, which
is much easier to understand and much cleaner to implement.
REVISION HISTORY:
11 Aug 2009 - R. Yantosca - Columnized and cleaned up
03 Nov 2009 - R. Yantosca - Now use GMI algorithm
17 Nov 2009 - R. Yantosca - Now save output in ES%LAI_DLY field
1.13.10 get lai month
Function GET LAI MONTH finds which month of leaf area index data corresponds toDOY. Note that the leaf area index data ”months” start on the 15th day of each calendarmonth, so there is an offset.
INTERFACE:
SUBROUTINE GET_LAI_MONTH( DOY, INMONTH, STARTDAY, MONcm, MONfm )
INPUT PARAMETERS:
Source File: gc emissions mod.F, Date: Tue Dec 15 14:07:34 EST 2009 83
! Arguments
INTEGER, INTENT(IN) :: DOY ! Day of year
INTEGER, INTENT(IN) :: INMONTH ! Current calendar month
INTEGER, INTENT(IN) :: STARTDAY(13) ! Array of starting days
OUTPUT PARAMETERS:
INTEGER, INTENT(OUT) :: MONcm ! Current month of LAI data
INTEGER, INTENT(OUT) :: MONfm ! Following month of LAI data
AUTHOR:
HARVARD ATMOSPHERIC CHEMISTRY MODELING GROUP
MODULE FOR SOIL NOx EMISSIONS
by Yuhang Wang, Gerry Gardner and Prof. Daniel Jacob
REMARKS:
Original code: subroutine "FINDMON" from GEOS-Chem.
REVISION HISTORY:
11 Aug 2009 - R. Yantosca - Columnized and cleaned up
29 Oct 2009 - R. Yantosca - Changed into a subroutine
29 Oct 2009 - R. Yantosca - Now pass MONcm, MONfm out via arg list
1.13.11 emiss gas phase
Subroutine EMISS GAS PHASE computes gas-phase emissions for the full chemistry sim-ulation. Emissions are stored in various sub-fields of the export state. Various sub-fields ofthe ES export-state object are also initialized here.
INTERFACE:
SUBROUTINE EMISS_GAS_PHASE( MET_1d, ES, RC )
USES:
USE CANOPY_NOX_MOD, ONLY : GET_CANOPY_NOX
USE SOIL_NOX_MOD, ONLY : SOIL_NOx_EMISSION
# include "lai_land_info.h"
INPUT PARAMETERS:
TYPE(GC_MET_1d), INTENT(IN) :: MET_1d ! Obj w/ 1-D met flds
INPUT/OUTPUT PARAMETERS:
TYPE(GC_COL_EXPORT), INTENT(INOUT) :: ES ! 1-D export-state obj
OUTPUT PARAMETERS:
Source File: canopy nox mod.F, Date: Tue Dec 15 14:07:34 EST 2009 84
INTEGER, INTENT(OUT) :: RC ! Return code
REVISION HISTORY:
10 Nov 2009 - R. Yantosca - Initial version
12 Nov 2009 - R. Yantosca - Removed PET from the arg list since this is
now replaced by ES%INPUT%PET
1.13.12 emiss aerosol phase
Subroutine EMISS AEROSOL PHASE computes aerosol-phase emissions for the full chem-istry simulation. Emissions are stored in various sub-fields of the export state.
INTERFACE:
SUBROUTINE EMISS_AER_PHASE( MET_1d, ES, RC )
USES:
INPUT PARAMETERS:
TYPE(GC_MET_1d), INTENT(IN) :: MET_1d ! Obj w/ 1-D met flds
INPUT/OUTPUT PARAMETERS:
TYPE(GC_COL_EXPORT), INTENT(INOUT) :: ES ! 1-D export state obj
OUTPUT PARAMETERS:
INTEGER, INTENT(OUT) :: RC ! Return code
REVISION HISTORY:
12 Nov 2009 - R. Yantosca - Initial version
1.14 Fortran: Module Interface canopy nox mod
Module CANOPY NOX MOD contains routines for computing the bulk surface resistanceof the canopy to NOx. This quantity is needed by GEOS-Chem soil emissions routine ”soil-crf.f”.
This computation was originally done in legacy routine DEPVEL (located in ”drydep mod.f”),and the bulk surface resistance was stored in common block array CANOPYNOX (in”commsoil.h”). However, the legacy code caused an ugly dependency. Drydep routine DE-PVEL had to be called BEFORE the soil NOx emissions routines. Routine GET CANOPY NOXin this module performs the same computation of NOx from tree canopies independent of”drydep mod.f”, thus allowing for a totally clean separation between dry deposition rou-tines and emisisons routines.
References:
Source File: canopy nox mod.F, Date: Tue Dec 15 14:07:34 EST 2009 85
• Baldocchi, D.D., B.B. Hicks, and P. Camara, A canopy stomatal resistance model for
gaseous deposition to vegetated surfaces, Atmos. Environ. 21, 91-101, 1987.
• Brutsaert, W., Evaporation into the Atmosphere, Reidel, 1982.
• Businger, J.A., et al., Flux-profile relationships in the atmospheric surface layer,J. Atmos. Sci., 28, 181-189, 1971.
• Dwight, H.B., Tables of integrals and other mathematical data, MacMillan, 1957.
• Guenther, A., et al, A global model of natural volatile organic compound emissions,J. Geophys. Res., 100, 8873-8892, 1995.
• Hicks, B.B., and P.S. Liss, Transfer of SO2 and other reactive gases across the air-sea
interface, Tellus, 28, 348-354, 1976.
• Jacob, D.J., and S.C. Wofsy, Budgets of reactive nitrogen, hydrocarbons, and ozone
over the Amazon forest during the wet season, J. Geophys. Res., 95, 16737-16754,1990.
• Jacob, D.J., et al, Deposition of ozone to tundra, J. Geophys. Res., 97, 16473-16479,1992.
• Levine, I.N., Physical Chemistry, 3rd ed., McGraw-Hill, New York, 1988.
• Munger, J.W., et al, Atmospheric deposition of reactive nitrogen oxides and ozone in
a temperate deciduous forest and a sub-arctic woodland, J. Geophys. Res., in press,1996.
• Walcek, C.J., R.A. Brost, J.S. Chang, and M.L. Wesely, SO2, sulfate, and HNO3 depo-
sition velocities computed using regional landuse and meteorological data, Atmos. Environ.,20, 949-964, 1986.
• Wang, Y., D.J. Jacob, and J.A. Logan, Global simulation of tropospheric O3-NOx-
hydrocarbon chemistry, 1. Model formulation, J. Geophys. Res., 103, D9,10,713-10,726, 1998.
• Wesely, M.L, Improved parameterizations for surface resistance to gaseous dry depo-
sition in regional-scale numerical models, Environmental Protection Agency ReportEPA/600/3-88/025, Research Triangle Park (NC), 1988.
• Wesely, M. L., Parameterization of surface resistance to gaseous dry deposition in
regional-scale numerical models, Atmos. Environ., 23, 1293-1304, 1989.
• Price, H., L. Jaegl, A. Rice, P. Quay, P.C. Novelli, R. Gammon, Global Budget of
Molecular Hydrogen and its Deuterium Content: Constraints from Ground Station,
Cruise, and Aircraft Observations, submitted to J. Geophys. Res., 2007.
INTERFACE:
MODULE CANOPY_NOX_MOD
!USES
IMPLICIT NONE
PRIVATE
Source File: canopy nox mod.F, Date: Tue Dec 15 14:07:34 EST 2009 86
PUBLIC MEMBER FUNCTIONS:
PUBLIC :: GET_CANOPY_NOX
PRIVATE MEMBER FUNCTIONS:
PRIVATE :: DIFFG
PRIVATE :: BIO_FIT
PRIVATE :: SUN_PARAM
REVISION HISTORY:
22 Jun 2009 - R. Yantosca - Split off from "drydep_mod.f"
04 Nov 2009 - R. Yantosca - Columnized and updated comments
04 Nov 2009 - R. Yantosca - Added PRIVATE functions SUNPARAM, DIFFG
1.14.1 get canopy nox
Subroutine GET CANOPY NOX computes the bulk surface resistance of the canopy toNOx (which is required to compute the NOx emissions from soils).
This computation was originally done within legacy routine DEPVEL (in ”drydep mod.f”).Moving this computation to GET CANOPY NOX now allows for a totally clean separationbetween dry deposition routines and emissions routines in GEOS-Chem.
INTERFACE:
SUBROUTINE GET_CANOPY_NOx( MET_1d, ES, CANOPYNOx, RC )
USES:
USE GC_EMISSIONS_TYPE_MOD
USE GC_TYPE_MOD
# include "drydep_info.h" ! Arrays for resistances
# include "lai_land_info.h" ! Dimensions for LAI & land type
# include "smv_errcode.h" ! Error code
INPUT PARAMETERS:
TYPE(GC_MET_1D), INTENT(IN) :: MET_1d ! Obj w/ 1-D met fields
TYPE(GC_COL_EXPORT), INTENT(IN) :: ES ! Obj w/ land cover info
OUTPUT PARAMETERS:
REAL*8, INTENT(OUT) :: CANOPYNOX(:) ! Bulk sfc resistance of
! NOx to canopy [1/s]
INTEGER, INTENT(OUT) :: RC ! Return code
REMARKS:
Source File: canopy nox mod.F, Date: Tue Dec 15 14:07:34 EST 2009 87
This version has been columnized in order to remove all references from
global GEOS-Chem common blocks. Call this immediately before routine
SOIL_NOX_EMISSION.
REVISION HISTORY:
22 Jun 2009 - R. Yantosca - Split off from "drydep_mod.f"
04 Nov 2009 - R. Yantosca - Columnized, removed all (I,J) references
04 Nov 2009 - R. Yantosca - Now pass all inputs/outputs via the arg list
09 Nov 2009 - R. Yantosca - Now pass met fields via the MET_1d object
09 Nov 2009 - R. Yantosca - Now pass land cover info via the ES object.
17 Nov 2009 - R. Yantosca - Now use daily LAI from ES%LAI_DLY(LDT)%DATA
1.14.2 diffg
Function DIFFG calculates the molecular diffusivity [m2/s] in air for a gas X of molecularweight XM [kg] at temperature TK [K] and pressure PRESS [Pa].
We specify the molecular weight of air (XMAIR) and the hard-sphere molecular radii of air(RADAIR) and of the diffusing gas (RADX). The molecular radius of air is given in a Tableon p. 479 of Levine [1988]. The Table also gives radii for some other molecules. Ratherthan requesting the user to supply a molecular radius we specify here a generic value of2.E-10 m for all molecules, which is good enough in terms of calculating the diffusivity aslong as molecule is not too big.
INTERFACE:
FUNCTION DIFFG( TK, PRESS, XM ) RESULT( DIFF_G )
INPUT PARAMETERS:
REAL*8, INTENT(IN) :: TK ! Temperature [K]
REAL*8, INTENT(IN) :: PRESS ! Pressure [hPa]
REAL*8, INTENT(IN) :: XM ! Molecular weight of gas [kg]
RETURN VALUE:
REAL*8 :: DIFF_G ! Molecular diffusivity [m2/s]
REVISION HISTORY:
22 Jun 2009 - R. Yantosca - Copied from "drydep_mod.f"
1.14.3 bio fit
Function BIO FIT adjust stomatal resistances for solar insolation, as described in Wang etal [1998].
INTERFACE:
Source File: canopy nox mod.F, Date: Tue Dec 15 14:07:34 EST 2009 88
FUNCTION BIO_FIT( COEFF1, XLAI1,
& SUNCOS1, CFRAC1 ) RESULT( BIOFIT )
USES:
# include "drydep_info.h"
INPUT PARAMETERS:
REAL*8, INTENT(IN) :: COEFF1(N_POLY) ! Baldocchi Polynomial coeffs
REAL*8, INTENT(IN) :: XLAI1 ! Leaf area index [cm2/cm2]
REAL*8, INTENT(IN) :: SUNCOS1 ! Cosine of SZA [unitless]
REAL*8, INTENT(IN) :: CFRAC1 ! Column cloud fraction [unitless]
RETURN VALUE:
REAL*8 :: BIOFIT ! Adjustment factor
REMARKS:
Light adjustment by the function BIO_FIT is described by Wang et al [1998].
It combines:
.
- Local dependence of stomal resistance on the intensity I of light
impinging the leaf; this is expressed as a multiplicative factor
I/(I+b) to the stomatal resistance where b = 50 W m-2
(equation (7) of Baldocchi et al. [1987])
.
- Radiative transfer of direct and diffuse radiation in the canopy using
equations (12)-(16) from Guenther et al. [1995]
.
- Separate accounting of sunlit and shaded leaves using equation (12)
of Guenther et al. [1995]
.
- Partitioning of the radiation at the top of the canopy into direct
and diffuse components using a parameterization to results from an
atmospheric radiative transfer model [Wang, et al 1998]
REVISION HISTORY:
04 Nov 2009 - R. Yantosca - Added to this module (source file: biofit.f)
04 Nov 2009 - R. Yantosca - Added ProTeX header and cleaned up a bit
05 Nov 2009 - R. Yantosca - Renamed to BIO_FIT to avoid confusion with
existing GEOS-Chem function "biofit.f"
1.14.4 sun param
Subroutine SUN PARAM is called by BIO FIT to adjust the LAI, cosine of solar zenithangle, and cloud fraction fields, according to according to Wang et al [1998].
INTERFACE:
Source File: gc column mod.F, Date: Tue Dec 15 14:07:34 EST 2009 89
SUBROUTINE SUN_PARAM( X )
DEFINED PARAMETERS:
! NN = Number of variables (lai, suncos, cld frac)
INTEGER, PARAMETER :: NN = 3
! ND = scaling factor for each variable
REAL*8, PARAMETER :: ND(NN) = (/ 55d0, 20d0, 11d0 /)
! X0 = maximum for each variable
REAL*8, PARAMETER :: X0(NN) = (/ 11d0, 1d0, 1d0 /)
INPUT PARAMETERS:
! Leaf area index [cm2/cm2]
REAL*8, INTENT(INOUT) :: X(NN)
REMARKS:
SUNPARAM is a utility routine called by function BIOFIT.
REVISION HISTORY:
04 Nov 2009 - R. Yantosca - Added to this module (source file: sunparam.f)
04 Nov 2009 - R. Yantosca - Added ProTeX header and cleaned up a bit
05 Nov 2009 - R. Yantosca - Renamed to SUN_PARAM to avoid confusion with
existing GEOS-Chem function "biofit.f"
1.15 Fortran: Module Interface gc column mod
Module GC COLUMN MOD is the module that contains the GEOS-Chem column codeinit, run and finalize methods.
INTERFACE:
MODULE GC_COLUMN_MOD
USES:
! Modules with derived type definitions
USE GC_TYPE_MOD
! NOTE: The SCHEM strat Ox "simple chemistry" is now deprecated,
! it will eventually be replaced with Linoz in the near future.
! For now, keep it as-is for testing/interfacing w/ GEOS-5.
! (bmy, 12/14/09)
USE SCHEM_MOD, ONLY : SCOX
USE SCHEM_MOD, ONLY : SCOX_1d
IMPLICIT NONE
PRIVATE
Source File: gc column mod.F, Date: Tue Dec 15 14:07:34 EST 2009 90
PUBLIC MEMBER FUNCTIONS:
PUBLIC :: GC_COLUMN_INIT
PUBLIC :: GC_COLUMN_RUN
PUBLIC :: GC_COLUMN_FINAL
PRIVATE MEMBER FUNCTIONS:
PRIVATE :: ITS_TIME
PRIVATE :: CONVERT_UNITS
REVISION HISTORY:
22 Jun 2009 - R. Yantosca & P. Le Sager - Columnized & cleaned up.
28 Oct 2009 - R. Yantosca - Various updates in module routines
14 Dec 2009 - R. Yantosca - GC_COLUMN_RUN now accepts TRACER_1d in [mol/mol]
mixing ratio. Apropos unit conversions are
now done w/in GC_COLUMN_RUN internally.
1.15.1 gc column run
Routine GC COLUMN RUN is the driver for the following operations:
• Planetary boundary layer mixing
• Cloud convection
• Dry deposition
• Emissions
• Chemistry
• Wet Depositon
INTERFACE:
SUBROUTINE GC_COLUMN_RUN(
!------------------------------------------------------------
! Inputs -- lon, lat, time, date
& TIMING, GEOLOC,
!------------------------------------------------------------
! Inputs -- Met fields and related quantities
& MET_1d,
!------------------------------------------------------------
! Inputs -- Emissions & drydep
& ID_EMISSION, EMISSION_1d, ALK_EMIS_1d, N_DENS_1d,
& N_AER, N_DRYDEP, N_DUST, N_RH,
Source File: gc column mod.F, Date: Tue Dec 15 14:07:34 EST 2009 91
!------------------------------------------------------------
! Inputs -- Land types and leaf area indices
& IREG_1d, ILAND_1d, IUSE_1d, LAI_1d,
& FRCLND_1d,
!------------------------------------------------------------
! Inputs -- Photolysis
& TO3_1d, N_JV,
!------------------------------------------------------------
! Inputs -- Objects for ID flags,, logical switches, etc.
& ID_SPECIES, ID_TRACERS, COEF, ID_DRYDEP,
& ID_WETDEP, OPTIONS,
!------------------------------------------------------------
! Inputs & Input/Outputs -- Column fields extracted
! from the internal state
& ORVC_TERP, ORVC_SESQ, GPROD, APROD,
& OXIDANTS_1d, CSPEC_FULL_1d, H2O2s_1d, SO2s_1d,
& AIR_MASS_1d, OH_MASS_1d,
!------------------------------------------------------------
! Input/Outputs
& TRACER_1d,
!------------------------------------------------------------
! Outputs
& DD_VEL_1d, DD_FREQ_1d, DD_FLUX_1d, WETD_LOSS_1d,
& RC )
USES:
! PBL mixing routines
USE PBL_MIXING_MOD, ONLY : COMPUTE_PBL
USE PBL_MIXING_MOD, ONLY : DO_PBL_MIXING
! Cloud convection routines
USE CLOUD_CONVECTION_MOD, ONLY : DO_GEOS5_CONVECTION
! Dry deposition routines
USE DRYDEP_MOD, ONLY : DO_DRYDEP
USE DRYDEP_MOD, ONLY : DIAG_DRYDEP_FLUX
! Chemistry routines
USE CHEMDR, ONLY : CHEMDR_COL
! Wet deposition routines
USE WETDEP_MOD, ONLY : COMPUTE_UPDRAFT_FSOL
Source File: gc column mod.F, Date: Tue Dec 15 14:07:34 EST 2009 92
USE WETDEP_MOD, ONLY : INIT_WETDEP_FIELDS
USE WETDEP_MOD, ONLY : MAKE_QQ
USE WETDEP_MOD, ONLY : WETDEP
# include "smv_dimension.h" ! Dimensions for common blocks
# include "comode_loop.h" ! SMVGEAR variables
# include "smv_errcode.h" ! Error codes
# include "bmy_debug.h" ! ### FOR DEBUGGING ONLY! ###
INPUT PARAMETERS:
!--------------------------------------------
! Lon, lat, date, time
!--------------------------------------------
TYPE(GC_TIME), INTENT(IN) :: TIMING ! Time, date, place values
TYPE(GC_GEOLOC), INTENT(IN) :: GEOLOC ! Lon, lat, localtime
!--------------------------------------------
! Met fields -- scalars
!--------------------------------------------
TYPE(GC_MET_1d), INTENT(IN) :: MET_1d ! Object w/ column met fields
!--------------------------------------------
! Emissions & drydep quantities
! NOTE: We may rewrite this such that
! all emissions come in as kg/box
!--------------------------------------------
INTEGER, INTENT(IN) :: N_DRYDEP ! # of drydep species
INTEGER, INTENT(IN) :: N_AER ! # of aerosol bins
INTEGER, INTENT(IN) :: N_DUST ! # of dust bins
INTEGER, INTENT(IN) :: N_RH ! # of RH bins
INTEGER, INTENT(IN) :: ID_EMISSION(:) ! CTM tracer #’s
REAL*8, INTENT(IN) :: EMISSION_1d(:,:) ! Emissions [kg species]
REAL*8, INTENT(IN) :: ALK_EMIS_1d(:,:) ! Seasalt alkalinity [kg]
REAL*8, INTENT(IN) :: N_DENS_1d(:,:) ! Seasalt density [#/m3]
!--------------------------------------------
! Land types & leaf area indices
!--------------------------------------------
INTEGER, INTENT(IN) :: IREG_1d ! # of Olson land types/box
INTEGER, INTENT(IN) :: ILAND_1d(:)! Olson land indices
INTEGER, INTENT(IN) :: IUSE_1d(:) ! Frac (%%) of land usage
REAL*8, INTENT(IN) :: LAI_1d(:) ! Leaf area index [cm2/cm2]
REAL*8, INTENT(IN) :: FRCLND_1d ! Land fraction [unitless]
!--------------------------------------------
! Photolysis
!--------------------------------------------
REAL*8, INTENT(IN) :: TO3_1d ! Total O3 column [DU]
Source File: gc column mod.F, Date: Tue Dec 15 14:07:34 EST 2009 93
INTEGER, INTENT(IN) :: N_JV ! Number of J-value rxns
!--------------------------------------------
! Objects for tracer & species ID’s
!--------------------------------------------
TYPE(ID_SPEC), INTENT(IN) :: ID_SPECIES ! ID’s for chem species
TYPE(ID_TRAC), INTENT(IN) :: ID_TRACERS ! ID’s for advected tracers
TYPE(SPEC_2_TRAC), INTENT(IN) :: COEF ! Species <--> tracer mapping
TYPE(ID_DRYD), INTENT(IN) :: ID_DRYDEP ! ID’s for drydep species
TYPE(ID_WETD), INTENT(IN) :: ID_WETDEP ! ID’s for wetdep species
TYPE(GC_OPTIONS), INTENT(IN) :: OPTIONS ! On/off switches for options
!--------------------------------------------
! Column quantities from the internal state
!--------------------------------------------
TYPE(SCOX_1d), INTENT(IN) :: OXIDANTS_1d ! For simple strat chem
INPUT/OUTPUT PARAMETERS:
REAL*8, INTENT(INOUT) :: TRACER_1d(:,:) ! Tracer mass [kg/box]
!--------------------------------------------
! Column quantities from the internal state
!--------------------------------------------
REAL*8, INTENT(INOUT) :: ORVC_TERP(:) ! monoterpene
REAL*8, INTENT(INOUT) :: ORVC_SESQ(:) ! sesqterpene
REAL*8, INTENT(INOUT) :: GPROD(:,:,:) ! Gas mass ratio
REAL*8, INTENT(INOUT) :: APROD(:,:,:) ! Aerosol mass ratio
REAL*8, INTENT(INOUT) :: CSPEC_FULL_1d(:,:) ! Prior chem concentration
REAL*8, INTENT(INOUT) :: H2O2s_1d(:) ! H2O2 [v/v] and SO2 [v/v]
REAL*8, INTENT(INOUT) :: SO2s_1d(:) ! conc’s after aqueous
! rxns are applied. These
! are computed in the
! sulfate chemistry module
! and passed here.
REAL*8, INTENT(INOUT) :: AIR_MASS_1d(:) ! Air mass & mass-weighted
REAL*8, INTENT(INOUT) :: OH_MASS_1d(:) ! OH for the mean OH
! diagnostic
OUTPUT PARAMETERS:
!--------------------------------------------
! Diagnostic Quantities
!--------------------------------------------
REAL*8, INTENT(OUT) :: DD_VEL_1d(:) ! Drydep velocity [m/s]
REAL*8, INTENT(OUT) :: DD_FREQ_1d(:) ! Drydep frequency [1/s]
REAL*8, INTENT(OUT) :: DD_FLUX_1d(:) ! Drydep fluxes [kg/s]
REAL*8, INTENT(OUT) :: WETD_LOSS_1d(:,:) ! Wetdep’d tracer [kg/s]
Source File: gc column mod.F, Date: Tue Dec 15 14:07:34 EST 2009 94
! Return code
INTEGER, INTENT(OUT) :: RC
REMARKS:
Met field inputs from the MET_1d object have SI units. Some GEOS-Chem
lower-level routines require nonstandard units. Units are converted and
stored in local variables within this module.
REVISION HISTORY:
22 Jun 2009 - R. Yantosca & P. Le Sager - Columnized & cleaned up.
15 Jul 2009 - R. Yantosca - Added calls to PBL mixing, drydep, wetdep
10 Aug 2009 - P. Le Sager & R. Yantosca - Pass H2O2s and SO2s as args.
24 Aug 2009 - R. Yantosca - Now pass time & date values in TIMING object.
25 Sep 2009 - R. Yantosca - Now pass met fields etc. in SI units
25 Sep 2009 - R. Yantosca - Removed DELP argument, now compute it here
20 Oct 2009 - R. Yantosca - Now pass total ozone column via arg list
21 Oct 2009 - R. Yantosca - Now pass AIR_MASS_1d, OH_MASS_1d via arg list
22 Oct 2009 - R. Yantosca - Now pass WETD_LOSS_1d via arg list
28 Oct 2009 - R. Yantosca - Now pass lon/lat info via GEOLOC object
06 Nov 2009 - R. Yantosca - Now pass column met fields via MET_1d object
14 Dec 2009 - R. Yantosca - Now input TRACER_1d as [mol/mol], and do the
relevant unit converions internally
1.15.2 gc column init
Subroutine GC COLUMN INIT calls the various initialization routines that read the setupfiles for the GEOS-Chem column code. Also, ID flags for advected tracers, chemical species,dry deposition species and wet deposition species are defined.
INTERFACE:
SUBROUTINE GC_COLUMN_INIT( OPTIONS, L_COLUMN,
& N_TRACERS, N_MEMBERS,
& N_DRYDEP, N_WETDEP,
& TS_CHEM, TRACER_NAME,
& ID_SPECIES, ID_TRACERS,
& COEF, ID_DRYDEP,
& ID_WETDEP, N_JV,
& RC )
USES:
USE DRYDEP_MOD, ONLY : INIT_DRYDEP
USE SEASALT_MOD, ONLY : INIT_SEASALT
USE WETDEP_MOD, ONLY : INIT_WETDEP
Source File: gc column mod.F, Date: Tue Dec 15 14:07:34 EST 2009 95
! NOTE: TEMPORARY TEST FOR MEAN OH!
USE DIAG_OH_MOD, ONLY : INIT_DIAG_OH
IMPLICIT NONE
# include "smv_dimension.h" ! Dimensions for common blocks
# include "comode_loop.h" ! SMVGEAR common blocks
# include "smv_errcode.h" ! Error codes
INPUT PARAMETERS:
! Object with logical flags
TYPE(GC_OPTIONS), INTENT(IN) :: OPTIONS
! Number of boxes in the atmospheric column
INTEGER, INTENT(IN) :: L_COLUMN
! Number of advected tracers
INTEGER, INTENT(IN) :: N_TRACERS
! Number of advected tracers
INTEGER, INTENT(IN) :: N_MEMBERS
! Chemistry timestep [minutes]
REAL*8, INTENT(IN) :: TS_CHEM
! Names of advected tracers
CHARACTER(LEN=*), INTENT(IN) :: TRACER_NAME(N_TRACERS)
INPUT/OUTPUT PARAMETERS:
! Object for ID flags for SMVGEAR chemical species
TYPE(ID_SPEC), INTENT(INOUT) :: ID_SPECIES
! Object for ID flags for advected tracers
TYPE(ID_TRAC), INTENT(INOUT) :: ID_TRACERS
! Object for # of species per advected tracer, etc.
TYPE(SPEC_2_TRAC), INTENT(INOUT) :: COEF
! Object for ID flags for dry-deposited tracers
TYPE(ID_DRYD), INTENT(INOUT) :: ID_DRYDEP
! Object for ID flags for wet-deposited tracers
TYPE(ID_WETD), INTENT(INOUT) :: ID_WETDEP
OUTPUT PARAMETERS:
! Number of dry deposited species
INTEGER, INTENT(OUT) :: N_DRYDEP
Source File: gc column mod.F, Date: Tue Dec 15 14:07:34 EST 2009 96
! Number of wet deposited species
INTEGER, INTENT(OUT) :: N_WETDEP
! Number of J-value reactions
INTEGER, INTENT(OUT) :: N_JV
! Return code
INTEGER, INTENT(OUT) :: RC
REVISION HISTORY:
22 Jun 2009 - R. Yantosca - Initial version
15 Jul 2009 - R. Yantosca - Now call init routines for drydep & wetdep
1.15.3 gc column final
Subroutine GC COLUMN FINAL deallocates pointers and arrays used in the chemistry.
INTERFACE:
SUBROUTINE GC_COLUMN_FINAL( COEF, OXIDANTS, OXIDANTS_1d, RC )
USES:
! Cleanup routines
USE CARBON_MOD, ONLY : CLEANUP_CARBON
USE SCHEM_MOD, ONLY : CLEANUP_SCHEM
USE SEASALT_MOD, ONLY : CLEANUP_SEASALT
USE SULFATE_MOD, ONLY : CLEANUP_SULFATE
IMPLICIT NONE
# include "smv_errcode.h" ! Error codes
INPUT/OUTPUT PARAMETERS:
! Object w/ info for mapping species <--> tracers
TYPE(SPEC_2_TRAC), INTENT(INOUT) :: COEF
! Oxidants (from internal state) for simple strat chemistry
TYPE(SCOX), INTENT(INOUT) :: OXIDANTS
! Oxidants (columns) for simple strat chemistry
TYPE(SCOX_1d), INTENT(INOUT) :: OXIDANTS_1d
OUTPUT PARAMETERS:
! Return code
INTEGER, INTENT(OUT) :: RC
Source File: gc column mod.F, Date: Tue Dec 15 14:07:34 EST 2009 97
REVISION HISTORY:
30 Apr 2009 - R. Yantosca - Initial version
05 May 2009 - P. Le Sager - now use module variables; remove call to
cleanup_dust
05 Jun 2009 - R. Yantosca - Now deallocate COEF%MOLEC_KG & COEF%XNUMOL
30 Jun 2009 - R. Yantosca - Moved here from "chemistry_mod.f"
1.15.4 its time
Function ITS TIME returns TRUE if the elapsed time is a multiple of the timestep, orFALSE otherwise. This is used to check if it is time to do emissions or chemistry, for ex-ample.
INTERFACE:
FUNCTION ITS_TIME( TIME_ELAPSED, TIMESTEP ) RESULT( IT_IS_TIME )
INPUT PARAMETERS:
REAL*8, INTENT(IN) :: TIME_ELAPSED
REAL*8, INTENT(IN) :: TIMESTEP
!RETURN_CODE
! Return code
LOGICAL :: IT_IS_TIME
REVISION HISTORY:
30 Jun 2009 - R. Yantosca - Initial version
1.15.5 convert units
Subroutine CONVERT UNITS converts the tracer concentration array from [kg] to [mol/mol]mixing ratio, or vice versa.
INTERFACE:
SUBROUTINE CONVERT_UNITS( IFLAG, COEF, AD, TRACER, RC )
USES:
USE ERROR_MOD, ONLY : IS_SAFE_DIV ! From "GeosUtil" library
# include "smv_errcode.h" ! Error codes
# include "smv_physconst.h" ! Physical constants
INPUT PARAMETERS:
Source File: pbl mixing mod.F, Date: Tue Dec 15 14:07:34 EST 2009 98
! If IFLAG==1, then convert from [kg ] --> [mol/mol]
! If IFLAG==2, then convert from [mol/mol] --> [kg ]
INTEGER, INTENT(IN) :: IFLAG
! Object containing molecular weight info
TYPE(SPEC_2_TRAC), INTENT(IN) :: COEF
! Air mass in grid box [kg]
REAL*8, INTENT(IN) :: AD(:)
INPUT/OUTPUT PARAMETERS:
! Tracer concentration in [kg] or [mol/mol]
REAL*8, INTENT(INOUT) :: TRACER(:,:)
OUTPUT PARAMETERS:
INTEGER, INTENT(OUT) :: RC
REMARKS:
The conversion from [kg] to [mol/mol] mixing ratio is as follows:
.
kg tracer(N) 1 Air mol wt moles tracer
----------- * -------- * ------------- = ------------
1 kg air tracer mol wt moles air
.
Therefore, with:
.
TCVV(N) = 28.97d-3 / molecular weight of tracer [kg]
= mol. wt. of air (AMU) / mol. wt. of tracer (AMU)
.
AD(L) = mass of air (kg) in grid box L (L = vertical index)
.
The conversion is:
.
TRACER(L,N) [kg] * TCVV(N) / AD(L) = TRACER(L,N) [mol/mol]
.
And the inverse conversion [mol/mol] to [kg] is:
.
TRACER(L,N) [mol/mol] / TCVV(N) * AD(L) = TRACER(L,N) [kg]
REVISION HISTORY:
07 Jul 2009 - R. Yantosca - Initial version
14 Dec 2009 - R. Yantosca - Now use [mol/mol] in comments instead of [v/v]
14 Dec 2009 - R. Yantosca - Now get molecular weight of air from MW_AIR
in header file "smv_physconst.h"
14 Dec 2009 - R. Yantosca - Now make sure division can be performed,
otherwise return an error condition
Source File: pbl mixing mod.F, Date: Tue Dec 15 14:07:34 EST 2009 99
1.16 Fortran: Module Interface pbl mixing mod
Module PBL MIXING MOD contains routines and variables used to compute the planetaryboundary layer (PBL) height and to mix tracers underneath the PBL top.
INTERFACE:
MODULE PBL_MIXING_MOD
USES:
! Derived type definitions
USE GC_TYPE_MOD
IMPLICIT NONE
PRIVATE
PUBLIC MEMBER FUNCTIONS:
PUBLIC :: COMPUTE_PBL
PUBLIC :: DO_PBL_MIXING
REVISION HISTORY:
02 Jul 2009 - R. Yantosca - Columnized and cleaned up
14 Dec 2009 - R. Yantosca - Don’t convert units in DO_PBL_MIXING
1.16.1 compute pbl
Subroutine COMPUTE PBL computes the PBL height and other related quantities.
INTERFACE:
SUBROUTINE COMPUTE_PBL( L_COLUMN, BXHEIGHT, PBL,
& PEDGE, IMIX, FPBL,
& PBL_TOP_L, PBL_TOP_hPa, PBL_TOP_m,
& PBL_THICK, F_OF_PBL, F_UNDER_TOP,
& ITS_IN_PBL, RC )
USES:
# include "smv_errcode.h" ! Error codes
# include "smv_physconst.h" ! Physical constants (e.g. SCALE_HEIGHT)
INPUT PARAMETERS:
! # of grid boxes in the atmospheric column
INTEGER, INTENT(IN) :: L_COLUMN
! Array of grid box heights [m]
REAL*8, INTENT(IN) :: BXHEIGHT(L_COLUMN)
Source File: pbl mixing mod.F, Date: Tue Dec 15 14:07:34 EST 2009 100
! PBL thickness of thickness [m]
REAL*8, INTENT(IN) :: PBL
! Pressure at grid box edges [hPa]
REAL*8, INTENT(IN) :: PEDGE(L_COLUMN+1)
OUTPUT PARAMETERS:
! Level where PBL top occurs
INTEGER, INTENT(OUT) :: IMIX
! Fraction of IMIXth level below the PBL top
REAL*8, INTENT(OUT) :: FPBL
! PBL top in model levels, hPa,and m
REAL*8, INTENT(OUT) :: PBL_TOP_L
REAL*8, INTENT(OUT) :: PBL_TOP_hPa
REAL*8, INTENT(OUT) :: PBL_TOP_m
! PBL thickness [hPa]
REAL*8, INTENT(OUT) :: PBL_THICK
! Fraction PBL occupied by each grid box
REAL*8, INTENT(OUT) :: F_OF_PBL(L_COLUMN)
! Fraction of grid box completely underneath the PBL top
REAL*8, INTENT(OUT) :: F_UNDER_TOP(L_COLUMN)
!
LOGICAL, INTENT(OUT) :: ITS_IN_PBL(L_COLUMN)
! Return code
INTEGER, INTENT(OUT) :: RC
REVISION HISTORY:
02 Jul 2009 - R. Yantosca - Columnized and cleaned up
14 Dec 2009 - R. Yantosca - Now reference physical constants from
include file "smv_physconst.h"
1.16.2 do pbl mixing
Subroutine DO PBL MIXING executes the GEOS-Chem boundary layer mixing algorithm.Original subroutine by Dale Allen, Univ of MD.
INTERFACE:
SUBROUTINE DO_PBL_MIXING( AD, IMIX, FPBL, TS_DYN, TRACER, RC )
Source File: cloud convection mod.F, Date: Tue Dec 15 14:07:34 EST 2009 101
USES:
# include "smv_errcode.h" ! Error codes
INPUT PARAMETERS:
! Air mass [kg]
REAL*8, INTENT(IN) :: AD(:)
! Level in which PBL top occurs
! (This is computed by routine COMPUTE_PBL)
INTEGER, INTENT(IN) :: IMIX
! Fraction of IMIXth level in PBL
! (This is computed by routine COMPUTE_PBL)
REAL*8, INTENT(IN) :: FPBL
! Timestep [minutes]
REAL*8, INTENT(IN) :: TS_DYN
INPUT/OUTPUT PARAMETERS:
! Tracer mass [mol/mol]
REAL*8, INTENT(INOUT) :: TRACER(:,:)
OUTPUT PARAMETERS:
! Return code
INTEGER, INTENT(OUT) :: RC
REVISION HISTORY:
02 Jul 2009 - R. Yantosca - Columnized and cleaned up
17 Jul 2009 - R. Yantosca - Now do unit conversion of TRACER array from
[kg] --> [v/v] and vice versa internally
14 Dec 2009 - R. Yantosca - TRACER is now passed in as [mol/mol] = [v/v],
so no need to convert units internally.
14 Dec 2009 - R. Yantosca - Removed COEF from the argument list
1.17 Fortran: Module Interface cloud convection mod
Module CLOUD CONVECTION MOD contains GEOS-Chem routines for cloud convec-tion.
INTERFACE:
MODULE CLOUD_CONVECTION_MOD
USES:
Source File: cloud convection mod.F, Date: Tue Dec 15 14:07:34 EST 2009 102
! Derived type definitions
USE GC_TYPE_MOD
IMPLICIT NONE
PRIVATE
PUBLIC DATA MEMBERS:
PUBLIC :: DO_GEOS5_CONVECTION
REVISION HISTORY:
15 Jul 2009 - R. Yantosca - Columnized and cleaned up
14 Dec 2009 - R. Yantosca - Remove unit conversion from [kg] -> [mol/mol]
1.17.1 do geos5 convection
Subroutine DO GEOS5 CONVECTION (formerly called NFCLDMX) is S-J Lin’s cumulustransport module for 3D GSFC-CTM, modified for the GEOS-Chem model.
INTERFACE:
SUBROUTINE DO_GEOS5_CONVECTION( AD, AREA_M2, CMFMC, DTRAIN, F,
& LAT, PEDGE, TS_DYN, Q, RC )
USES:
# include "smv_errcode.h" ! Error codes
INPUT PARAMETERS:
! Air mass [kg]
REAL*8, INTENT(IN) :: AD(:)
! Surface area [m2]
REAL*8, INTENT(IN) :: AREA_M2
! Cloud mass flux [kg/m2/s]
REAL*8, INTENT(IN) :: CMFMC(:)
! Detrainment flux [kg/m2/s]
REAL*8, INTENT(IN) :: DTRAIN(:)
! Fraction of soluble tracer for updraft scavenging [unitless]
! This is computed by routine COMPUTE_UPDRAFT_FSOL
REAL*8, INTENT(IN) :: F(:,:)
! Latitude [degrees]
REAL*8, INTENT(IN) :: LAT
Source File: cloud convection mod.F, Date: Tue Dec 15 14:07:34 EST 2009 103
! Pressure at grid box edges [hPa]
REAL*8, INTENT(IN) :: PEDGE(:)
! Dynamic timestep [min]
REAL*8, INTENT(IN) :: TS_DYN
INPUT/OUTPUT PARAMETERS:
! Tracer concentration [mol/mol]
REAL*8, INTENT(INOUT) :: Q(:,:)
OUTPUT PARAMETERS:
! Return code
INTEGER, INTENT(OUT) :: RC
REMARKS:
(1) The "NF" stands for "no flipping", and denotes that you don’t have to
flip the tracer array Q in the main program before passing it to NFCLDMX.
(bmy, 2/12/97, 1/31/08)
(2) This version has been customized to work with GEOS-5 met fields.
Reference:
============================================================================
Lin, SJ. "Description of the parameterization of cumulus transport
in the 3D Goddard Chemistry Transport Model, NASA/GSFC, 1996.
Vertical indexing:
============================================================================
The indexing of the vertical sigma levels has been changed from
SJ-Lin’s original code:
Old Method New Method
(SJ Lin)
------------------------------------- Top of Atm.
k = 1 k = NLAY
===================================== Max Extent
k = 2 k = NLAY-1 of Clouds
-------------------------------------
... ...
-------------------------------------
k = NLAY-3 k = 4
-------------------------------------
k = NLAY-2 k = 3
------------------------------------- Cloud base
k = NLAY-1 k = 2
- - - - - - - -
k = NLAY k = 1
===================================== Ground
which means that:
Source File: cloud convection mod.F, Date: Tue Dec 15 14:07:34 EST 2009 104
Old Method New Method
(SJ Lin)
k-1 ^ k+1 ^
---------|--------- ---------|---------
| |
CMFMC(k) CMFMC(k)
becomes
k DTRAIN(k), k DTRAIN(k),
QC(k), Q(k) QC(k), Q(k)
^ ^
---------|--------- ---------|---------
| |
k+1 CMFMC(k+1) k-1 CMFMC(k-1)
i.e., the lowest level used to be NLAY but is now 1
the level below k used to be k+1 but is now k-1.
the level above k used to be k-1 but is now k+1
the top of the atm. used to be 1 but is now NLAY.
The old method required that the vertical dimensions of the CMFMC, DTRAIN,
and Q arrays had to be flipped before and after calling CLDMX. Also,
diagnostic arrays generated within CLDMX also had to be flipped. The new
indexing eliminates this requirement (and also saves on array operations).
Major Modifications:
============================================================================
Original Author: Shian-Jiann Lin, Code 910.3, NASA/GSFC
Original Release: 12 February 1997
Version 3, Detrainment and Entrainment are considered.
The algorithm reduces to that of version 2 if Dtrn = 0.
.
Modified By: Bob Yantosca, for Harvard Atmospheric Sciences
Modified Release: 27 January 1998
Version 3.11, contains features of V.3 but also
scavenges soluble tracer in wet convective updrafts.
.
28 April 1998
Version 3.12, now includes mass flux diagnostic
.
11 November 1999
Added mass-flux diagnostics
.
04 January 2000
Updated scavenging constant AS2
.
14 March 2000
Added new wet scavenging code and diagnostics
based on the GMI algorithm
.
Source File: drydep mod.F, Date: Tue Dec 15 14:07:35 EST 2009 105
02 May 2000
Added parallel loop over tracers
REVISION HISTORY:
15 Jul 2009 - R. Yantosca - Columnized and cleaned up.
- CLDMAS renamed to CMFMC and DTRN renamed
to DTRAIN for consistency w/ GEOS-5.
17 Jul 2009 - R. Yantosca - Now do unit conversion of Q array from
[kg] --> [v/v] and vice versa internally
14 Dec 2009 - R. Yantosca - Now remove internal unit conversion, since
Q now comes in as [mol/mol] (=[v/v]) from the
calling routine.
14 Dec 2009 - R. Yantosca - Remove COEF from the argument list
1.18 Fortran: Module Interface drydep mod
Module DRYDEP MOD contains variables and routines for the GEOS-Chem dry deposi-tion scheme.
References:
• Baldocchi, D.D., B.B. Hicks, and P. Camara, A canopy stomatal resistance model for
gaseous deposition to vegetated surfaces, Atmos. Environ. 21, 91-101, 1987.
• Brutsaert, W., Evaporation into the Atmosphere, Reidel, 1982.
• Businger, J.A., et al., Flux-profile relationships in the atmospheric surface layer,J. Atmos. Sci., 28, 181-189, 1971.
• Dwight, H.B., Tables of integrals and other mathematical data, MacMillan, 1957.
• Guenther, A., et al, A global model of natural volatile organic compound emissions,J. Geophys. Res., 100, 8873-8892, 1995.
• Hicks, B.B., and P.S. Liss, Transfer of SO2 and other reactive gases across the air-sea
interface, Tellus, 28, 348-354, 1976.
• Jacob, D.J., and S.C. Wofsy, Budgets of reactive nitrogen, hydrocarbons, and ozone
over the Amazon forest during the wet season, J. Geophys. Res., 95, 16737-16754,1990.
• Jacob, D.J., et al, Deposition of ozone to tundra, J. Geophys. Res., 97, 16473-16479,1992.
• Levine, I.N., Physical Chemistry, 3rd ed., McGraw-Hill, New York, 1988.
• Munger, J.W., et al, Atmospheric deposition of reactive nitrogen oxides and ozone in
a temperate deciduous forest and a sub-arctic woodland, J. Geophys. Res., in press,1996.
Source File: drydep mod.F, Date: Tue Dec 15 14:07:35 EST 2009 106
• Walcek, C.J., R.A. Brost, J.S. Chang, and M.L. Wesely, SO2, sulfate, and HNO3 depo-
sition velocities computed using regional landuse and meteorological data, Atmos. Environ.,20, 949-964, 1986.
• Wang, Y., D.J. Jacob, and J.A. Logan, Global simulation of tropospheric O3-NOx-
hydrocarbon chemistry, 1. Model formulation, J. Geophys. Res., 103, D9,10,713-10,726, 1998.
• Wesely, M.L, Improved parameterizations for surface resistance to gaseous dry depo-
sition in regional-scale numerical models, Environmental Protection Agency ReportEPA/600/3-88/025, Research Triangle Park (NC), 1988.
• Wesely, M. L., Parameterization of surface resistance to gaseous dry deposition in
regional-scale numerical models, Atmos. Environ., 23, 1293-1304, 1989.
• Price, H., L. Jaegl, A. Rice, P. Quay, P.C. Novelli, R. Gammon, Global Budget of
Molecular Hydrogen and its Deuterium Content: Constraints from Ground Station,
Cruise, and Aircraft Observations, submitted to J. Geophys. Res., 2007.
INTERFACE:
MODULE DRYDEP_MOD
USES:
USE GC_TYPE_MOD ! Derived type definitions
IMPLICIT NONE
PRIVATE
# include "smv_dimension.h" ! MAX_TRACERS
# include "drydep_info.h" ! Arrays for resistances, etc.
PUBLIC DATA MEMBERS:
PUBLIC :: MAXDEP
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% KEEP THESE PUBLIC VARIABLES HERE FOR BACKWARDS COMPATIBILITY WITH OTHER
%%% GEOS-Chem ROUTINES DURING TESTING; OTHERWISE THE CODE WILL CHOKE UPON
%%% COMPILATION. THESE MAY BE DELETED LATER. (bmy, 6/24/09)
PUBLIC :: DEPSAV
PUBLIC :: DEPNAME
PUBLIC :: NUMDEP
PUBLIC :: NTRAIND
INTEGER :: NUMDEP
INTEGER :: NTRAIND(MAX_TRACERS)
CHARACTER(LEN=14) :: DEPNAME(MAX_TRACERS)
REAL*8, ALLOCATABLE :: DEPSAV(:,:,:)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
PUBLIC MEMBER FUNCTIONS:
Source File: drydep mod.F, Date: Tue Dec 15 14:07:35 EST 2009 107
PUBLIC :: CLEANUP_DRYDEP
PUBLIC :: DIAG_DRYDEP_FLUX
PUBLIC :: DO_DRYDEP
PUBLIC :: INIT_DRYDEP
PRIVATE MEMBER FUNCTIONS:
PRIVATE :: DIFFG
PRIVATE :: BIO_FIT
PRIVATE :: DVZ_MINVAL
PRIVATE :: SUN_PARAM
REVISION HISTORY:
23 Jun 2009 - R. Yantosca - Split off from "drydep_mod.f"
05 Nov 2009 - R. Yantosca - Added PRIVATE routines SUN_PARAM, BIO_FIT
1.18.1 do drydep
Subroutine DO DRYDEP is the driver for the GEOS-CHEM dry deposition scheme. DO DRYDEPcalls DEPVEL to compute deposition velocities [m/s], which are then converted to [cm/s].Drydep frequencies are also computed.
INTERFACE:
SUBROUTINE DO_DRYDEP( N_DRYDEP, NTYPE, AD, AIRVOL, ALBD,
& BXHEIGHT, CLDFRC, HFLUX, IREG, ILAND,
& IUSE, RADSWG, RH, SUNCOS, TS,
& USTAR, XYLAI, Z0, ZH, DD_VEL,
& DD_FREQ, RC )
USES:
# include "smv_errcode.h" ! Error codes
# include "smv_physconst.h" ! Physical constants
INPUT PARAMETERS:
INTEGER, INTENT(IN) :: N_DRYDEP ! # of dry depositing species
INTEGER, INTENT(IN) :: NTYPE ! Max # of Olson types / grid box
REAL*8, INTENT(IN) :: AD ! Air mass [kg]
REAL*8, INTENT(IN) :: AIRVOL ! Grid box volume [m3]
REAL*8, INTENT(IN) :: ALBD ! Surface albedo [unitless]
REAL*8, INTENT(IN) :: BXHEIGHT ! Grid box height [m]
REAL*8, INTENT(IN) :: CLDFRC ! Cloud fraction [unitless]
REAL*8, INTENT(IN) :: HFLUX ! Sensible heat flux [W/m2]
INTEGER, INTENT(IN) :: IREG ! # of Olson types / grid box
INTEGER, INTENT(IN) :: ILAND(NTYPE) ! Olson land type ID
INTEGER, INTENT(IN) :: IUSE(NTYPE) ! Olson land type usage (per mil)
Source File: drydep mod.F, Date: Tue Dec 15 14:07:35 EST 2009 108
REAL*8, INTENT(IN) :: RADSWG ! Radiation @ sfc [W/m2]
REAL*8, INTENT(IN) :: RH ! Relative humidity [unitless]
REAL*8, INTENT(IN) :: SUNCOS ! Cosine(solar zenith angle)
REAL*8, INTENT(IN) :: TS ! Surface temperature [K]
REAL*8, INTENT(IN) :: USTAR ! Friction velocity [m/s]
REAL*8, INTENT(IN) :: XYLAI(NTYPE) ! Leaf area indes
REAL*8, INTENT(IN) :: Z0 ! Roughness height [m]
REAL*8, INTENT(IN) :: ZH ! Mixing depth [m]
OUTPUT PARAMETERS:
REAL*8, INTENT(OUT) :: DD_VEL(N_DRYDEP) ! Dry dep velocity [m/s]
REAL*8, INTENT(OUT) :: DD_FREQ(N_DRYDEP) ! Dry dep frequency [1/s]
INTEGER, INTENT(OUT) :: RC ! Error code
REVISION HISTORY:
22 Jun 2009 - R. Yantosca - Copied from "drydep_mod.f"
1.18.2 dvz minval
Function DVZ MINVAL sets minimum values for drydep velocities for SULFATE TRAC-ERS, according to Mian Chin’s GOCART model.
INTERFACE:
FUNCTION DVZ_MINVAL( N, LSNOW, DVZ ) RESULT( NEWDVZ )
INPUT PARAMETERS:
INTEGER, INTENT(IN) :: N ! Tracer number
LOGICAL, INTENT(IN) :: LSNOW ! Logical flag to denote snow/ice
REAL*8, INTENT(IN) :: DVZ ! Deposition velocity [m/s]
RETURN VALUE:
REAL*8 :: NEWDVZ ! Modified deposition velocity [m/s]
REVISION HISTORY:
25 Jun 2009 - R. Yantosca - Now use IDT instead of tracer flags
25 Jun 2009 - R. Yantosca - Added ProTeX header
23 Oct 2009 - R. Yantosca - Changed units to [m/s], do unit conv internally
1.18.3 depvel
Subroutine DEPVEL computes the dry deposition velocities (Vd) using a resistance-in-series model.
INTERFACE:
Source File: drydep mod.F, Date: Tue Dec 15 14:07:35 EST 2009 109
SUBROUTINE DEPVEL( N_DRYDEP, NTYPE, LSNOW, CLDFRC, CZ,
& IREG, ILAND, IUSE, OBK, RADSWG,
& RH, SUNCOS, TS, USTAR, XYLAI,
& Z0, ZH, DVEL, RC )
USES:
# include "smv_errcode.h" ! Error codes
# include "smv_physconst.h" ! Physical constants
INPUT PARAMETERS:
INTEGER, INTENT(IN) :: N_DRYDEP ! # of dry depositing species
INTEGER, INTENT(IN) :: NTYPE ! Max # of Olson types / grid box
LOGICAL, INTENT(IN) :: LSNOW ! Flag denoting snow/ice
REAL*8, INTENT(IN) :: CLDFRC ! Cloud fraction [unitless]
REAL*8, INTENT(IN) :: CZ ! Alt [m] where Vd is computed
INTEGER, INTENT(IN) :: IREG ! # of Olson types / grid box
INTEGER, INTENT(IN) :: ILAND(NTYPE) ! Olson land type ID
INTEGER, INTENT(IN) :: IUSE(NTYPE) ! Olson land type usage (per mil)
REAL*8, INTENT(IN) :: OBK ! Monin-Obhukov Length [m]
REAL*8, INTENT(IN) :: RADSWG ! Radiation @ sfc [W/m2]
REAL*8, INTENT(IN) :: RH ! Relative humidity [unitless]
REAL*8, INTENT(IN) :: SUNCOS ! Cosine(solar zenith angle)
REAL*8, INTENT(IN) :: TS ! Surface temperature [K]
REAL*8, INTENT(IN) :: USTAR ! Friction velocity [m/s]
REAL*8, INTENT(IN) :: XYLAI(NTYPE) ! Leaf area index [cm2/cm2]
REAL*8, INTENT(IN) :: Z0 ! Roughness height [m]
REAL*8, INTENT(IN) :: ZH ! Mixing depth [m]
OUTPUT PARAMETERS:
REAL*8, INTENT(OUT) :: DVEL(N_DRYDEP) ! Dry deposition velocity [cm/s]
INTEGER, INTENT(OUT) :: RC ! Error code
REMARKS:
Original code comments below:
--------------------------------------------------------------------
Subroutine computes the dry deposition velocities using a
resistance-in-series model.
** Contact: D.J. Jacob, Harvard U. ([email protected])
** Modularized by G.M. Gardner, Harvard U.
** Version 3.2: 5/27/97
** Version 3.2.1: 3/4/99 -- bug fix in expression for RT
** Version 3.2.2: 3/26/99 -- bug fix: specify a large Ra for aerosols
** Version 3.2.3: 11/12/99 -- change Reynolds # criterion from 10 to 1
-- force double precision w/ "D" exponents
** Version 3.3: 5/8/00 -- bug fixes, cleanup, updated comments.
** Version 3.4: 1/22/03 -- remove hardwire for CANOPYNOX
** Version 3.5 7/21/03 -- Remove cap of surface resistance in RLUXX
Source File: drydep mod.F, Date: Tue Dec 15 14:07:35 EST 2009 110
** Version 3.6 4/01/04 -- Now do drydep of DUST aerosol tracers
** Version 3.7 4/20/04 -- Now also do drydep of SEASALT aerosol tracers
** Version 3.8 4/13/05 -- Accounts for hygroscopic growth of SEASALT
** aerosol tracers. DUST aerosol tracers do
** not grow hygroscopically. Added RHB as
** an input argument.
** Version 3.9 5/25/05 -- Now restore GISS-specific code for GCAP model
** Version 3.9.1 11/17/05 -- change Reynolds # criterion from 1 to 0.1
***********************************************************************
Changes from Version 3.2 to Version 3.3: ***
* We now suppress dry deposition over aerodynamically smooth ***
surfaces. The previous algorithm yielded negative numbers ***
when u* was very small (due to the logarithm going negative). ***
See the comments below for more information. ***
* Now eliminate obsolete variables ZLMO and SIH from the code. ***
* Obsolete comments have been updated or removed. ***
***********************************************************************
Changes from version 3.1 to version 3.2: ***
* In unstable atmospheres with |ZLMO| < ZO, as can happen ***
occasionally under very low wind conditions with tall canopies, ***
application of Monin-Obukhov similarity yields negative values ***
for RA. This was a problem in version 3.1. In fact, ***
Monin-Obukhov similarity does not apply under such conditions, ***
so we now set RA to zero and let the boundary ***
resistance RB define the overall aerodynamic resistance. Since ***
RB varies inversely with U* it will impose a large aerodynamic ***
resistance under very low wind conditions. ***
* The range of applicability of stability correction functions ***
to Monin-Obukhov similarity has been extended to ***
-2.5 < z/zMO < 1.5, based on Figure 2 of Businger et al. [1971].***
The range used to be -1 < z/zMO < 1 in version 3.1. ***
***********************************************************************
REVISION HISTORY:
22 Jun 2009 - R. Yantosca - Copied from "drydep_mod.f"
05 Nov 2009 - R. Yantosca - Now call local BIO_FIT function instead of
the external "biofit.f"
14 Dec 2009 - R. Yantosca - Now replace XCKMAN parameter with VON_KARMAN,
from "smv_physconst.h"
1.18.4 diffg
Function DIFFG calculates the molecular diffusivity [m2/s] in air for a gas X of molecularweight XM [kg] at temperature TK [K] and pressure PRESS [Pa].
We specify the molecular weight of air (XMAIR) and the hard-sphere molecular radii of air
Source File: drydep mod.F, Date: Tue Dec 15 14:07:35 EST 2009 111
(RADAIR) and of the diffusing gas (RADX). The molecular radius of air is given in a Tableon p. 479 of Levine [1988]. The Table also gives radii for some other molecules. Ratherthan requesting the user to supply a molecular radius we specify here a generic value of2.E-10 m for all molecules, which is good enough in terms of calculating the diffusivity aslong as molecule is not too big.
INTERFACE:
FUNCTION DIFFG( TK, PRESS, XM ) RESULT( DIFF_G )
INPUT PARAMETERS:
REAL*8, INTENT(IN) :: TK ! Temperature [K]
REAL*8, INTENT(IN) :: PRESS ! Pressure [hPa]
REAL*8, INTENT(IN) :: XM ! Molecular weight of gas [kg]
RETURN VALUE:
REAL*8 :: DIFF_G ! Molecular diffusivity [m2/s]
REVISION HISTORY:
22 Jun 2009 - R. Yantosca - Copied from "drydep_mod.f"
1.18.5 bio fit
Function BIO FIT adjust stomatal resistances for solar insolation, as described in Wang etal [1998].
INTERFACE:
FUNCTION BIO_FIT( COEFF1, XLAI1,
& SUNCOS1, CFRAC1 ) RESULT( BIOFIT )
INPUT PARAMETERS:
REAL*8, INTENT(IN) :: COEFF1(N_POLY) ! Baldocchi Polynomial coeffs
REAL*8, INTENT(IN) :: XLAI1 ! Leaf area index [cm2/cm2]
REAL*8, INTENT(IN) :: SUNCOS1 ! Cosine of SZA [unitless]
REAL*8, INTENT(IN) :: CFRAC1 ! Column cloud fraction [unitless]
RETURN VALUE:
REAL*8 :: BIOFIT ! Adjustment factor
REMARKS:
Light adjustment by the function BIO_FIT is described by Wang et al [1998].
It combines:
.
- Local dependence of stomal resistance on the intensity I of light
Source File: drydep mod.F, Date: Tue Dec 15 14:07:35 EST 2009 112
impinging the leaf; this is expressed as a multiplicative factor
I/(I+b) to the stomatal resistance where b = 50 W m-2
(equation (7) of Baldocchi et al. [1987])
.
- Radiative transfer of direct and diffuse radiation in the canopy using
equations (12)-(16) from Guenther et al. [1995]
.
- Separate accounting of sunlit and shaded leaves using equation (12)
of Guenther et al. [1995]
.
- Partitioning of the radiation at the top of the canopy into direct
and diffuse components using a parameterization to results from an
atmospheric radiative transfer model [Wang, et al 1998]
REVISION HISTORY:
04 Nov 2009 - R. Yantosca - Added to this module (source file: biofit.f)
04 Nov 2009 - R. Yantosca - Added ProTeX header and cleaned up a bit
05 Nov 2009 - R. Yantosca - Renamed to BIO_FIT to avoid confusion with
existing GEOS-Chem function "biofit.f"
1.18.6 sun param
Subroutine SUN PARAM is called by BIO FIT to adjust the LAI, cosine of solar zenithangle, and cloud fraction fields, according to Wang et al [1998].
INTERFACE:
SUBROUTINE SUN_PARAM( X )
DEFINED PARAMETERS:
! NN = Number of variables (lai, suncos, cld frac)
INTEGER, PARAMETER :: NN = 3
! ND = scaling factor for each variable
REAL*8, PARAMETER :: ND(NN) = (/ 55d0, 20d0, 11d0 /)
! X0 = maximum for each variable
REAL*8, PARAMETER :: X0(NN) = (/ 11d0, 1d0, 1d0 /)
INPUT PARAMETERS:
! Leaf area index [cm2/cm2]
REAL*8, INTENT(INOUT) :: X(NN)
REMARKS:
SUNPARAM is a utility routine called by function BIO_FIT.
Source File: drydep mod.F, Date: Tue Dec 15 14:07:35 EST 2009 113
REVISION HISTORY:
04 Nov 2009 - R. Yantosca - Added to this module (source file: sunparam.f)
04 Nov 2009 - R. Yantosca - Added ProTeX header and cleaned up a bit
05 Nov 2009 - R. Yantosca - Renamed to SUN_PARAM to avoid confusion with
existing GEOS-Chem function "biofit.f"
15 Dec 2009 - R. Yantosca - Updated comments
1.18.7 aero sfcrsii
Function AERO SFCRSII computes the aerodynamic resistance of seasalt aerosol tracersaccording to Zhang et al 2001. We account for hygroscopic growth of the seasalt aerosolparticles.
INTERFACE:
FUNCTION AERO_SFCRSII( K, II, PRESS, TEMP, USTAR, RHB ) RESULT(RS)
INPUT PARAMETERS:
INTEGER, INTENT(IN) :: K ! Dry deposition species index
INTEGER, INTENT(IN) :: II ! Surface land type index
REAL*8, INTENT(IN) :: PRESS ! Pressure [kPa] (where 1 Kpa = 0.1 mb)
REAL*8, INTENT(IN) :: TEMP ! Temperature [K]
REAL*8, INTENT(IN) :: USTAR ! Friction velocity [m/s]
REAL*8, INTENT(IN) :: RHB ! Relative humidity [fraction]
RETURN VALUE:
REAL*8 :: RS ! Surface resistance for particles [s/m]
REMARKS:
Original code implemented into GEOS-Chem by Rokjin Park,
T. Duncan Fairlie, and Becky Alexander.
REVISION HISTORY:
25 Jun 2009 - R. Yantosca - Columnized and cleaned up.
1.18.8 dust sfcrsi
Function DUST SFCRSI computes the aerodynamic resistance of dust aerosol tracers ac-cording to Seinfeld et al 96. We do not consider hygroscopic growth of the dust aerosolparticles.
INTERFACE:
FUNCTION DUST_SFCRSI( K, II, PRESS, TEMP, USTAR ) RESULT( RS )
Source File: drydep mod.F, Date: Tue Dec 15 14:07:35 EST 2009 114
INPUT PARAMETERS:
INTEGER, INTENT(IN) :: K ! Dry deposition species index
INTEGER, INTENT(IN) :: II ! Surface land type index
REAL*8, INTENT(IN) :: PRESS ! Pressure [kPa] (where 1 Kpa = 0.1 mb)
REAL*8, INTENT(IN) :: TEMP ! Temperature [K]
REAL*8, INTENT(IN) :: USTAR ! Friction velocity [m/s]
RETURN VALUE:
REAL*8 :: RS ! Surface resistance for particles [s/m]
REMARKS:
Original code implemented into GEOS-Chem by Rokjin Park,
T. Duncan Fairlie, and Becky Alexander.
REVISION HISTORY:
25 Jun 2009 - R. Yantosca - Columnized and cleaned up.
1.18.9 dust sfcrsii
Function DUST SFCRSII computes the aerodynamic resistance of dust aerosol tracers ac-cording to Zhang et al 2001. We do not consider the hygroscopic growth of the aerosolparticles.
INTERFACE:
FUNCTION DUST_SFCRSII( K, II, PRESS, TEMP, USTAR ) RESULT( RS )
INPUT PARAMETERS:
INTEGER, INTENT(IN) :: K ! Dry deposition species index
INTEGER, INTENT(IN) :: II ! Surface land type index
REAL*8, INTENT(IN) :: PRESS ! Pressure [kPa] (where 1 Kpa = 0.1 mb)
REAL*8, INTENT(IN) :: TEMP ! Temperature [K]
REAL*8, INTENT(IN) :: USTAR ! Friction velocity [m/s]
RETURN VALUE:
REAL*8 :: RS ! Surface resistance for particles [s/m]
REMARKS:
Original code implemented into GEOS-Chem by Rokjin Park,
T. Duncan Fairlie, and Becky Alexander.
REVISION HISTORY:
25 Jun 2009 - R. Yantosca - Columnized and cleaned up.
Source File: drydep mod.F, Date: Tue Dec 15 14:07:35 EST 2009 115
1.18.10 diag drydep flux
Subroutine DIAG DRYDEP FLUX computes dry deposition fluxes for the gas-phase dry-depositing species which are part of the GEOS-Chem chemical mechanism.
INTERFACE:
SUBROUTINE DIAG_DRYDEP_FLUX( COEF, CSPEC, FRAC_UNDER_PBL,
& TS_DRYD, VOLUME, DD_FLUX,
& RC )
USES:
# include "smv_dimension.h" ! Dimensions for common blocks
# include "comode_loop.h" ! NTDEP, NPRODLO
# include "smv_errcode.h" ! Error codes
INPUT PARAMETERS:
! Object w/ parameters for mapping species <-> tracers
TYPE(SPEC_2_TRAC), INTENT(IN) :: COEF
! Species concentrations (including drydep fluxes) in [molec/cm3]
REAL*8, INTENT(IN) :: CSPEC(:,:)
! Fraction of grid box that is completely below the PBL top
REAL*8, INTENT(IN) :: FRAC_UNDER_PBL(:)
! Dry deposition timestep [min]
REAL*8, INTENT(IN) :: TS_DRYD
! Grid box volume [cm3]
REAL*8, INTENT(IN) :: VOLUME(:)
OUTPUT PARAMETERS:
! Dry deposition fluxes [kg/s]
REAL*8, INTENT(OUT) :: DD_FLUX(:)
! Return code
INTEGER, INTENT(OUT) :: RC
REVISION HISTORY:
29 Jun 2009 - R. Yantosca - Columnized and cleaned up
22 Oct 2009 - R. Yantosca - Now don’t pass size parameters
23 Oct 2009 - R. Yantosca - Units of drydep flux are now [kg/s]
23 Oct 2009 - R. Yantosca - Reordered argument list
Source File: wetdep mod.F, Date: Tue Dec 15 14:07:35 EST 2009 116
1.18.11 init drydep
Subroutine INIT DRYDEP initializes the DRYD INFO object, which contains the param-eters for each dry deposition species for passing to subroutine DEPVEL.
INTERFACE:
SUBROUTINE INIT_DRYDEP( ID_TRACERS, ID_DRYDEP, COEF,
& N_DRYDEP, DRYDEP_NAME, RC )
USES:
# include "smv_dimension.h" ! MAX_TRACERS
# include "smv_errcode.h" ! Error codes
# include "sea_salt_info.h" ! Sea salt sizes [um] and densities [kg/m3]
INPUT PARAMETERS:
! Object w/ ID flags for advected tracers
TYPE(ID_TRAC), INTENT(IN) :: ID_TRACERS
! Object w/ tracer parameters (including molecular weight)
TYPE(SPEC_2_TRAC), INTENT(IN) :: COEF
OUTPUT PARAMETERS:
! Object w/ ID flags for dry-deposited tracers
TYPE(ID_DRYD), INTENT(OUT) :: ID_DRYDEP
! Number of dry-deposited tracers
INTEGER, INTENT(OUT) :: N_DRYDEP
! Names of dry-deposited tracers
CHARACTER(LEN=14), INTENT(OUT) :: DRYDEP_NAME(MAX_TRACERS)
! Return code
INTEGER, INTENT(OUT) :: RC
REVISION HISTORY:
25 Jun 2009 - R. Yantosca - Columnized and cleaned up.
1.19 Fortran: Module Interface wetdep mod
Module WETSCAV MOD contains routines and variables used in the wet scavenging oftracer in cloud updrafts, rainout, and washout.
INTERFACE:
MODULE WETDEP_MOD
Source File: wetdep mod.F, Date: Tue Dec 15 14:07:35 EST 2009 117
USES:
USE GC_TYPE_MOD
IMPLICIT NONE
PRIVATE
# include "smv_dimension.h"
PUBLIC MEMBER FUNCTIONS:
PUBLIC :: COMPUTE_UPDRAFT_FSOL
PUBLIC :: INIT_WETDEP
PUBLIC :: INIT_WETDEP_FIELDS
PUBLIC :: MAKE_QQ
PUBLIC :: WETDEP
PRIVATE MEMBER FUNCTIONS:
PRIVATE :: COMPUTE_L2G
PRIVATE :: CONV_F_PRIME
PRIVATE :: E_ICE
PRIVATE :: LS_K_RAIN
PRIVATE :: LS_F_PRIME
PRIVATE :: RAINOUT
PRIVATE :: GET_RAINFRAC
PRIVATE :: SAFETY
PRIVATE :: WASHOUT
PRIVATE :: WASHFRAC_AEROSOL
PRIVATE :: WASHFRAC_LIQ_GAS
REMARKS:
References:
============================================================================
(1 ) Liu,H., D.J. Jacob, I. Bey and R.M. Yantosca, "Constraints from 210Pb
and 7Be on wet deposition and transport in a global three-dimensional
chemical tracer model driven by assimilated meteorological fields",
JGR, Vol 106, pp 12109-12128, 2001.
(2 ) D.J. Jacob, H. Liu, C. Mari, and R. M. Yantosca, "Harvard wet
deposition scheme for GMI", Harvard Atmospheric Chemistry Modeling
Group, March 2000.
(3 ) Chin, M., D.J. Jacob, G.M. Gardner, M.S. Foreman-Fowler, and P.A.
Spiro, "A global three-dimensional model of tropospheric sulfate",
J. Geophys. Res., 101, 18667-18690, 1996.
(4 ) Balkanski, Y D.J. Jacob, G.M. Gardner, W.C. Graustein, and K.K.
Turekian, "Transport and Residence Times of Tropospheric Aerosols
from a Global Three-Dimensional Simulation of 210Pb", JGR, Vol 98,
(D11) pp 20573-20586, 1993.
(5 ) Giorgi, F, & W.L. Chaimedes, "Rainout Lifetimes of Highly Soluble
Aerosols and Gases as Inferred from Simulations With a General
Circulation Model", JGR, Vol 86 (D13) pp 14367-14376, 1986.
Source File: wetdep mod.F, Date: Tue Dec 15 14:07:35 EST 2009 118
REVISION HISTORY:
15 Jul 2009 - R. Yantosca - Columnized and cleaned up
10 Aug 2009 - R. Yantosca - Now add CONV field to WETD_INFO
1.19.1 make qq
Subroutine MAKE QQ computes the large-scale or convective precipitation fields for usewith subroutine WETDEP. These are stored in the PDOWN and QQ fields of the module-private WETD INFO object.
INTERFACE:
SUBROUTINE MAKE_QQ( LS, AD, AIRVOL, BXHEIGHT,
& MOISTQ, PRECTOT, PRECCON, RC )
USES:
# include "smv_errcode.h" ! Error codes
INPUT PARAMETERS:
LOGICAL, INTENT(IN) :: LS ! T denotes large-scale precip,
! F denotes convective precip
REAL*8, INTENT(IN) :: AD(:) ! Air mass [kg]
REAL*8, INTENT(IN) :: AIRVOL(:) ! Volume of grid box [m3]
REAL*8, INTENT(IN) :: BXHEIGHT(:) ! Height of grid box [m]
REAL*8, INTENT(IN) :: MOISTQ(:) ! Tendency in SPHU [kg/kg/s]
REAL*8, INTENT(IN) :: PRECTOT ! Total precip @ ground [mm/day]
REAL*8, INTENT(IN) :: PRECCON ! Convective precip @ ground [mm/day]
OUTPUT PARAMETERS:
INTEGER, INTENT(OUT) :: RC ! Return code
REVISION HISTORY:
15 Jul 2009 - R. Yantosca - Columnized and cleaned up.
1.19.2 e ice
Function E ICE computes Eice(T), the saturation vapor pressure of ice at a given temper-ature.
INTERFACE:
FUNCTION E_ICE( TK ) RESULT( VALUE )
INPUT PARAMETERS:
Source File: wetdep mod.F, Date: Tue Dec 15 14:07:35 EST 2009 119
REAL*8, INTENT(IN) :: TK ! Temperature [K]
RETURN VALUE:
REAL*8 :: VALUE ! Sat. vapor pressure of ice [hPa]
REMARKS:
Marti & Mauersberber (GRL ’93) formulation of saturation
vapor pressure of ice [Pa] is: log P = A/TK + B
REVISION HISTORY:
09 Jun 2009 - R. Yantosca - Columnized and cleaned up.
1.19.3 compute l2g
Subroutine COMPUTE L2G computes the ratio L2G = Cliq / Cgas, which is the mixingratio of tracer in the liquid phase, divided by the mixing ratio of tracer in the gas phase.
INTERFACE:
SUBROUTINE COMPUTE_L2G( Kstar298, H298_R, TK, H2OLIQ, L2G )
INPUT PARAMETERS:
! Eff. Henry’s law constant @ 298 K [moles/atm]
REAL*8, INTENT(IN) :: KStar298
! Henry’s law coefficient / R [K]
REAL*8, INTENT(IN) :: H298_R
! Temperature [K]
REAL*8, INTENT(IN) :: TK
! Liquid water content [cm3 H2O/cm3 air]
REAL*8, INTENT(IN) :: H2OLIQ
OUTPUT PARAMETERS:
! Cliq/Cgas ratio for given tracer [unitless]
REAL*8, INTENT(OUT) :: L2G
REMARKS:
The ratio Cliq / Cgas is obtained via Henry’s law. The appropriate
values of Kstar298 and H298_R must be supplied for each tracer.
(cf Jacob et al 2000, p. 3). Kstar298 and H298_R are contained in
the internal module object WETD_INFO, which is defined in routine
INIT_WETDEP.
REVISION HISTORY:
09 Jun 2009 - R. Yantosca - Columnized and cleaned up.
Source File: wetdep mod.F, Date: Tue Dec 15 14:07:35 EST 2009 120
1.19.4 compute updraft fsol
Subroutine COMPUTE UPDRAFT FSOL computes the fraction of soluble tracer lost byscavenging in convective cloud updrafts.
INTERFACE:
SUBROUTINE COMPUTE_UPDRAFT_FSOL( BXHEIGHT, T, H2O2s, SO2s, F )
INPUT PARAMETERS:
REAL*8, INTENT(IN) :: BXHEIGHT(:) ! Grid box height [m]
REAL*8, INTENT(IN) :: T(:) ! Temperature [K]
INPUT/OUTPUT PARAMETERS:
REAL*8, INTENT(INOUT) :: H2O2s(:) ! H2O2 [v/v] and SO2 [v/v]
REAL*8, INTENT(INOUT) :: SO2s(:) ! concentrations after aqueous
! rxns are applied. These are
! computed in the sulfate
! chemistry module and passed
! here as arguments.
OUTPUT PARAMETERS:
REAL*8, INTENT(OUT) :: F(:,:) ! Fraction of tracer scavenged
! in cloud updraft [0-1]
REMARKS:
Routines INIT_WETDEP_FIELDS and COMPUTE_UPDRAFT_FSOL need to be
called prior to the cloud convection.
REVISION HISTORY:
09 Jun 2009 - R. Yantosca - Columnized and cleaned up.
07 Aug 2009 - R. Yantosca - Now pass H2O2s, SO2s as arguments
1.19.5 rainout
Subroutine RAINOUT computes RAINFRAC, the fraction of soluble tracer lost to rainoutevents in precipitation.
INTERFACE:
SUBROUTINE RAINOUT( L, N_WD, TK, K_RAIN,
& DT, F, H2O2s, SO2s, RAINFRAC )
INPUT PARAMETERS:
Source File: wetdep mod.F, Date: Tue Dec 15 14:07:35 EST 2009 121
INTEGER, INTENT(IN) :: L ! Level index
INTEGER, INTENT(IN) :: N_WD ! Wet deposition species index
REAL*8, INTENT(IN) :: K_RAIN ! Rainout rate constant [1/s]
REAL*8, INTENT(IN) :: DT ! Timestep for rainout event [s]
REAL*8, INTENT(IN) :: F ! Fraction of grid box precipitating
REAL*8, INTENT(IN) :: TK ! Temperature [K]
INPUT/OUTPUT PARAMETERS:
REAL*8, INTENT(INOUT) :: H2O2s ! H2O2 [v/v] and SO2 [v/v]
REAL*8, INTENT(INOUT) :: SO2s ! concentrations after aqueous rxns
! are applied. These are computed
! in the sulfate chemistry module
! and passed here as arguments.
OUTPUT PARAMETERS:
REAL*8, INTENT(OUT) :: RAINFRAC ! Fraction of tracer lost to rainout
REMARKS:
Now suppress rainout if T < 258K for GEOS-5 met fields.
REVISION HISTORY:
15 Jul 2009 - R. Yantosca - Columnized and cleaned up.
1.19.6 get rainfrac
Function GET RAINFRAC computes the fraction of tracer lost to rainout according toJacob et al 2000.
INTERFACE:
FUNCTION GET_RAINFRAC( K, F, DT ) RESULT( RAINFRAC )
INPUT PARAMETERS:
! Arguments
REAL*8, INTENT(IN) :: K ! Rainout rate constant [1/s]
REAL*8, INTENT(IN) :: F ! Fraction of grid box precipitating
REAL*8, INTENT(IN) :: DT ! Timestep for rainout event [s]
RETURN VALUE:
REAL*8 :: RAINFRAC ! Fraction of tracer lost to rainout
REVISION HISTORY:
15 Jul 2009 - R. Yantosca - Columnized and cleaned up.
Source File: wetdep mod.F, Date: Tue Dec 15 14:07:35 EST 2009 122
1.19.7 washout
Subroutine WASHOUT computes WASHFRAC, the fraction of soluble tracer lost to washoutevents in precipitation.
INTERFACE:
SUBROUTINE WASHOUT( L, N_WD, BXHEIGHT, TK, PP,
& DT, F, H2O2s, SO2s, WASHFRAC )
INPUT PARAMETERS:
INTEGER, INTENT(IN) :: L ! Vertical level
INTEGER, INTENT(IN) :: N_WD ! Index ospecies being wet-deposited
REAL*8, INTENT(IN) :: BXHEIGHT ! Grid box height [m]
REAL*8, INTENT(IN) :: TK ! Temperature [K]
REAL*8, INTENT(IN) :: PP ! Precip rate thru at bottom of
! grid box [cm3 H2O/cm2 air/s]
REAL*8, INTENT(IN) :: DT ! Timestep [s]
REAL*8, INTENT(IN) :: F ! Fraction of box that is
! precipitating
INPUT/OUTPUT PARAMETERS:
REAL*8, INTENT(INOUT) :: H2O2s ! H2O2 [v/v] and SO2 [v/v]
REAL*8, INTENT(INOUT) :: SO2s ! concentrations after aqueous rxns
! are applied. These are computed
! in the sulfate chemistry module
! and passed here as arguments.
OUTPUT PARAMETERS:
REAL*8, INTENT(OUT) :: WASHFRAC ! Fraction of tracer lost to rainout
REVISION HISTORY:
15 Jul 2009 - R. Yantosca - Columnized and cleaned up.
1.19.8 washfrac aerosol
Function WASHFRAC AEROSOL returns the fraction of soluble aerosol tracer lost towashout.
INTERFACE:
FUNCTION WASHFRAC_AEROSOL( DT, F, K_WASH, PP, TK )
& RESULT( WASHFRAC )
INPUT PARAMETERS:
Source File: wetdep mod.F, Date: Tue Dec 15 14:07:35 EST 2009 123
! Timestep [s]
REAL*8, INTENT(IN) :: DT
! Fraction of grid box that is precipitating
REAL*8, INTENT(IN) :: F
! 1st order washout rate constant [1/cm]
REAL*8, INTENT(IN) :: K_WASH
! Precipitation rate thru at bottom of grid box [cm3 H2O/cm2 air/s]
REAL*8, INTENT(IN) :: PP
! Temperature [K]
REAL*8, INTENT(IN) :: TK
RETURN VALUE:
! Fraction of aerosol tracer lost to washout
REAL*8 :: WASHFRAC
REVISION HISTORY:
15 Jul 2009 - R. Yantosca - Columnized and cleaned up.
1.19.9 washfrac liq gas
Function WASHFRAC LIQ GAS returns the fraction of soluble liquid/gas phase tracer lostto washout.
INTERFACE:
FUNCTION WASHFRAC_LIQ_GAS( Kstar298, H298_R, PP, DT,
& F, DZ, TK, K_WASH )
& RESULT( WASHFRAC )
INPUT PARAMETERS:
! Eff. Henry’s law constant @ 298 K [moles/atm]
REAL*8, INTENT(IN) :: Kstar298
! Henry’s law coefficient / R [K]
REAL*8, INTENT(IN) :: H298_R
! Precipitation rate thru bottom of grid box [cm3 H2O/cm2 air/s]
REAL*8, INTENT(IN) :: PP
! Timestep [s]
REAL*8, INTENT(IN) :: DT
Source File: wetdep mod.F, Date: Tue Dec 15 14:07:35 EST 2009 124
! Fraction of grid box that is precipitating
REAL*8, INTENT(IN) :: F
! Height of grid box [cm]
REAL*8, INTENT(IN) :: DZ
! Temperature [K]
REAL*8, INTENT(IN) :: TK
! 1st order washout rate constant [1/cm]
REAL*8, INTENT(IN) :: K_WASH
RETURN VALUE:
! Fraction of tracer lost to washout
REAL*8 :: WASHFRAC
REVISION HISTORY:
15 Jul 2009 - R. Yantosca - Columnized and cleaned up.
1.19.10 wetdep
Subroutine WETDEP computes the downward mass flux of tracer due to washout and rain-out of aerosols and soluble tracers in a column.
INTERFACE:
SUBROUTINE WETDEP( LS, BXHEIGHT, TK, TS_DYN,
& H2O2s, SO2s, TRACER, LOSS, RC )
USES:
# include "smv_errcode.h" ! Error codes
INPUT PARAMETERS:
LOGICAL, INTENT(IN) :: LS ! LS==T denotes large-scale precip
! LS==F denotes convective precip
REAL*8, INTENT(IN) :: BXHEIGHT(:) ! Grid box height [m]
REAL*8, INTENT(IN) :: TK(:) ! Temperature [K]
REAL*8, INTENT(IN) :: TS_DYN ! Dynamics timestep [min]
INPUT/OUTPUT PARAMETERS:
REAL*8, INTENT(INOUT) :: H2O2s(:) ! H2O2 [v/v] and SO2 [v/v]
REAL*8, INTENT(INOUT) :: SO2s(:) ! concentrations after aqueous
! rxns are applied. These are
! computed in the sulfate
Source File: wetdep mod.F, Date: Tue Dec 15 14:07:35 EST 2009 125
! chemistry module and passed
! here as arguments.
REAL*8, INTENT(INOUT) :: TRACER(:,:) ! Tracer mass [kg]
REAL*8, INTENT(INOUT) :: LOSS(:,:) ! Mass of tracer scavenged out
! of the column [kg/s]
OUTPUT PARAMETERS:
INTEGER, INTENT(OUT) :: RC ! Return code
REMARKS:
The precip fields through the bottom of each level are indexed as follows:
.
Layer GEOS-Chem
-------------------------------- Top of Atm.
LM PDOWN(LM)
|
=====================V========== Max Extent
LM-1 PDOWN(LM-1) of Clouds
|
---------------------V----------
...
--------------------------------
4 PDOWN(4)
|
---------------------V----------
3 PDOWN(3)
|
---------------------V---------- Cloud base
2 PDOWN(2)
|
- - - - - - - V - - -
1 PDOWN(1)
|
=====================V========= Ground
.
From the diagram, we have the following for layer L:
.
GEOS-CHEM
(a) Precip coming in thru top of layer L = PDOWN(L+1 )
(b) Precip going out thru bottom of layer L = PDOWN(L, I,J)
REVISION HISTORY:
13 Jul 2009 - R. Yantosca - Columnized and cleaned up.
22 Oct 2009 - R. Yantosca - Now pass LOSS diagnostic array via the arg list.
Source File: wetdep mod.F, Date: Tue Dec 15 14:07:35 EST 2009 126
1.19.11 ls k rain
Function LS K RAIN computes K RAIN, the first order rainout rate constant for large-scale (a.k.a. stratiform) precipitation.
INTERFACE:
FUNCTION LS_K_RAIN( Q ) RESULT( K_RAIN )
INPUT PARAMETERS:
! Arguments
REAL*8, INTENT(IN) :: Q ! Precip formation rate [cm3 H2O/cm3 air/s]
RETURN VALUE:
REAL*8 :: K_RAIN ! 1st order rainout rate constant [s-1]
REVISION HISTORY:
13 Jul 2009 - R. Yantosca - Columnized and cleaned up.
1.19.12 ls f prime
Function LS F PRIME computes F’, the fraction of the grid box that is precipitating duringlarge scale (a.k.a. stratiform) precipitation.
INTERFACE:
FUNCTION LS_F_PRIME( Q, K_RAIN ) RESULT( F_PRIME )
INPUT PARAMETERS:
! Arguments
REAL*8, INTENT(IN) :: Q ! Precip formation rate [cm3 H2O/cm3 air/s]
REAL*8, INTENT(IN) :: K_RAIN ! 1st order rainout rate constant [s-1]
RETURN VALUE:
! Function value
REAL*8 :: F_PRIME ! Precipitating fraction of grid box
REVISION HISTORY:
13 Jul 2009 - R. Yantosca - Columnized and cleaned up.
Source File: wetdep mod.F, Date: Tue Dec 15 14:07:35 EST 2009 127
1.19.13 conv f prime
Function CONV F PRIME computes F’, the fraction of the grid box that is precipitatingduring convective precipitation.
INTERFACE:
FUNCTION CONV_F_PRIME( Q, K_RAIN, DT ) RESULT( F_PRIME )
INPUT PARAMETERS:
! Arguments
REAL*8, INTENT(IN) :: Q ! Precip formation rate [cm3 H2O/cm3 air/s]
REAL*8, INTENT(IN) :: K_RAIN ! 1st order rainout rate constant [s-1]
REAL*8, INTENT(IN) :: DT ! Wet deposition timestep [s]
RETURN VALUE:
! Function value
REAL*8 :: F_PRIME ! Precipitating fraction of grid box
REVISION HISTORY:
13 Jul 2009 - R. Yantosca - Columnized and cleaned up.
1.19.14 safety
Subroutine SAFETY prints the values of several variables when an error condition is en-countered in routine WETDEP.
INTERFACE:
SUBROUTINE SAFETY( L, N, A, LS,
& PDOWN, QQ, ALPHA, ALPHA2,
& RAINFRAC, WASHFRAC, MASS_WASH, MASS_NOWASH,
& WETLOSS, GAINED, LOST, DTRACER,
& TRACER )
INPUT PARAMETERS:
LOGICAL, INTENT(IN) :: LS ! =T denotes large-scale precip
! =F denotes convective precip
INTEGER, INTENT(IN) :: L ! Vertical level
INTEGER, INTENT(IN) :: N ! Tracer number
INTEGER, INTENT(IN) :: A ! Area of the code we are in
REAL*8, INTENT(IN) :: PDOWN ! Precip thru bottom of grid box
! [cm3 H2O/cm2 area/s]
REAL*8, INTENT(IN) :: QQ ! Rate of formation of new precip
! [cm3 H2O/cm3 air/s]
REAL*8, INTENT(IN) :: ALPHA ! Fraction of raindrops evaporated
REAL*8, INTENT(IN) :: ALPHA2 ! Fraction of raindrops resuspended
Source File: wetdep mod.F, Date: Tue Dec 15 14:07:35 EST 2009 128
REAL*8, INTENT(IN) :: RAINFRAC ! Frac of tracer lost to rainout
REAL*8, INTENT(IN) :: WASHFRAC ! Frac of tracer lost to washout
REAL*8, INTENT(IN) :: MASS_WASH ! Aerosol tracer that can washout
REAL*8, INTENT(IN) :: MASS_NOWASH ! Aerosol tracer that can’t washout
REAL*8, INTENT(IN) :: WETLOSS ! Amount of tracer that washed out
REAL*8, INTENT(IN) :: GAINED ! Aerosol that will re-evaporate
REAL*8, INTENT(IN) :: LOST ! Aerosol that won’t re-evaporate
REAL*8, INTENT(IN) :: DTRACER(:) ! Change in tracer [kg]
REAL*8, INTENT(IN) :: TRACER(:) ! Tracer concentration [kg]
REMARKS:
NOTE: For a full description of variables, see the source code
to subroutine WETDEP.
REVISION HISTORY:
13 Jul 2009 - R. Yantosca - Columnized and cleaned up.
1.19.15 init wetdep fields
Subroutine INIT WETDEP FIELDS initializes updraft velocity, cloud liquid water content,cloud ice content, and mixing ratio of water fields, which are used in the wet scavengingroutines.
INTERFACE:
SUBROUTINE INIT_WETDEP_FIELDS( T, P, LWI, RC )
USES:
# include "smv_errcode.h"
INPUT PARAMETERS:
REAL*8, INTENT(IN) :: T(:) ! Temperature [K]
REAL*8, INTENT(IN) :: P(:) ! Pressure at level center [hPa]
REAL*8, INTENT(IN) :: LWI ! Land/water indices [unitless]
OUTPUT PARAMETERS:
INTEGER, INTENT(OUT) :: RC ! Return code
REMARKS:
Routines INIT_WETDEP_FIELDS and COMPUTE_UPDRAFT_FSOL need to be
called prior to the cloud convection.
REVISION HISTORY:
15 Jul 2009 - R. Yantosca - Columnized and cleaned up.
Source File: chemdr.F, Date: Tue Dec 15 14:07:35 EST 2009 129
1.19.16 init wetdep
Subroutine INIT WETDEP initializes the WETD INFO object, which contains the param-eters for each wet deposition species for passing to subroutine WETDEP.
INTERFACE:
SUBROUTINE INIT_WETDEP( L_COLUMN, ID_TRACERS,
& ID_WETDEP, N_WD, RC )
USES:
# include "smv_errcode.h" ! Error codes
INPUT PARAMETERS:
! Number of grid boxes in the atmospheric column
INTEGER, INTENT(IN) :: L_COLUMN
! Object w/ ID flags for advected tracers
TYPE(ID_TRAC), INTENT(IN) :: ID_TRACERS
OUTPUT PARAMETERS:
! Object w/ ID flags for wet-deposited tracers
TYPE(ID_WETD), INTENT(OUT) :: ID_WETDEP
! Number of wet-deposited tracers
INTEGER, INTENT(OUT) :: N_WD
! Return code
INTEGER, INTENT(OUT) :: RC
REVISION HISTORY:
15 Jul 2009 - R. Yantosca - Columnized and cleaned up.
10 Aug 2009 - R. Yantosca - Now add CONV field to WETD_INFO
1.20 Fortran: Module Interface chemdr.f
Module CHEMDR is the module that contains the various GEOS-Chem routines for thefull-chemistry simulation.
INTERFACE:
MODULE CHEMDR
USES:
! Module w/ derived type definitions
USE GC_TYPE_MOD
IMPLICIT NONE
PRIVATE
Source File: chemdr.F, Date: Tue Dec 15 14:07:35 EST 2009 130
PUBLIC MEMBER FUNCTIONS:
PUBLIC :: CHEMDR_COL
REVISION HISTORY:
03 Apr 2009 - R. Yantosca & P. Le Sager - Columnized & cleaned up.
1.20.1 chemdr col
Routine CHEMDR COL is the column chemistry driver routine. All quantities are passedin as vertical columns or scalars.
INTERFACE:
SUBROUTINE CHEMDR_COL(
!------------------------------------------------------------
! Inputs -- lon, lat, time & date
& LON, LAT, MONTH, YEAR,
& DAY, JDAY, HOUR, MINUTE,
& LOCALTIME, FIRST_TIME, TS_CHEM,
!-----------------------------------------------------------
! Inputs -- Met fields
& AD_1d, AIRDENS_1d, AIRVOL_1d, ALBD_1d,
& AREA_CM2_1d, BXHEIGHT_1d, CLDF_1d, DELP_1d,
& FRCLND_1d, OPTD_1d, PEDGE_1d, PMID_1d,
& RH_1d, SPHU_1d, SUNCOS_1d, SST_1d,
& T_1d, TS_1d, U10M_1d, UVALBEDO_1d,
& V10M_1d, VOLUME_1d,
!-----------------------------------------------------------
! Inputs -- PBL and troposphere quantities
& FRAC_OF_PBL, FRAC_UNDER_PBL, ITS_IN_PBL, ITS_IN_TROP,
!------------------------------------------------------------
! Inputs -- Emissions & drydep
& ID_EMISSION, EMISSION_1d, DD_FREQ_1d, ALK_EMIS_1d,
& N_DENS_1d, N_AER, N_DUST, N_RH,
!------------------------------------------------------------
! Inputs -- Photolysis
& TO3_1d, N_JV,
!------------------------------------------------------------
! Inputs -- Objects for ID flags, logical switches, etc.
& ID_SPECIES, ID_TRACERS, COEF, ID_DRYDEP,
Source File: chemdr.F, Date: Tue Dec 15 14:07:35 EST 2009 131
& ID_WETDEP, OPTIONS,
!------------------------------------------------------------
! Inputs and Input/Outputs -- Column fields extracted
! from the internal state
& ORVC_TERP, ORVC_SESQ, GPROD, APROD,
& OXIDANTS_1d, CSPEC_FULL_1d, AIR_MASS_1d, OH_MASS_1d,
!------------------------------------------------------------
! Input/Outputs and outputs
& TRACER_1d, H2O2s, SO2s, RC )
USES:
! Aerosol chemistry routines
USE CARBON_CHEM_MOD, ONLY : CHEMCARBON
USE DUST_MOD, ONLY : CHEMDUST
USE RPMARES_MOD, ONLY : DO_RPMARES
USE SEASALT_CHEM_MOD, ONLY : CHEMSEASALT
USE SULFATE_CHEM_MOD, ONLY : CHEMSULFATE
! Other chemistry routines
USE ACETONE_MOD, ONLY : OCEAN_SINK_ACET
! Simple stratospheric chemistry
USE SCHEM_MOD, ONLY : SCOX_1d, SCHEM
# include "smv_dimension.h" ! Dimensions for common blocks
# include "comode_loop.h" ! SMVGEAR variables
# include "smv_errcode.h" ! Error codes
# include "smv_physconst.h" ! Physical constants (e.g. MW_AIR, AVO)
# include "bmy_debug.h"
INPUT PARAMETERS:
!--------------------------------------------
! Lon, lat, date, time
!--------------------------------------------
REAL*8, INTENT(IN) :: LON ! Longitude of column [deg]
REAL*8, INTENT(IN) :: LAT ! Latitude of column [deg]
INTEGER, INTENT(IN) :: YEAR ! UTC year
INTEGER, INTENT(IN) :: MONTH ! UTC month (1-12)
INTEGER, INTENT(IN) :: DAY ! UTC day (1-31)
INTEGER, INTENT(IN) :: JDAY ! UTC day of year (1-365/366)
INTEGER, INTENT(IN) :: HOUR ! UTC hour (0-24)
INTEGER, INTENT(IN) :: MINUTE ! UTC minutes (0-59)
REAL*8, INTENT(IN) :: LOCALTIME ! Local time (UTC + LON/15)
LOGICAL, INTENT(IN) :: FIRST_TIME ! Is it first chem iteration?
REAL*8, INTENT(IN) :: TS_CHEM ! Chemistry timestep [min]
Source File: chemdr.F, Date: Tue Dec 15 14:07:35 EST 2009 132
!--------------------------------------------
! Met fields -- scalars
!--------------------------------------------
REAL*8, INTENT(IN) :: AREA_CM2_1d ! Surface area [cm2]
REAL*8, INTENT(IN) :: ALBD_1d ! Surface albedo [unitless]
REAL*8, INTENT(IN) :: FRCLND_1d ! Land fraction [unitless]
REAL*8, INTENT(IN) :: SUNCOS_1d ! Cosine of SZA [unitless]
REAL*8, INTENT(IN) :: TS_1d ! Surface temperature [K]
REAL*8, INTENT(IN) :: SST_1d ! Sea surface temperature [K]
REAL*8, INTENT(IN) :: U10M_1d ! E/W wind speed @ 10 m [m/s]
REAL*8, INTENT(IN) :: UVALBEDO_1d ! Albedo in UV band [unitless]
REAL*8, INTENT(IN) :: V10M_1d ! N/S wind speed @ 10 m [m/s]
!--------------------------------------------
! Met fields -- vertical column arrays
!--------------------------------------------
REAL*8, INTENT(IN) :: AD_1d(:) ! Air mass [kg]
REAL*8, INTENT(IN) :: AIRVOL_1d(:) ! Grid box volume [m3]
REAL*8, INTENT(IN) :: AIRDENS_1d(:) ! Air density [molec/cm3]
REAL*8, INTENT(IN) :: BXHEIGHT_1d(:) ! Grid box height [m]
REAL*8, INTENT(IN) :: CLDF_1d(:) ! Cloud fraction [unitless]
REAL*8, INTENT(IN) :: DELP_1d(:) ! Delta-pressure [hPa]
REAL*8, INTENT(IN) :: OPTD_1d(:) ! Vis. optical depth [unitless]
REAL*8, INTENT(IN) :: PEDGE_1d(:) ! Pressure @ level edges [hPa]
REAL*8, INTENT(IN) :: PMID_1d(:) ! Pressure @ level ctrs [hPa]
REAL*8, INTENT(IN) :: RH_1d(:) ! Relative humidity [%]
REAL*8, INTENT(IN) :: SPHU_1d(:) ! Specific humidity [g/kg]
REAL*8, INTENT(IN) :: T_1d(:) ! Temperature [K]
REAL*8, INTENT(IN) :: VOLUME_1d(:) ! Grid box volume [cm3]
!--------------------------------------------
! PBL quantities
!--------------------------------------------
REAL*8, INTENT(IN) :: FRAC_OF_PBL(:) ! Frac of box in the PBL
REAL*8, INTENT(IN) :: FRAC_UNDER_PBL(:) ! Frac of box under PBL top
LOGICAL, INTENT(IN) :: ITS_IN_PBL(:) ! Flags: are we in PBL?
LOGICAL, INTENT(IN) :: ITS_IN_TROP(:) ! Flags: are we in trop?
!--------------------------------------------
! Emissions & drydep quantities
!--------------------------------------------
INTEGER, INTENT(IN) :: N_AER ! # of aerosol bins
INTEGER, INTENT(IN) :: N_DUST ! # of dust bins
INTEGER, INTENT(IN) :: N_RH ! # of RH bins
INTEGER, INTENT(IN) :: ID_EMISSION(:) ! CTM tracer #’s
REAL*8, INTENT(IN) :: EMISSION_1d(:,:) ! Emissions [kg species]
REAL*8, INTENT(IN) :: DD_FREQ_1d(:) ! Drydep frequencies [1/s]
Source File: chemdr.F, Date: Tue Dec 15 14:07:35 EST 2009 133
REAL*8, INTENT(IN) :: ALK_EMIS_1d(:,:) ! Seasalt alkalinity [kg]
REAL*8, INTENT(IN) :: N_DENS_1d(:,:) ! Seasalt density [#/m3]
!--------------------------------------------
! Photolysis
!--------------------------------------------
REAL*8, INTENT(IN) :: TO3_1d ! Total O3 column [DU]
INTEGER, INTENT(IN) :: N_JV ! Number of J-value rxns
!--------------------------------------------
! Objects for tracer & species ID’s
!--------------------------------------------
TYPE(ID_SPEC), INTENT(IN) :: ID_SPECIES ! ID’s for chem species
TYPE(ID_TRAC), INTENT(IN) :: ID_TRACERS ! ID’s for advected tracers
TYPE(SPEC_2_TRAC), INTENT(IN) :: COEF ! Species <--> tracer mapping
TYPE(ID_DRYD), INTENT(IN) :: ID_DRYDEP ! ID’s for drydep species
TYPE(ID_WETD), INTENT(IN) :: ID_WETDEP ! ID’s for wetdep species
TYPE(GC_OPTIONS), INTENT(IN) :: OPTIONS ! On/off switches for options
!--------------------------------------------
! Column quantities from the internal state
!--------------------------------------------
TYPE(SCOX_1d), INTENT(IN) :: OXIDANTS_1d ! For simple strat chem
INPUT/OUTPUT PARAMETERS:
REAL*8, INTENT(INOUT) :: TRACER_1d(:,:) ! Tracer conc. [kg/box]
! Column quantities from the internal state
REAL*8, INTENT(INOUT) :: ORVC_TERP(:) ! monoterpene
REAL*8, INTENT(INOUT) :: ORVC_SESQ(:) ! sesqterpene
REAL*8, INTENT(INOUT) :: GPROD(:,:,:) ! Gas mass ratio
REAL*8, INTENT(INOUT) :: APROD(:,:,:) ! Aerosol mass ratio
REAL*8, INTENT(INOUT) :: CSPEC_FULL_1d(:,:) ! Prior chem concentration
REAL*8, INTENT(INOUT) :: AIR_MASS_1d(:) ! Masses of air and OH
REAL*8, INTENT(INOUT) :: OH_MASS_1d(:) ! for mean OH diagnostic
OUTPUT PARAMETERS:
REAL*8, INTENT(OUT) :: H2O2s(:) ! H2O2 [v/v] and SO2 [v/v]
REAL*8, INTENT(OUT) :: SO2s(:) ! conc’s after aqueous
! rxns are applied. These
! are computed in the
! sulfate chemistry module
! and passed out here.
INTEGER, INTENT(OUT) :: RC ! Return code
REVISION HISTORY:
22 Jun 2009 - R. Yantosca & P. Le Sager - Columnized & cleaned up.
Source File: chemdr.F, Date: Tue Dec 15 14:07:35 EST 2009 134
16 Jul 2009 - R. Yantosca - Switched order of PEDGE_1d & PMID_1d
in the argument list (for alpha order)
20 Oct 2009 - R. Yantosca - Now pass in total ozone column via arg list
21 Oct 2009 - R. Yantosca - Now pass out AIR_MASS_1d and OH_MASS_1d
for the GEOS-Chem Mean OH diagnostic
1.20.2 rdust
Subroutine RDUST calculates dust optical depth at each level for the FAST-J routineset prof.f.
INTERFACE:
SUBROUTINE RDUST( ID_TRACERS, L_COLUMN, N_AER,
& N_DUST, N_RH, N_TRACERS,
& AIRVOL_1d, BXHEIGHT_1d, TRACER_1d,
& ERADIUS_1d, ODMDUST_1d, TAREA_1d,
& RC )
USES:
IMPLICIT NONE
# include "smv_dimension.h" ! Dimensions for common blocks
# include "cmn_fj_loop.h" ! FAST-J parameters & variables
# include "jv_cmn_loop.h" ! ODMDUST, QAA, RAA
# include "smv_errcode.h" ! Error codes
INPUT PARAMETERS:
! Object for tracer ID flags
TYPE(ID_TRAC), INTENT(IN) :: ID_TRACERS
! Number of grid boxes in the vertical column
INTEGER, INTENT(IN) :: L_COLUMN
! Number of aerosol bins
INTEGER, INTENT(IN) :: N_AER
! Number of dust bins
INTEGER, INTENT(IN) :: N_DUST
! Number of relative humidity bins
INTEGER, INTENT(IN) :: N_RH
! Number of transported tracers
INTEGER, INTENT(IN) :: N_TRACERS
Source File: chemdr.F, Date: Tue Dec 15 14:07:35 EST 2009 135
! Grid box volume
REAL*8, INTENT(IN) :: AIRVOL_1d (L_COLUMN )
! Grid box height [m]
REAL*8, INTENT(IN) :: BXHEIGHT_1d(L_COLUMN )
! Tracer concentration [kg]
REAL*8, INTENT(IN) :: TRACER_1d (L_COLUMN,N_TRACERS )
INPUT/OUTPUT PARAMETERS:
! Aerosol effective radius [cm]
REAL*8, INTENT(INOUT) :: ERADIUS_1d (L_COLUMN,N_DUST+N_AER)
! Dust optical depth [unitless]
REAL*8, INTENT(INOUT) :: ODMDUST_1d (L_COLUMN,N_DUST )
! Aerosol surface area [cm^2 dry aerosol/cm^3 air]
REAL*8, INTENT(INOUT) :: TAREA_1d (L_COLUMN,N_DUST+N_RH )
OUTPUT PARAMETERS:
! Return code
INTEGER, INTENT(OUT) :: RC
REVISION HISTORY:
03 Apr 2009 - R. Yantosca & P. Le Sager - Columnized & cleaned up.
1.20.3 rdaer
Subroutine RDAER calculates optical depth at each level for ”set prof.f”. Also calculatessurface area for heterogeneous chemistry. It uses aerosol parameters in FAST-J input file”jv spec.dat” for these calculations.
INTERFACE:
SUBROUTINE RDAER( ID_TRACERS, OPTIONS, L_COLUMN,
& N_AER, N_DUST, N_RH,
& N_TRACERS, ABSHUM_1d, AIRVOL_1d,
& BXHEIGHT_1d, ITS_IN_TROP, TRACER_1d,
& ERADIUS_1d, ODAER_1d, TAREA_1d,
& RC )
USES:
IMPLICIT NONE
# include "smv_dimension.h" ! Dimensions for common blocks
# include "cmn_fj_loop.h" ! LPAR
# include "jv_cmn_loop.h" ! ODAER, QAA, RA
# include "smv_errcode.h" ! Error codes
Source File: chemdr.F, Date: Tue Dec 15 14:07:35 EST 2009 136
INPUT PARAMETERS:
! Object for tracer ID flags
TYPE(ID_TRAC), INTENT(IN) :: ID_TRACERS
! Object for logical switches to control various options
TYPE(GC_OPTIONS), INTENT(IN) :: OPTIONS
! Number of grid boxes in the vertical column
INTEGER, INTENT(IN) :: L_COLUMN
! Number of aerosol bins
INTEGER, INTENT(IN) :: N_AER
! Number of dust bins
INTEGER, INTENT(IN) :: N_DUST
! Number of relative humidity bins
INTEGER, INTENT(IN) :: N_RH
! Number of transported tracers
INTEGER, INTENT(IN) :: N_TRACERS
! Array of flags to denote if each grid box is tropospheric or not
LOGICAL, INTENT(IN) :: ITS_IN_TROP(L_COLUMN )
! Relative humidity [unitless]
REAL*8, INTENT(IN) :: ABSHUM_1d (L_COLUMN )
! Volume [cm3]
REAL*8, INTENT(IN) :: AIRVOL_1d (L_COLUMN )
! Grid box height [m]
REAL*8, INTENT(IN) :: BXHEIGHT_1d(L_COLUMN )
! Tracer concentrations [kg/box]
REAL*8, INTENT(IN) :: TRACER_1d (L_COLUMN,N_TRACERS )
INPUT/OUTPUT PARAMETERS:
! Aerosol radius [cm]
REAL*8, INTENT(INOUT) :: ERADIUS_1d (L_COLUMN,N_DUST+N_AER)
! Aerosol optical depth [unitless]
REAL*8, INTENT(INOUT) :: ODAER_1d (L_COLUMN,N_AER*N_RH )
! Aerosol surface area [cm^2 dry aerosol/cm^3 air]
REAL*8, INTENT(INOUT) :: TAREA_1d (L_COLUMN,N_DUST+N_AER)
Source File: carbon chem mod.F, Date: Tue Dec 15 14:07:35 EST 2009 137
OUTPUT PARAMETERS:
! Return code
INTEGER, INTENT(OUT) :: RC
REVISION HISTORY:
03 Apr 2009 - R. Yantosca & P. Le Sager - Columnized & cleaned up.
1.20.4 sum for mean oh
Subroutine SUM FOR MEAN OH sums the air mass and mass-weighted OH for the GEOS-Chem mean OH diagnostic.
The output arrays AIR MASS and OH MASS are passed out of the column chemistrycode into the global internal-state arrays. The mean OH concentration is then computedfrom these global internal-state arrays at the end of the GEOS-Chem simulation.
INTERFACE:
SUBROUTINE SUM_FOR_MEAN_OH( ITS_IN_TROP, AIRDENS, VOLUME,
& OH, AIR_MASS, OH_MASS )
INPUT PARAMETERS:
LOGICAL, INTENT(IN) :: ITS_IN_TROP(:) ! Are we in the tropopause?
REAL*8, INTENT(IN) :: AIRDENS(:) ! Air density [molec/cm3]
REAL*8, INTENT(IN) :: VOLUME(:) ! Grid box volume [cm3]
REAL*8, INTENT(IN) :: OH(:) ! OH concentration [molec/cm3]
INPUT/OUTPUT PARAMETERS:
REAL*8, INTENT(INOUT) :: AIR_MASS(:) ! Mass of air [molec air]
REAL*8, INTENT(INOUT) :: OH_MASS(:) ! Mass-weighted OH
! [molec OH/cm3 * molec air]
REVISION HISTORY:
21 Oct 2009 - R. Yantosca - Split off from GEOS-Chem "diag_oh_mod.f"
1.21 Fortran: Module Interface carbon chem mod.f
Module CARBON CHEM MOD contains arrays and routines for performing a carbona-ceous aerosol simulation. Original code was taken from Mian Chin’s GOCART model andmodified accordingly (by Rokjin Park et al). For the secondary organic aerosol (SOA) sim-ulation, original code developed by Chung and Seinfeld [2002] and Hong Liao from JohnSeinfeld’s group at Caltech was taken and modified accordingly (also by Rokjin Park et al).
Species in this simulation:
Source File: carbon chem mod.F, Date: Tue Dec 15 14:07:35 EST 2009 138
1. BCPI (Black carbon, hydrophilic)
2. OCPI (Organic carbon, hydrophilic)
3. BCPO (Black carbon, hydrophobic)
4. OCPO (Organic carbon, hydrophobic)
5. ALPH (A-pinene, B-pinene, sabinene, carene, terpenoid ketones)
6. LIMO (Limonene)
7. ALCO (Myrcene, terpenoid alcohols, ocimene)
8. SOG1 (Lump of gas products of ALPH+LIMO+TERP hydrocarbon oxidation)
9. SOG2 (Gas product of ALCO oxidation)
10. SOG3 (Gas product of SESQ oxidation)
11. SOG4 (Gas product of SESQ oxidation)
12. SOA1 (Lump of aerosol products of ALPH+LIMO+TERP hydrocarbon oxidation)
13. SOA2 (Aerosol product of ALCO oxidation)
14. SOA3 (Aerosol product of SESQ oxidation)
15. SOA4 (Aerosol product of ISOP oxidation)
INTERFACE:
MODULE CARBON_CHEM_MOD
USES:
! Module w/ derived type definitions
USE GC_TYPE_MOD
IMPLICIT NONE
PRIVATE
PUBLIC MEMBER FUNCTIONS:
PUBLIC :: CHEMCARBON
PRIVATE MEMBER FUNCTIONS:
PRIVATE :: CHEM_BCPO
PRIVATE :: CHEM_BCPI
PRIVATE :: CHEM_OCPO
PRIVATE :: CHEM_OCPI
PRIVATE :: SOA_CHEMISTRY
PRIVATE :: SOA_PARA
PRIVATE :: CHEM_NVOC
Source File: carbon chem mod.F, Date: Tue Dec 15 14:07:35 EST 2009 139
PRIVATE :: SOA_PARTITION
PRIVATE :: SOA_LUMP
PRIVATE :: SOA_DEPO
PRIVATE :: SOA_EQUIL
PRIVATE :: ZEROIN
PRIVATE :: GET_DOH_COL
REVISION HISTORY:
04 Jun 2009 - R. Yantosca & P. Le Sager - Columnized & cleaned up.
1.21.1 chemcarbon
Subroutine CHEMCARBON is the interface between the GEOS-Chem main program andthe carbon aerosol chemistry routines that calculates dry deposition, chemical conversionbetween hydrophilic and hydrophobic, and SOA production. (rjp, bmy, 4/1/04, 9/14/06)
INTERFACE:
SUBROUTINE CHEMCARBON( OPTIONS, ID_TRACERS, ID_SPECIES,
& ID_DRYDEP, ID_COEF, T,
& AD, SUNCOS, VOLUME,
& ITS_TROP, inDEPSAV, TS_CHEM,
& FRAC_UNDER_PBL, ORVC_TERP, ORVC_SESQ,
& inGPROD, inAPROD, inCSPEC,
& inSTT, RC )
USES:
# include "smv_errcode.h" ! Error codes
INPUT PARAMETERS:
! Object w/ ID’s for advected tracers
TYPE(ID_TRAC), INTENT(IN) :: ID_TRACERS
! Object w/ ID’s for chemical species
TYPE(ID_SPEC), INTENT(IN) :: ID_SPECIES
! Object w/ ID’s for dry deposited species
TYPE(ID_DRYD), INTENT(IN) :: ID_DRYDEP
! Object w/ info for species <--> tracer mapping
TYPE(SPEC_2_TRAC), INTENT(IN) :: ID_COEF
! Object w/ on/off flags for controlling various chemistry options
TYPE(GC_OPTIONS), INTENT(IN) :: OPTIONS
! Air mass [kg]
Source File: carbon chem mod.F, Date: Tue Dec 15 14:07:35 EST 2009 140
REAL*8, TARGET, INTENT(IN) :: AD(:)
! Fraction of grid box that is completely below PBL top [unitless]
REAL*8, TARGET, INTENT(IN) :: FRAC_UNDER_PBL(:)
! Temperature [K]
REAL*8, TARGET, INTENT(IN) :: T(:)
! Grid box volume [cm3]
REAL*8, TARGET, INTENT(IN) :: VOLUME(:)
! Dry deposition frequencies [1/s]
REAL*8, TARGET, INTENT(IN) :: inDEPSAV(:)
! Chemical species concentrations (from SMVGEAR) [molec/cm3/s]
REAL*8, TARGET, INTENT(IN) :: inCSPEC(:,:)
! Chemistry timestep [min]
REAL*8, INTENT(IN) :: TS_CHEM
! Cosine of solar zenith angle [unitless]
REAL*8, INTENT(IN) :: SUNCOS
! Array of flags to denote if grid boxes are in the troposphere
LOGICAL, INTENT(IN) :: ITS_TROP(:)
INPUT/OUTPUT PARAMETERS:
! Tracer concentrations [kg/box]
REAL*8, TARGET, INTENT(INOUT) :: inSTT(:,:)
! Non-transported tracers
REAL*8, INTENT(INOUT) :: ORVC_TERP(:)
REAL*8, INTENT(INOUT) :: ORVC_SESQ(:)
REAL*8, TARGET, INTENT(INOUT) :: inAPROD(:,:,:)
REAL*8, TARGET, INTENT(INOUT) :: inGPROD(:,:,:)
OUTPUT PARAMETERS:
INTEGER, INTENT(OUT) :: RC
REVISION HISTORY:
04 Jun 2009 - R. Yantosca & P. Le Sager - Columnized & cleaned up.
1.21.2 chem bcpo
Subroutine CHEM BCPO converts hydrophobic BC to hydrophilic BC and calculates thedry deposition of hydrophobic BC.
Source File: carbon chem mod.F, Date: Tue Dec 15 14:07:35 EST 2009 141
INTERFACE:
SUBROUTINE CHEM_BCPO( TC, BCCONV )
INPUT/OUTPUT PARAMETERS:
! Tracer concentration [kg]
REAL*8, INTENT(INOUT) :: TC(:)
! Hydrophobic BC converted to hydrophilic BC [kg]
REAL*8, INTENT(INOUT) :: BCCONV(:)
REVISION HISTORY:
04 Jun 2009 - R. Yantosca & P. Le Sager - Columnized & cleaned up.
1.21.3 chem bcpi
Subroutine CHEM BCPI calculates dry deposition of hydrophilic BC.
INTERFACE:
SUBROUTINE CHEM_BCPI( TC, BCCONV )
INPUT/OUTPUT PARAMETERS:
! Tracer concentration [kg]
REAL*8, INTENT(INOUT) :: TC(:)
! Hydrophobic BC converted to hydrophilic BC [kg]
REAL*8, INTENT(INOUT) :: BCCONV(:)
REVISION HISTORY:
04 Jun 2009 - R. Yantosca & P. Le Sager - Columnized & cleaned up.
1.21.4 chem ocpo
Subroutine CHEM OCPO converts hydrophobic OC to hydrophilic OC and calculates thedry deposition of hydrophobic OC.
INTERFACE:
SUBROUTINE CHEM_OCPO( TC, OCCONV )
INPUT/OUTPUT PARAMETERS:
! Tracer concentration [kg]
REAL*8, INTENT(INOUT) :: TC(:)
! Hydrophobic OC converted to hydrophilic OC [kg]
REAL*8, INTENT(INOUT) :: OCCONV(:)
Source File: carbon chem mod.F, Date: Tue Dec 15 14:07:35 EST 2009 142
REVISION HISTORY:
04 Jun 2009 - R. Yantosca & P. Le Sager - Columnized & cleaned up.
1.21.5 chem bcpi
Subroutine CHEM BCPI calculates dry deposition of hydrophilic OC.
INTERFACE:
SUBROUTINE CHEM_OCPI( TC, occonv )
INPUT/OUTPUT PARAMETERS:
! Tracer concentration [kg]
REAL*8, INTENT(INOUT) :: TC(:)
! Hydrophobic OC converted to hydrophilic OC [kg]
REAL*8, INTENT(INOUT) :: OCCONV(:)
REVISION HISTORY:
04 Jun 2009 - R. Yantosca & P. Le Sager - Columnized & cleaned up.
1.21.6 soa chemistry
Subroutine SOA CHEMISTRY performs SOA formation. This code is from the Caltechgroup (Hong Liao, Serena Chung, et al) and was modified for GEOS-Chem.
INTERFACE:
SUBROUTINE SOA_CHEMISTRY( T, AIRVOL, SUNCOS,
& IS_TROP, ORVC_TERP, ORVC_SESQ, RC )
USES:
! References to F90 modules
USE GC_TYPE_MOD
# include "smv_errcode.h" ! Error codes
INPUT PARAMETERS:
REAL*8, INTENT(IN) :: T(:) ! Temperature [K]
REAL*8, INTENT(IN) :: AIRVOL(:) ! Grid box volume [m3]
REAL*8, INTENT(IN) :: SUNCOS ! Cosine of SZA [unitless]
LOGICAL, INTENT(IN) :: IS_TROP(:) ! Are boxes in tropopause or not?
INPUT/OUTPUT PARAMETERS:
Source File: carbon chem mod.F, Date: Tue Dec 15 14:07:35 EST 2009 143
REAL*8, INTENT(INOUT) :: ORVC_TERP(:) ! Terpenes
REAL*8, INTENT(INOUT) :: ORVC_SESQ(:) ! Sesqiterpenes
OUTPUT PARAMETERS:
INTEGER, INTENT(OUT) :: RC
REMARKS:
Procedure:
===========
(1 ) Read in NO3, O3, OH in CHEM_SOA
(2 ) Scales these fields using OHNO3TIME in sulfate_mod.f (see GET_OH)
(3 ) Calculate reaction rates (Serena’s OCHEMPARAETER)
(4 ) CALCULATE DELHC
(5 ) get T0M gas products
(6 ) equilibrium calculation
.
There are total of 42 tracers considered in this routine:
.
4 classes of primary carbonaceous aerosols:
BCPI = Hydrophilic black carbon
OCPI = Hydrophilic organic carbon
BCPO = Hydrophobic black carbon
OCPO = Hydrophobic organic carbon
.
6 reactive biogenic hydrocarbon groups (NVOC):
ALPH = a-pinene, b-pinene, sabinene, carene, terpenoid ketones
LIMO = limonene
TERP = a-terpinene, r-terpinene, terpinolene
ALCO = myrcene, terpenoid alcohols, ocimene
SESQ = sesquiterpenes
ISOP = Isoprene
.
NOTE: TERP and SESQ are not tracers because of their high reactivity
.
32 organic oxidation products by O3+OH and NO3:
6 ( 3 gases + 3 aerosols ) from each of first four NVOC = 24
4 ( 2 gases + 2 aerosols ) from sesquiterpenes oxidation = 4
4 ( 2 gases + 2 aerosols ) from isoprene oxidation = 4
.
NOTE: We aggregate these into 6 tracers according to HC classes
SOG1 = lump of gas products of first three (ALPH+LIMO+TERP) HC oxidation.
SOG2 = gas product of ALCO oxidation
SOG3 = gas product of SESQ oxidation
SOG4 = gas product of ISOP oxidation
SOA1 = lump of aerosol products of first 3 (ALPH+LIMO+TERP) HC oxidation.
SOA2 = aerosol product of ALCO oxidation
SOA3 = aerosol product of SESQ oxidation
SOA4 = aerosol product of ISOP oxidation
Source File: carbon chem mod.F, Date: Tue Dec 15 14:07:35 EST 2009 144
REVISION HISTORY:
04 Jun 2009 - R. Yantosca & P. Le Sager - Columnized & cleaned up.
15 Dec 2009 - R. Yantosca - Updated comments
1.21.7 soa equil
Subroutine SOA EQUIL solves SOAeqn=0 to determine Mnew (= mass) See Eqn (27) onpage 70 of notes. Originally written by Serena Chung at Caltech, and modified for inclusioninto GEOS-Chem.
REMARKS:
This version does NOT assume that the gas and aerosol phases are in
equilibrium before chemistry; therefore, gas phase concentrations are
needed explicitly. The gas and aerosol phases are assumed to be in
equilibrium after chemistry.
.
Note: Unlike FUNCTION SOA, this function assumes no reactions. It only
considers the partitioning of existing products of VOC oxidation.
.
HC_JHC + OXID_IOXID - >
alpha(1,IOXID,JHC) [SOAprod_gas(1,IOXID,JHC)+SOAprod(1,IOXID,JHC)]+
alpha(2,IOXID,JHC) [SOAprod_gas(2,IOXID,JHC)+SOAprod(2,IOXID,JHC)]
.
SOAprod_gas(IPR,IOXID,JHC) <--> SOAprod(IPR,IOXID,JHC)
(aerosol phase)
.
w/ equilibrium partitioning:
.
SOAprod(IPR,IOXID,JHC)
SOAprod_gas(IPR,IOXID,JHC) = ------------------------
Kom(IPR,IOXID,JHC)
INTERFACE:
FUNCTION SOA_EQUIL( MASS, MPOC, AEROSOL, GAS, KOM )
& RESULT( SOA_MASS )
INPUT PARAMETERS:
!MASS : Pre-existing aerosol mass [ug/m3]
!MPOC : POA Mass [ug/m3]
!AEROSOL : Aerosol concentration [ug/m3]
!GAS : Gas-phase concentration [ug/m3]
!KOM : Equilibrium gas-aerosol partition coeff. [m3/ug]
REAL*8, INTENT(IN) :: MASS, MPOC
REAL*8, INTENT(IN) :: AEROSOL(NPROD,MHC)
REAL*8, INTENT(IN) :: GAS(NPROD,MHC)
REAL*8, INTENT(IN) :: KOM(NPROD,MHC)
Source File: carbon chem mod.F, Date: Tue Dec 15 14:07:35 EST 2009 145
REVISION HISTORY:
04 Jun 2009 - R. Yantosca & P. Le Sager - Columnized & cleaned up.
15 Dec 2009 - R. Yantosca - Updated comments
1.21.8 zeroin
Function ZEROIN is a root finder for the function SOA EQUIL. REMARKS:
NOTE: This function may be problematic -- it uses GOTO’s, which are not
good for parallelization. (bmy, 7/8/04)
.
shc I got this code from http://www.netlib.org
.
a zero of the function f(x) is computed in the interval ax,bx .
.
input..
.
ax left endpoint of initial interval
bx right endpoint of initial interval
f function subprogram which evaluates f(x) for any x in
the interval ax,bx
tol desired length of the interval of uncertainty of the
final result ( .ge. 0.0d0)
.
output..
.
zeroin abcissa approximating a zero of f in the interval ax,bx
.
it is assumed that f(ax) and f(bx) have opposite signs
without a check. zeroin returns a zero x in the given interval
ax,bx to within a tolerance 4*macheps*abs(x) + tol, where macheps
is the relative machine precision.
.
this function subprogram is a slightly modified translation of
the algol 60 procedure zero given in richard brent, algorithms for
minimization without derivatives, prentice - hall, inc. (1973).
\\
\\
INTERFACE:
FUNCTION ZEROIN(AX,BX,TOL,MPOC,AEROSOL,GAS,KOM) RESULT( MNEW )
INPUT PARAMETERS:
REAL*8, INTENT(IN) :: ax,bx,tol
REAL*8, INTENT(IN) :: Mpoc
REAL*8, INTENT(IN) :: Aerosol(NPROD,MHC), Gas(NPROD,MHC)
REAL*8, INTENT(IN) :: Kom(NPROD,MHC)
Source File: carbon chem mod.F, Date: Tue Dec 15 14:07:35 EST 2009 146
REVISION HISTORY:
04 Jun 2009 - R. Yantosca & P. Le Sager - Columnized & cleaned up.
15 Dec 2009 - R. Yantosca - Updated comments
1.21.9 soa para
Subroutine SOA PARA gves mass-based stoichiometric coefficientsfor semi-volatile prod-ucts from the oxidation of hydrocarbons. It calculates secondary organic aerosol yieldparameters. Temperature effects are included. Original code from the CALTECH groupand modified for inclusion to GEOS-Chem.
INTERFACE:
SUBROUTINE SOA_PARA( TEMP, KO3, KOH, KNO3, RALPHA, KOM )
INPUT PARAMETERS:
! Temperature [K]
REAL*8, INTENT(IN) :: TEMP
OUTPUT PARAMETERS:
! Rxn rate for HC oxidation by O3 [cm3/molec/s]
REAL*8, INTENT(OUT) :: KO3(MHC)
! Rxn rate for HC oxidation by OH [cm3/molec/s]
REAL*8, INTENT(OUT) :: KOH(MHC)
! Rxn rate for HC oxidation by NO3 [cm3/molec/s]
REAL*8, INTENT(OUT) :: KNO3(MHC)
! Mass-based stoichiometric coefficients [unitless]
REAL*8, INTENT(OUT) :: RALPHA(NPROD,MHC)
! Equilibrium gas-aerosol partition coeff [m3/ug]
REAL*8, INTENT(OUT) :: KOM(NPROD,MHC)
REMARKS:
References:
===========
PHOTO-OXIDATION RATE CONSTANTS OF ORGANICS come from:
(1 ) Atkinson, el al., Int. J. Chem.Kinet., 27: 941-955 (1995)
(2 ) Shu and Atkinson, JGR 100: 7275-7281 (1995)
(3 ) Atkinson, J. Phys. Chem. Ref. Data 26: 215-290 (1997)
(4 ) Some are reproduced in Table 1 of Griffin, et al., JGR 104: 3555-3567
(5 ) Chung and Seinfeld (2002)
.
ACTIVATION ENERGIES come from:
Source File: carbon chem mod.F, Date: Tue Dec 15 14:07:35 EST 2009 147
(6 ) Atkinson, R. (1994) Gas-Phase Tropospheric Chemistry of Organic
Compounds. J. Phys. Chem. Ref. Data, Monograph No.2, 1-216.
(7 ) They are also reproduced in Tables B.9 and B.10 of Seinfeld and
Pandis (1988).
.
PARAMETERS FOR ISOPRENE:
(8 ) Kroll et al., GRL, 109, L18808 (2005)
(9 ) Kroll et al., Environ Sci Tech, in press (2006)
(10) Henze and Seinfeld, GRL, submitted (2006)
REVISION HISTORY:
04 Jun 2009 - R. Yantosca & P. Le Sager - Columnized & cleaned up.
15 Dec 2009 - R. Yantosca - Updated comments
1.21.10 chem nvoc
Subroutine CHEM NVOC computes the oxidation of Hydrocarbon by O3, OH, and NO3.This comes from the Caltech group (Hong Liao, Serena Chung, et al) and was incorporatedinto GEOS-Chem.
INTERFACE:
SUBROUTINE CHEM_NVOC( L, KO3, KOH,
& KNO3, ALPHA, GM0,
& ORVC_TERP_LOCAL, ORVC_SESQ_LOCAL, VOL )
INPUT PARAMETERS:
! GEOS-Chem altitude index
INTEGER, INTENT(IN) :: L
! Rxn rate for HC oxidation by O3 [cm3/molec/s]
REAL*8, INTENT(IN) :: KO3(MHC)
! Rxn rate for HC oxidation by OH [cm3/molec/s]
REAL*8, INTENT(IN) :: KOH(MHC)
! Rxn rate for HC oxidation by NO3 [cm3/molec/s]
REAL*8, INTENT(IN) :: KNO3(MHC)
! Mass-based stoichiometric coefficients [unitless]
REAL*8, INTENT(IN) :: ALPHA(NPROD,MHC)
! Grid box volume [cm3]
REAL*8, INTENT(IN) :: VOL
INPUT/OUTPUT PARAMETERS:
Source File: carbon chem mod.F, Date: Tue Dec 15 14:07:35 EST 2009 148
! Gas mass for each HC and its oxidation product [kg]
REAL*8, INTENT(INOUT) :: GM0(NPROD,MHC)
! Terpenes
REAL*8, INTENT(INOUT) :: ORVC_TERP_LOCAL
! Sesquiterpenes
REAL*8, INTENT(INOUT) :: ORVC_SESQ_LOCAL
REVISION HISTORY:
04 Jun 2009 - R. Yantosca & P. Le Sager - Columnized & cleaned up.
1.21.11 soa partition
Subroutine SOA PARTITION partitions the mass of gas and aerosol tracers according tofive Hydrocarbon species and three oxidants.
INTERFACE:
SUBROUTINE SOA_PARTITION( L, GM0, AM0 )
INPUT PARAMETERS:
! Altitude index
INTEGER, INTENT(IN) :: L
INPUT/OUTPUT PARAMETERS:
! Gas mass for each HC and its oxidation product [kg]
REAL*8, INTENT(OUT) :: GM0(NPROD,MHC)
! Aerosol mass for each HC and its oxidation product [kg]
REAL*8, INTENT(OUT) :: AM0(NPROD,MHC)
REMARKS:
NOTE: GPROD and APROD are mass ratios of individual oxidation
products of gas/aerosol to the sum of all.
REVISION HISTORY:
04 Jun 2009 - R. Yantosca & P. Le Sager - Columnized & cleaned up.
1.21.12 soa lump
Subroutine SOA LUMP returns the organic gas and aerosol back to the tracer array.
INTERFACE:
Source File: carbon chem mod.F, Date: Tue Dec 15 14:07:35 EST 2009 149
SUBROUTINE SOA_LUMP( L, GM0, AM0 )
INPUT PARAMETERS:
! Altitude index
INTEGER, INTENT(IN) :: L
! Gas mass for each HC and its oxidation product [kg]
REAL*8, INTENT(IN) :: GM0(NPROD,MHC)
! Aerosol mass for each HC and its oxidation product [kg]
REAL*8, INTENT(IN) :: AM0(NPROD,MHC)
REVISION HISTORY:
04 Jun 2009 - R. Yantosca & P. Le Sager - Columnized & cleaned up.
1.21.13 soa depo
Subroutine SOA DEPO computes dry-deposition of a particular SOA species.
INTERFACE:
SUBROUTINE SOA_DEPO( TC, DEPID, TRID )
INPUT/OUTPUT PARAMETERS:
INTEGER, INTENT(IN) :: DEPID ! Dry deposition ID #
INTEGER, INTENT(IN) :: TRID ! Tracer ID #
INPUT/OUTPUT PARAMETERS:
REAL*8, INTENT(INOUT) :: TC(:) ! Tracer concentration [kg]
REVISION HISTORY:
04 Jun 2009 - R. Yantosca & P. Le Sager - Columnized & cleaned up.
1.21.14 get doh col
Function GET DOH COL returns the amount of isoprene [kg] that has reacted with OHduring the last chemistry time step.
INTERFACE:
FUNCTION GET_DOH_COL( L, VOL ) RESULT( DOH )
INPUT/OUTPUT PARAMETERS:
INTEGER, INTENT(IN) :: L ! Vertical level
REAL*8, INTENT(IN) :: VOL ! Grid box volume [cm3]
Source File: dust mod.F, Date: Tue Dec 15 14:07:35 EST 2009 150
RETURN VALUE:
REAL*8 :: DOH ! ISOP that has reacted w /OH [kg]
REVISION HISTORY:
04 Jun 2009 - R. Yantosca & P. Le Sager - Columnized & cleaned up.
1.22 Fortran: Module Interface dust mod
Module DUST MOD contains routines for computing dust aerosol emissions, chemistry,and optical depths. Original GEOS-Chem code written by T. Duncan Fairlie.
INTERFACE:
MODULE DUST_MOD
USES:
IMPLICIT NONE
PRIVATE
PUBLIC MEMBER FUNCTIONS:
PUBLIC :: CHEMDUST
PUBLIC :: EMISSDUST_BOX
PRIVATE MEMBER FUNCTIONS:
PRIVATE :: DRY_SETTLING
PRIVATE :: DRY_DEPOSITION
REMARKS:
At this point, only the Ginoux source function has been columnized.
The DEAD source function (Zender et al) is more complicated to
columnize from a source code standpoint...we’ll get to it later on.
REVISION HISTORY:
28 Apr 2009 - P. Le Sager & R. Yantosca - Columnized and cleaned up.
15 Dec 2009 - R. Yantosca - Updated comments
Source File: dust mod.F, Date: Tue Dec 15 14:07:35 EST 2009 151
1.22.1 chemdust
Subroutine CHEMDUST is the interface between the GEOS-Chem main program and theDUST routines that applies removal of dust by gravitational settling and dry deposition.
INTERFACE:
SUBROUTINE CHEMDUST( TRACER, OPTIONS, ID_TRACERS, ID_DRYDEP,
& DEPSAV, T, BXHEIGHT, PMID,
& TS_CHEM, RC )
USES:
USE GC_TYPE_MOD ! Module w/ derived types
# include "smv_errcode.h" ! SMVGEAR error codes
INPUT PARAMETERS:
! Object w/ tracer ID flags
TYPE(ID_TRAC), INTENT(IN) :: ID_TRACERS
! Object w/ dry-deposition tracer ID flags
TYPE(ID_DRYD), INTENT(IN) :: ID_DRYDEP
! Object w/ logical switches for GEOS-Chem option selection
TYPE(GC_OPTIONS), INTENT(IN) :: OPTIONS
! Temperature [K]
REAL*8, INTENT(IN) :: T(:)
! Pressure @ grid box centers [hPa]
REAL*8, INTENT(IN) :: PMID(:)
! Grid box height [m]
REAL*8, INTENT(IN) :: BXHEIGHT(:)
! Dry deposition frequencies
REAL*8, INTENT(IN) :: DEPSAV(:)
! Chemistry timestep [min]
REAL*8, INTENT(IN) :: TS_CHEM
INPUT/OUTPUT PARAMETERS:
! Tracer concentrations [kg]
REAL*8, INTENT(INOUT), TARGET :: TRACER(:,:)
OUTPUT PARAMETERS:
! Return code
INTEGER, INTENT(OUT) :: RC
Source File: dust mod.F, Date: Tue Dec 15 14:07:35 EST 2009 152
REVISION HISTORY:
27 Apr 2009 - P. Le Sager - Columnized.
11 Jun 2009 - R. Yantosca - Remove L_TROP argument
1.22.2 dry settling
Subroutine DRY SETTLING computes the dry settling of dust tracers. Original code writ-ten by T. Duncan Fairlie.
INTERFACE:
SUBROUTINE DRY_SETTLING( T, BXHEIGHT, PMID, TS_CHEM, RC )
USES:
# include "smv_errcode.h" ! Error codes
# include "smv_physconst.h" ! Physical constants
INPUT PARAMETERS:
! Temperature [K]
REAL*8, INTENT(IN) :: T(:)
! Pressure @ grid box centers [hPa]
REAL*8, INTENT(IN) :: PMID(:)
! Grid box height [m]
REAL*8, INTENT(IN) :: BXHEIGHT(:)
! Chemistry timestep [min]
REAL*8, INTENT(IN) :: TS_CHEM
OUTPUT PARAMETERS:
! Return code
INTEGER, INTENT(OUT) :: RC
REMARKS:
GEOS-Chem historically was doing the settling from the maximum
possible tropopause level. We now start from the top of the
atmosphere. This allows us to get rid of the L_TROP argument.
REVISION HISTORY:
27 Apr 2009 - P. Le Sager - Columnized.
11 Jun 2009 - R. Yantosca - Removed L_TROP argument
14 Dec 2009 - R. Yantosca - Now reference physical constants from
include file "smv_physconst.h"
Source File: dust mod.F, Date: Tue Dec 15 14:07:35 EST 2009 153
1.22.3 dry deposition
Subroutine DRY DEPOSITION computes the loss of dust due to dry deposition at thesurface using an implicit method. (tdf, bmy, 3/30/04, 10/25/05)
INTERFACE:
SUBROUTINE DRY_DEPOSITION( ID_DRYDEP, DEPSAV, TS_CHEM, RC )
USES:
USE GC_TYPE_MOD ! Module with derived type definitions
# include "smv_errcode.h" ! SMVGEAR error codes (bmy, 3/20/09)
INPUT PARAMETERS:
! Object w/ dry-deposition tracer ID flags
TYPE(ID_DRYD), INTENT(IN) :: ID_DRYDEP
! Dry deposition frequencies
REAL*8, INTENT(IN) :: DEPSAV(:)
! Chemistry timestep [min]
REAL*8, INTENT(IN) :: TS_CHEM
OUTPUT PARAMETERS:
! Return code
INTEGER, INTENT(OUT) :: RC
REVISION HISTORY:
28 Apr 2009 - P. Le Sager - Columnized.
1.22.4 emissdust box
Subroutine EMISSDUST BOX is the driver routine for the dust emission module. It isdesigned to use either the GINOUX or the DEAD dust source function. (However, as of6/11/09, only the GINOUX source function has been implemented.) Original code writtenby T. Duncan Fairlie for GEOS-Chem.
INTERFACE:
SUBROUTINE EMISSDUST_BOX( L_COLUMN, N_TRACERS, ID_TRACERS,
& OPTIONS, SRCE_FUNK, AREA_M2,
& TS_EMIS, U10M, V10M,
& WETTOP, TRACER, RC )
USES:
Source File: dust mod.F, Date: Tue Dec 15 14:07:35 EST 2009 154
USE GC_TYPE_MOD
# include "smv_errcode.h" ! SMVGEAR error codes
INPUT PARAMETERS:
! # of grid boxes in the column
INTEGER, INTENT(IN) :: L_COLUMN
! # of advected tracers
INTEGER, INTENT(IN) :: N_TRACERS
! Object w/ tracer ID flags
TYPE(ID_TRAC), INTENT(IN) :: ID_TRACERS
! Object w/ logical switches for GEOS-Chem option selection
TYPE(GC_OPTIONS), INTENT(IN) :: OPTIONS
! Source function for 1: Sand, 2: Silt, 3: Clay [-]
REAL*8, INTENT(IN) :: SRCE_FUNK(3)
! Box surface [m2]
REAL*8, INTENT(IN) :: AREA_M2
! Time step [min]
REAL*8, INTENT(IN) :: TS_EMIS
! Wind the anemometer level (10meters) [m/s]
REAL*8, INTENT(IN) :: U10M, V10M
! Top Soil Wetness [-]
REAL*8, INTENT(IN) :: WETTOP
INPUT/OUTPUT PARAMETERS:
! Advected GC tracers
REAL*8, INTENT(INOUT) :: TRACER(L_COLUMN,N_TRACERS)
OUTPUT PARAMETERS:
INTEGER, INTENT(OUT) :: RC
REMARKS:
The DEAD dust source is not available yet in the column version.
REVISION HISTORY:
28 Apr 2009 - P. Le Sager - Columnized
11 Jun 2009 - R. Yantosca - Added IDT local shadow variable,
removed other local variables
Source File: dust mod.F, Date: Tue Dec 15 14:07:35 EST 2009 155
1.22.5 src dust ginoux box
Paul GINOUX dust source function for GEOS-Chem.
INTERFACE:
SUBROUTINE SRC_DUST_GINOUX_BOX( DUST, SRCE_FUNK, AREA_M2,
& TS_EMIS, U10M, V10M,
& WETTOP, RC )
!USES
# include "smv_errcode.h" ! Error codes
# include "smv_physconst.h" ! Physical constants
INPUT PARAMETERS:
! Surface dust
REAL*8, INTENT(INOUT) :: DUST(NDSTBIN)
! Source function for 1: Sand, 2: Silt, 3: Clay [-]
REAL*8, INTENT(IN ) :: SRCE_FUNK(3)
! Box surface [m2]
REAL*8, INTENT(IN ) :: AREA_M2
! Time step [min]
REAL*8, INTENT(IN ) :: TS_EMIS
! Wind the anemometer level (10meters) [m/s]
REAL*8, INTENT(IN ) :: U10M, V10M
! Top Soil Wetness [-]
REAL*8, INTENT(IN ) :: WETTOP
OUTPUT PARAMETERS:
INTEGER, INTENT(OUT) :: RC
REMARKS:
This subroutine updates the surface mixing ratio of dust aerosols for
NDSTBIN size bins. The uplifting of dust depends in space on the source
function, and in time and space on the soil moisture and surface
wind speed (10 meters). Dust is uplifted if the wind speed is greater
than a threshold velocity which is calculated with the formula of
Marticorena et al. (JGR, v.102, p 23277-23287, 1997).
.
To run this subroutine you need the source function which can be
obtained by contacting Paul Ginoux at [email protected]
If you are not using GEOS DAS met fields, you will most likely need
Source File: rpmares mod.F, Date: Tue Dec 15 14:07:35 EST 2009 156
to adapt the adjusting parameter.
.
Contact: Paul Ginoux ([email protected])
.
.
Input from module variable:
.
DUSTDEN Dust density (kg/m3)
DUSTREFF Effective radius (um)
AD Air mass for each grid box (kg)
NTDT Time step (s)
W10m Velocity at the anemometer level (10meters) (m/s)
GWET Surface wetness (-)
.
.
Parameters used in GEOS-CHEM
Size bins: NDSTBIN = 4
.
Dust properties used in GOCART
.
Size classes: 01-1, 1-1.8, 1.8-3, 3-6 (um)
Radius: 0.7, 1.5, 2.5, 4 (um)
Density: 2500, 2650, 2650, 2650 (kg/m3)
References:
============================================================================
(1 ) Ginoux, P., M. Chin, I. Tegen, J. Prospero, B. Hoben, O. Dubovik,
and S.-J. Lin, "Sources and distributions of dust aerosols simulated
with the GOCART model", J. Geophys. Res., 2001
(2 ) Chin, M., P. Ginoux, S. Kinne, B. Holben, B. Duncan, R. Martin,
J. Logan, A. Higurashi, and T. Nakajima, "Tropospheric aerosol
optical thickness from the GOCART model and comparisons with
satellite and sunphotometers measurements", J. Atmos Sci., 2001.
REVISION HISTORY:
28 Apr 2009 - P. Le Sager - Columnized.
14 Dec 2009 - R. Yantosca - Now reference physical constants from
include file "smv_physconst.h"
15 Dec 2009 - R. Yantosca - Updated comments
1.23 Fortran: Module Interface seasalt chem mod.f
Module SEASALT CHEM MOD contains arrays and routines for removing sea salt aerosolsby gravitational settling and dry deposition. All routines have been columnized and arecalled from within driver routine CHEMDR COL.
Source File: seasalt chem mod.F, Date: Tue Dec 15 14:07:35 EST 2009 157
INTERFACE:
MODULE SEASALT_CHEM_MOD
USES:
IMPLICIT NONE
PRIVATE
PUBLIC MEMBER FUNCTIONS:
PUBLIC :: CHEMSEASALT
PRIVATE MEMBER FUNCTIONS:
PRIVATE :: WET_SETTLING
PRIVATE :: DRY_DEPOSITION
REMARKS:
Original code taken from Mian Chin’s GOCART model and modified accordingly
by Becky Alexander et al.
Seasalt aerosol species: (1) Accumulation mode (usually 0.1 - 0.5 um)
(2) Coarse mode (usually 0.5 - 10.0 um)
References:
============================================================================
(1 ) Chin, M., P. Ginoux, S. Kinne, B. Holben, B. Duncan, R. Martin,
J. Logan, A. Higurashi, and T. Nakajima, "Tropospheric aerosol
optical thickness from the GOCART model and comparisons with
satellite and sunphotometers measurements", J. Atmos Sci., 2001.
(2 ) Gong, S., L. Barrie, and J.-P. Blanchet, "Modeling sea-salt
aerosols in the atmosphere. 1. Model development", J. Geophys. Res.,
v. 102, 3805-3818, 1997.
REVISION HISTORY:
12 Jun 2009 - R. Yantosca & P. Le Sager - Columnized & cleaned up.
1.23.1 chemseasalt
Subroutine CHEMSEASALT is the interface between the GEOS-Chem main program andthe seasalt chemistry routines that mostly calculates seasalt dry deposition (rjp, bmy,1/24/02, 5/23/06)
INTERFACE:
SUBROUTINE CHEMSEASALT( ID_TRACERS, ID_DRYDEP, OPTIONS, L_COLUMN,
& N_DRYDEP, N_TRACERS, T, PMID,
& BXHEIGHT, RH, DEPSAV, TS_CHEM,
& TRACER, RC )
Source File: seasalt chem mod.F, Date: Tue Dec 15 14:07:35 EST 2009 158
USES:
USE GC_TYPE_MOD ! Module w/ derived type definitions
# include "smv_errcode.h" ! SMVGEAR error codes (bmy, 3/20/09)
INPUT PARAMETERS:
! Object w/ tracer ID flags
TYPE(ID_TRAC), TARGET, INTENT(IN) :: ID_TRACERS
! Object w/ dry-deposition tracer ID flags
TYPE(ID_DRYD), TARGET, INTENT(IN) :: ID_DRYDEP
! Object w/ logical switches for GEOS-Chem option selection
TYPE(GC_OPTIONS), INTENT(IN) :: OPTIONS
! Number of grid boxes in the column
INTEGER, INTENT(IN) :: L_COLUMN
! Number of advected tracers that are dry-deposited
INTEGER, INTENT(IN) :: N_DRYDEP
! Number of advected tracers
INTEGER, INTENT(IN) :: N_TRACERS
! Temperature [K]
REAL*8, INTENT(IN) :: T(L_COLUMN)
! Pressure @ grid box centers [hPa]
REAL*8, INTENT(IN) :: PMID(L_COLUMN)
! Grid box height [m]
REAL*8, INTENT(IN) :: BXHEIGHT(L_COLUMN)
! Relative humidity [%]
REAL*8, INTENT(IN) :: RH(L_COLUMN)
! Dry deposition frequencies
REAL*8, INTENT(IN) :: DEPSAV(N_DRYDEP)
! Chemistry timestep [s]
REAL*8, INTENT(IN) :: TS_CHEM
INPUT/OUTPUT PARAMETERS:
! Tracer concentrations [kg]
REAL*8, INTENT(INOUT) :: TRACER(L_COLUMN,N_TRACERS)
OUTPUT PARAMETERS:
Source File: seasalt chem mod.F, Date: Tue Dec 15 14:07:35 EST 2009 159
! Return code
INTEGER, INTENT(OUT) :: RC
REVISION HISTORY:
12 Jun 2009 - R. Yantosca & P. Le Sager - Columnized & cleaned up.
1.23.2 wet settling
Subroutine WET SETTLING performs wet settling of sea salt aerosol tracers. (bec, rjp,bmy, 4/20/04, 6/11/08)
INTERFACE:
SUBROUTINE WET_SETTLING( L_COLUMN, TC, DEN, REDGE_um,
& T, PMID, BXHEIGHT, DTCHEM,
& RH, RC )
USES:
# include "smv_errcode.h" ! Error codes
# include "smv_physconst.h" ! Physical constants (e.g. g0)
INPUT PARAMETERS:
! Number of levels in the column
INTEGER, INTENT(IN) :: L_COLUMN
! Sea salt density [kg/m3]
REAL*8, INTENT(IN) :: DEN
! Sea salt aerosol bin edges [um]
REAL*8, INTENT(IN) :: REDGE_um(NSALT)
! Temperature [K]
REAL*8, INTENT(IN) :: T (L_COLUMN)
! Grid box height [m]
REAL*8, INTENT(IN) :: BXHEIGHT(L_COLUMN)
! Pressure at grid box centers [hPa]
REAL*8, INTENT(IN) :: PMID (L_COLUMN)
! Relative humidity [%]
REAL*8, INTENT(IN) :: RH (L_COLUMN)
! Chemistry timestep [s]
REAL*8, INTENT(IN) :: DTCHEM
INPUT/OUTPUT PARAMETERS:
Source File: sulfate chem mod.F, Date: Tue Dec 15 14:07:35 EST 2009 160
! Tracer concentration [kg/box]
REAL*8, INTENT(INOUT) :: TC (L_COLUMN)
INPUT/OUTPUT PARAMETERS:
! Return code
INTEGER, INTENT(OUT) :: RC
REVISION HISTORY:
21 Apr 2009 - R. Yantosca & P. Le Sager - Columnized & cleaned up.
14 Dec 2009 - R. Yantosca - Now references include file "smv_physconst.h"
1.23.3 dry deposition
Subroutine DRY DEPOSITION computes the loss of sea salt by dry deposition at the sur-face, using an implicit method. (bec, rjp, bmy, 4/20/04)
INTERFACE:
SUBROUTINE DRY_DEPOSITION( L_COLUMN, TRACER, DT, DEPSAV, RC )
USES:
# include "smv_errcode.h" ! SMVGEAR error codes (bmy, 3/20/09)
INPUT PARAMETERS:
! Number of grid boxes in the column
INTEGER, INTENT(IN) :: L_COLUMN
! Chemistry timestep [s]
REAL*8, INTENT(IN) :: DT
! Dry deposition frequencies [1/s]
REAL*8, INTENT(IN) :: DEPSAV
INPUT/OUTPUT PARAMETERS:
! Tracer concentrations [kg]
REAL*8, INTENT(INOUT) :: TRACER(L_COLUMN)
OUTPUT PARAMETERS:
! Return code
INTEGER, INTENT(OUT) :: RC
REVISION HISTORY:
03 Apr 2009 - R. Yantosca & P. Le Sager - Columnized & cleaned up.
Source File: sulfate chem mod.F, Date: Tue Dec 15 14:07:35 EST 2009 161
1.24 Fortran: Module Interface sulfate chem mod.f
Module SULFATE CHEM MOD contains arrays and routines for performing a coupledchemistry/aerosol run simulation. Original code taken from Mian Chin’s GOCART modeland modified accordingly.
Tracers modified in this simulation:
1. SO2
2. SO4 sulfate
3. SO4s sulfate in coarse sea salt
4. NIT nitrate
5. NITs nitrate in coarse sea salt
6. H2O2
7. NH3
8. NH4
9. NH4aq
10. MSA
References:
1. Andreae, M.O. & P. Merlet, Emission of trace gases and aerosols from biomass burn-
ing, Global Biogeochem. Cycles, 15, 955-966, 2001.
2. Nightingale et al [2000a], J. Geophys. Res, 14, 373-387.
3. Nightingale et al [2000b], Geophys. Res. Lett, 27, 2117-2120
4. Wanninkhof, R., Relation between wind speed and gas exchange over the ocean, J. Geophys. Res,97, 7373-7382, 1992.
INTERFACE:
MODULE SULFATE_CHEM_MOD
USES:
! Module w/ derived type definitions
USE GC_TYPE_MOD
IMPLICIT NONE
PRIVATE
PUBLIC MEMBER FUNCTIONS:
Source File: sulfate chem mod.F, Date: Tue Dec 15 14:07:35 EST 2009 162
PUBLIC :: CHEMSULFATE
PRIVATE MEMBER FUNCTIONS:
PRIVATE :: GET_VCLDF
PRIVATE :: GET_LWC
PRIVATE :: GRAV_SETTLING
PRIVATE :: CHEM_SO2
PRIVATE :: SEASALT_CHEM
PRIVATE :: AQCHEM_SO2
PRIVATE :: CHEM_SO4
PRIVATE :: CHEM_MSA
PRIVATE :: CHEM_NH3
PRIVATE :: CHEM_NH4
PRIVATE :: CHEM_NIT
PRIVATE :: GET_O3
REVISION HISTORY:
24 Jun 2009 - P. Le Sager - column version
1.24.1 chemsulfate
Subroutine CHEMSULFATE is the interface between the GEOS-Chem main program andthe sulfate chemistry routines. The user has the option of running a coupled chemistry-aerosols simulation or an offline aerosol simulation (rjp, bdf, bmy, 5/31/00, 3/16/06)
INTERFACE:
SUBROUTINE CHEMSULFATE( FIRST_TIME, ID_TRACERS, ID_SPECIES,
& ID_DRYDEP, ID_COEF, STT,
& CSPEC, DEPSAV, ALK_EMIS,
& N_DENS, T, PSURF,
& PMID, ITS_TROP, RH,
& AD, AIRDEN, BXHEIGHT,
& F_UNDER_PBL, TS_CHEM, H2O2s,
& SO2s, RC )
USES:
# include "smv_errcode.h" ! Error codes
# include "sea_salt_info.h" ! Sea salt size parameters
INPUT PARAMETERS:
! Is it first chem iteration?
LOGICAL, INTENT(IN) :: FIRST_TIME
! ID’s for advected tracers, chemiscal & dry deposited species
TYPE(ID_TRAC), INTENT(IN) :: ID_TRACERS
Source File: sulfate chem mod.F, Date: Tue Dec 15 14:07:35 EST 2009 163
TYPE(ID_SPEC), INTENT(IN) :: ID_SPECIES
TYPE(ID_DRYD), INTENT(IN) :: ID_DRYDEP
! GC Type w/ species specs
TYPE(SPEC_2_TRAC), INTENT(IN) :: ID_COEF
! Model characteristics
REAL*8, INTENT(IN) :: TS_CHEM ! Timestep [min]
REAL*8, INTENT(IN) :: BXHEIGHT(:) ! Grid box height [m]
! Met fields (targets for module variables)
REAL*8, TARGET, INTENT(IN) :: AIRDEN(:) ! Air density [kg/m3]
REAL*8, TARGET, INTENT(IN) :: RH(:) ! Relative Humidity [%]
REAL*8, TARGET, INTENT(IN) :: PMID(:) ! P @ level ctrs [hPa]
REAL*8, TARGET, INTENT(IN) :: PSURF ! Surface pressure [hPa]
REAL*8, TARGET, INTENT(IN) :: AD(:) ! Air mass [kg]
REAL*8, TARGET, INTENT(IN) :: T(:) ! Temperature [K]
LOGICAL, TARGET, INTENT(IN) :: ITS_TROP(:) ! Trop. flag
REAL*8, TARGET, INTENT(IN) :: F_UNDER_PBL(:) ! Fraction under PBL
! Dry deposition frequencies [1/s]
REAL*8, TARGET, INTENT(IN) :: DEPSAV(:)
! Chemical species and seasalts
REAL*8, TARGET, INTENT(IN) :: CSPEC(:,:) ! Concentrations [molec/cm3/s]
REAL*8, INTENT(IN) :: ALK_EMIS(:,:) ! Seasalt alkalinity [kg]
REAL*8, INTENT(IN) :: N_DENS(:,:) ! Seasalt density [#/m3]
INPUT/OUTPUT PARAMETERS:
REAL*8, TARGET, INTENT(INOUT) :: STT(:,:) ! Tracer mass [kg/box]
REAL*8, INTENT(INOUT) :: H2O2s(:) ! H2O2 [v/v] & SO2 [v/v]
REAL*8, INTENT(INOUT) :: SO2s(:) ! concentrations from
! aqueous chemistry,
! archived to pass
! to the wetdep code
OUTPUT PARAMETERS:
! Return code
INTEGER, INTENT(OUT) :: RC
REVISION HISTORY:
02 Oct 2009 - R. Yantosca - Now use SALC_REDGE_um from "sea_salt_info.h"
1.24.2 get vcldf
Subroutine GET VCLDF computes the volume cloud fraction for SO2 chemistry. (rjp, bdf,bmy, 9/23/02)
Source File: sulfate chem mod.F, Date: Tue Dec 15 14:07:35 EST 2009 164
INTERFACE:
SUBROUTINE GET_VCLDF( VCLDF )
REMARKS:
(1) See Sundqvist et al. [1989]
OUTPUT PARAMETERS:
REAL*8, INTENT(OUT) :: VCLDF(:) ! volume cloud fraction
REVISION HISTORY:
24 Jun 2009 - P. Le Sager - column version
1.24.3 get lwc
Function GET LWC returns the cloud liquid water content at a GEOS-Chem grid box asa function of temperature. (rjp, bmy, 10/31/02, 1/14/03)
INTERFACE:
FUNCTION GET_LWC( T ) RESULT( LWC )
INPUT PARAMETERS:
REAL*8, INTENT(IN) :: T ! temperature [K]
RETURN VALUE:
REAL*8 :: LWC ! liquid water content [m3/m3]
REVISION HISTORY:
24 Jun 2009 - P. Le Sager - column version
1.24.4 grav settling
Subroutine GRAV SETTLING performs gravitational settling of sulfate and nitrate incoarse sea salt (SO4S and NITS). (bec, rjp, bmy, 4/20/04, 7/20/04, 10/25/05)
INTERFACE:
SUBROUTINE GRAV_SETTLING( TC, BXHEIGHT, SALC_REDGE_um )
USES:
# include "smv_physconst.h" ! g0
INPUT PARAMETERS:
Source File: sulfate chem mod.F, Date: Tue Dec 15 14:07:35 EST 2009 165
! Box Height[m]
REAL*8, INTENT(IN) :: BXHEIGHT(:)
! Coarse seasalt aerosol size bins [um]
REAL*8, INTENT(IN) :: SALC_REDGE_um(2)
INPUT/OUTPUT PARAMETERS:
REAL*8, INTENT(INOUT) :: TC(:) ! Tracer [kg]
REMARKS:
- Assumes two (2) seasalt aerosol size bins
- This is the same code as "wet_settling" in seasalt_mod
REVISION HISTORY:
24 Jun 2009 - P. Le Sager - column version
14 Dec 2009 - R. Yantosca - Now reference "smv_physconst.h" to import
a list of physical constants
1.24.5 chem so2
Subroutine CHEM SO2 is the SO2 chemistry subroutine (rjp, bmy, 11/26/02, 10/25/05)
INTERFACE:
SUBROUTINE CHEM_SO2( PNITS, PSO4_SO2, PSO4_SS, PSO2_DMS,
$ VCLDF, ALK_EMIS, N_DENS, H2O2s, SO2s )
USES:
USE SEASALT_MOD, ONLY : GET_ALK
# include "smv_physconst.h" ! Phys. constants (e.g. MW_AIR)
INPUT PARAMETERS:
REAL*8, INTENT(IN) :: PSO2_DMS(:) ! P(SO2) from DMS [v/v/timestep]
REAL*8, INTENT(IN) :: ALK_EMIS(:,:) ! Seasalt alkalinity [kg]
REAL*8, INTENT(IN) :: N_DENS(:,:) ! Seasalt density [#/m3]
REAL*8, INTENT(IN) :: VCLDF(:) ! Volume cloud frac [unitless]
INPUT/OUTPUT PARAMETERS:
REAL*8, INTENT(INOUT) :: PNITS(:) ! P(NITS)
REAL*8, INTENT(INOUT) :: PSO4_SO2(:) ! P(SO4) from SO2 [v/v/timestep]
REAL*8, INTENT(INOUT) :: PSO4_SS(:) ! P(SO4) from SO2 (in coarse
! sea-salt) [v/v/timestep]
REAL*8, INTENT(INOUT) :: H2O2s(:) ! Saved H2O2 for wet dep [v/v]
REAL*8, INTENT(INOUT) :: SO2s(:) ! Saved SO2 for wet dep [v/v]
Source File: sulfate chem mod.F, Date: Tue Dec 15 14:07:35 EST 2009 166
REMARKS:
Reaction List (by Rokjin Park, [email protected])
============================================================================
(1 ) SO2 production:
DMS + OH, DMS + NO3 (saved in CHEM_DMS)
.
(2 ) SO2 loss:
(a) SO2 + OH -> SO4
(b) SO2 -> drydep
(c) SO2 + H2O2 or O3 (aq) -> SO4
.
(3 ) SO2 = SO2_0 * exp(-bt) + PSO2_DMS/bt * [1-exp(-bt)]
where b is the sum of the reaction rate of SO2 + OH and the dry
deposition rate of SO2, PSO2_DMS is SO2 production from DMS in
MixingRatio/timestep.
.
If there is cloud in the gridbox (fraction = fc), then the aqueous
phase chemistry also takes place in cloud. The amount of SO2 oxidized
by H2O2 in cloud is limited by the available H2O2; the rest may be
oxidized due to additional chemistry, e.g, reaction with O3 or O2
(catalyzed by trace metal).
REVISION HISTORY:
24 Jun 2009 - P. Le Sager - column version
1.24.6 seasalt chem
SEASALT CHEM computes SO4 formed from S(IV) + O3 on seasalt aerosols as a functionof seasalt alkalinity. In one Box. (bec, bmy, 4/13/05, 10/7/08)
INTERFACE:
SUBROUTINE SEASALT_CHEM ( L, PNITS, HNO3, ALK1, ALK2,
& SO2_cd, Kt1, Kt2, Kt1N, Kt2N,
& SO2_ss, PSO4E, PSO4F )
USES:
# include "smv_physconst.h" ! Physical constants (e.g. MW_AIR)
INPUT PARAMETERS:
INTEGER, INTENT(IN) :: L ! Level
REAL*8, INTENT(IN) :: SO2_cd ! SO2 mixing ratio [v/v] after gas
phase chemistry and dry deposition
REAL*8, INTENT(IN) :: Kt1 ! Rate constant [s-1] for sulfate formation
Source File: sulfate chem mod.F, Date: Tue Dec 15 14:07:35 EST 2009 167
on fine sea-salt aerosols from GET_ALK
REAL*8, INTENT(IN) :: Kt2 ! Rate constant [s-1] for sulfate formation
on coarse sea-salt aerosols from GET_ALK
REAL*8, INTENT(IN) :: Kt1N
REAL*8, INTENT(IN) :: Kt2N
REAL*8, INTENT(IN) :: ALK1, ALK2 ! Alkalinity [kg] from seasalt
INPUT/OUTPUT PARAMETERS:
REAL*8, INTENT(INOUT) :: HNO3
REAL*8, INTENT(INOUT) :: PNITS
OUTPUT PARAMETERS:
! SO2 mixing ratio [v/v] updated after SS chemistry
REAL*8, INTENT(OUT) :: SO2_ss
! SO4E (sulfate produced by S(IV)+O3 on fine seasalt) mixing ratio [v/v]
REAL*8, INTENT(OUT) :: PSO4E
! SO4F(sulfate produced by S(IV)+O3 on coarse seasalt) mixing ratio [v/v]
REAL*8, INTENT(OUT) :: PSO4F
REMARKS:
Chemical reactions:
============================================================================
(R1) SO2 + O3 + ALK => SO4 + O2
Modeled after Chamedies and Stelson, 1992?
REVISION HISTORY:
24 Jun 2009 - P. Le Sager - column version
1.24.7 aqchem so2
Subroutine AQCHEM SO2 computes the reaction rates for aqueous SO2 chemistry. (rjp,bmy, 10/31/02, 12/12/02)
INTERFACE:
SUBROUTINE AQCHEM_SO2( LWC, T, P, SO2, H2O2,
& O3, Hplus, KaqH2O2, KaqO3 )
INPUT PARAMETERS:
============================================================================
(1 ) LWC : Liquid water content [m3/m3] = 1.E-6*L [g/m3]
(2 ) T : Temperature [K]
(3 ) P : Pressure [atm]
(4 ) SO2 : SO2 mixing ratio [v/v]
(5 ) H2O2 : H2O2 mixing ratio [v/v]
(6 ) O3 : O3 mixing ratio [v/v]
(7 ) HPLUS : Concentration of H+ ion (i.e. the pH) [v/v]
REAL*8, INTENT(IN) :: LWC, T, P, SO2, H2O2, O3, HPLUS
Source File: sulfate chem mod.F, Date: Tue Dec 15 14:07:35 EST 2009 168
OUTPUT PARAMETERS:
REAL*8, INTENT(OUT) :: KaqH2O2, KaqO3 ! Reaction rate for H2O2 & O3
REMARKS:
Chemical Reactions:
============================================================================
(R1) HSO3- + H2O2(aq) + H+ => SO4-- + 2H+ + H2O [Jacob, 1986]
.
d[S(VI)]/dt = k[H+][H2O2(aq)][HSO3-]/(1 + K[H+])
[Seinfeld and Pandis, 1998, page 366]
.
(R2) SO2(aq) + O3(aq) =>
HSO3- + O3(aq) =>
SO3-- + O3(aq) =>
[Jacob, 1986; Jacobson, 1999]
.
d[S(VI)]/dt = (k0[SO2(aq)] + k1[HSO3-] + K2[SO3--])[O3(aq)]
[Seinfeld and Pandis, 1998, page 363]
.
Reaction rates can be given as
Ra = k [H2O2(ag)] [S(IV)] [mole/liter*s] OR
Krate = Ra LWC R T / P [1/s]
.
Where:
LWC = Liquid water content(g/m3)*10-6 [m3(water)/m3(gas)]
R = 0.08205 (atm L / mol-K), Universal gas const.
T = Temperature (K)
P = Pressure (atm)
.
Procedure:
============================================================================
(a ) Given [SO2] which is assumed to be total SO2 (gas+liquid) in
equilibrium between gas and liquid phase.
.
(b ) We can compute SO2(g) using Henry’s law
P(so2(g)) = Xg * [SO2]
Xg = 1/(1 + Faq), Fraction of SO2 in gas
where:
Faq = Kheff * R * T * LWC,
KHeff = Effective Henry’s constant
.
(c ) Then Calculate Aquous phase, S[IV] concentrations
S[IV] = Kheff * P(so2(g) in atm) [M]
.
(d ) The exact same procedure is applied to calculate H2O2(aq)
REVISION HISTORY:
Source File: sulfate chem mod.F, Date: Tue Dec 15 14:07:35 EST 2009 169
24 Jun 2009 - P. Le Sager - column version
15 Dec 2009 - R. Yantosca - Updated comments
1.24.8 chem so4
Subroutine CHEM SO4 is the SO4 chemistry subroutine from Mian Chin’s GOCARTmodel, modified for the GEOS-CHEM model. Now also modified to account for productionof crystalline & aqueous sulfur tracers. (rjp, bdf, cas, bmy, 5/31/00, 5/23/06)
INTERFACE:
SUBROUTINE CHEM_SO4( PSO4_SO2, PSO4_ss )
INPUT PARAMETERS:
REAL*8, INTENT(IN) :: PSO4_SO2(:) ! P(SO4) from SO2 [v/v/timestep]
REAL*8, INTENT(IN) :: PSO4_SS(:) ! P(SO4) from SO2 in coarse sea-salt [v/v/timestep]
REMARKS:
Reaction List (by Mian Chin, [email protected])
============================================================================
The Only production is from SO2 oxidation (save in CHEM_SO2), and the only
loss is dry depsition here. Wet deposition will be treated in "wetdep.f".
.
SO4 = SO4_0 * exp(-kt) + PSO4_SO2/kt * (1.-exp(-kt))
where k = dry deposition.
REVISION HISTORY:
24 Jun 2009 - P. Le Sager - column version
15 Dec 2009 - R. Yantosca - Updated comments
1.24.9 chem msa
Subroutine CHEM MSA is the SO4 chemistry subroutine from Mian Chin’s GOCARTmodel, modified for the GEOS-Chem model. (rjp, bdf, bmy, 5/31 /00, 10/25/05)
INTERFACE:
SUBROUTINE CHEM_MSA( PMSA_DMS )
INPUT PARAMETERS:
REAL*8, INTENT(IN) :: PMSA_DMS(:) ! P(MSA) from DMS [v/v/timestep]
REMARKS:
Source File: sulfate chem mod.F, Date: Tue Dec 15 14:07:35 EST 2009 170
Reaction List (by Mian Chin, [email protected])
============================================================================
The Only production is from DMS oxidation (saved in CHEM_DMS), and the only
loss is dry depsition here. Wet deposition will be treated in "wetdep.f".
.
MSA = MSA_0 * exp(-dt) + PMSA_DMS/kt * (1.-exp(-kt))
.
where k = dry deposition.
REVISION HISTORY:
24 Jun 2009 - P. Le Sager - column version
14 Dec 2009 - R. Yantosca - Removed reference to CMN_GCTM
1.24.10 chem nh3
Subroutine CHEM NH3 removes NH3 from the surface via dry deposition. (rjp, bdf, bmy,1/2/02, 10/25/05)
INTERFACE:
SUBROUTINE CHEM_NH3
REMARKS:
Reaction List:
============================================================================
(1 ) NH3 = NH3_0 * EXP( -dt ) where d = dry deposition rate [s-1]
REVISION HISTORY:
24 Jun 2009 - P. Le Sager - column version
15 Dec 2009 - R. Yantosca - Updated comments
1.24.11 chem nh4
Subroutine CHEM NH4 removes NH4 from the surface via dry deposition. (rjp, bdf, bmy,1/2/02, 10/25/05)
INTERFACE:
SUBROUTINE CHEM_NH4
REMARKS:
Reaction List:
============================================================================
(1 ) NH4 = NH4_0 * EXP( -dt ) where d = dry deposition rate [s-1]
Source File: fastj title.txt, Date: Tue Dec 15 14:07:35 EST 2009 171
REVISION HISTORY:
24 Jun 2009 - P. Le Sager - column version
1.24.12 chem nit
Subroutine CHEM NIT removes SULFUR NITRATES (NIT) from the surface via dry de-position. (rjp, bdf, bmy, 1/2/02, 5/23/06)
INTERFACE:
SUBROUTINE CHEM_NIT( PNITS )
INPUT PARAMETERS:
REAL*8, INTENT(IN) :: PNITS(:) ! P(NITS) [v/v/timestep]
REMARKS:
Reaction List:
============================================================================
(1 ) NIT = NIT_0 * EXP( -dt ) where d = dry deposition rate [s-1]
REVISION HISTORY:
24 Jun 2009 - P. Le Sager - column version
1.24.13 get o3
Function GET O3 in the column returns O3 for sulfate aerosol simulations.
INTERFACE:
FUNCTION GET_O3( L ) RESULT( O3_VV )
INPUT PARAMETERS:
INTEGER, INTENT(IN) :: L ! level of grid box
RETURN VALUE:
REAL*8 :: O3_VV ! O3 [v/v]
REVISION HISTORY:
24 Jun 2009 - P. Le Sager - column version
Source File: BLKSLV.F, Date: Tue Dec 15 14:07:35 EST 2009 172
1.25 Fortran: Module Interface FAST-J Photolysis Code
Here follows a list of Fortran source code routines comprise the FAST-J photolysis package.
1.25.1 blkslv
Solves the block tri-diagonal system: A(I)*X(I-1) + B(I)*X(I) + C(I)*X(I+1) = H(I)
INTERFACE:
SUBROUTINE BLKSLV
USES:
IMPLICIT NONE
# include "jv_mie.h"
REMARKS:
Called from MIESCT.f
REVISION HISTORY:
01 Oct 1995 - M. Prather - Initial version
08 Dec 2009 - R. Yantosca - Added ProTeX headers
1.25.2 cldsrf
Routine to set cloud and surface properties for the FAST-J photolysis scheme.
INTERFACE:
SUBROUTINE CLDSRF( ODCOL, SA )
USES:
IMPLICIT NONE
# include "smv_dimension.h"
# include "cmn_fj_loop.h"
# include "jv_cmn_loop.h"
INPUT PARAMETERS:
REAL*8, INTENT(IN) :: SA
INPUT/OUTPUT PARAMETERS:
REAL*8, INTENT(INOUT) :: ODCOL(LPAR)
Source File: EFOLD.F, Date: Tue Dec 15 14:07:35 EST 2009 173
REMARKS:
Add the following input variables for CTM interface (bmy, 9/13/99)
.
Variable Type Dimensn Units Description
-------- ---- ------- ----- -----------
ODCOL dble [LPAR] - Vertical optical depth profile
SA dble - - Surface Albedo
-----------------------------------------------------------------------
rflect Surface albedo (Lambertian)
odmax Maximum allowed optical depth, above which they are scaled
odcol Optical depth at each model level
odsum Column optical depth
nlbatm Level of lower photolysis boundary - usually surface
REVISION HISTORY:
01 Oct 1995 - M. Prather - Initial version
08 Dec 2009 - R. Yantosca - Added ProTeX headers
1.25.3 efold
Calculates the e-fold between two boundaries, given the value at both boundaries F0(x=0)= top, F1(x=1) = bottom. Used in the FAST-J photolysis scheme.
INTERFACE:
SUBROUTINE EFOLD( F0, F1, N, F )
USES:
IMPLICIT NONE
INPUT PARAMETERS:
REAL*8 F0, F1
INTEGER N
OUTPUT PARAMETERS:
REAL*8 F(250) !F(N+1)
REMARKS:
-----------------------------------------------------------------------
--- calculate the e-fold between two boundaries, given the value
--- at both boundaries F0(x=0) = top, F1(x=1) = bottom.
--- presume that F(x) proportional to exp[-A*x] for x=0 to x=1
--- d2F/dx2 = A*A*F and thus expect F1 = F0 * exp[-A]
--- alternatively, could define A = ln[F0/F1]
Source File: GAUSSP.F, Date: Tue Dec 15 14:07:35 EST 2009 174
--- let X = A*x, d2F/dX2 = F
--- assume equal spacing (not necessary, but makes this easier)
--- with N-1 intermediate points (and N layers of thickness dX = A/N)
---
--- 2nd-order finite difference: (F(i-1) - 2F(i) + F(i+1)) / dX*dX = F(i)
--- let D = 1 / dX*dX:
1 | 1 0 0 0 0 0 | | F0 |
| | | 0 |
2 | -D 2D+1 -D 0 0 0 | | 0 |
| | | 0 |
3 | 0 -D 2D+1 -D 0 0 | | 0 |
| | | 0 |
| 0 0 -D 2D+1 -D 0 | | 0 |
| | | 0 |
N | 0 0 0 -D 2D+1 -D | | 0 |
| | | 0 |
N+1 | 0 0 0 0 0 1 | | F1 |
-----------------------------------------------------------------------
Advantage of scheme over simple attenuation factor: conserves total
number of photons - very useful when using scheme for heating rates.
Disadvantage: although reproduces e-folds very well for small flux
differences, starts to drift off when many orders of magnitude are
involved.
-----------------------------------------------------------------------
REVISION HISTORY:
01 Oct 1995 - M. Prather - Initial version
08 Dec 2009 - R. Yantosca - Added ProTeX headers
1.25.4 gaussp
Loads in pre-set Gauss points for 4 angles from 0 to +1 in cos(theta)=mu. Used by theFAST-J photolysis scheme.
INTERFACE:
SUBROUTINE GAUSSP( N, XPT, XWT )
USES:
IMPLICIT NONE
OUTPUT PARAMETERS:
INTEGER :: N
REAL*8 :: XPT(N)
REAL*8 :: XWT(N)
Source File: GEN.F, Date: Tue Dec 15 14:07:35 EST 2009 175
REMARKS:
Called from MIESCT.f
REVISION HISTORY:
01 Oct 1995 - M. Prather - Initial version
08 Dec 2009 - R. Yantosca - Added ProTeX headers
1.25.5 gen
Generates coefficient matrices for the block tri-diagonal system: A(I)*X(I-1) + B(I)*X(I)+ C(I)*X(I+1) = H(I). Used by the FAST-J photolysis scheme.
INTERFACE:
SUBROUTINE GEN( ID )
USES:
IMPLICIT NONE
# include "jv_mie.h"
INPUT PARAMETERS:
INTEGER, INTENT(IN) :: ID
REMARKS:
Called from BLKSLV.f
REVISION HISTORY:
01 Oct 1995 - M. Prather - Initial version
08 Dec 2009 - R. Yantosca - Added ProTeX headers
1.25.6 jratet
Calculate and print J-values. Note that the loop in this routine only covers the jpnl levelsactually needed by the CTM.
INTERFACE:
SUBROUTINE JRATET( T, IDAY )
USES:
Source File: JVALUE.F, Date: Tue Dec 15 14:07:35 EST 2009 176
IMPLICIT NONE
# include "smv_dimension.h"
# include "cmn_fj_loop.h"
# include "jv_cmn_loop.h"
INPUT PARAMETERS:
REAL*8, INTENT(IN) :: T(LPAR) ! Temperature profile [K]
INTEGER, INTENT(IN) :: IDAY ! Day of year (1-365 / 1-366)
REMARKS:
Part of the FAST-J package (O. Wild, M. Prather)
REVISION HISTORY:
21 Oct 2009 - R. Yantosca - Added ProTeX header
1.25.7 jvalue
Calculates the actinic flux at each level for the current solar zenith angle (SZA) value. Quitwhen SZA ¿ 98.0 deg (= tangent height of 63km).
INTERFACE:
SUBROUTINE JVALUE( SA, RC )
USES:
IMPLICIT NONE
# include "smv_dimension.h" !%%% added this (bmy, 3/25/09)
# include "cmn_fj_loop.h"
# include "jv_cmn_loop.h"
# include "smv_errcode.h"
INPUT PARAMETERS:
REAL*8, INTENT(IN) :: SA ! Surface albedo [unitless]
OUTPUT PARAMETERS:
INTEGER, INTENT(OUT) :: RC ! Return code
REMARKS:
Part of the FAST-J package (O. Wild, M. Prather)
REVISION HISTORY:
21 Oct 2009 - R. Yantosca - Added ProTeX header
Source File: MATIN4.F, Date: Tue Dec 15 14:07:35 EST 2009 177
1.25.8 legnd0
Calculates ORDINARY LEGENDRE fns of X (real), from P[0] = PL(1) = 1, P[1] = X, ....P[N-1] = PL(N). Used in the FAST-J photolysis scheme.
INTERFACE:
SUBROUTINE LEGND0( X, PL, N )
USES:
IMPLICIT NONE
INPUT PARAMETERS:
INTEGER, INTENT(IN) :: N ! Order of polynomial
REAL*8, INTENT(IN) :: X ! Argument of polynomial
OUTPUT PARAMETERS:
REAL*8, INTENT(OUT) :: PL(N) ! Array w/ Legendre polynomials
REMARKS:
Called from MIESCT.f
REVISION HISTORY:
01 Oct 1995 - M. Prather - Initial version
08 Dec 2009 - R. Yantosca - Added ProTeX headers
1.25.9 matin4
Invert 4x4 matrix A(4,4) in place with L-U decomposition. Used in the FAST-J photolysisscheme.
INTERFACE:
SUBROUTINE MATIN4( A )
USES:
IMPLICIT NONE
INPUT/OUTPUT PARAMETERS:
REAL*8 :: A(4,4) ! 4 x 4 matrix to be inverted
REMARKS:
Called from BLKSLV.f
REVISION HISTORY:
01 Oct 1995 - M. Prather - Initial version
08 Dec 2009 - R. Yantosca - Added ProTeX headers
Source File: NOABS.F, Date: Tue Dec 15 14:07:35 EST 2009 178
1.25.10 miesct
This is an adaption of the Prather radiative transfer code, used in the FAST-J photolysisscheme.
INTERFACE:
SUBROUTINE MIESCT
USES:
IMPLICIT NONE
# include "jv_mie.h"
REMARKS:
Prather, 1974, Astrophys. J. 192, 787-792.
Sol’n of inhomogeneous Rayleigh scattering atmosphere.
(original Rayleigh w/ polarization)
Cochran and Trafton, 1978, Ap.J., 219, 756-762.
Raman scattering in the atmospheres of the major planets.
(first use of anisotropic code)
Jacob, Gottlieb and Prather, 1989, J.Geophys.Res., 94, 12975-13002.
Chemistry of a polluted cloudy boundary layer,
(documentation of extension to anisotropic scattering)
.
takes atmospheric structure and source terms from std J-code
ALSO limited to 4 Gauss points, only calculates mean field!
.
mean rad. field ONLY (M=1)
initialize variables FIXED/UNUSED in this special version:
FTOP = 1.0 = astrophysical flux (unit of pi) at SZA, -ZU0, use for scaling
FBOT = 0.0 = external isotropic flux on lower boundary
SISOTP = 0.0 = Specific Intensity of isotropic radiation incident from top
.
SUBROUTINES: MIESCT needs ’jv_mie.cmn’
BLKSLV needs ’jv_mie.cmn’
GEN (ID) needs ’jv_mie.cmn’
LEGND0 (X,PL,N)
MATIN4 (A)
GAUSSP (N,XPT,XWT)
REVISION HISTORY:
01 Oct 1995 - M. Prather - Initial version
08 Dec 2009 - R. Yantosca - Added ProTeX header
Source File: OPMIE.F, Date: Tue Dec 15 14:07:35 EST 2009 179
1.25.11 noabs
Zero out absorption terms to check scattering code. Leave a little Rayleigh to provide aminimal optical depth, and set surface albedo to unity. Used in the FAST-J photolysisscheme.
INTERFACE:
SUBROUTINE NOABS( XLO3, XLO2, XLRAY, BCAER, RFLECT )
USES:
IMPLICIT NONE
INPUT/OUTPUT PARAMETERS:
REAL*8 XLRAY
OUTPUT PARAMETERS:
REAL*8 XLO3, XLO2, BCAER, RFLECT
REMARKS:
Called from OPMIE.f
REVISION HISTORY:
01 Oct 1995 - M. Prather - Initial version
08 Dec 2009 - R. Yantosca - Added ProTeX headers
1.25.12 opmie
New Mie code for J’s, only uses 8-term expansion, 4-Gauss pts Currently allow up to NPaerosol phase functions (at all altitudes) to be associated with optical depth AER(1:NC) =aerosol opt.depth @ 1000 nm
INTERFACE:
SUBROUTINE OPMIE( KW, WAVEL, XQO2, XQO3, FMEAN, RC )
USES:
IMPLICIT NONE
# include "smv_dimension.h"
# include "cmn_fj_loop.h"
# include "jv_cmn_loop.h"
# include "jv_mie.h"
# include "smv_errcode.h"
INPUT PARAMETERS:
Source File: RD TJPL.F, Date: Tue Dec 15 14:07:35 EST 2009 180
INTEGER, INTENT(IN) :: KW ! Wavelength bin
REAL*8, INTENT(IN) :: WAVEL ! Array of wavelengths
REAL*8, INTENT(IN) :: XQO2(NB) ! O2 quantum yields
REAL*8, INTENT(IN) :: XQO3(NB) ! O3 quantum yields
OUTPUT PARAMETERS:
REAL*8, INTENT(OUT) :: FMEAN(LPAR) ! Mean actinic flux array
INTEGER, INTENT(OUT) :: RC
REMARKS:
Part of the FAST-J package (O. Wild, M. Prather)
.
Pick Mie-wavelength with phase function and Qext:
01 RAYLE = Rayleigh phase
02 ISOTR = isotropic
03 ABSRB = fully absorbing ’soot’, wavelength indep.
04 S_Bkg = backgrnd stratospheric sulfate (n=1.46,log-norm:r=.09um/sigma=.6)
05 S_Vol = volcanic stratospheric sulfate (n=1.46,log-norm:r=.08um/sigma=.8)
06 W_H01 = water haze (H1/Deirm.) (n=1.335, gamma: r-mode=0.1um /alpha=2)
07 W_H04 = water haze (H1/Deirm.) (n=1.335, gamma: r-mode=0.4um /alpha=2)
08 W_C02 = water cloud (C1/Deirm.) (n=1.335, gamma: r-mode=2.0um /alpha=6)
09 W_C04 = water cloud (C1/Deirm.) (n=1.335, gamma: r-mode=4.0um /alpha=6)
10 W_C08 = water cloud (C1/Deirm.) (n=1.335, gamma: r-mode=8.0um /alpha=6)
11 W_C13 = water cloud (C1/Deirm.) (n=1.335, gamma: r-mode=13.3um /alpha=6)
12 W_L06 = water cloud (Lacis) (n=1.335, r-mode=5.5um / alpha=11/3)
13 Ice-H = hexagonal ice cloud (Mishchenko)
14 Ice-I = irregular ice cloud (Mishchenko)
Choice of aerosol index MIEDX is made in SET_AER; optical depths are
apportioned to the AER array in SET_PROF
.
-----------------------------------------------------------------------
FUNCTION RAYLAY(WAVE)---RAYLEIGH CROSS-SECTION for wave > 170 nm
WSQI = 1.E6/(WAVE*WAVE)
REFRM1 = 1.0E-6*(64.328+29498.1/(146.-WSQI)+255.4/(41.-WSQI))
RAYLAY = 5.40E-21*(REFRM1*WSQI)**2
-----------------------------------------------------------------------
REVISION HISTORY:
21 Oct 2009 - R. Yantosca - Added ProTeX Headers
1.25.13 rd tjpl
Reads in wavelength bins, solar fluxes, Rayleigh parameters, temperature-dependent crosssections and Rayleigh/aerosol scattering phase functions with temperature dependences.Current data originates from JPL’97
INTERFACE:
Source File: SPHERE.F, Date: Tue Dec 15 14:07:35 EST 2009 181
SUBROUTINE RD_TJPL( NJ1, NAMFIL )
USES:
IMPLICIT NONE
# include "smv_dimension.h"
# include "cmn_fj_loop.h"
# include "jv_cmn_loop.h"
INPUT PARAMETERS:
INTEGER, INTENT(IN) :: NJ1 ! Logical file unit #
CHARACTER(LEN=*), INTENT(IN) :: NAMFIL ! Name of file to open
REMARKS:
Part of the FAST-J package (O. Wild, M. Prather)
.
Variables that are read from disk:
NJVAL Number of species to calculate J-values for
NWWW Number of wavelength bins, from NW1:NW2
WBIN Boundaries of wavelength bins
WL Centres of wavelength bins - ’effective wavelength’
FL Solar flux incident on top of atmosphere (cm-2.s-1)
QRAYL Rayleigh parameters (effective cross-section) (cm2)
QBC Black Carbon absorption extinct. (specific cross-sect.) (m2/g)
QO2 O2 cross-sections
QO3 O3 cross-sections
Q1D O3 => O(1D) quantum yield
TQQ Temperature for supplied cross sections
QQQ Supplied cross sections in each wavelength bin (cm2)
NAA Number of categories for scattering phase functions
QAA Aerosol scattering phase functions
NK Number of wavelengths at which functions supplied (set as 4)
WAA Wavelengths for the NK supplied phase functions
PAA Phase function: first 8 terms of expansion
RAA Effective radius associated with aerosol type
SSA Single scattering albedo
.
npdep Number of pressure dependencies
zpdep Pressure dependencies by wavelength bin
jpdep Index of cross sections requiring pressure dependence
lpdep Label for pressure dependence
REVISION HISTORY:
21 Oct 2009 - R. Yantosca - Added ProTeX headers
Source File: XSEC1D.F, Date: Tue Dec 15 14:07:35 EST 2009 182
1.25.14 sphere
Calculation of spherical geometry; derive tangent heights, slant path lengths and air massfactor for each layer. Not called when SZA ¿ 98 degrees. Beyond 90 degrees, include treat-ment of emergent beam (where tangent height is below altitude J-value desired at).
INTERFACE:
SUBROUTINE SPHERE
USES:
IMPLICIT NONE
# include "smv_dimension.h"
# include "cmn_fj_loop.h"
# include "jv_cmn_loop.h"
REMARKS:
Part of the FAST-J package (O. Wild, M. Prather)
REVISION HISTORY:
21 Oct 2009 - R. Yantosca - Added ProTeX header
1.25.15 xsec1d
Function XSEC1D returns quantum yields for O3 –¿ O2 + O(1D) interpolated across 3temperatures.
INTERFACE:
FUNCTION XSEC1D( K, TTT )
USES:
IMPLICIT NONE
# include "smv_dimension.h"
# include "cmn_fj_loop.h"
# include "jv_cmn_loop.h"
INPUT PARAMETERS:
INTEGER, INTENT(IN) :: K ! Wavelength bin
REAL*8, INTENT(IN) :: TTT ! Temperature [K]
REMARKS:
Part of the FAST-J package (O. Wild, M. Prather)
REVISION HISTORY:
21 Oct 2009 - R. Yantosca - Added ProTeX headers
Source File: XSECO3.F, Date: Tue Dec 15 14:07:35 EST 2009 183
1.25.16 xseco2
Function XSECO2 returns cross-sections for O2 interpolated across 3 temperatures; No S RBands yet!
INTERFACE:
FUNCTION XSECO2( K, TTT )
USES:
IMPLICIT NONE
# include "smv_dimension.h"
# include "cmn_fj_loop.h"
# include "jv_cmn_loop.h"
INPUT PARAMETERS:
INTEGER, INTENT(IN) :: K ! Wavelength bin
REAL*8, INTENT(IN) :: TTT ! Temperature [K]
REMARKS:
Part of the FAST-J package (O. Wild, M. Prather)
REVISION HISTORY:
21 Oct 2009 - R. Yantosca - Added ProTeX header
1.25.17 xseco3
Function XSECO3 computes cross-sections for O3 for all processes interpolated across 3temperatures.
INTERFACE:
FUNCTION XSECO3( K, TTT )
USES:
IMPLICIT NONE
# include "smv_dimension.h"
# include "cmn_fj_loop.h"
# include "jv_cmn_loop.h"
INPUT PARAMETERS:
INTEGER, INTENT(IN) :: K ! Wavelength bin
REAL*8, INTENT(IN) :: TTT ! Temperature [K]
REMARKS:
Part of the FAST-J package (O. Wild, M. Prather)
REVISION HISTORY:
21 Oct 2009 - R. Yantosca - Added ProTeX header
Source File: fast j.F, Date: Tue Dec 15 14:07:35 EST 2009 184
1.25.18 fast j.f
Subroutine FAST J loops over longitude and latitude, and calls PHOTOJ to compute J-Values for each column at every chemistry time-step. (ppm, 4/98; bmy, rvm, 9/99, 2/6/04;hyl, 4/25/04; phs, bmy, 10/7/08)
References:
1. H. Liu, J.H. Crawford, R.B. Pierce, P. Norris, S.E. Platnick, G. Chen, J.A. Logan,R.M. Yantosca, M.J. Evans, C. Kittaka, Y. Feng, and X. Tie, Radiative effect of clouds
on tropospheric chemistry in a global three-dimensional chemical transport model,J. Geophys. Res., 111, D20303, doi:10.1029/2005JD006403, 2006. http://research.nianet.org/ hyl/publications/liu2006
INTERFACE:
SUBROUTINE FAST_J( L_COLUMN, N_AER, N_DUST, N_RH,
& N_JV, MONTH, DAY, DAY_OF_YR,
& CSZA, SFCA, YLAT, PEDGE,
& TEMP, CLDF, OD_VIS, OD_DUST,
& OD_AER, TO3, J_VALUE, RC )
USES:
IMPLICIT NONE
# include "smv_dimension.h" ! Dimensions for common blocks
# include "cmn_fj_loop.h" ! LPAR, CMN_SIZE
# include "jv_cmn_loop.h" ! ODMDUST, PJ
# include "smv_errcode.h" ! Error codes
INPUT PARAMETERS:
! Number of grid boxes in the vertical column
INTEGER, INTENT(IN) :: L_COLUMN
! Number of aerosol bins
INTEGER, INTENT(IN) :: N_AER
! Number of dust bins
INTEGER, INTENT(IN) :: N_DUST
! Number of relative humidity bins
INTEGER, INTENT(IN) :: N_RH
! Number of J-value reactions
INTEGER, INTENT(IN) :: N_JV
! Current UTC month, day, and day-of-year
INTEGER, INTENT(IN) :: MONTH
INTEGER, INTENT(IN) :: DAY
INTEGER, INTENT(IN) :: DAY_OF_YR
Source File: inphot.F, Date: Tue Dec 15 14:07:35 EST 2009 185
! Cosine of solar zenith angle [unitless]
REAL*8, INTENT(IN) :: CSZA
! UV albedo at surface [unitless]
REAL*8, INTENT(IN) :: SFCA
! Latitude of the column [degrees]
REAL*8, INTENT(IN) :: YLAT
! Pressures at edges of each grid box in the column [hPa]
REAL*8, INTENT(IN) :: PEDGE (L_COLUMN+1 )
! Temperature at each grid box in the column [hPa]
REAL*8, INTENT(IN) :: TEMP (L_COLUMN )
! Cloud fraction at each grid box in the column [unitless]
REAL*8, INTENT(IN) :: CLDF (L_COLUMN )
! Visible optical depth at each grid box in the column [unitless]
REAL*8, INTENT(IN) :: OD_VIS (L_COLUMN )
! Dust optical depth at each grid box in the column [unitless]
REAL*8, INTENT(IN) :: OD_DUST(L_COLUMN,N_DUST )
! Aerosol optical depth at each grid box in the column [unitless]
REAL*8, INTENT(IN) :: OD_AER (L_COLUMN,N_AER*N_RH)
! Total overhead ozone column [DU]
REAL*8, INTENT(IN) :: TO3
OUTPUT PARAMETERS:
! J-values [1/s]
REAL*8, INTENT(OUT) :: J_VALUE(L_COLUMN,N_JV )
! Return code
INTEGER, INTENT(OUT) :: RC
REVISION HISTORY:
24 Mar 2009 - R. Yantosca - Columnized and cleaned up
20 Oct 2009 - R. Yantosca - Now pass in total ozone column via argument list
1.25.19 inphot
Subroutine INPHOT initializes quantities for FAST-J photolysis, including JPL spectraldata (e.g. cross sections, quantum yields), standard O3 and T profiles, and the translation
Source File: jv index.F, Date: Tue Dec 15 14:07:35 EST 2009 186
indices between GEOS-Chem and FAST-J species names. (Oliver Wild, 4/99, ppm, bmy,9/7/99, 2/13/07)
INTERFACE:
SUBROUTINE INPHOT( NLAYER, NREACS, N_JVALUE, RC )
USES:
IMPLICIT NONE
# include "smv_dimension.h" ! Dimension for common blocks
# include "cmn_fj_loop.h" ! FAST-J parameters & indices
# include "jv_cmn_loop.h" ! Various FAST-J common blocks
# include "smv_errcode.h" ! Error codes
INPUT PARAMETERS:
INTEGER, INTENT(IN) :: NLAYER ! # of layers to compute J-values
INTEGER, INTENT(IN) :: NREACS ! # of requested photolysis rxns
OUTPUT PARAMETERS:
INTEGER, INTENT(OUT) :: N_JVALUE ! # of total photolysis rxns
INTEGER, INTENT(OUT) :: RC ! Return code
REVISION HISTORY:
20 Mar 2009 - R. Yantosca - Modified for column G-C code
1.25.20 jv index
Subroutine JV INDEX computes the mapping between the CTM indices (from ”globchem.dat”)for J-values to the FAST-J indices (from ”ratj.d”) for J-values.
INTERFACE:
SUBROUTINE JV_INDEX
USES:
IMPLICIT NONE
# include "smv_dimension.h" ! Dimensions for common blocks
# include "cmn_fj_loop.h" ! FAST-J parameters & indices
# include "comode_loop.h" ! SMVGEAR II arrays
REVISION HISTORY:
05 Oct 1998 - R. Yantosca - Initial version
15 Dec 2009 - R. Yantosca - Added ProTeX headers
Source File: photoj.F, Date: Tue Dec 15 14:07:35 EST 2009 187
1.25.21 photoj
Subroutine PHOTOJ is the driver routine for the FAST-J photolysis package. (Oliver Wild& Michael Prather, 1996, 1999, bmy, 7/18/03, 2/13/07)
New FAST J-Value code, troposphere only (mjprather 6/96); uses special wavelengthquadrature spectral data (jv spec.dat) that includes only 289 nm - 800 nm (later a sin-gle 205 nm add-on); uses special compact Mie code based on Feautrier/Auer/Prather vers.
INTERFACE:
SUBROUTINE PHOTOJ( L_COLUMN, N_AER, N_DUST, N_RH,
& YLAT, MONTH, DAY, DAY_OF_YR,
& CSZA, T, SA, OD_VIS,
& OD_DUST, OD_AER, TO3, RC )
USES:
IMPLICIT NONE
# include "smv_dimension.h" ! Dimensions for common blocks
# include "cmn_fj_loop.h" ! FAST-J parameters & indices
# include "jv_cmn_loop.h" ! ZJ
# include "smv_errcode.h" ! Error codes
INPUT PARAMETERS:
! Number of grid boxes in the atmospheric column
INTEGER, INTENT(IN) :: L_COLUMN
! Number of aerosol bins
INTEGER, INTENT(IN) :: N_AER
! Number of dust bins
INTEGER, INTENT(IN) :: N_DUST
! Number of relative humidity bins
INTEGER, INTENT(IN) :: N_RH
! Latitude of the atmospheric column [unitless]
REAL*8, INTENT(IN) :: YLAT
! Current UTC month, day, and day-of-year
INTEGER, INTENT(IN) :: MONTH
INTEGER, INTENT(IN) :: DAY
INTEGER, INTENT(IN) :: DAY_OF_YR
! Cosine of solar zenith angle [unitless]
REAL*8, INTENT(IN) :: CSZA
Source File: rd js.F, Date: Tue Dec 15 14:07:35 EST 2009 188
! UV albedo at surface [unitless]
REAL*8, INTENT(IN) :: SA
! Temperature at each grid box in the column [hPa]
REAL*8, INTENT(IN) :: T (L_COLUMN )
! Dust optical depth at each grid box in the column [unitless]
REAL*8, INTENT(IN) :: OD_DUST(L_COLUMN,N_DUST )
! Aerosol optical depth at each grid box in the column [unitless]
REAL*8, INTENT(IN) :: OD_AER (L_COLUMN,N_AER*N_RH)
! Total overhead ozone column [DU]
REAL*8, INTENT(IN) :: TO3
INPUT/OUTPUT PARAMETERS:
! Visible optical depth at each grid box in the column [unitless]
REAL*8, INTENT(INOUT) :: OD_VIS (L_COLUMN )
OUTPUT PARAMETERS:
! Return code
INTEGER, INTENT(OUT) :: RC
REVISION HISTORY:
24 Mar 2009 - R. Yantosca - Columnized & cleaned up
20 Oct 2009 - R. Yantosca - Now pass total ozone column from the outside
1.25.22 rd js
Reread the ratj.d file to map photolysis rate to reaction. Read in quantum yield ’jfacta’and fastj label ’jlabel’. Used in the FAST-J photolysis scheme.
INTERFACE:
SUBROUTINE RD_JS( NJ1, NAMFIL )
USES:
IMPLICIT NONE
# include "smv_dimension.h"
# include "cmn_fj_loop.h"
# include "jv_cmn_loop.h"
INPUT PARAMETERS:
INTEGER, INTENT(IN) :: NJ1 ! Logical unit #
CHARACTER(LEN=*), INTENT(IN) :: NAMFIL ! File name
Source File: rd prof.F, Date: Tue Dec 15 14:07:35 EST 2009 189
REMARKS:
jfacta Quantum yield (or multiplication factor) for photolysis
jlabel Reference label identifying appropriate J-value to use
ipr Photolysis reaction counter - should total ’jppj’
.
Called from inphot.f
REVISION HISTORY:
01 Oct 1995 - M. Prather - Initial version
08 Dec 2009 - R. Yantosca - Added ProTeX headers
1.25.23 rd prof
Routine to input T and O3 reference profiles. Used by the FAST-J photolysis scheme.
INTERFACE:
SUBROUTINE RD_PROF( NJ2, NAMFIL )
USES:
IMPLICIT NONE
# include "smv_dimension.h"
# include "cmn_fj_loop.h"
# include "jv_cmn_loop.h"
INPUT PARAMETERS:
INTEGER, INTENT(IN) :: NJ2 ! Logical unit #
CHARACTER(LEN=*), INTENT(IN) :: NAMFIL ! File name
REMARKS:
Called from inphot.f
REVISION HISTORY:
01 Oct 1995 - M. Prather - Initial version
08 Dec 2009 - R. Yantosca - Added ProTeX headers
1.25.24 set prof
Subroutine SET PROF sets up atmospheric profiles required by Fast-J using a doubledversion of the level scheme used in the CTM. First pressure and z* altitude are defined,then O3 and T are taken from the supplied climatology and integrated to the CTM levels
Source File: set prof.F, Date: Tue Dec 15 14:07:35 EST 2009 190
(may be overwritten with values directly from the CTM, if desired) and then black carbonand aerosol profiles are constructed.
INTERFACE:
SUBROUTINE SET_PROF( L_COLUMN, N_AER, N_DUST, N_RH,
& YLAT, MONTH, DAY, T,
& SA, OD_VIS, OD_DUST, OD_AER,
& TO3, RC )
USES:
IMPLICIT NONE
# include "smv_dimension.h" ! Dimensions for common blocks
# include "cmn_fj_loop.h" ! LPAR, JPPJ, JPNL
# include "jv_cmn_loop.h" ! NDUST, NAER, PJ
# include "smv_errcode.h" ! Error codes
INPUT PARAMETERS:
! Number of grid boxes in the vertical column
INTEGER, INTENT(IN) :: L_COLUMN
! Number of aerosol bins
INTEGER, INTENT(IN) :: N_AER
! Number of dust bins
INTEGER, INTENT(IN) :: N_DUST
! Number of relative humidity bins
INTEGER, INTENT(IN) :: N_RH
! Latitude of the atmospheric column [unitless]
REAL*8, INTENT(IN) :: YLAT
! Current UTC month and day
INTEGER, INTENT(IN) :: MONTH
INTEGER, INTENT(IN) :: DAY
! UV albedo at the surface [unitless]
REAL*8, INTENT(IN) :: SA
! Temperature at each grid box in the column [K]
REAL*8, INTENT(IN) :: T (L_COLUMN )
! Dust optical depth at each grid box in the column [unitless]
REAL*8, INTENT(IN) :: OD_DUST(L_COLUMN,N_DUST )
! Aerosol optical depth at each grid box in the column [unitless]
Source File: smvgear title.txt, Date: Tue Dec 15 14:07:35 EST 2009 191
REAL*8, INTENT(IN) :: OD_AER (L_COLUMN,N_AER*N_RH)
! Total overhead O3 column [DU]
REAL*8, INTENT(IN) :: TO3
INPUT/OUTPUT PARAMETERS:
! Visible optical depth at each grid box in the column [unitless]
REAL*8, INTENT(INOUT) :: OD_VIS (L_COLUMN )
OUTPUT PARAMETERS:
! Return code
INTEGER, INTENT(OUT) :: RC
REVISION HISTORY:
07 Apr 1999 - O. Wild et al - Initial version
24 Mar 2009 - R. Yantosca - Columnized and cleaned up
20 Oct 2009 - R. Yantosca - Now pass a total O3 column from outside
1.26 Fortran: Module Interface SMVGEAR Support Routines
Here follows a list of standalone Fortran source code routines (i.e. routines that do notbelong to any module) which are part of SMVGEAR chemistry solver package.
1.26.1 arsl1k
Function ARSL1K calculates the 1st-order loss rate of species on wet aerosol surface.
INTERFACE:
REAL*8 FUNCTION ARSL1K( AREA, RADIUS, DENAIR, STKCF, STK, SQM )
USES:
IMPLICIT NONE
INPUT PARAMETERS:
! Surface area of wet aerosols/volume of air [cm2/cm3]
REAL*8, INTENT(IN) :: AREA
! Radius of wet aerosol [cm], order of 0.01-10 um;
! Note that radius here is Rd, not Ro
REAL*8, INTENT(IN) :: RADIUS
! Density of air [#/cm3]
REAL*8, INTENT(IN) :: DENAIR
Source File: backsub.F, Date: Tue Dec 15 14:07:35 EST 2009 192
! Sticking coefficient [unitless], order of 0.1
REAL*8, INTENT(IN) :: STKCF
! Square root of temperature [K]
REAL*8, INTENT(IN) :: STK
! Square root of molecular weight [g/mole]
REAL*8, INTENT(IN) :: SQM
REMARKS:
The 1st-order loss rate on wet aerosol (Dentener’s Thesis, p. 14)
is computed as:
.
ARSL1K [1/s] = area / [ radius/dfkg + 4./(stkcf * xmms) ]
.
where XMMS = Mean molecular speed [cm/s] = sqrt(8R*TK/pi/M) for Maxwell
DFKG = Gas phase diffusion coeff [cm2/s] (order of 0.1)
REVISION HISTORY:
01 Jul 1994 - lwh, jyl, gmg, djj - Initial version
04 Apr 2003 - R. Yantosca - Updated comments, cosmetic changes
07 Apr 2004 - R. Yantosca - Now return w/ default value if RADIUS is zero
(i.e. is smaller than a very small number)
03 Dec 2009 - R. Yantosca - Prevent div-by-zero errors by returning the
default value if any of the args are zero
03 Dec 2009 - R. Yantosca - Added ProTeX Header
1.26.2 backsub
Subroutine BACKSUB does the back-substitution on the decomposed matrix. (M. Jacob-son 1997; bdf, bmy, 4/1/03, 7/9/03)
INTERFACE:
SUBROUTINE BACKSUB( RC )
USES:
IMPLICIT NONE
# include "smv_dimension.h" ! Dimensions for common blocks
# include "comode_loop.h" ! SMVGEAR II arrays
# include "smv_errcode.h" ! Error codes
OUTPUT PARAMETERS:
INTEGER, INTENT(OUT) :: RC ! Return code
Source File: backsub.F, Date: Tue Dec 15 14:07:35 EST 2009 193
REMARKS:
*********************************************************************
************ WRITTEN BY MARK JACOBSON (1993) ************
*** (C) COPYRIGHT, 1993 BY MARK Z. JACOBSON ***
*** U.S. COPYRIGHT OFFICE REGISTRATION NO. TXu 670-279 ***
*** (650) 723-6836 ***
*********************************************************************
BBBBBBB A CCCCCCC K K SSSSSSS U U BBBBBBB
B B A A C K K S U U B B
BBBBBBB A A C K K SSSSSSS U U BBBBBBB
B B AAAAAAA C K K S U U B B
BBBBBBB A A CCCCCCC K K SSSSSSS UUUUUUUU BBBBBBB
*********************************************************************
******* PERFORM BACK-SUBSTITUTIONS ON THE DECOMPOSED MATRIX *******
*********************************************************************
*********************************************************************
* THIS SUBROUTINE SOLVES THE LINEAR SET OF EQUATIONS Ax = B FOR x, *
* THE CORRECTION VECTOR, WHERE "A" IS THE L-U DECOMPOSTION OF THE *
* ORIGINAL MATRIX, *
* *
* P = I - H x Bo x J, *
* *
* I = IDENTITY MATRIX, H = TIME-STEP, Bo = A COEFFICIENT THAT *
* DEPENDS ON THE ORDER OF THE INTEGRATION METHOD, AND J IS THE *
* MATRIX OF PARTIAL DERIVATIVES. B IS SENT FROM SMVGEAR AS A *
* CORRECTED VALUE OF THE FIRST DERIVATIVES OF THE ORDINARY DIFFER- *
* ENTIAL EQUATIONS. SUBROUTINE DECOMP.F SOLVED FOR "A", THE *
* DECOMPOSED MATRIX. SEE PRESS ET AL. (1992) NUMERICAL RECIPES. *
* CAMBRIDGE UNIVERSITY PRESS, FOR A BETTER DESCRIPTION OF THE BACK- *
* SUBSTITUTION PROCESS. *
* *
* THIS BACK-SUBSTITUTION PROCESS USES SPARSE-MATRIX TECHNIQUES, *
* VECTORIZES AROUND THE GRID-CELL DIMENSION, AND USES NO PARTIAL *
* PIVOTING. TESTS BY SHERMAN & HINDMARSH (1980) LAWRENCE LIVERMORE *
* REP. UCRL-84102 AND BY US HAVE CONFIRMED THAT THE REMOVAL OF *
* PARTIAL PIVOTING HAS LITTLE EFFECT ON RESULTS. *
* *
* HOW TO CALL SUBROUTINE: *
* ---------------------- *
* CALL BACKSUB.F FROM SMVGEAR.F WITH *
* NCS = 1..NCSGAS FOR GAS CHEMISTRY *
* NCSP = NCS FOR DAYTIME GAS CHEM *
* NCSP = NCS +ICS FOR NIGHTTIME GAS CHEM *
*********************************************************************
*********************************************************************
* BACKSUB LOOP # 1 *
* FIRST, ADJUST RIGHT SIDE OF Ax = B USING LOWER TRIANGULAR MATRIX *
Source File: calcrate.F, Date: Tue Dec 15 14:07:35 EST 2009 194
*********************************************************************
SUM 1,2,3,4, OR 5 TERMS AT A TIME TO IMPROVE VECTORIZATION.
KTLOOP = NUMBER OF GRID-CELLS IN A GRID-BLOCK
ISCHAN = ORDER OF MATRIX
CC2 = ARRAY HOLDING VALUES OF DECOMPOSED MATRIX.
GLOSS = ARRAY INITIALLY HOLDING RIGHT SIDE OF EQUATION. THESE
VALUES ARE CONVERTED TO THE SOLUTION DURING BACK-SUBSTITUTION.
KZEROA,..= ARRAYS IDENTIFYING TERMS IN GLOSS ARRAY
REVISION HISTORY:
23 Mar 2009 - R. Yantosca - Added return code
1.26.3 calcrate
Subroutine CALCRATE computes reaction rates before passing them to the SMVGEARsolver. (M. Jacobson 1997; gcc, bdf, bmy, 4/1/03, 11/19/08)
INTERFACE:
SUBROUTINE CALCRATE( L_COLUMN, N_AER, N_DRYDEP,
& N_DUST, N_EMISSION, N_JV,
& N_RH, N_TRACERS, ABSHUM_1d,
& AIRDENS_1d, DEPSAV_1d, ERADIUS_1d,
& FRAC_OF_PBL, FRAC_UNDER_PBL, ID_EMISSION,
& ITS_IN_TROP, ITS_IN_PBL, J_VALUE,
& LAT, PMID_bar_1d, REMIS_1d,
& SUNCOS_1d, T_1d, TAREA_1d,
& RC )
USES:
IMPLICIT NONE
# include "smv_dimension.h" ! Dimensions for common blocks
# include "cmn_fj_loop.h" ! RINDEX
# include "comode_loop.h" ! SMVGEAR II common blocks
# include "smv_errcode.h" ! Error codes
INPUT PARAMETERS:
! Number of boxes in the atmospheric column
INTEGER, INTENT(IN) :: L_COLUMN
! Number of aerosol size bins
INTEGER, INTENT(IN) :: N_AER
! Number of dry deposition species
INTEGER, INTENT(IN) :: N_DRYDEP
Source File: calcrate.F, Date: Tue Dec 15 14:07:35 EST 2009 195
! Number of emission species
INTEGER, INTENT(IN) :: N_EMISSION
! Number of dust species
INTEGER, INTENT(IN) :: N_DUST
! Number of J-value rxns
INTEGER, INTENT(IN) :: N_JV
! Number of relative humidity bins
INTEGER, INTENT(IN) :: N_RH
! Number of advected tracers
INTEGER, INTENT(IN) :: N_TRACERS
! Latitude of surface location [degrees]
REAL*8, INTENT(IN) :: LAT
! Cosine of solar zenith angle [unitless]
REAL*8, INTENT(IN) :: SUNCOS_1d
! Relative humidity []
REAL*8, INTENT(IN) :: ABSHUM_1d ( L_COLUMN )
! Air density [#/cm3]
REAL*8, INTENT(IN) :: AIRDENS_1d ( L_COLUMN )
! Fraction of PBL bounded by each box [unitless]
REAL*8, INTENT(IN) :: FRAC_OF_PBL ( L_COLUMN )
! Fraction of each box totally underneath the PBL [unitless]
REAL*8, INTENT(IN) :: FRAC_UNDER_PBL( L_COLUMN )
! Flags to denote if each box is in the troposphere
LOGICAL, INTENT(IN) :: ITS_IN_TROP ( L_COLUMN )
! Flags to denote if each box is in the PBL
LOGICAL, INTENT(IN) :: ITS_IN_PBL ( L_COLUMN )
! Pressure [bar]
REAL*8, INTENT(IN) :: PMID_bar_1d ( L_COLUMN )
! Temperature [K]
REAL*8, INTENT(IN) :: T_1d ( L_COLUMN )
! J-values [1/s]
REAL*8, INTENT(IN) :: J_VALUE ( L_COLUMN, N_JV )
Source File: calcrate.F, Date: Tue Dec 15 14:07:35 EST 2009 196
! Emission array [molec/cm3/s]
REAL*8, INTENT(IN) :: REMIS_1d ( L_COLUMN, N_EMISSION )
! Aerosol effective radius
REAL*8, INTENT(IN) :: ERADIUS_1d ( L_COLUMN, N_DUST+N_AER )
! Aerosol effective surface area
REAL*8, INTENT(IN) :: TAREA_1d ( L_COLUMN, N_DUST+N_RH )
! ID #’s for each emission species
INTEGER, INTENT(IN) :: ID_EMISSION ( N_EMISSION )
! Dry deposition frequencies [1/s]
REAL*8, INTENT(IN) :: DEPSAV_1d ( N_DRYDEP )
OUTPUT PARAMETERS:
! Return code
INTEGER, INTENT(OUT) :: RC
REMARKS:
*********************************************************************
************ WRITTEN BY MARK JACOBSON (1993) ************
*** (C) COPYRIGHT, 1993 BY MARK Z. JACOBSON ***
*** U.S. COPYRIGHT OFFICE REGISTRATION NO. TXu 670-279 ***
*** (650) 723-6836 ***
*********************************************************************
CCCCCCC A L CCCCCCC RRRRRRR A TTTTTTT EEEEEEE
C A A L C R R A A T E
C A A L C RRRRRRR A A T EEEEEEE
C AAAAAAA L C R R AAAAAAA T E
CCCCCCC A A LLLLLLL CCCCCCC R R A A T EEEEEEE
*********************************************************************
* THIS SUBROUTINE CALCULATES KINETIC REACTION AND PHOTORATES *
* (S-1, CM3 S-1, OR CM6 S-2) AND PRESSURE AND TEMPERATURE- *
* DEPENDENCE FOR GAS-PHASE CHEMICAL REACTIONS. *
* *
* HOW TO CALL SUBROUTINE: *
* ---------------------- *
* CALL CALCRATE.F FROM PHYSPROC.F WITH *
* NCS = 1..NCSGAS FOR GAS CHEMISTRY *
*********************************************************************
REVISION HISTORY:
22 May 2009 - R. Yantosca - Columnized and cleaned up
09 Dec 2009 - R. Yantosca - Removed reference to obsolete functions
Source File: decomp.F, Date: Tue Dec 15 14:07:35 EST 2009 197
1.26.4 n2o5
Internal function N2O5 computes the GAMMA factor for N2O5 hydrolysis. (mje, bmy,8/7/03)
INTERFACE:
FUNCTION N2O5( AEROTYPE, TEMP, RH, RC ) RESULT( GAMMA )
USES:
IMPLICIT NONE
# include "smv_errcode.h" ! Error codes
INPUT PARAMETERS:
INTEGER, INTENT(IN) :: AEROTYPE ! Aerosol type
REAL*8, INTENT(IN) :: TEMP ! Temperature [K]
REAL*8, INTENT(IN) :: RH ! Relative humidity [unitless]
OUTPUT PARAMETERS:
! Arguments
INTEGER, INTENT(OUT) :: RC ! Return code
RETURN VALUE:
! Function return value
REAL*8 :: GAMMA ! Reaction probability GAMMA
REVISION HISTORY:
25 Mar 2009 - R. Yantosca - Added ProTex Docs & return code
1.26.5 decomp
Subroutine DECOMP decomposes the sparse matrix for the SMVGEAR II solver. (M.Jacobson, 1997; bdf, bmy, 4/18/03)
INTERFACE:
SUBROUTINE DECOMP( RC )
USES:
IMPLICIT NONE
# include "smv_dimension.h" ! Dimensions for common blocks
# include "comode_loop.h" ! SMVGEAR arrays
# include "smv_errcode.h" ! Error codes
OUTPUT PARAMETERS:
Source File: decomp.F, Date: Tue Dec 15 14:07:35 EST 2009 198
INTEGER, INTENT(OUT) :: RC ! Return code
REMARKS:
*********************************************************************
************ WRITTEN BY MARK JACOBSON (1993) ************
*** (C) COPYRIGHT, 1993 BY MARK Z. JACOBSON ***
*** U.S. COPYRIGHT OFFICE REGISTRATION NO. TXu 670-279 ***
*** (650) 723-6836 ***
*********************************************************************
DDDDDDD EEEEEEE CCCCCCC OOOOOOO M M PPPPPPP
D D E C O O MM MM P P
D D EEEEEEE C O O M M M M PPPPPPP
D D E C O O M M M P
DDDDDDD EEEEEEE CCCCCCC OOOOOOO M M P
*********************************************************************
************** DECOMPOSE THE SPARSE MATRIX **************************
*********************************************************************
*********************************************************************
* THIS SUBROUTINE DECOMPOSES THE MATRIX "P" INTO THE MATRIX "A" IN *
* ORDER TO SOLVE THE LINEAR SET OF EQUATIONS Ax = B FOR x, WHICH IS *
* A CORRECTION VECTOR. Ax = B IS SOLVED IN SUBROUTINE BACKSUB.F *
* ABOVE, THE ORIGINAL MATRIX "P" IS *
* *
* P = I - H x Bo x J, *
* *
* WHERE I = IDENTITY MATRIX, H = TIME-STEP, Bo = A COEFFICIENT THAT *
* DEPENDS ON THE ORDER OF THE INTEGRATION METHOD, AND J IS THE *
* MATRIX OF PARTIAL DERIVATIVES. SEE PRESS ET AL. (1992) NUMERICAL *
* RECIPES CAMBRIDGE UNIVERSITY PRESS, FOR A BETTER DESCRIPTION OF *
* THE L-U DECOMPOSTION PROCESS *
* *
* THIS L-U DECOMPOSTION PROCESS USES SPARSE-MATRIX TECHNIQUES, *
* VECTORIZES AROUND THE GRID-CELL DIMENSION, AND USES NO PARTIAL *
* PIVOTING. TESTS BY SHERMAN & HINDMARSH (1980) LAWRENCE LIVERMORE *
* REP. UCRL-84102 AND BY US HAVE CONFIRMED THAT THE REMOVAL OF *
* PARTIAL PIVOTING HAS LITTLE EFFECT ON RESULTS. *
* *
* HOW TO CALL SUBROUTINE: *
* ---------------------- *
* CALL DECOMP.F FROM SMVGEAR.F WITH *
* NCS = 1..NCSGAS FOR GAS CHEMISTRY *
* NCSP = NCS FOR DAYTIME GAS CHEM *
* NCSP = NCS +ICS FOR NIGHTTIME GAS CHEM *
*********************************************************************
KTLOOP = NUMBER OF GRID-CELLS IN A GRID-BLOCK
ISCHAN = ORIGINAL ORDER OF MATRIX
Source File: fyrno3.F, Date: Tue Dec 15 14:07:36 EST 2009 199
CC2 = ARRAY OF IARRAY UNITS HOLDING VALUES OF EACH MATRIX
POSITION ACTUALLY USED. ORIGINALLY,
CC2 = P = I - DELT * ASET(NQQ,1) * PARTIAL DERIVATIVES.
HOWEVER, CC2 IS DECOMPOSED HERE
*********************************************************************
*** FIRST LOOP OF L-U DECOMPOSTION ***
*********************************************************************
SUM 1,2,3,4, OR 5 TERMS AT A TIME TO IMPROVE VECTORIZATION
REVISION HISTORY:
21 May 2008 - R. Yantosca - Initial version
1.26.6 fyrno3
Function FYRNO3 returns organic nitrate yields YN = RKA/(RKA+RKB) from RO2+NOreactions as a function of the number N of carbon atoms.
INTERFACE:
REAL*8 FUNCTION FYRNO3( XCARBN, ZDNUM, TT )
USES:
IMPLICIT NONE
INPUT PARAMETERS:
REAL*8, INTENT(IN) :: XCARBN ! Number of C atoms in RO2
REAL*8, INTENT(IN) :: ZDNUM ! Air density [molec/cm3]
REAL*8, INTENT(IN) :: TT ! Temperature [K]
REMARKS:
Called from calcrate.f
REVISION HISTORY:
(1 ) Original code from Larry Horowitz, Jinyou Liang, Gerry Gardner,
and Daniel Jacob circa 1989/1990.
(2 ) Updated following Atkinson 1990.
(3 ) Change yield from Isoprene Nitrate (ISN2) from 0.44% to 12%,
according to Sprengnether et al., 2002. (amf, bmy, 1/7/02)
(4 ) Eliminate obsolete code from 1/02 (bmy, 2/27/02)
(5 ) Updated comment description of XCARBN (bmy, 6/26/03)
08 Dec 2009 - R. Yantosca - Added ProTeX headers
Source File: gasconc.F, Date: Tue Dec 15 14:07:36 EST 2009 200
1.26.7 gasconc
Subroutine GASCONC initializes gas concentrations for SMVGEAR II. (M. Jacobson 1997;bdf, bmy, 4/18/03, 11/19/08)
INTERFACE:
SUBROUTINE GASCONC( FIRST_TIME, ID_SPECIES, ID_TRACERS,
& COEF, L_COLUMN, N_DRYDEP,
& N_GAS, N_MEMBERS, N_TRACERS,
& AIRDENS_1D, FRCLND_1d, ITS_IN_TROP,
& PMID_bar_1d, T_1d, VOLUME_1d,
& ABSHUM_1d, CSPEC_1d, CSPEC_FULL_1d,
& TRACER_1d, RC )
USES:
USE GC_TYPE_MOD ! Types for species & tracer properties
IMPLICIT NONE
# include "smv_dimension.h" ! Dimension for common blocks
# include "comode_loop.h" ! SMVGEAR II arrays
# include "smv_errcode.h" ! Error codes
INPUT PARAMETERS:
! Object for ID flags for chemical species
TYPE(ID_SPEC), INTENT(IN) :: ID_SPECIES
! Object for ID flags for tracer numbers
TYPE(ID_TRAC), INTENT(IN) :: ID_TRACERS
! Object for coefficients etc. that link species & tracers
TYPE(SPEC_2_TRAC), INTENT(IN) :: COEF
! Are we on the first chemistry timestep?
LOGICAL, INTENT(IN) :: FIRST_TIME
! Number of boxes in an atmospheric column
INTEGER, INTENT(IN) :: L_COLUMN
! Number of species that dry-deposity
INTEGER, INTENT(IN) :: N_DRYDEP
! Number of species for SMVGEAR to solve
INTEGER, INTENT(IN) :: N_GAS
! Max mumber of chemical species per family tracer
INTEGER, INTENT(IN) :: N_MEMBERS
Source File: gasconc.F, Date: Tue Dec 15 14:07:36 EST 2009 201
! Number of transported tracer
INTEGER, INTENT(IN) :: N_TRACERS
! Fraction of the grid box that is land
REAL*8, INTENT(IN) :: FRCLND_1d
! Air density for each box in the column [#/cm3]
REAL*8, INTENT(IN) :: AIRDENS_1d (L_COLUMN )
! Flags to denote if each box in the column is in the troposphere or not
LOGICAL, INTENT(IN) :: ITS_IN_TROP (L_COLUMN )
! Pressure at the midpt of each box in the column [bar]
REAL*8, INTENT(IN) :: PMID_bar_1d (L_COLUMN )
! Temperature of each box in the column [K]
REAL*8, INTENT(IN) :: T_1d (L_COLUMN )
! Volume of each grid box in an atmospheric column [cm3]
REAL*8, INTENT(IN) :: VOLUME_1d (L_COLUMN )
INPUT/OUTPUT PARAMETERS:
! Absolute humidity (goes out as relative humidity)
REAL*8, INTENT(INOUT) :: ABSHUM_1d (L_COLUMN )
! Chemical species for SMVGEAR
REAL*8, INTENT(INOUT) :: CSPEC_1d (L_COLUMN, N_GAS )
! Chemical species saved from last iteration
REAL*8, INTENT(INOUT) :: CSPEC_FULL_1d(L_COLUMN, N_GAS )
! Tracer concentrations
REAL*8, INTENT(INOUT) :: TRACER_1d (L_COLUMN, N_TRACERS)
OUTPUT PARAMETERS:
! Return code
INTEGER, INTENT(OUT) :: RC
REMARKS:
*********************************************************************
************ WRITTEN BY MARK JACOBSON (1991-4) ************
*** (C) COPYRIGHT, 1991-4 BY MARK Z. JACOBSON ***
*** (650) 723-6836 ***
*********************************************************************
GGGGGG A SSSSSS CCCCCC OOOOO N N CCCCCC
G A A S C O O N N N C
Source File: get global ch4.F, Date: Tue Dec 15 14:07:36 EST 2009 202
G GGGG A A SSSSSSS C O O N N N C
G G AAAAAAA S C O O N N N C
GGGGGG A A SSSSSS CCCCCC OOOOO N N CCCCCC
*********************************************************************
****** INITIALIZE GAS CONCENTRATIONS IN THE MODEL ******
*********** AND SET MISCELLANEOUS PARAMETERS **********
******************
*********************************************************************
* SET THE CONCENTRATION (# CM-3) OF ACTIVE AND INACTIVE GASES *
*********************************************************************
REVISION HISTORY:
20 Mar 2009 - R. Yantosca - Modified for G-C column module, added comments!
28 Sep 2009 - R. Yantosca - Removed XNUMOL as an argument, since this
is now a field in the COEF object
1.26.8 get global ch4
Subroutine GET GLOBAL CH4 computes the latitudinal gradient in CH4 correspondingto year.
INTERFACE:
SUBROUTINE GET_GLOBAL_CH4( THISYEAR, VARIABLE_CH4,
& A3090S, A0030S, A0030N, A3090N )
USES:
IMPLICIT NONE
INPUT PARAMETERS:
INTEGER, INTENT(IN) :: THISYEAR ! Current month number (1-12)
LOGICAL, INTENT(IN) :: VARIABLE_CH4 ! =T will select variable CH4
! =F will select constant CH4
OUTPUT PARAMETERS:
REAL*8, INTENT(OUT) :: A3090S ! CH4 [ppbv], 90S - 30S lat
REAL*8, INTENT(OUT) :: A0030S ! CH4 [ppbv], 30S - 00 lat
REAL*8, INTENT(OUT) :: A0030N ! CH4 [ppbv], 00 - 30N lat
REAL*8, INTENT(OUT) :: A3090N ! CH4 [ppbv], 30N - 90N lat
REMARKS:
Original README:
.
New methane data from 1983-2001 (mje, bmy, 7/7/03)
.
Methane measurements are from CMDL website:
Source File: jsparse.F, Date: Tue Dec 15 14:07:36 EST 2009 203
ftp://140.172.192.211/ccg/ch4/flask/month
.
Measurements includes all sites other than:
BAL BSC HUN MHD OXK TAP SEY IZO KUM MID ASK
.
Sites are separated into 4 latitude bands:
(1) 90S - 30S; (2) 30S - 00S;
(3) 00N - 30N; (4) 30N - 90N
.
Bob Yantosca ([email protected]) maintains the archive
of the IDL code needed to process the methane data.
.
In mainline GEOS-Chem, updates for years post-2001 have been applied.
We need to bring those updates into this routine in the near future.
.
This routine is called from chemdr.f
REVISION HISTORY:
03 Jan 2001 - J. Wang - Initial version
(1 ) GET_GLOBAL_CH4 only has to be called at the start of the new year,
as long as A3090S, A0030S, A0030N, A3090N are saved in the
calling program (bmy, 1/3/01)
(2 ) Also need to compute yearly gradients for CH4 beyond 1997 --
will do this later (bmy, 1/3/01)
(3 ) Bug fix: add missing comma to FORMAT statement (bmy, 3/23/03)
(4 ) Place WRITE statments w/in an !$OMP CRITICAL block, so as to make
sure that only one processor at a time writes them. Also now use
F90 REPEAT intrinsic function. Also replaced old CH4 gradient values
with updated values for 1983-2001. Use data for 2001 as a proxy for
years past 2001, since data for those years has not been reported
yet. (mje, bmy, 7/7/03)
(5 ) Split off from module "global_ch4_mod.f". Updated for IPCC future
emissions scenarios. (swu, bmy, 5/30/06)
(6 ) Add the preindustrial CH4 scenarios. Also set 2001 as the default
in case we are running 2030 or 2050 met but present-day emissions.
(swu, havala, bmy, 1/25/08)
09 Dec 2009 - R. Yantosca - Remove future scaling, not needed here
09 Dec 2009 - R. Yantosca - Added ProTeX headers
1.26.9 jsparse
Subroutine JSPARSE sets up the sparse-matrix arrays for SMVGEAR II. (M. Jacobson1993; bdf, bmy, 4/18/03)
INTERFACE:
Source File: jsparse.F, Date: Tue Dec 15 14:07:36 EST 2009 204
SUBROUTINE JSPARSE( RC )
USES:
IMPLICIT NONE
# include "smv_dimension.h" ! Dimension for common blocks
# include "comode_loop.h" ! SMVGEAR II arrays
# include "smv_errcode.h" ! Error codes
OUTPUT PARAMETERS:
INTEGER, INTENT(OUT) :: RC ! Return code
REMARKS:
*********************************************************************
************ WRITTEN BY MARK JACOBSON (1993) ************
*** (C) COPYRIGHT, 1993 BY MARK Z. JACOBSON ***
*** U.S. COPYRIGHT OFFICE REGISTRATION NO. TXu 670-279 ***
*** (650) 723-6836 ***
*********************************************************************
JJ SSSSSSS PPPPPPP A RRRRRRR SSSSSSS EEEEEEE
J S P P A A R R S E
J SSSSSSS PPPPPPP A A RRRRRRR SSSSSSS EEEEEEE
J J S P AAAAAAA R R S E
JJJJJJJ SSSSSSS P A A R R SSSSSSS EEEEEEE
*********************************************************************
* THIS ROUTINE SETS UP SPARSE-MATRIX AND OTHER ARRAYS FOR SMVGEAR *
* (SPARSE-MATRIX VECTORIZED GEAR-CODE. IT SETS ARRAYS FOR GAS- *
* -PHASE, AQUEOUS-PHASE, AND ANY OTHER TYPE OF CHEMISTRY. IT ALSO *
* SETS ARRAYS FOR BOTH DAY AND NIGHT CHEMISTRY OF EACH TYPE. *
* *
* HOW TO CALL SUBROUTINE: *
* ---------------------- *
* CALL JSPARSE.F FROM READCHEM.F WITH *
* NCS = 1..NCSGAS FOR GAS CHEMISTRY *
*********************************************************************
*********************************************************************
******* SETS UP ARRAYS FOR GAS- AND AQUEOUS-PHASE CHEMISTRY ********
* INCLUDES ARRAYS FOR CALCULATING FIRST DERIVATIVES, PARTIAL DERIV- *
* ATIVES, MATRIX DECOMPOSTION, AND MATRIX BACK-SUBSTITUTION. FIRST, *
* JSPARSE RE-ORDERS THE ORDINARY DIFFERENTIAL EQUATIONS TO MAXIMIZE *
* THE NUMBER OF ZEROS IN THE MATRIX OF PARTIAL DERIVATIVES. IT *
* LATER SETS ARRAYS TO ELIMINATE ALL CALCULATIONS INVOLVING A ZERO. *
*********************************************************************
NTSPEC = TOTAL NUMBER OF ACTIVE + INACTIVE SPECIES.
NSPEC = TOTAL NUMBER OF ACTIVE SPECIES.
Source File: ksparse.F, Date: Tue Dec 15 14:07:36 EST 2009 205
NMREAC = 3 = MAXIMUM NUMBER OF ACTIVE REACTANTS IN A REACTION
NALLREAC = 4 = TOTAL REACTANT POSITIONS IN A REACTION
NMPROD = 5 = MAXIMUN NUMBER OF ACTIVE PRODUCTS IN A REACTION
NPRODLO = NALLREAC + 1 = LOWEST PRODUCT POSITION NUMBER.
NPRODHI = NALLREAC + NMPROD = HIGHEST PRODUCT POSITION NUMBER.
*********************************************************************
* DETERMINE HOW MANY PARTIAL DERIV TERMS ARE NEEDED FOR EACH SPECIES*
*********************************************************************
IFREPRO = 1 THEN SPECIES IS LOST AND REPRODUCED IN REACTION NK
IRM = SPECIES # OF EACH REACT OR PRODUCT IN EACH NK REACTION
ISAPORL = COUNTS PARTIAL DERIVATIVE TERMS FOR EACH SPECIES
FKOEF = 1, 2, FRACTION, OR MORE = # OF A GIVEN REACTANT OR PRODUCTS
E.G. REACTION A + B --> 2C + 0.34D + D
VALUE OF FKOEF 1 1 2 0.34 1
NCS = 1..NCSGAS FOR GAS CHEMISTRY
NCSP = NCS FOR DAYTIME GAS CHEM
= NCS +ICS FOR NIGHTTIME GAS CHEM
NK = REACTION # OF EACH REACTION
NRATES = NUMBER OF KINETIC (NON-PHOTO) RATE COEFFICIENTS
NTRATES = NUMBER OF KINETIC PLUS PHOTO RATE COEFFICIENTS
NALLRAT = NUMBER OF KINETIC PLUS PHOTO REACTION RATES
REVISION HISTORY:
24 May 2008 - R. Yantosca - Columnized & cleaned up
1.26.10 ksparse
Subroutine KSPARSE sets up the sparse-matrix arrays, and also arrays for day and nightchemistry for SMVGEAR II. (M. Jacobson 1997; bdf, bmy, 4/18/03)
INTERFACE:
SUBROUTINE KSPARSE( RC )
USES:
IMPLICIT NONE
# include "smv_dimension.h" ! Dimensions for common blocks
# include "comode_loop.h" ! SMVGEAR II arrays
# include "smv_errcode.h" ! Error codes
OUTPUT PARAMETERS:
INTEGER, INTENT(OUT) :: RC ! Return code
REMARKS:
Source File: ksparse.F, Date: Tue Dec 15 14:07:36 EST 2009 206
*********************************************************************
************ WRITTEN BY MARK JACOBSON (1993) ************
*** (C) COPYRIGHT, 1993 BY MARK Z. JACOBSON ***
*** U.S. COPYRIGHT OFFICE REGISTRATION NO. TXu 670-279 ***
*** (650) 723-6836 ***
*********************************************************************
K K SSSSSSS PPPPPPP A RRRRRRR SSSSSSS EEEEEEE
K K S P P A A R R S E
KK SSSSSSS PPPPPPP A A RRRRRRR SSSSSSS EEEEEEE
K K S P AAAAAAA R R S E
K K SSSSSSS P A A R R SSSSSSS EEEEEEE
*********************************************************************
* THIS ROUTINE SETS UP SPARSE-MATRIX AND OTHER ARRAYS. IT ALSO *
* SETS ARRAYS FOR GAS-PHASE, AQUEOUS-PHASE, OR ANY OTHER TYPE *
* OF CHEMISTRY. FINALLY, IT SETS ARRAYS FOR BOTH DAY AND NIGHT *
* CHEMISTRY OF EACH TYPE. *
* *
* HOW TO CALL SUBROUTINE: *
* ---------------------- *
* CALL KSPARSE.F FROM JSPARSE.F WITH *
* NCS = 1..NCSGAS FOR GAS CHEMISTRY *
*********************************************************************
*********************************************************************
* SETS UP ARRAYS FOR DECOMPOSITION / BACK-SUBSTITUTION OF SPARSE *
* MATRICES BY REMOVING ALL CALCULATIONS INVOLVING A ZERO. *
*********************************************************************
*********************************************************************
*********************************************************************
** SET ARRAYS TO TAKE ADVANTAGE OF SPARSE MATRICES **
*********************************************************************
*********************************************************************
IFSUN = 1 THEN DAY-CHEMISTRY; = 2 THEN NIGHT CHEMISTRY
NCSP = NCS FOR DAYTIME GAS CHEM
NCSP = NCS +ICS FOR NIGHTTIME GAS CHEM
KOUNT0A = # INITIAL MATRIX SPOTS FILLED W/O SPARSE-MATRIX REDUCTIONS
KOUNT0 = # INITIAL MATRIX SPOTS FILLED WITH SPARSE-MATRIX REDUCTIONS
KNTARRAY = # FINAL MATRIX SPOTS FILLED W/O SPARSE-MATRIX REDUCTIONS
IARRAY2 = # FINAL MATRIX SPOTS FILLED WITH SPARSE-MATRIX REDUCTIONS
ICNTA = # OPERATIONS IN DECOMP LOOP 1 W/O SPARSE-MATRIX REDUCTIONS
ICNTB = # OPERATIONS IN DECOMP LOOP 1 WITH SPARSE-MATRIX REDUCTIONS
JCNTA = # OPERATIONS IN DECOMP LOOP 2 W/O SPARSE-MATRIX REDUCTIONS
JCNTB = # OPERATIONS IN DECOMP LOOP 2 WITH SPARSE-MATRIX REDUCTIONS
KCNTA = # OPERATIONS IN BACK-SUP LOOP 1 W/O SPARSE-MATRIX REDUCTIONS
KCNTB = # OPERATIONS IN BACK-SUB LOOP 1 WITH SPARSE-MATRIX REDUCTIONS
MCNTA = # OPERATIONS IN BACK-SUP LOOP 2 W/O SPARSE-MATRIX REDUCTIONS
MCNTB = # OPERATIONS IN BACK-SUB LOOP 2 WITH SPARSE-MATRIX REDUCTIONS
LZERO = 1 IF AN ARRAY SPOT IS FILLED WITH A NON-ZERO VALUE. LZERO
Source File: lump.F, Date: Tue Dec 15 14:07:36 EST 2009 207
IS UPDATED AS WE SIMULATE THE ORDER OF CALCULATIONS DURING
A PRACTICE L-U DECOMPOSITION
REVISION HISTORY:
24 Mar 2009 - R. Yantosca - Columnized & cleaned up
1.26.11 lump
Subroutine LUMP takes individual chemistry species and ”lumps” them back into tracersafter each SMVGEAR chemistry timestep.
INTERFACE:
SUBROUTINE LUMP( L_COLUMN, N_GAS, N_MEMBERS, N_TRACERS,
& CSPEC_1d, ITS_IN_TROP, COEF, VOLUME_1d,
& TRACER_1d, RC )
USES:
USE GC_TYPE_MOD ! Types for species & tracer properties
IMPLICIT NONE
# include "smv_errcode.h" ! Error codes
INPUT PARAMETERS:
! Object for coefficients etc. that link species & tracers
TYPE(SPEC_2_TRAC), INTENT(IN) :: COEF
! Number of boxes in the atmospheric column
INTEGER, INTENT(IN) :: L_COLUMN
! Number of SMVGEAR trace gas species
INTEGER, INTENT(IN) :: N_GAS
! Number of chemical species for each family tracer
INTEGER, INTENT(IN) :: N_MEMBERS
! Number of advected tracers
INTEGER, INTENT(IN) :: N_TRACERS
! Flags to denote if each box is in the troposphere
LOGICAL, INTENT(IN) :: ITS_IN_TROP(L_COLUMN)
! Grid box volume [cm3]
REAL*8, INTENT(IN) :: VOLUME_1d (L_COLUMN)
Source File: ohsave.F, Date: Tue Dec 15 14:07:36 EST 2009 208
! Chemical species for SMVGEAR
REAL*8, INTENT(IN) :: CSPEC_1d (L_COLUMN, N_GAS)
INPUT/OUTPUT PARAMETERS:
! Tracer concentrations
! Enters in [molec/cm3/box]; leaves in [kg/box]
REAL*8, INTENT(INOUT) :: TRACER_1d (L_COLUMN, N_TRACERS)
OUTPUT PARAMETERS:
! Return code
INTEGER, INTENT(OUT) :: RC
REVISION HISTORY:
20 Mar 2009 - R. Yantosca - Modified for G-C column module, added comments!
28 Sep 2009 - R. Yantosca - Removed XNUMOL as an argument, since this
is now a field in the COEF object
1.26.12 partition
Subroutine PARTITION separates GEOS-CHEM tracers into its individual constituentchemistry species before each SMVGEAR chemistry timestep.
INTERFACE:
SUBROUTINE PARTITION( ID_SPECIES, ID_TRACERS, COEFF,
& L_COLUMN, N_GAS, N_MEMBERS,
& N_TRACERS, ITS_IN_TROP, VOLUME_1d,
& CSPEC_1d, TRACER_1d, RC )
! References to F90 modules
USE GC_TYPE_MOD
USE ERROR_MOD, ONLY : SAFE_DIV
USES:
IMPLICIT NONE
# include "smv_dimension.h" ! Dimensions for common blocks
# include "comode_loop.h" ! SMVGEAR common blocks
# include "smv_errcode.h" ! Error codes
INPUT PARAMETERS:
! Object for ID flags for chemical species
TYPE(ID_SPEC), INTENT(IN) :: ID_SPECIES
! Object for ID flags for tracer numbers
Source File: pderiv.F, Date: Tue Dec 15 14:07:36 EST 2009 209
TYPE(ID_TRAC), INTENT(IN) :: ID_TRACERS
! Object for coefficients etc. that link species & tracers
TYPE(SPEC_2_TRAC), INTENT(IN) :: COEFF
! Number of boxes in an atmospheric column
INTEGER, INTENT(IN) :: L_COLUMN
! Number of species for SMVGEAR to solve
INTEGER, INTENT(IN) :: N_GAS
! Max mumber of chemical species per family tracer
INTEGER, INTENT(IN) :: N_MEMBERS
! Number of transported tracer
INTEGER, INTENT(IN) :: N_TRACERS
! Flags to denote if each box in the column is in the troposphere or not
LOGICAL, INTENT(IN) :: ITS_IN_TROP (L_COLUMN )
! Volume of each grid box in an atmospheric column [cm3]
REAL*8, INTENT(IN) :: VOLUME_1d (L_COLUMN )
INPUT/OUTPUT PARAMETERS:
! Chemical species saved from last iteration
REAL*8, INTENT(INOUT) :: CSPEC_1d (L_COLUMN, N_GAS )
! Tracer concentrations
REAL*8, INTENT(INOUT) :: TRACER_1d (L_COLUMN, N_TRACERS)
OUTPUT PARAMETERS:
! Return code
INTEGER, INTENT(OUT) :: RC
REVISION HISTORY:
20 Mar 2009 - R. Yantosca - Modified for G-C column module, added comments!
28 Sep 2009 - R. Yantosca - Removed XNUMOL as an argument, since this
is now a field in the COEF object
1.26.13 pderiv
Subroutine PDERIV places the partial differential equations into a matrix for SMVGEARII. (M. Jacobson, 1997; bdf, bmy, 4/18/03)
INTERFACE:
SUBROUTINE PDERIV( RC )
Source File: pderiv.F, Date: Tue Dec 15 14:07:36 EST 2009 210
USES:
IMPLICIT NONE
# include "smv_dimension.h" ! Dimensions for common blocks
# include "comode_loop.h" ! SMVGEAR II arrays
# include "smv_errcode.h" ! Error codes
OUTPUT PARAMETERS:
INTEGER, INTENT(OUT) :: RC ! Return code
REMARKS:
*********************************************************************
************ WRITTEN BY MARK JACOBSON (1993) ************
*** (C) COPYRIGHT, 1993 BY MARK Z. JACOBSON ***
*** U.S. COPYRIGHT OFFICE REGISTRATION NO. TXu 670-279 ***
*** (650) 723-6836 ***
*********************************************************************
PPPPPPP DDDDDDD EEEEEEE RRRRRRR IIIIIII V V
P P D D E R R I V V
PPPPPPP D D EEEEEEE RRRRRRR I V V
P D D E R R I V V
P DDDDDDD EEEEEEE R R IIIIIII V
*********************************************************************
* THIS SUBROUTINE PUTS THE PARTIAL DERIVATIVES OF EACH ORDINARY *
* DIFFERENTIAL EQUATION INTO A MATRIX. THE FORM OF THE MATRIX *
* EQUATION IS *
* P = I - H x Bo x J *
* *
* WHERE I = IDENTITY MATRIX, H = TIME-STEP, Bo = COEFFICIENT *
* CORRESPONDING TO THE ORDER OF THE METHOD, AND J IS THE JACOBIAN *
* MATRIX OF PARTIAL DERIVATIVES. *
* *
* HOW TO CALL SUBROUTINE: *
* ---------------------- *
* CALL PDERIV.F FROM SMVGEAR.F WITH *
* NCS = 1..NCSGAS FOR GAS CHEMISTRY *
* NCSP = NCS FOR DAYTIME GAS CHEM *
* NCSP = NCS +ICS FOR NIGHTTIME GAS CHEM *
*********************************************************************
*********************************************************************
* INITIALIZE MATRIX *
*********************************************************************
CC2 = ARRAY OF IARRAY UNITS HOLDING VALUES OF EACH MAXTRIX
POSITION ACTUALLY USED.
CC2 = P = I - DELT * ASET(NQQ,1) * PARTIAL DERIVATIVES.
URATE = TERM OF JACOBIAN (J) = PARTIAL DERIVATIVE
IARRAY = TOTAL NUMBER OF MATRIX POSITIONS FILLED AFTER MAT. PROCESSES
Source File: physproc.F, Date: Tue Dec 15 14:07:36 EST 2009 211
IRMA,B,C = SPECIES # OF EACH REACTANT
ISCHAN = ORIGINAL ORDER OF MATRIX
KTLOOP = NUMBER OF GRID-CELLS IN A GRID-BLOCK
NONDIAG1 = 1 + # OF FINAL MATRIX POSITIONS, EXCLUDING DIAGONAL TERMS,
FILLED AFTER ALL MATRIX PROCESSES.
NPDERIV = COUNTER OF NUMBER OF TIMES THIS ROUTINE IS CALLED
R1DELT = -ASET(NQQ,1) * TIME STEP = -COEFFICIENT OF METHOD * DT
RRATE = REACTION RATE COEFFICIENT
EXAMPLE OF HOW PARTIAL DERIVATIVES ARE PLACED IN AN ARRAY:
---------------------------------------------------------
SPECIES: A, B, C
CONCENTRATIONS: [A], [B], [C]
REACTIONS: 1) A --> B J
2) A + B --> C K1
3 A + B + C --> D K2
FIRST d[A] / dt = -J[A] - K1[A][B] - K2[A][B][C]
DERIVATIVES: d[B] / dt = +J[A] - K1[A][B] - K2[A][B][C]
d[C] / dt = + K1[A][B] - K2[A][B][C]
d[D] / dt = + K2[A][B][C]
PREDICTOR MATRIX (P) = I - h * b * J:
J = JACOBIAN MATRIX OF PARTIAL DERIVATES
I = IDENTITY MATRIX
h = TIME-STEP
b = COEFFICIENT OF METHOD
R = h * b = -R1DELT
A B C D
___________________________________________________________________
|
A | 1-R(-J-K1[B]-K2[B][C]) -R(-K1[A]-K2[A][C]) -R(-K2[A][B]) 0
|
B | -R(+J-K1[B]-K2[B][C]) 1-R(-K1[A]-K2[A][C]) -R(-K2[A][B]) 0
|
C | -R( +K1[B]-K2[B][C]) -R(+K1[A]-K2[A][C]) 1-R(-K2[A][B]) 0
|
D | -R( +K2[B][C]) -R( +K2[A][C]) -R(+K2[A][B]) 1
REVISION HISTORY:
23 Mar 2009 - R. Yantosca - Added return code
1.26.14 physproc
Subroutine PHYSPROC is the driver for SMVGEAR II chemistry. It calls both CAL-CRATE to compute the rxn rates and the SMVGEAR solver routine. (M. Jacobson 1993;bdf, bmy, 4/18/03, 9/29/03)
INTERFACE:
Source File: physproc.F, Date: Tue Dec 15 14:07:36 EST 2009 212
SUBROUTINE PHYSPROC( L_COLUMN, N_AER, N_DRYDEP,
& N_DUST, N_EMISSION, N_GAS,
& N_JV, N_RH, N_TRACERS,
& ABSHUM_1d, AIRDENS_1d, CSPEC_1d,
& DEPSAV_1d, ERADIUS_1d, FRAC_OF_PBL,
& FRAC_UNDER_PBL, ID_EMISSION, ITS_IN_TROP,
& ITS_IN_PBL, J_VALUE, LAT,
& PMID_bar_1d, REMIS_1d, SUNCOS_1d,
& T_1d, TAREA_1d, RC )
USES:
IMPLICIT NONE
# include "smv_dimension.h" ! Dimensions for common blocks
# include "comode_loop.h" ! SMVGEAR common blocks & parameters
# include "smv_errcode.h" ! Error codes
INPUT PARAMETERS:
! Number of boxes in the atmospheric column
INTEGER, INTENT(IN) :: L_COLUMN
! Number of aerosol size bins
INTEGER, INTENT(IN) :: N_AER
! Number of dry deposition species
INTEGER, INTENT(IN) :: N_DRYDEP
! Number of emission species
INTEGER, INTENT(IN) :: N_EMISSION
! Number of dust species
INTEGER, INTENT(IN) :: N_DUST
! Number of SMVGEAR trace gas species
INTEGER, INTENT(IN) :: N_GAS
! Number of J-values
INTEGER, INTENT(IN) :: N_JV
! Number of relative humidity bins
INTEGER, INTENT(IN) :: N_RH
! Number of advected tracers
INTEGER, INTENT(IN) :: N_TRACERS
! Latitude of surface location [degrees]
REAL*8, INTENT(IN) :: LAT
Source File: physproc.F, Date: Tue Dec 15 14:07:36 EST 2009 213
! Relative humidity []
REAL*8, INTENT(IN) :: ABSHUM_1d ( L_COLUMN )
! Air density [#/cm3]
REAL*8, INTENT(IN) :: AIRDENS_1d ( L_COLUMN )
! Fraction of PBL bounded by each box [unitless]
REAL*8, INTENT(IN) :: FRAC_OF_PBL ( L_COLUMN )
! Fraction of each box totally underneath the PBL [unitless]
REAL*8, INTENT(IN) :: FRAC_UNDER_PBL( L_COLUMN )
! Flags to denote if each box is in the troposphere
LOGICAL, INTENT(IN) :: ITS_IN_TROP ( L_COLUMN )
! Flags to denote if each box us in the PBL
LOGICAL, INTENT(IN) :: ITS_IN_PBL ( L_COLUMN )
! Pressure [bar]
REAL*8, INTENT(IN) :: PMID_bar_1d ( L_COLUMN )
! Cosine of solar zenith angle [unitless]
REAL*8, INTENT(IN) :: SUNCOS_1d
! Temperature [K]
REAL*8, INTENT(IN) :: T_1d ( L_COLUMN )
! J-values [1/s]
REAL*8, INTENT(IN) :: J_VALUE ( L_COLUMN, N_JV )
! Emission array [molec/cm3/s]
REAL*8, INTENT(IN) :: REMIS_1d ( L_COLUMN, N_EMISSION )
! Aerosol effective radius
REAL*8, INTENT(IN) :: ERADIUS_1d ( L_COLUMN, N_DUST+N_AER )
! Aerosol effective surface area
REAL*8, INTENT(IN) :: TAREA_1d ( L_COLUMN, N_DUST+N_RH )
! ID #’s for each emission species
INTEGER, INTENT(IN) :: ID_EMISSION ( N_EMISSION )
! Dry deposition frequencies [1/s]
REAL*8, INTENT(IN) :: DEPSAV_1d ( N_DRYDEP )
INPUT/OUTPUT PARAMETERS:
! Chemical species to be solved by SMVGEAR [molec/cm3]
Source File: readchem.F, Date: Tue Dec 15 14:07:36 EST 2009 214
REAL*8, INTENT(INOUT) :: CSPEC_1d ( L_COLUMN, N_GAS )
OUTPUT PARAMETERS:
! Return code
INTEGER, INTENT(OUT) :: RC
REMARKS:
*********************************************************************
************ WRITTEN BY MARK JACOBSON (1993) ************
*** (C) COPYRIGHT, 1993 BY MARK Z. JACOBSON ***
*** U.S. COPYRIGHT OFFICE REGISTRATION NO. TXu 670-279 ***
*** (650) 723-6836 ***
*********************************************************************
PPPPPPP H H Y Y SSSSSSS PPPPPPP RRRRRRR OOOOOOO CCCCCCC
P P H H Y Y S P P R R O O C
PPPPPPP HHHHHHH Y SSSSSSS PPPPPPP RRRRRRR O O C
P H H Y S P R R O O C
P H H Y SSSSSSS P P P OOOOOOO CCCCCCC
*********************************************************************
* THIS SUBROUTINE CALLS CALCRATE.F AND SMVGEAR.F. TO SOLVE GAS- *
* PHASE CHEMICAL EQUATIONS. THE ROUTINE DIVIDES THE GRID DOMAIN *
* INTO GRID BLOCKS, AND THE CODE VECTORIZES AROUND THE NUMBER OF *
* GRID CELLS IN EACH BLOCK. *
* *
*********************************************************************
REVISION HISTORY:
21 May 2009 - R. Yantosca - Columnized and cleaned up
1.26.15 readchem
Subroutine READCHEM reads species names, chemical rxns, and photolysis reactions fromthe ”globchem.dat” chemistry mechanism file for SMVGEAR II. (M. Jacobson 1997; bdf,bmy, 5/9/03, 8/9/06)
INTERFACE:
SUBROUTINE READCHEM( RC )
USES:
IMPLICIT NONE
# include "smv_dimension.h" ! Dimensions for common blocks
# include "comode_loop.h" ! SMVGEAR II arrays
# include "smv_errcode.h" ! Error codes
OUTPUT PARAMETERS:
Source File: reader.F, Date: Tue Dec 15 14:07:36 EST 2009 215
INTEGER, INTENT(OUT) :: RC
DEFINED PARAMETERS:
! Max # of drydep species
INTEGER, PARAMETER :: MAXDEP = MAX_TRACERS
REMARKS:
*********************************************************************
************ WRITTEN BY MARK JACOBSON (1990-4) ************
*** (650) 723-6836 ***
*********************************************************************
RRRRRR EEEEEEE A DDDDDD CCCCCCC H H EEEEEEE M M
R R E A A D D C H H E M M M M
RRRRRR EEEE A A D D C HHHHHHH EEEEEEE M M M
R R E AAAAAAA D D C H H E M M
R R EEEEEEE A A DDDDDD CCCCCCC H H EEEEEEE M M
*********************************************************************
* THIS IS THE SETUP ROUTINE FOR GAS-PHASE CHEMISTRY. IT READS *
* SPECIES NAMES, CHEMICAL REACTIONS, AND PHOTOPROCESSES FROM AN *
* INPUT DATA SET. IT THEN PLACES ALL NECESSARY INFORMATION INTO *
* ARRAYS AND PRINTS OUT THE INPUT INFORMATION. *
*********************************************************************
REVISION HISTORY:
20 Mar 2008 - R. Yantosca - Modified for G-C column code, added comments!
15 Dec 2009 - R. Yantosca - Now set MAXDEP=MAX_TRACERS; avoid errors later
1.26.16 reader
Subroutine READER reads on/off switches and other settings for SMVGEAR II. (M. Ja-cobson 1997; bdf, bmy, 4/18/03, 10/16/06)
INTERFACE:
SUBROUTINE READER( FIRSTCHEM, TS_CHEM, RC )
USES:
IMPLICIT NONE
# include "smv_dimension.h" ! Dimensions for common blocks
# include "comode_loop.h" ! SMVGEAR II arrays
# include "smv_errcode.h" ! Error codes
# include "smv_physconst.h" ! Physical constants (e.g. Re, PI)
INPUT PARAMETERS:
Source File: setemdep.F, Date: Tue Dec 15 14:07:36 EST 2009 216
LOGICAL, INTENT(IN) :: FIRSTCHEM ! First chemistry timestep?
REAL*8, INTENT(IN) :: TS_CHEM ! Timestep in minutes
OUTPUT PARAMETERS:
INTEGER, INTENT(OUT) :: RC
REMARKS:
*********************************************************************
* THIS SUBROUTINE OPENS ALL DATA FILES AND READS DATA FROM m.dat ***
* FOR DEFINITIONS OF THE PARAMETERS READ IN HERE, SEE define.dat ***
*********************************************************************
RRRRRRR EEEEEEE A DDDDDDD EEEEEEE RRRRRRR
R R E A A D D E R R
RRRRRRR EEEEEEE A A D D EEEEEEE RRRRRRR
R R E AAAAAAA D D E R R
R R EEEEEEE A A DDDDDDD EEEEEEE R R
*********************************************************************
* NAMELIST DATA FOR DATA FILE m.dat *
*********************************************************************
REVISION HISTORY:
21 May 2008 - R. Yantosca - Removed a lot of unneccessary code,
and added comments
14 Dec 2009 - R. Yantosca - Now references include file "smv_physconst.h"
1.26.17 setemdep
Subroutine SETEMDEP stores SMVGEAR reaction numbers (listed in ”globchem.dat”)corresponding to GEOS-CHEM tracers which emit and dry deposit into the NTEMIS andNTDEP index arrays. (lwh, jyl, gmg, djj, 1994; bmy, 7/20/04)
INTERFACE:
SUBROUTINE SETEMDEP( N_TRACERS, N_DRYDEP, TRACER_NAME,
& DRYDEP_NAME, COEF, RC )
USES:
USE GC_TYPE_MOD ! Types for species & tracer properties
IMPLICIT NONE
# include "smv_dimension.h" ! Dimensions for common blocks
# include "comode_loop.h" ! SMVGEAR II arrays
# include "smv_errcode.h" ! Error codes
INPUT PARAMETERS:
Source File: smvgear.F, Date: Tue Dec 15 14:07:36 EST 2009 217
! Number of advected tracers
INTEGER, INTENT(IN) :: N_TRACERS
! Number of dry deposited species
INTEGER, INTENT(IN) :: N_DRYDEP
! Names of advected tracers
CHARACTER(LEN=*), INTENT(IN) :: TRACER_NAME(N_TRACERS)
! Names of dry deposition species
CHARACTER(LEN=*), INTENT(IN) :: DRYDEP_NAME(MAX_TRACERS)
! Object for # of species per advected tracer, etc.
TYPE(SPEC_2_TRAC), INTENT(INOUT) :: COEF
OUTPUT PARAMETERS:
! Return code
INTEGER, INTENT(OUT) :: RC
REVISION HISTORY:
24 Mar 2009 - R. Yantosca - Columnized & cleaned up
18 May 2009 - R. Yantosca - Optimized DO loops
1.26.18 smvgear
Subroutine SMVGEAR solves ODE’s for chemical reactions using a GEAR-type method.(M. Jacobson 1997; bdf, bmy, 5/12/03, 11/1/07)
INTERFACE:
SUBROUTINE SMVGEAR( RC )
USES:
USE ERROR_MOD, ONLY : IT_IS_NAN
IMPLICIT NONE
# include "smv_dimension.h" ! Dimensions for common blocks
# include "comode_loop.h" ! SMVGEAR common blocks
# include "smv_errcode.h" ! Error codes
OUTPUT PARAMETERS:
INTEGER, INTENT(OUT) :: RC ! Return code
REMARKS:
Source File: smvgear.F, Date: Tue Dec 15 14:07:36 EST 2009 218
*********************************************************************
************ WRITTEN BY MARK JACOBSON (1993) ************
*** (C) COPYRIGHT, 1993 BY MARK Z. JACOBSON ***
*** U.S. COPYRIGHT OFFICE REGISTRATION NO. TXu 670-279 ***
*** (650) 723-6836 ***
*********************************************************************
*********************************************************************
*********************************************************************
SSSSSSS M M V V GGGGGGG EEEEEEE A RRRRRRR
S MM MM V V G E A A R R
SSSSSSS M M M M V V G GGGG EEEEEEE A A RRRRRRR
S M M M V V G G E AAAAAAA R R
SSSSSSS M M V GGGGGGG EEEEEEE A A R R
*********************************************************************
VERSION: SMVGEAR II
LAST UPDATE: AUGUST, 1997
*********************************************************************
*********************************************************************
* SMVGEAR IS A GEAR-TYPE INTEGRATOR THAT SOLVES FIRST-ORDER ORDIN- *
* ARY DIFFERENTIAL EQUATIONS WITH INITIAL VALUE BOUNDARY CONDITIONS.*
* SMVGEAR DIFFERS FROM AN ORIGINAL GEAR CODE IN THAT IT USES SPARSE *
* MATRIX AND VECTORIZATION TECHNIQUES TO IMPROVE SPEED. MUCH *
* OF THE SPEED UP IN THIS PROGRAM IS DUE TO SPARSE MATRIX *
* TECHNIQUES AND VECTORIZATION. *
* *
* THIS VERSION INCLUDES RE-ORDERING OF GRID-CELLS PRIOR TO EACH *
* TIME-INTERVAL. THE PURPOSE OF THE REORDERING IS TO GROUP CELLS *
* WITH STIFF EQUATIONS TOGETHER AND THOSE WITH NON-STIFF EQUATIONS *
* THIS REORDERING CAN SAVE SIGNIFCANT COMPUTER TIME *
* (E.G. SPEED THE CODE BY A FACTOR OF TWO OR MORE), DEPENDING ON *
* THE VARIATION IN STIFFNESS THROUGHOUT THE GRID-DOMAIN. WHEN THE *
* STIFFNESS IS THE SAME THROUGHOUT THE GRID-DOMAIN (E.G. IF ALL *
* CONCENTRATIONS AND RATES ARE THE SAME), THEN RE-ORDERING IS *
* UNNECESSARY AND WILL NOT SPEED SOLUTIONS. *
* *
* THIS VERSION INCLUDES A VARIABLE ABSOLUTE ERROR TOLERANCE. *
* THE ABSOLUTE TOLERANCE IS RECALCULATED EVERY FEW GEAR TIME STEPS. *
* *
* THIS VERSION CONTAINS DIFFERENT SETS OF CHEMISTRY FOR *
* DIFFERENT REGIONS OF THE ATMOSPHERE. THUS, URBAN, FREE TROP- *
* OSPHERIC, AND STRATOSPHERIC CHEMISTRY CAN BE SOLVED DURING THE *
* SAME MODEL RUN. *
* *
* REFERENCES: *
* ----------- *
* *
* JACOBSON M. Z. (1998) FUNDAMENTALS OF ATMOSPHERIC MODELING. *
* CAMBRIDGE UNIVERSITY PRESS, NEW YORK. *
Source File: smvgear.F, Date: Tue Dec 15 14:07:36 EST 2009 219
* *
* JACOBSON M. Z. (1998) IMPROVEMENT OF SMVGEAR II ON VECTOR AND *
* SCALAR MACHINES THROUGH ABSOLUTE ERROR TOLERANCE CONTROL. *
* ATMOS. ENVIRON. 32, 791 - 796 *
* *
* JACOBSON M. Z. (1995) COMPUTATION OF GLOBAL PHOTOCHEMISTRY *
* WITH SMVGEAR II. ATMOS. ENVIRON., 29A, 2541 - 2546 *
* *
* JACOBSON M. Z. (1994) DEVELOPING, COUPLING, AND APPLYING A GAS, *
* AEROSOL, TRANSPORT, AND RADIATION MODEL TO STUDYING URBAN *
* AND REGIONAL AIR POLLUTION. Ph. D. THESIS, UNIVERSITY OF *
* CALIFORNIA, LOS ANGELES. *
* *
* JACOBSON M. Z. AND TURCO R. P. (1994) SMVGEAR: A SPARSE- *
* MATRIX, VECTORIZED GEAR CODE FOR ATMOSPHERIC MODELS. *
* ATMOS. ENVIRON. 28A, 273 - 284. *
* *
* HOW TO CALL SUBROUTINE: *
* ---------------------- *
* CALL SMVGEAR FROM PHYSPROC FOR GAS CHEM W/ NCS = 1..NCSGAS *
* *
*********************************************************************
* *
* THE ORIGINS OF THE GEAR INTEGRATOR USED IN SMVGEAR ARE FOUND IN *
* *
* GEAR C. W. (1971) NUMERICAL INITIAL VALUE PROBLEMS IN ORDINARY *
* DIFFERENTIAL EQUATIONS. PRENTICE-HALL, NJ, PP. 158-166. *
* *
*********************************************************************
* *
* FINALLY, IN SUBROUTINE SMVGEAR.F, THE FOLLOWING IDEAS ORIGINATED *
* FROM LSODES, THE LIVERMORE SOLVER FOR ORDINARY DIFFERENTIAL *
* WITH SPARSE MATRICES (HINDMARSH A. C. AND SHERMAN A. H.): *
* *
* (A) PREDICTING THE FIRST TIME-STEP; *
* (B) DETERMINING CORRECTOR CONVERGENCE DIFFERENTLY THAN IN *
* GEAR’S ORIGINAL CODE (GOC) *
* (C) DETERMINING ERROR DIFFERENTLY THAN IN GOC *
* (D) SUMMING UP THE PASCAL MATRIX DIFFERENTLY THAN IN GOC *
* *
* REFERENCES FOR THE 1987 LSODES VERSION INCLUDE: *
* *
* SHERMAN A. H. AND HINDMARSH A. C. (1980) GEARS: A PACKAGE FOR *
* THE SOLUTION OF SPARSE, STIFF ORDINARY DIFFERENTIAL EQUATIONS. *
* LAWRENCE LIVERMORE LABORATORY REPORT UCRL-84102. *
* *
* HINDMARSH A. C. (1983) ODEPACK, A SYSTEMATIZED COLLECTION OF *
* ODE SOLVERS. IN SCIENTIFIC COMPUTING, R.S. STEPLEMAN ET AL., *
Source File: smvgear.F, Date: Tue Dec 15 14:07:36 EST 2009 220
* EDS., NORTH-HOLLAND, AMSTERDAM, PP. 55 - 74. *
* *
*********************************************************************
*********************************************************************
*************** HERE ARE SOME PARAMETER DEFINITIONS *****************
*********************************************************************
ABST2 = 1. / TIMEINTERVAL**2 (SEC-2) (SET IN READER.F)
ASN1 = THE VALUE OF ASET(NQQ,1)
CEST = STORES VALUE OF DTLOS WHEN IDOUB = 1
CHOLD = 1 / (RELTOL * CNEW + ABTOL). MULTIPLY
CHOLD BY LOCAL ERRORS IN DIFFERENT ERROR TESTS.
CNEW = STORES CONCENTRATION (Y [ESTIMATED])
CONC = AN ARRAY OF LENGTH ISCHAN * (MAXORD+1) THAT CARRIES THE
DERIVATIVES OF CNEW, SCALED BY DELT**J/FACTORIAL(J),
WHERE J IS THE J-TH DERIVATIVE. J VARIES FROM 1 TO NQQ,
WHICH IS THE CURRENT ORDER OF THE METHOD.
E.G. CONC(JSPC,2) STORES DELT * Y’ (ESTIMATED)
DELT = CURRENT TIME-STEP (S) LENGTH DURING A TIME-INTERVAL
DRATE = PARAMETER WHICH USED TO DETERMINE WHETHER CONVERGENCE
HAS OCCURRED
DTLOS = AN ARRAY OF LENGTH ISCHAN, USED FOR THE ACCUMULATED
CORRECTIONS. ON A SUCCESSFUL RETURN, DTLOS(KLOOP,I) CONTAINS
THE ESTIMATED ONE-STEP LOCAL ERROR IN CNEW.
EDWN = PERTST**2 * ORDER FOR ONE ORDER LOWER THAN CURRENT ORDER
ENQQ = PERTST**2 * ORDER FOR CURRENT ORDER
ERRMAX = RELATIVE ERROR TOLERANCE (SEE CHOLD). SET IN m.dat.
EPS SHOULD BE < 1.0. FOR SPEEDY AND RELIABLE RESULTS,
10**-3 IS REASONABLE. FOR MANY DECIMAL PLACES OF ACCURACY,
DECREASE EPS.
EUP = PERTST**2 * ORDER FOR ONE ORDER HIGHER THAN CURRENT ORDER
FRACDEC = FRACTION THE TIME-STEP IS DECREASED IF CONVERGENCE TEST FAILS
GLOSS = VALUE OF FIRST DERIVATIVES ON OUTPUT FROM SUBFUN.
= RIGHT-SIDE OF EQUATION ON INPUT TO BACKSUB.F
= ERROR TERM (SOLUTION FROM BACKSUB.F) ON OUTPUT FROM BACKSUB
HMAX = THE MAXIMUM ALLOWABLE VALUE OF DELT
HMIN = THE MINIMUM ALLOWABLE VALUE OF DELT
HRMAX = MAXIMUM RELATIVE CHANGE IN DELT*ASET(1) BEFORE PDERIV IS CALLED.
HRATIO = RELATIVE CHANGE IN DELT * ASET(1) EACH CHANGE IN STEP OR ORDER
WHEN ABS(HRATIO-1) > HRMAX, RESET JEVAL = 1 TO CALL PDERIV
IABOVK = NUMBER OF SPECIES WHOSE CONCENTRATIONS ARE LARGER THAN YABST
IDOUB = RECORDS THE NUMBER OF STEPS SINCE THE LAST CHANGE IN STEP SIZE
OR ORDER. IT MUST BE AT LEAST KSTEP = NQQ+1 BEFORE DOUBLING IS
ALLOWED.
IFAIL = NUMBER OF TIMES THE CORRECTOR FAILED TO CONVERGE WHILE THE
JACOBIAN WAS OLD (PDERIV NOT CALLED DURING THE LAST TEST)
IFSUCCESS = IDENTIFIES WHETHER STEP IS SUCCESSFUL (=1) OR NOT (=0)
IFSUN = IDENTIFIES WHETHER SUN IS UP (=1) OR DOWN (=2)
Source File: smvgear.F, Date: Tue Dec 15 14:07:36 EST 2009 221
ISCHAN = THE NUMBER OF FIRST-ORDER EQUATIONS TO SOLVE = # OF SPECIES =
ORDER OF ORIGINAL MATRIX. ISCHAN HAS A DIFFERENT VALUE
FOR DAY AND NIGHT AND FOR GAS- CHEMISTRY.
ISREORD = 1: CALC INITIAL STIFFNESS BEFORE RUNNING CODE TO REORDER CELLS
IN THIS CASE, USE PHOTORATES FOR END OF TIME-INTERVAL
= 0: DO NORMAL CALCULATIONS
JEVAL = 1 --> CALL PDERIV THE NEXT TIME THROUGH THE CORRECTOR STEPS.
= 0 --> LAST STEP WAS SUCCESSFUL AND DO NOT NEED TO CALL PDERIV
= -1 --> PDERIV JUST CALLED, AND DO NOT NEED TO CALL AGAIN
UNTIL JEVAL SWITCHED TO 1.
JRESTAR = COUNTS NUMBER OF TIMES SMVGEAR STARTS OVER AT ORDER 1
BECAUSE OF EXCESSIVE FAILURES.
LFAIL = NUMBER OF TIMES THE ACCUMULATED ERROR TEST FAILED
KSTEP = NQQ + 1
KTLOOP = NUMBER OF GRID-CELLS IN A GRID-BLOCK
MAXORD = THE MAXIMUM ALLOWABLE ORDER OF THE INTEGRATION METHOD
MBETWEEN = THE MAXIMUM ALLOWABLE NUMBER OF STEPS BETWEEN CALLS TO PDERIV
MSTEP = THE MAXIMUM ALLOWABLE NUMBER OF CORRECTOR ITERATIONS
NCS = 1..NCSGAS FOR GAS CHEMISTRY
NCSP = NCS FOR DAYTIME GAS CHEM
= NCS + ICS FOR NIGHTTIME GAS CHEM
NFAIL = NUMBER OF TIMES CORRECTER FAILS TO CONVERGE AFTER PDERIV
WAS JUST CALLED
NPDERIV = TOTAL NUMBER OF TIMES THAT MATRIX IS EVALUATED (PDERIV)
NPDTOT = NUMBER OF CALLS TO PDERIV ROUTINE, OVER ALL TIME
NSFTOT = NUMBER OF CALLS TO SUBFUN ROUTINE, OVER ALL TIME
NSLP = THE LAST TIME-STEP NUMBER DURING WHICH PDERIV WAS CALLED
NSTTOT = TOTAL NUMBER OF SUCCESSFUL TIME-STEPS, OVER ALL TIME
NSUBFUN = TOTAL NUMBER OF TIMES SUBFUN IS CALLED
NSTEPS = TOTAL NUMBER OF SUCCESSFUL TIME-STEPS TAKEN
NQQ = ORDER OF THE INTEGRATION METHOD. IT VARIES BETWEEN 1 AND MAXORD.
NQQISC = NQQ * ISCHAN
NQQOLD = VALUE OF NQQ DURING LAST TIME-STEP
ORDER = FLOATING POINT VALUE OF ISCHAN, THE ORDER OF NUMBER OF ODES.
PDERIV = NAME OF ROUTINE TO EVALUATE THE JACOBIAN MATRIX (J)
AND P = I - DELT * ASET(1) * J
PERTS2 = COEFFICIENTS USED IN SELECTING THE STEP AND ORDER (SEE
JSPARSE.F) NOTE THAT PERTS2 = ORIGINAL PERTST**2
RDELMAX = THE MAXIMUM FACTOR BY WHICH DELT CAN BE INCREASED IN A SINGLE
STEP. AS IN LSODES, SET IT TO 1E4 INITIALLY TO COMPENSATE
FOR THE SMALL INITIAL DELT, BUT THEN SET IT TO 10 AFTER
SUCCESSFUL STEPS AND 2 AFTER UNSUCCESSFUL STEPS
RDELT = FACTOR (TIME-STEP RATIO) BY WHICH WE INCREASE OR DECREASE DELT
RDELTDN = TIME-STEP RATIO AT ONE ORDER LOWER THAN CURRENT ORDER
RDELTSM = TIME-STEP RATIO AT CURRENT ORDER
RDELTUP = TIME-STEP RATIO AT ONE ORDER HIGHER THAN CURRENT ORDER
RMSRAT = RATIO OF CURRENT TO PREVIOUS RMS SCALED ERROR. IF THIS
RATIO DECREASES, THEN CONVERGENCE IS OCCURING.
Source File: subfun.F, Date: Tue Dec 15 14:07:36 EST 2009 222
SUBFUN = NAME OF ROUTINE TO SOLVE FIRST DERIVATIVES.
= EVALUATES DERIVATIVES IN THE SPECIAL FORM F = Y’(EST)
= F(X,Y,ESTIMATED), WHERE F IS THE RIGHT HAND SIDE OF THE
DIFFERENTIAL EQUATION.
TINTERVAL = TOTAL SECONDS IN A TIME-INTERVAL
TIMREMAIN = REMAINING TIME IN AN INTERVAL
TOLD = STORES THE LAST VALUE OF XELAPS IN CASE THE CURRENT STEP FAILS
XELAPS = ELAPSED TIME IN AN INTERVAL (S)
ABTOL = ABSOLUTE ERROR TOLERANCE
IF ABTOL IS TOO SMALL, THEN INTEGRATION WILL TAKE TOO LONG.
IF ABTOL TOO LARGE, CONVERGENCE WILL BE TOO EASY AND ERRORS
WILL ACCUMULATE, THE TIME-STEP MAY BE CUT TOO SMALL, AND
THE INTEGRATION MAY STOP (DELT < HMIN OR FLOATING POINT
EXCEPTION IN DECOMP.F).
TYPICAL GAS-PHASE VALUES OF ABSTOL ARE 10**3 CM-3
TYPICAL AQ -PHASE VALUES OF ABSTOL ARE 10**-13 TO 10**-15 M L-1
YFAC = 1.0 ORIGINIALLY, BUT IS DECREASED IF EXCESSIVE FAILURES OCCUR
IN ORDER TO REDUCE ABSOLUTE ERROR TOLERANCE
REVISION HISTORY:
23 Mar 2009 - R. Yantosca - Columnized and cleaned up
16 Nov 2009 - R. Yantosca - Bug fix: RC was REAL*8, should be INTEGER.
Fhis had been causing a segmentation fault.
1.26.19 subfun
Subroutine SUBFUN evaluates the first derivative of each ODE for SMVGEAR II. (M.Jacobson, 1997; bdf, bmy, 4/1/03)
INTERFACE:
SUBROUTINE SUBFUN( RC )
USES:
IMPLICIT NONE
# include "smv_dimension.h" ! Dimensions for common blocks
# include "comode_loop.h" ! SMVGEAR II arrays
# include "smv_errcode.h" ! Error codes
OUTPUT PARAMETERS:
INTEGER, INTENT(OUT) :: RC ! Return code
REMARKS:
*********************************************************************
************ WRITTEN BY MARK JACOBSON (1993) ************
Source File: subfun.F, Date: Tue Dec 15 14:07:36 EST 2009 223
*** (C) COPYRIGHT, 1993 BY MARK Z. JACOBSON ***
*** U.S. COPYRIGHT OFFICE REGISTRATION NO. TXu 670-279 ***
*** (650) 723-6836 ***
*********************************************************************
SSSSSSS U U BBBBBBB FFFFFFF U U N N
S U U B B F U U NN N
SSSSSSS U U BBBBBBB FFF U U N N N
S U U B B F U U N NN
SSSSSSS UUUUUUU BBBBBBB F UUUUUUU N N
*********************************************************************
* THIS SUBROUTINE EVALUATES THE FIRST DERIVATIVE OF EACH ORDINARY *
* DIFFERENTIAL EQUATION (ODE) *
* *
* HOW TO CALL SUBROUTINE: *
* ---------------------- *
* CALL SUBFUN.F FROM SMVGEAR.F WITH *
* NCS = 1..NCSGAS FOR GAS CHEMISTRY *
* NCSP = NCS FOR DAYTIME GAS CHEM *
* NCSP = NCS +ICS FOR NIGHTTIME GAS CHEM *
*********************************************************************
EXAMPLE
-------
SPECIES: A, B, C
CONCENTRATIONS: [A], [B], [C]
REACTIONS: 1) A --> B J
2) A + B --> C K1
3 A + B + C --> D K2
FIRST d[A] / dt = -J[A] - K1[A][B] - K2[A][B][C]
DERIVATIVES: d[B] / dt = +J[A] - K1[A][B] - K2[A][B][C]
d[C] / dt = + K1[A][B] - K2[A][B][C]
d[D] / dt = + K2[A][B][C]
*********************************************************************
CONCMULT = PRODUCT OF CONCENTRATIONS IN A RATE. IF TWO
CONSECUTIVE REACTIONS HAVE THE SAME SPECIES REACTING
(EG A + B --> C AND A + B --> D + E) THEN USE THE
SAME VALUE OF CONCMULT FOR BOTH REACTIONS.
CNEW = INIT (AND FINAL) SPECIES CONC (# CM-3-AIR OR MOLES L-1-H2O)
GLOSS = FIRST DERIVATIVE = SUM OF PROD. MINUS LOSS RATES FOR A SPECIES
IRMA,B,C = LOCATES REORDERED ACTIVE SPECIES NUMBERS
ISCHAN = NUMBER OF ODES.
LOSSRA.. = REAORDERED REACTION RATE NUMBERS FOR EACH LOSS (AND PROD) TERM
KTLOOP = NUMBER OF GRID-CELLS IN A GRID-BLOCK
NSUBFUN = COUNTS THE NUMBER OF TIMES THIS ROUTINE IS CALLED
RRATE = FORWARD RATE COEFFICIENT
= S-1 FOR RATES WITH 1 REACTANT
= L-H2O MOLE-1 S-1 OR CM**3 #-1 S-1 FOR RATES WITH 2 REACTANTS
= L**2-H2O M-2 S-1 OR CM**6 #-2 S-1 FOR RATES WITH 3 REACTANTS
TRATE = REACTION RATE MOLES L-1 -H2O S-1 OR # CM-3 S-1
Source File: update.F, Date: Tue Dec 15 14:07:36 EST 2009 224
REVISION HISTORY:
23 Mar 2009 - R. Yantosca - Initial version
1.26.20 update
Subroutine UPDATE updates rxn rates for each timestep for SMVGEAR II. (M. Jacobson,1997, bdf, bmy, 4/18/03)
INTERFACE:
SUBROUTINE UPDATE( RC )
USES:
IMPLICIT NONE
# include "smv_dimension.h" ! Dimensions for common blocks
# include "comode_loop.h" ! SMVGEAR II arrays
# include "smv_errcode.h" ! Error codes
OUTPUT PARAMETERS:
INTEGER, INTENT(OUT) :: RC ! Return code
REMARKS:
*********************************************************************
************ WRITTEN BY MARK JACOBSON (1993) ************
*** (C) COPYRIGHT, 1993 BY MARK Z. JACOBSON ***
*** (650) 723-6836 ***
*********************************************************************
U U PPPPPPP DDDDDD A TTTTTTT EEEEEEE
U U P P D D A A T E
U U PPPPPPP D D A A T EEEEEEE
U U P D D AAAAAAA T E
UUUUUUU P DDDDDD A A T EEEEEEE
*********************************************************************
* THIS SUBROUTINE UPDATES PHOTORATES AND ARB EMISSIONS RATES FOR *
* EACH TIME-STEP. PHOTORATES ARE INCLUDED IN FIRST AND PARTIAL *
* DERIVATIVE EQUATIONS WHILE EMISSIONS RATES ARE INCLUDED IN FIRST *
* DERIVATE EQUATIONS ONLY. SINCE THE EMISSIONS RATES ARE CONSTANT *
* FOR A GIVEN TIME STEP AND LOCATION (ALTHOUGH THEY CHANGE EACH *
* TIME STEP AND LOCATION, THEY ARE PUT INTO THE FIRST DERIVATIVE *
* TERM OF SUBFUN.F ONLY (NOT INTO PARTIAL DERIVATIVE TERMS. EVERY *
* INTEGRATION TIME-STEP, EMISSIONS ARE RECALCULATED. *
*********************************************************************
*********************************************************************
Source File: update.F, Date: Tue Dec 15 14:07:36 EST 2009 225
* UPDATE PHOTO-RATES AND OTHER PARMETERS BECAUSE THE TIME CHANGED. *
* NOTE THAT A TIME CHANGE COULD CORRESPOND TO EITHER A SUCCESSFUL *
* OR FAILED STEP *
*********************************************************************
RRATE = PRATE1 + XELAPS * (PRATE - PRATE1)
XELAPS = ELAPSED TIME DURING INTERVAL
IFPRAT = 1: USE SCALED PHOTORATES FROM photrate.dat (ITESTGEAR.EQ.0)
= 0: USE PHOTORATES FROM globchem.dat (ITESTGEAR > 0)
*********************************************************************
************** UPDATE PHOTORATES ***************
****************** INTERPOLATE BETWEEN TWO VALUES *******************
*********************************************************************
REVISION HISTORY:
23 Mar 2009 - R. Yantosca - Initial version