UKCA Chemistry and Aerosol UMvn13.0 Tutorial 4
UKCA Chemistry and Aerosol Tutorials at UMvn13.0
Difficulty | MEDIUM |
Time to Complete | 1-2 hours |
Video instructions |
Remember to run mosrs-cache-password.
What you will do in this tutorial
In this tutorial you will learn how to add new chemical reactions to UKCA. You will then include a reaction involving the chemical tracers you added in the last tutorial, ALICE and BOB.
Adding new Chemical Reactions
UKCA uses the ASAD chemical integration software package, which can be easily extended by a user. ASAD could in principle use many different solvers, although currently it uses a symbolic Backward Euler solver with Newton-Raphson iteration, which is known within UKCA as the "Newton Raphson". Further details on the solver implementation can be found in Esentürk et al. (2018)[1].
ASAD considers four different types of chemical reactions: bimolecular reactions, termolecular reactions, heterogeneous reactions, and photolysis reactions. During this tutorial you will be tasked with adding a new reaction into your UKCA branch.
References
- Esentürk, E., Abraham, N. L., Archer-Nicholls, S., Mitsakou, C., Griffiths, P., Archibald, A., and Pyle, J.: Quasi-Newton methods for atmospheric chemistry simulations: implementation in UKCA UM vn10.8, Geosci. Model Dev., 11, 3089–3108, https://doi.org/10.5194/gmd-11-3089-2018, 2018.
Code Changes
src/science/core/chemistry/ukca_chem_master.F90
You will need to add your reaction(s) to the appropriate array within the ukca_chem_master.F90 module. Details covering what is required for each reaction type are below.
src/control/core/top_level/ukca_config_defs_mod.F90
Within the IF blocks for each chemistry scheme are variables called nr_therm (for all bimolecular, termolecular, and heterogeneous reactions) and nr_phot (for photolysis reactions). When adding reactions you should increment the appropriate variable for each chemistry scheme altered.
Biomolecular Reactions
For most bimolecular reactions, it is sufficient to provide the Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): {\displaystyle k_{0}} , Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): {\displaystyle \alpha} , and Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): {\displaystyle \beta} coefficients that are used to compute the rate coefficient Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): {\displaystyle k} from the Arrhenius expression
Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): {\displaystyle k = k_{0} \left(\frac{T}{300}\right)^{\alpha} \textrm{exp} \left(\frac{-\beta}{T}\right) }
Bimolecular Reaction Definition
The bimolecular reactions are defined in the ukca_chem_master.F90 module using the ratb_t1 Fortran type specification, and are held in arrays. At the end of this routine the ratb_defs_master array is created from these, and if that scheme is selected in UKCA these reactions are copied across into the master ratb_defs array.
The format of this ratb_t1 type (defined in ukca_chem_defs_mod.F90) is
ratb_t1(N, 'Reactant 1','Reactant 2','Product 1 ','Product 2 ','Product 3 ',& 'Product 4 ', Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): {\displaystyle k_{0}} , Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): {\displaystyle \alpha} , Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): {\displaystyle \beta} , Fraction of Product 1 produced, Fraction of Product 2 produced, Fraction of Product 3 produced, Fraction of Product 4 produced, SCHEME, QUALIFIER, DISQUALIFIER, VN), &
If fractional products are not required for a reaction, then the fraction of each product formed should be set to 0.00. If fractional products are required for any one of the products then the fraction of each product formed should be set to its correct value.
The settings for N, SCHEME, QUALIFIER, DISQUALIFIER, and VN are the same as in the adding new tracers tutorial, although here N should be incremented for each new reaction, where there might be the same reaction specified several times with changes to reaction rates or even species.
The specifications of the individual reactions are done as, e.g.
! B060 JPL2011 ratb_t1(60,'HO2 ','NO ','OH ','NO2 ',' ', & ' ',3.30e-12, 0.00, -270.00, 0.00, 0.00, 0.00, 0.00,st+r,0,0,107), & ! updates for 121 - st only ratb_t1(60,'HO2 ','NO ','OH ','NO2 ',' ', & ' ',3.44e-12, 0.00, -260.00, 0.00, 0.00, 0.00, 0.00,st,0,0,121), & ratb_t1(60,'HO2 ','NO ','OH ','NO2 ',' ', & ' ',3.50e-12, 0.00, -250.00, 0.00, 0.00, 0.00, 0.00,s,0,0,107), & ratb_t1(60,'HO2 ','NO ','OH ','NO2 ',' ', & ' ',3.60e-12, 0.00, -270.00, 0.00, 0.00, 0.00, 0.00,ti+t+cs,0,0,107),& ! CS2 ratb_t1(60,'HO2 ','NO ','OH ','NO2 ',' ', & ' ',3.45e-12, 0.00, -270.00, 0.00, 0.00, 0.00, 0.00,cs,0,0,119), & ! B060a added Alex ! Not in TI, S, ST and R schemes ratb_t1(60,'HO2 ','NO ','HONO2 ',' ',' ', & ' ',3.60e-12, 0.00, -270.00, 0.00, 0.00, 0.00, 0.00,t,0,0,107), &
! B062 IUPAC2001 ratb_t1(62,'HO2 ','O3 ','OH ','O2 ',' ', & ' ',2.03e-16, 4.57, -693.00, 0.0, 0.0,0.0,0.0,ti+t+st+r+cs,0,0,107), & ! updates for 121 - st only ratb_t1(62,'HO2 ','O3 ','OH ','O2 ',' ', & ' ',1.00e-14, 0.00, 490.00, 0.0, 0.0,0.0,0.0,st,0,0,121), & ratb_t1(62,'HO2 ','O3 ','OH ','O2 ','O2 ', & ' ',2.03e-16, 4.57, -693.00, 0.00, 0.00, 0.00, 0.00,s,0,0,107), &
! B204 ratb_t1(204,'DMSO ','OH ','SO2 ',' ',' ', & ' ',5.80e-11, 0.00, 0.00, 0.60, 0.00, 0.00, 0.00, ol+r,a,0,107), & ratb_t1(204,'DMSO ','OH ','SO2 ','MSA ',' ', & ' ',5.80e-11, 0.00, 0.00, 0.60, 0.40, 0.00, 0.00, ti,a,0,107), & ratb_t1(204,'DMSO ','OH ','SO2 ','MSA ',' ', & ' ',5.80e-11, 0.00, 0.00, 0.60, 0.40, 0.00, 0.00, st,a,0,117), & ! updates for 121 ratb_t1(204,'DMSO ','OH ','SO2 ','MSA ',' ', & ' ',6.10e-12, 0.00, -800.00, 0.60, 0.40, 0.00, 0.00, st,a,0,121), &
- The first reaction above takes its kinetic data from NASA's Jet Propulsion Laboratory. The rate for this can be found on page 1-10 (with further description on page 1-51) of the JPL2011 document.
- The second reaction in these examples takes its kinetic data from IUPAC. Going to this website, this reaction is defined here.
- The third reaction shows the use of fractional products.
- Other reactions may take their rates from the Master Chemical Mechanism.
You can see that in the instances above, different chemistry schemes use slightly different rates or species, as may be required by the scheme and species considered.
When adding new reactions you will need to increment the size of the array holding the ratb_t1 type (n_bimol_master). Due to the large number of bimolecular reactions, the array containing them has been broken up into several blocks. If you are not adding new reactions to the last block (for instance, if you are adding a variation on an existing reaction) you will need to increment the stride as well, e.g.
n_ratb_s = n_ratb_e+1
n_ratb_e = n_ratb_s+49
ratb_defs_master(n_ratb_s:n_ratb_e) = (/ &
would become
n_ratb_s = n_ratb_e+1
n_ratb_e = n_ratb_s+50
ratb_defs_master(n_ratb_s:n_ratb_e) = (/ &
If there is a reaction that is an exception to the general Arrhenius equation then special code needs to be placed in the asad_bimol.F90 routine, which is held in the UKCA/ source-code directory.
Termolecular Reactions
As well as defining reactions involving a third body, the termolecular rate definition can also be used to define unimolecular reactions.
The pressure and temperature dependent rate, Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): {\displaystyle k} , of a termolecular reaction is given by
Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): {\displaystyle k = \left(\frac{k_{0}\left[M\right]}{1+k_{0}\left[M\right]/k_{\infty}}\right)F_{c}^{\left(1+\left[\textrm{log}_{10}\left(\frac{k_{0}\left[M\right]}{k_{\infty}}\right)\right]^{2}\right)^{-1}} }
where the low pressure rate constant Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): {\displaystyle k_{0}} is given by
Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): {\displaystyle k_{0} = k_{1} \left(\frac{T}{300}\right)^{{\alpha}_{1}} \textrm{exp} \left(\frac{-{\beta}_{1}}{T}\right) }
and the high pressure rate constant Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): {\displaystyle k_{\infty}} is given by
Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): {\displaystyle k_{\infty} = k_{2} \left(\frac{T}{300}\right)^{{\alpha}_{2}} \textrm{exp} \left(\frac{-{\beta}_{2}}{T}\right) }
Termolecular Reaction Definition
The termolecular reactions are defined in the ukca_chem_master.F90 module using the ratt_t1 Fortran type specification and are held in the ratt_defs_master array.
To format of this ratt_t1 type is
ratt_t(N,'Reactant 1','Reactant 2','Product 1 ','Product 2 ', Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): {\displaystyle f} , & Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): {\displaystyle k_{1}} , Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): {\displaystyle {\alpha}_{1}} , Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): {\displaystyle {\beta}_{1}} , Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): {\displaystyle k_{2}} , Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): {\displaystyle {\alpha}_{2}} , Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): {\displaystyle {\beta}_{2}} , Fraction of Product 1 produced, Fraction of Product 2 produced,SCHEME,QUALIFIER, DISQUALIFIER,VN), &
and as in rabt_t1, where the fraction of a product should be set to 0.0 if this functionality does not need to be used.
The settings for N, SCHEME, QUALIFIER, DISQUALIFIER, and VN are the same as in the adding new tracers tutorial, although here N should be incremented for each new reaction, where there might be the same reaction specified several times with changes to reaction rates or even species.
The Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): {\displaystyle f} value is used to define the Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): {\displaystyle F_{c}} value by
If Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): {\displaystyle f < 1.0} then Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): {\displaystyle F_{c} = f}
else Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): {\displaystyle F_{c} = \textrm{exp}\left(-T/f\right)}
as Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): {\displaystyle F_{c}} may or may not be highly temperature dependent.
Examples of these reactions are
! T004 JPL 2011 ratt_t1(4,'O(1D) ','N2 ','N2O ','m ', 0.0, & 2.80e-36, -0.90, 0.00, 0.00e+00, 0.0, 0.0, 0.0, 0.0, st+cs,0,0,107), & ! update for 121 ratt_t1(4,'O(1D) ','N2 ','N2O ','m ', 0.60, & 2.80e-36, -0.90, 0.00, 0.00e+00, 0.0, 0.0, 0.0, 0.0, st+cs,0,0,121), & ! JPL 2003 ratt_t1(4,'O(1D) ','N2 ','N2O ','m ', 0.0, & 3.50e-37, -0.60, 0.00, 0.00e+00, 0.0, 0.0, 0.0, 0.0, s,0,0,107) , &
To add new termolecular reactions you will need to append equivalent lines for the new reactions to the end of the ratt_defs_master array (increasing the array size n_ratt_master accordingly). If there is any special code that needs to be added, this should be placed in the asad_trimol.F90 routine, which is held in the UKCA/ source-code directory.
Heterogeneous Reactions
Heterogeneous reactions are those that occur on aerosol surfaces. There is no functional form defined for these reactions, with special code needed to be added for each case.
Heterogeneous Reaction Definition
The heterogeneous reactions are defined in the ukca_chem_master.F90 module using the rath_t1 Fortran type specification, usually in one array (rath_defs_master).
To format of this rath_t1 type is
rath_t(N,'Reactant 1','Reactant 2','Product 1 ','Product 2 ','Product 3 ',& 'Product 4 ', Fraction of Product 1 produced, Fraction of Product 2 produced, Fraction of Product 3 produced, Fraction of Product 4 produced,SCHEME,QUALIFIER,DISQUALIFIER,VN), &
i.e. there is no rate information provided. For reactions on PSCs special code has been added to the routines in ukca_hetero_mod.F90, and for other reactions there is code in asad_hetero.F90.
The settings for N, SCHEME, QUALIFIER, DISQUALIFIER, and VN are the same as in the adding new tracers tutorial, although here N should be incremented for each new reaction, where there might be the same reaction specified several times with changes to reaction rates or even species.
Examples of this type are
rath_t1(5,'N2O5 ','HCl ','Cl ','NO2 ','HONO2 ', & ' ', 0.000, 0.000, 0.000, 0.000, s+st+cs,hp,0,107), & rath_t1(6,'ClONO2 ','HBr ','BrCl ','HONO2 ',' ', & ' ', 0.000, 0.000, 0.000, 0.000, s+st+cs,eh,0,111), &
To add new heterogeneous reactions you will need to append equivalent lines for the new reactions to the end of the rath_defs_master array (increasing the array size n_het_master accordingly), before adding code to either ukca_hetero_mod.F90 (for stratospheric reactions) or asad_hetero.F90 (for tropospheric reactions).
In the above block you can also see the use of the chemical mechanism version specification.
Photolysis Reactions
These define a reaction where a chemical compound is broken down by photons. There is no functional form defined for this type of reaction. Instead, either (in the troposphere) input files are used to define the reaction rates for each species, while (in the stratosphere) on-line look-up tables are generated for the rates for each species, or a separate photolysis code, Fast-JX, is used to interactively calculate the rate of reaction throughout the the whole atmosphere (for Fast-JX). These interactive schemes are preferred as they take the effect of aerosols or clouds into account at each timestep, allowing for more feedbacks to be investigated. In the upper stratosphere there are some wavelength regions that Fast-JX does not consider, and so the 3D on-line look-up tables are also used for these regions.
Tropospheric Off-Line Photolysis
If Fast-JX is not being used, then the off-line two-dimensional (zonally average) tropospheric photolysis is used (for all schemes). It is based on the work of Hough (1988)[2] and Law et al (1998)[3].
This scheme makes use of datafiles which define the reaction rate for a particular species (e.g. H2O2), or if no rate is known, a nil rate can be used. For vn10.4 these files can be found in
$UMDIR/vn11.8/ctldata/UKCA/tropdata/photol
To use this scheme set the value of i_ukca_photol by clicking 2D Photolysis Scheme. You will then need to give the location of the files (above). The code controlling this scheme is held in ukca_phot2d.F90.
It is advised that this scheme is no longer used, and Fast-JX interactive photolysis should be used instead.
References
- Hough, A. M.: The calculation of photolysis rates for use in global modelling studies, Tech. rep., UK Atomic Energy Authority, Harwell, Oxon., UK, 1988
- Law, K., Plantevin, P., Shallcross, D., Rogers, H., Pyle, J., Grouhel, C., Thouret, V., and Marenco, A.: Evaluation of modeled O3 using Measurement of Ozone by Airbus In-Service Aircraft (MOZAIC) data, J. Geophys. Res., 103, 25721–25737, 1998
Stratospheric Look-Up Table Photolysis
In a chemistry scheme which has stratospheric chemistry, such as CheS/Strat and CheST/StratTrop, if interactive photolysis is not used, then above 300hPa the look-up table approach of Lary and Pyle (1991)[4] is used (below 300hPa the tropospheric scheme described above is used). To use this scheme set the value of i_ukca_photol by clicking 2D Photolysis Scheme. The code for this scheme is held in ukca_strat_update.F90.
References
- Lary, D. and Pyle, J.: Diffuse-radiation, twilight, and photochemistry, J. Atmos. Chem., 13, 393–406, 1991.
Interactive Photolysis
The original Fast-J scheme (Wild et al, 2000)[5] uses 7 different wavelength bins appropriate for the troposphere, and the updated Fast-JX scheme (Neu et al, 2007)[6] adds up to an extra 11 bins allowing use in the stratosphere. At present only Fast-JX is available, although some previous UM versions used the older Fast-J scheme as well.
To use this scheme set the value of i_ukca_photol by clicking FastJ-X. You will then need to give the location of several input data files used by this scheme.
Further details on how the the Fast-JX scheme is used in UKCA, can be found in Telford et al (2013)[7].
The Fast-JX data files are held in
$UMDIR/vn11.8/ctldata/UKCA/fastj
on ARCHER.
References
- Wild, O., Zhu, X., and Prather, M.: Fast-J: accurate simulation of in- and below-cloud photolysis in tropospheric chemical models, J. Atmos. Chem., 37, 245–282, doi:10.1023/A:1006415919030, 2000
- Neu, J., Prather, M., and Penner, J.: Global atmospheric chemistry: integrating over fractional cloud cover, J. Geophys. Res., 112, D11306, 12 pp., doi:10.1029/2006JD008007, 2007
- Telford, P. J., Abraham, N. L., Archibald, A. T., Braesicke, P., Dalvi, M., Morgenstern, O., O'Connor, F. M., Richards, N. A. D., and Pyle, J. A.: Implementation of the Fast-JX Photolysis scheme (v6.4) into the UKCA component of the MetUM chemistry-climate model (v7.3), Geosci. Model Dev., 6, 161-177, doi:10.5194/gmd-6-161-2013, 2013.
Photolysis Reaction Definition
The photolysis reactions are defined in the ukca_chem_master.F90 module using the ratj_t1 Fortran type specification and held in the ratj_defs_master array.
To format of this ratj_t1 type is
ratj_t1(N,'Reactant 1','Reactant 2','Product 1 ','Product 2 ','Product 3 ',& 'Product 4 ', Fraction of Product 1 produced, Fraction of Product 2 produced, Fraction of Product 3 produced, Fraction of Product 4 produced, Quantum Yield, Look-up Label,SCHEME,QUALIFIER,DISQUALIFIER,VN), &
The Look-Up Label is used to define the file used for the 2D photolysis, and is used by Fast-JX to find the correct values for each species in the input data files. This is a 10-character string, although only the first 7 characters are read by Fast-JX. Reactant 2 will always be PHOTON.
The settings for N, SCHEME, QUALIFIER, DISQUALIFIER, and VN are the same as in the adding new tracers tutorial, although here N should be incremented for each new reaction, where there might be the same reaction specified several times with changes to reaction rates or even species.
Examples of this type are
! 3 ! This should produce H+ CHO -> H + HO2 + CO in ST scheme. ratj_t1(3,'HCHO ','PHOTON ','HO2 ','HO2 ','CO ', & ' ', 0.0,0.0,0.0,0.0, 100.000,'jhchoa ',ti+t+st+r+cs,0,0,107),& ! CS2 ratj_t1(3,'HCHO ','PHOTON ','HO2 ','HO2 ','CO ', & ' ', 0.0,0.0,0.0,0.0, 100.000,'jforma ',cs,0,0,119), & ratj_t1(3,'HCHO ','PHOTON ','H ','CO ','HO2 ', & ' ', 0.0,0.0,0.0,0.0, 100.000,'jhchoa ',s,0,0,107) , & ! 4 ratj_t1(4,'HCHO ','PHOTON ','H2 ','CO ',' ', & ' ', 0.0,0.0,0.0,0.0, 100.0,'jhchob ',ti+s+t+st+r+cs,0,0,107),& ! CS2 ratj_t1(4,'HCHO ','PHOTON ','H2 ','CO ',' ', & ' ', 0.0,0.0,0.0,0.0, 100.0,'jformb ',cs,0,0,119), &
To add new photolysis reactions you will need to append equivalent lines for the new reactions to the end of the ratj_defs_master array (increasing the array size n_ratj_master accordingly), adding new files/code as necessary as described above.
Task 4.1: Add a bimolecular reaction
TASK 4.1: You should now add in the bimolecular reaction of ALICE with OH to form BOB and an optional secondary organic compound (labelled in UKCA as Sec_Org) when aerosol chemistry is included. You should add this to both the StratTrop and CRI-Strat schemes using version 131.
This reaction is given by:
Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): {\displaystyle \textrm{ALICE} + \textrm{OH} \longrightarrow \textrm{BOB} + \textrm{Sec}\_\textrm{Org} }
Parameter | Value |
---|---|
Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): {\displaystyle k_{0}} | 2.70E-11 |
Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): {\displaystyle \alpha} | 0.00 |
Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): {\displaystyle \beta} | -390.00 |
Hint |
---|
As Sec_Org is part of the aerosol chemistry, when it is included the reaction should be given the a qualifier. When it is not included the reaction should have the a as a disqualifier. |
You should increment the value of n_bimol_master by the number of different reaction lines added. |
You should increment the value of nr_therm accordingly. |
The Jupyter notebook
$HOME/Tutorials/UMvn13.0/notebooks/BoxModel_T04.ipynb
can be used to plot ALICE and BOB for this exercise.
Solution to Task 4.1: Add a bimolecular reaction
The changes to UKCA are:
Index: src/control/core/top_level/ukca_config_defs_mod.F90 =================================================================== --- src/control/core/top_level/ukca_config_defs_mod.F90 (revision 475) +++ src/control/core/top_level/ukca_config_defs_mod.F90 (revision 488) @@ -316,7 +316,7 @@ 'C2H6 ','C3H8 ','Me2CO ','MeCHO ', & 'C5H8 ', nm_meoh_em ,'NO_aircrft'] n_chem_tracers = 73 ! No chem tracers - nr_therm = 220 ! thermal reactions + nr_therm = 221 ! thermal reactions nr_phot = 55 ! photolytic (ATA) ELSE ! If using aerosol chemistry @@ -333,9 +333,9 @@ n_aero_tracers = 12 n_chem_tracers = 73 ! No chem tracers IF (ukca_config%l_ukca_trophet) THEN - nr_therm = 241 ! thermal reactions + nr_therm = 242 ! thermal reactions ELSE - nr_therm = 239 ! thermal reactions + nr_therm = 240 ! thermal reactions END IF nr_phot = 59 ! photolytic (ATA) @@ -381,7 +381,7 @@ IF (ukca_config%i_ukca_chem_version >= 119) THEN ! CRI-Strat 2 w/o aerosol n_chem_tracers = 173 ! advected chemical tracers (+9, -4) n_aero_tracers = 0 ! DMS, SO2... aerosol precursor species - nr_therm = 625 ! thermal reactions (+45 bimol, +8 termol) + nr_therm = 626 ! thermal reactions (+45 bimol, +8 termol) nr_phot = 135 ! photolytic reacs ELSE ! CRI-Strat without aerosol n_chem_tracers = 166 ! advected chemical tracers @@ -406,9 +406,9 @@ n_aero_tracers = 17 ! DMS, SO2... aerosol precursor species nr_phot = 137 ! photolytic reacs IF (ukca_config%l_ukca_trophet) THEN - nr_therm = 644 ! thermal reactions (+45 bimol, +8 termol) + nr_therm = 645 ! thermal reactions (+45 bimol, +8 termol) ELSE - nr_therm = 646 ! thermal reactions (+45 bimol, +8 termol) + nr_therm = 647 ! thermal reactions (+45 bimol, +8 termol) END IF ELSE ! CRI-Strat with aerosol n_chem_tracers = 166 ! advected chemical tracers Index: src/science/core/chemistry/ukca_chem_master.F90 =================================================================== --- src/science/core/chemistry/ukca_chem_master.F90 (revision 475) +++ src/science/core/chemistry/ukca_chem_master.F90 (revision 488) @@ -107,7 +107,7 @@ INTEGER, PARAMETER :: n_het_master = 18 ! number of heterogeneous reactions INTEGER, PARAMETER :: n_dry_master = 161 ! number of dry deposition reactions INTEGER, PARAMETER :: n_wet_master = 159 ! number of wet deposition reactions -INTEGER, PARAMETER :: n_bimol_master = 1209 ! number of bimolecular reactions +INTEGER, PARAMETER :: n_bimol_master = 1211 ! number of bimolecular reactions INTEGER, PARAMETER :: n_ratj_master = 183 ! number of photolysis reactions INTEGER, PARAMETER :: n_ratt_master = 116 ! number of termolecular reactions @@ -6227,7 +6227,13 @@ ' ',3.93e-15, 0.00, 1913.00, 0.54, 0.00, 0.00, 0.00,r,0,0,107), & ! B745 - updates for 121 ratb_t1(745,'HO2 ','EtCO3 ','OH ','EtOO ','CO2 ', & -' ',1.89e-13, 0.00, -1040.00, 0.00, 0.00, 0.00, 0.00,st,0,0,121) & +' ',1.89e-13, 0.00, -1040.00, 0.00, 0.00, 0.00, 0.00,st,0,0,121), & +! B746 - updates for 130 (ALICE & BOB tutorials) - aerosol chemistry +ratb_t1(746,'ALICE ','OH ','BOB ','Sec_Org ',' ', & +' ',2.70e-11, 0.00, -390.00, 0.00, 0.00, 0.00, 0.00,st+cs,a,0,131),& +! B746 - updates for 130 (ALICE & BOB tutorials) - no aerosol chemistry +ratb_t1(746,'ALICE ','OH ','BOB ',' ',' ', & +' ',2.70e-11, 0.00, -390.00, 0.00, 0.00, 0.00, 0.00,st+cs,0,a,131) & ] !----------------------------------------------------------------------
These differences can be found here:
Tutorials/UMvn13.0/worked_solutions/Task04.1/Task04.1_ukca.patch
Sample output from this task can be found here:
Tutorials/UMvn13.0/sample_output/Task04.1/
Task 4.2: Change the initial condition of ALICE
As both ALICE and BOB were initialised to very small concentrations (1.0e-15) and there are no emissions in the Box Model, ALICE is converted to BOB almost immediately.
TASK 4.2: You should now provide an initial conditions of ALICE, setting it to 1.0e-9.
Hint |
---|
You will either need to edit the file specified by tracer_in_filename, or make a copy of this, edit it to add the initialisation, and then use this new file in your Rose suite. |
Solution to Task 4.2: Change the initial condition of ALICE
The changes to Rose are:
Index: app/ukca/file/chem_tracer_pars_STwGMaero_EqTropopause =================================================================== --- app/ukca/file/chem_tracer_pars_STwGMaero_EqTropopause (revision 236523) +++ app/ukca/file/chem_tracer_pars_STwGMaero_EqTropopause (revision 236993) @@ -23,6 +23,7 @@ 3.0000e-22 Monoterp 5.0000e-24 Sec_org 5.0000e-23 SO3 +1.0000e-09 ALICE 2.0000e-15 Nuc_SOL_N 4.0000e-11 Nuc_SOL_SU 2.0000e-17 Ait_SOL_N
These differences can be found here:
Tutorials/UMvn13.0/worked_solutions/Task04.2/Task04.2_rose.patch
Sample output from this task can be found here:
Tutorials/UMvn13.0/sample_output/Task04.2/
Task 4.3: Use this reaction with a different chemistry scheme
TASK 4.3: Now test that this reaction works with the CRI-Strat scheme without GLOMAP-mode aerosols included.
Solution |
---|
Change the value of i_ukca_chem to be 59 (CRI-Strat) |
(Optional) set the value of l_ukca_mode to be False |
Change the value of l_ukca_chem_aero to be False |
Change the value of l_ukca_het_psc to be False |
This is just one example - you may also want to test this scheme with other combinations of StratTrop and CRI-Strat chemistry schemes, with and without GLOMAP-mode aerosols.
Note that changing these setting will automatically make lots of other changes to variables within Rose. You do not need to worry about these additional changes.
Worked Solution to Task 4.3: Use this reaction with a different chemistry scheme
Note that here Sec_Org is now no longer a product of the reaction.
The changes to Rose are:
Index: app/ukca/rose-app.conf =================================================================== --- app/ukca/rose-app.conf (revision 236993) +++ app/ukca/rose-app.conf (revision 236994) @@ -477,14 +477,14 @@ !!i_ageair_reset_method=1 !!i_inferno_emi= !!i_mode_bln_param_method=0 -i_mode_nzts=15 -i_mode_setup=2 -i_ukca_activation_scheme=0 -i_ukca_chem=51 +!!i_mode_nzts=15 +!!i_mode_setup=2 +!!i_ukca_activation_scheme=0 +i_ukca_chem=59 i_ukca_chem_version=131 i_ukca_conserve_method=3 -i_ukca_dms_flux=1 -i_ukca_hetconfig=0 +!!i_ukca_dms_flux=1 +!!i_ukca_hetconfig=0 !!i_ukca_hiorder_scheme=0 i_ukca_light_param=1 !!i_ukca_nwbins=20 @@ -507,14 +507,14 @@ !!l_dust_slinn_impc_scav=.false. l_environ_jo2=.false. l_environ_jo2b=.false. -l_mode_bhn_on=.true. -l_mode_bln_on=.false. +!!l_mode_bhn_on=.true. +!!l_mode_bln_on=.false. l_ukca=.true. l_ukca_ageair=.false. !!l_ukca_aie1=.false. !!l_ukca_aie2=.false. l_ukca_asad_columns=.true. -l_ukca_chem_aero=.true. +l_ukca_chem_aero=.false. !!l_ukca_classic_hetchem=.false. !!l_ukca_coarse_no3_prod=.true. l_ukca_ddep_lev1=.false. @@ -522,48 +522,48 @@ l_ukca_debug_asad=.true. l_ukca_dry_dep_so2wet=.false. !!l_ukca_dust=.false. -l_ukca_emsdrvn_ch4=.false. +!!l_ukca_emsdrvn_ch4=.false. !!l_ukca_fine_no3_prod=.true. l_ukca_h2o_feedback=.false. -l_ukca_het_psc=.true. +l_ukca_het_psc=.false. l_ukca_ibvoc=.false. -l_ukca_inferno=.false. +!!l_ukca_inferno=.false. !!l_ukca_inferno_ch4=.false. l_ukca_intdd=.true. l_ukca_intph=.false. -l_ukca_limit_nat=.false. +!!l_ukca_limit_nat=.false. l_ukca_linox_scaling=.false. -l_ukca_mode=.true. +!!l_ukca_mode=.false. l_ukca_prescribech4=.false. !!l_ukca_prim_moc=.false. -l_ukca_primbcoc=.false. +!!l_ukca_primbcoc=.false. !!l_ukca_primdu=.false. -l_ukca_primss=.false. -l_ukca_primsu=.false. +!!l_ukca_primss=.false. +!!l_ukca_primsu=.false. l_ukca_qch4inter=.false. l_ukca_quasinewton=.false. -l_ukca_radaer=.false. +!!l_ukca_radaer=.false. !!l_ukca_radaer_sustrat=.false. l_ukca_radch4=.false. -l_ukca_radf11=.false. -l_ukca_radf113=.false. -l_ukca_radf12=.false. -l_ukca_radf22=.false. +!!l_ukca_radf11=.false. +!!l_ukca_radf113=.false. +!!l_ukca_radf12=.false. +!!l_ukca_radf22=.false. l_ukca_radn2o=.false. l_ukca_rado3=.false. l_ukca_ro2_ntp=.true. l_ukca_ro2_perm=.true. -l_ukca_sa_clim=.false. -l_ukca_scale_biom_aer_ems=.false. +!!l_ukca_sa_clim=.false. +!!l_ukca_scale_biom_aer_ems=.false. !!l_ukca_scale_marine_pom_ems=.false. !!l_ukca_scale_sea_salt_ems=.false. -l_ukca_scale_seadms_ems=.false. -l_ukca_scale_soa_yield=.true. +!!l_ukca_scale_seadms_ems=.false. +!!l_ukca_scale_soa_yield=.true. l_ukca_set_trace_gases=.true. !!l_ukca_sfix=.false. -l_ukca_so2ems_expvolc=.false. +!!l_ukca_so2ems_expvolc=.false. !!l_ukca_src_in_conservation=.true. -l_ukca_trophet=.false. +!!l_ukca_trophet=.false. !!l_ukca_tune_bc=.false. !!l_ukca_use_background_aerosol=.false. lightnox_scale_fac=0.5 @@ -570,10 +570,10 @@ !!marine_pom_ems_scaling=0 !!max_ageair_reset_height=0.0 !!max_ageair_reset_level=0 -mode_activation_dryr=37.5 -mode_aitsol_cvscav=0.5 -mode_incld_so2_rfrac=0.25 -mode_parfrac=2.5 +!!mode_activation_dryr=37.5 +!!mode_aitsol_cvscav=0.5 +!!mode_incld_so2_rfrac=0.25 +!!mode_parfrac=2.5 !!nit=0 nrsteps=45 !!ph_fit_coeff_a=0 @@ -582,7 +582,7 @@ !!phot2d_dir= !!sea_salt_ems_scaling=0 !!seadms_ems_scaling=1.0 -soa_yield_scaling=2.0 +!!soa_yield_scaling=2.0 !!tc_lbc_ukca=150*0 ukca_ccl4mmr=0.00 ukca_cfc115mmr=0.00 @@ -625,9 +625,9 @@ l_fix_ukca_h2dd_x=.false. l_fix_ukca_h2so4_ystore=.true. l_fix_ukca_impscav=.false. -l_fix_ukca_meoh_emiss_input=.false. +!!l_fix_ukca_meoh_emiss_input=.false. !!l_fix_ukca_offox_h2o_fac=.false. -l_improve_aero_drydep=.false. +!!l_improve_aero_drydep=.false. !!l_improve_cv_cons=.false. l_methox_fix=.true. @@ -636,5 +636,5 @@ !!a_convect_segments=-99 !!a_convect_trac_seg_size=1 ukca_chem_seg_size=1 -ukca_mode_seg_size=1 +!!ukca_mode_seg_size=1 ussp_seg_size=1
These differences can be found here:
Tutorials/UMvn13.0/worked_solutions/Task04.3/Task04.3_rose.patch
Sample output from this task can be found here:
Tutorials/UMvn13.0/sample_output/Task04.3/
Checklist
- ☐ Add the new reaction into the correct reaction type array in ukca_chem_master.F90, incrementing the size of the array accordingly.
- ☐ Increment the value of nr_therm and/or nr_phot in ukca_config_defs_mod.F90.
- ☐ If required, add special code to the asad_bimol.F90, asad_trimol.F90, ukca_hetero_mod.F90, or asad_hetero.F90 routines.
- ☐ For photolysis reactions, further work is required to calculate new cross sections. Code will also need to be added to ukca_strat_update.F90.
- ☐ Add initialisations of your new tracers if required.
- ☐ Test your new chemistry with different chemistry schemes and aerosol options as necessary.
UKCA Chemistry and Aerosol Tutorials at UMvn13.0
Written by Luke Abraham 2022