Radm2
- RADM2
reaction_system
gaschem
radm2
The RADM2 gas-phase mechanism (Stockwell et al. 1990) exactly as WRF-Chem chem_opt = 101 (the KPP build of RADM2; chem_opt = 1 is the older hand-coded RADM2 of chem/module_radm.F, a different code path) integrates it: the 156 reactions of radm2.eqn (21 photolysis + 135 thermal) over 59 variable species, translated from chem/KPP/mechanisms/radm2/radm2.eqn and radm2.spc of WRF v4.8.0 by a translation script. The reaction system has 157 entries, one more than the .eqn, because the negative product "-0.9 OH" of reaction 60 is written as the extra entry R060x. The document holds three components. The model RADM2RateConstants evaluates every thermal rate coefficient from the hand-authored WRF rate-law templates (radm2_ratelaws.esm) with the .eqn coefficients bound once, and exposes them as observeds tested at t = 0 against the real64 KPP box driver and against a real WRF-Chem chem_opt = 101 single-column run. The reaction system RADM2 carries the stoichiometry only, each rate being a scoped reference to that model (photolysis rates are its parameters j_*). The model RADM2Tendencies exposes the mass-action tendency of every species as an observed, so the right-hand side is tested at t = 0 independently of any integrator. Species are in molec/cm^3 (the KPP units; WRF converts its ppmV chem array with conv = 1e-6 dens2con_a rho). The two KPP fixed species are not species here: air (M) and water vapour (H2O) are the parameters RADM2RateConstants.M and RADM2RateConstants.H2O, the single source of each for the whole document. The rate laws read them as arguments, the five reactions in which KPP multiplies by a fixed species (R022, R024 and R036 by M; R025 and R033 by H2O) multiply their rate by them, and the relative humidity of the heterogeneous N2O5 rate is derived from H2O, M, T and p with WRF's own formula, so no override can leave two copies of one quantity disagreeing. Mass action is that of esm-spec 7.4, v = k prod S_i^n_i with no 1/n_i! factor, which is also what KPP generates. The eight reactions with a doubled substrate (R032 and R033 HO2 + HO2, R036 NO + NO, R119 MO2 + MO2, R140 ACO3 + ACO3, R147 XO2 + XO2, R153 XNO2 + XNO2, R156 OLN + OLN) carry their .eqn coefficients unchanged on that understanding: a binding that lowers this document to Catalyst.jl must build it with combinatoric_ratelaws = false, or those eight rates come out at half the KPP value. Single-precision literals of radm2.eqn and of the WRF-Chem coupler (.20946e0, .78084, -2.3, the constants of rc_n2o5 and of the relative humidity) are transcribed as the binary64 value of the single-precision number, since that is what the Fortran evaluates.
- RADM2RateConstants
model
gaschem
radm2
The RADM2 gas-phase mechanism (Stockwell et al. 1990) exactly as WRF-Chem chem_opt = 101 (the KPP build of RADM2; chem_opt = 1 is the older hand-coded RADM2 of chem/module_radm.F, a different code path) integrates it: the 156 reactions of radm2.eqn (21 photolysis + 135 thermal) over 59 variable species, translated from chem/KPP/mechanisms/radm2/radm2.eqn and radm2.spc of WRF v4.8.0 by a translation script. The reaction system has 157 entries, one more than the .eqn, because the negative product "-0.9 OH" of reaction 60 is written as the extra entry R060x. The document holds three components. The model RADM2RateConstants evaluates every thermal rate coefficient from the hand-authored WRF rate-law templates (radm2_ratelaws.esm) with the .eqn coefficients bound once, and exposes them as observeds tested at t = 0 against the real64 KPP box driver and against a real WRF-Chem chem_opt = 101 single-column run. The reaction system RADM2 carries the stoichiometry only, each rate being a scoped reference to that model (photolysis rates are its parameters j_*). The model RADM2Tendencies exposes the mass-action tendency of every species as an observed, so the right-hand side is tested at t = 0 independently of any integrator. Species are in molec/cm^3 (the KPP units; WRF converts its ppmV chem array with conv = 1e-6 dens2con_a rho). The two KPP fixed species are not species here: air (M) and water vapour (H2O) are the parameters RADM2RateConstants.M and RADM2RateConstants.H2O, the single source of each for the whole document. The rate laws read them as arguments, the five reactions in which KPP multiplies by a fixed species (R022, R024 and R036 by M; R025 and R033 by H2O) multiply their rate by them, and the relative humidity of the heterogeneous N2O5 rate is derived from H2O, M, T and p with WRF's own formula, so no override can leave two copies of one quantity disagreeing. Mass action is that of esm-spec 7.4, v = k prod S_i^n_i with no 1/n_i! factor, which is also what KPP generates. The eight reactions with a doubled substrate (R032 and R033 HO2 + HO2, R036 NO + NO, R119 MO2 + MO2, R140 ACO3 + ACO3, R147 XO2 + XO2, R153 XNO2 + XNO2, R156 OLN + OLN) carry their .eqn coefficients unchanged on that understanding: a binding that lowers this document to Catalyst.jl must build it with combinatoric_ratelaws = false, or those eight rates come out at half the KPP value. Single-precision literals of radm2.eqn and of the WRF-Chem coupler (.20946e0, .78084, -2.3, the constants of rc_n2o5 and of the relative humidity) are transcribed as the binary64 value of the single-precision number, since that is what the Fortran evaluates.
- RADM2Tendencies
model
gaschem
radm2
The RADM2 gas-phase mechanism (Stockwell et al. 1990) exactly as WRF-Chem chem_opt = 101 (the KPP build of RADM2; chem_opt = 1 is the older hand-coded RADM2 of chem/module_radm.F, a different code path) integrates it: the 156 reactions of radm2.eqn (21 photolysis + 135 thermal) over 59 variable species, translated from chem/KPP/mechanisms/radm2/radm2.eqn and radm2.spc of WRF v4.8.0 by a translation script. The reaction system has 157 entries, one more than the .eqn, because the negative product "-0.9 OH" of reaction 60 is written as the extra entry R060x. The document holds three components. The model RADM2RateConstants evaluates every thermal rate coefficient from the hand-authored WRF rate-law templates (radm2_ratelaws.esm) with the .eqn coefficients bound once, and exposes them as observeds tested at t = 0 against the real64 KPP box driver and against a real WRF-Chem chem_opt = 101 single-column run. The reaction system RADM2 carries the stoichiometry only, each rate being a scoped reference to that model (photolysis rates are its parameters j_*). The model RADM2Tendencies exposes the mass-action tendency of every species as an observed, so the right-hand side is tested at t = 0 independently of any integrator. Species are in molec/cm^3 (the KPP units; WRF converts its ppmV chem array with conv = 1e-6 dens2con_a rho). The two KPP fixed species are not species here: air (M) and water vapour (H2O) are the parameters RADM2RateConstants.M and RADM2RateConstants.H2O, the single source of each for the whole document. The rate laws read them as arguments, the five reactions in which KPP multiplies by a fixed species (R022, R024 and R036 by M; R025 and R033 by H2O) multiply their rate by them, and the relative humidity of the heterogeneous N2O5 rate is derived from H2O, M, T and p with WRF's own formula, so no override can leave two copies of one quantity disagreeing. Mass action is that of esm-spec 7.4, v = k prod S_i^n_i with no 1/n_i! factor, which is also what KPP generates. The eight reactions with a doubled substrate (R032 and R033 HO2 + HO2, R036 NO + NO, R119 MO2 + MO2, R140 ACO3 + ACO3, R147 XO2 + XO2, R153 XNO2 + XNO2, R156 OLN + OLN) carry their .eqn coefficients unchanged on that understanding: a binding that lowers this document to Catalyst.jl must build it with combinatoric_ratelaws = false, or those eight rates come out at half the KPP value. Single-precision literals of radm2.eqn and of the WRF-Chem coupler (.20946e0, .78084, -2.3, the constants of rc_n2o5 and of the relative humidity) are transcribed as the binary64 value of the single-precision number, since that is what the Fortran evaluates.