UKCA Chemistry and Aerosol vn10.4 Tutorial 6

From UKCA

UKCA Chemistry and Aerosol Tutorials at vn10.4

What you will learn in this tutorial

During this tutorial you will learn how UKCA specifies different chemical reactions. You will then add a new reaction involving the new tracers that you have added.

Task 6.1: Add a bimolecular reaction

TASK 6.1: You should now add in the bimolecular reaction of ALICE with OH to form BOB and a secondary organic compound (labelled in UKCA as Sec_Org). This reaction is given by:

Parameter Value
2.70E-11
0.00
-390.00

Adding new Chemical Reactions

UKCA currently uses two different methods of defining the chemical reactions solved in the model. The first is a backward Euler solver, and is used for the RAQ and StdTrop chemistry schemes where the solver itself is created by a code-writer. The second makes use of the ASAD chemical integration software package, and is used for the CheT/TropIsop, CheS/Strat, and CheST/StratTrop chemistry schemes. ASAD can use many different solvers, although currently it uses a symbolic Newton-Raphson solver. In this tutorial we will only consider the ASAD framework, as this is easily extended by a user.

ASAD considers four different types of chemical reactions: bimolecular reactions, termolecular reactions, heterogeneous reactions, and photolysis reactions. To make changes and add reactions you will need to make changes to the UKCA source code which can be found in

vn10.4_your_branch_name/src/atmosphere/UKCA

During this tutorial you will be tasked with adding a new reaction into your branch.

Biomolecular Reactions

For most bimolecular reactions, it is sufficient to provide the , , and coefficients that are used to compute the rate coefficient from the Arrhenius expression

Bimolecular Reaction Definition

The bimolecular reactions are defined in the ukca_chem_scheme.F90 routines using the ratb_t Fortran type specification, and are held in arrays. At the end of this routine the ratb_defs_scheme 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_t type is

ratb_t('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), & 

If fractional products are not required for a reaction, then the fraction of each product formed should be set to 0.000. 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 specifications of the individual reactions are done as, e.g.

ratb_t('O3        ','C5H8      ','HO2       ','OH        ','          ',& ! B133 
'          ',  3.33E-15,  0.00,   1995.00, 0.750, 0.750, 0.000, 0.000), & ! B133 IUPAC2007*   
...
ratb_t('OH        ','C5H8      ','ISO2      ','          ','          ',& ! B144 
'          ',  2.70E-11,  0.00,   -390.00, 0.000, 0.000, 0.000, 0.000), & ! B144 IUPAC2009   
...
ratb_t('OH        ','HCl       ','H2O       ','Cl        ','          ',& ! B159 
'          ',  1.80E-12,  0.00,    250.00, 0.000, 0.000, 0.000, 0.000), & ! B159 JPL2011   

The first reaction in these examples takes its kinetic data from IUPAC. Going to this website, this reaction is defined here. The second reaction above takes its kinetic data from NASA's Jet Propulsion Laboratory. The rate for this can be found on page 1-19 of the JPL2011 document. When adding new reactions you will need to increment the size of the array holding the ratb_t type.

To add new bimolecular reactions you will need to append equivalent lines for the new reactions to the end of the ratb_defs_scheme array (increasing the array sizes accordingly). 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.

Increase the size of JPBK

As well as adding these reactions to the ukca_chem_scheme.F90 routine (and incrementing the size of the arrays in that routine accordingly, you will also need to increase the value of one parameter that UKCA needs. This is

  • JPBK is the number of bimolecular reactions

This value is set in ukca_setup_chem_mod.F90 - you will need to find the correct section of the routine that references the chemistry scheme that you are using, e.g. StratTrop.

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, , of a termolecular reaction is given by

where the low pressure rate constant is given by

and the high pressure rate constant is given by

Termolecular Reaction Definition

The termolecular reactions are defined in the ukca_chem_scheme.F90 routines using the ratt_t Fortran type specification, and are usually held in one single array (there are not usually enough reactions to require splitting the reactions over several arrays).

To format of this ratt_t type is

ratt_t('Reactant 1','Reactant 2','Product 1 ','Product 2 ', , &
,  ,  , ,  ,  , Fraction of Product 1 produced, Fraction of Product 2 produced), & 

and as in ratb_t, where the fraction of a product should be set to 0.000 if this functionality does not need to be used.

The value is used to define the value by

If then
else

as may or may not be highly temperature dependent.

Examples of these reactions are

ratt_t('N2O5      ','m         ','NO2       ','NO3       ',     0.3,    & ! T023  
  1.30E-03, -3.50, 11000.00,  9.70E+14,  0.10, 11080.00, 0.000, 0.000), & ! T023 IUPAC 2002   
ratt_t('NO        ','NO        ','NO2       ','NO2       ',     0.0,    & ! T024  
  3.30E-39,  0.00,  -530.00,  0.00E+00,  0.00,     0.00, 0.000, 0.000)  & ! T024 IUPAC 2001  

To add new termolecular reactions you will need to append equivalent lines for the new reactions to the end of the ratt_defs_scheme array (increasing the array sizes accordingly).

Increase the size of JPTK

As with the bimolecular reactions, you will also need to increase the value of one parameter that UKCA needs. This is

  • JPTK is the number of termolecular reactions

This value is set in ukca_setup_chem_mod.F90 - you will need to find the correct section of the routine that references the chemistry scheme that you are using, e.g. StratTrop.

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_scheme.F90 routines using the rath_t Fortran type specification, usually in one array. To format of this rath_t type is

rath_t('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), & 

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. Examples of this type are

rath_t('ClONO2    ','H2O       ','HOCl      ','HONO2     ','          ', &
'          ', 0.000, 0.000, 0.000, 0.000), &
...
rath_t('SO2       ','H2O2      ','NULL0     ','          ','          ', & !HSO3+H2O2(aq)
'          ', 0.000, 0.000, 0.000, 0.000),                               &

To add new heterogeneous reactions you will need to append equivalent lines for the new reactions to the end of the ratt_defs_scheme array (increasing the array sizes accordingly), before adding code to either ukca_hetero_mod.F90 or asad_hetero.F90.

Increase the size of JPHK

As with the bimolecular and termolecular reactions, you will also need to increase the value of one parameter that UKCA needs. This is

  • JPHK is the number of heterogeneous reactions

This value is set in ukca_setup_chem_mod.F90 - you will need to find the correct section of the routine that references the chemistry scheme that you are using, e.g. StratTrop.

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)[1] and Law et al (1998)[2].

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/vn10.4/ctldata/UKCA/tropdata/photol

on ARCHER. 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

  1. Hough, A. M.: The calculation of photolysis rates for use in global modelling studies, Tech. rep., UK Atomic Energy Authority, Harwell, Oxon., UK, 1988
  2. 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)[1] 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

  1. 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)[1] uses 7 different wavelength bins appropriate for the troposphere, and the updated Fast-JX scheme (Neu et al, 2007)[2] adds up to an extra 11 bins allowing use in the stratosphere. At vn10.4 only Fast-JX is available, although previous UM version used Fast-J 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)[3].

The Fast-JX data files are held in

$UMDIR/vn10.4/ctldata/UKCA/fastj

on ARCHER.

References

  1. 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
  2. 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
  3. 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_scheme.F90 routines using the ratj_t Fortran type specification, usually in several arrays. To format of this ratj_t type is

ratj_t('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), & 

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.

Examples of this type are

ratj_t('H2O2      ','PHOTON    ','OH        ','OH        ','          ', &
     '          ',    0.0,   0.0,   0.0,   0.0, 100.000,'jh2o2     ') ,  &
ratj_t('HCHO      ','PHOTON    ','HO2       ','HO2       ','CO        ', &
     '          ',    0.0,   0.0,   0.0,   0.0, 100.000,'jhchoa    ') ,  &

Increase the size of JPPJ

As with the bimolecular, termolecular, and heterogeneous reactions, you will also need to increase the value of one parameter that UKCA needs. This is

  • JPPJ is the number of photolysis reactions

This value is set in ukca_setup_chem_mod.F90 - you will need to find the correct section of the routine that references the chemistry scheme that you are using, e.g. StratTrop.

Solution to Task 6.1: Add a bimolecular reaction

Figure 1: Surface level concentrations (kg/kg) of BOB after the reaction has been applied.

You were given the task

  • You should now add in the bimolecular reaction of ALICE with OH to form BOB and a secondary organic compound (labelled in UKCA as Sec_Org). This reaction is given by:

Parameter Value
2.70E-11
0.00
-390.00


For a working Rose suite that has completed this task, please see u-ai084@25943

The specific Rose changes made are (this is just to update the branch revision number):

Index: trunk/app/fcm_make_um/rose-app.conf
===================================================================
--- trunk/app/fcm_make_um/rose-app.conf	(revision 25943)
+++ trunk/app/fcm_make_um/rose-app.conf	(revision 26542)
@@ -45,4 +45,4 @@
 stash_version=1A
 timer_version=3A
 um_rev=vn10.4
-um_sources=branches/dev/mohitdalvi/vn10.4_scale_lightning_nox@19623 branches/dev/stevenhardiman/vn10.4_ukca_tropopause_amendment@19627 branches/dev/alistairsellar/vn10.4_no_expvolc_so2@19808 branches/dev/marcuskoehler/vn10.4_ukca_fix_glomap_climatol_surfarea@24038 branches/dev/lukeabraham/vn10.4_UKCA_Tutorial_Solns@31082
+um_sources=branches/dev/mohitdalvi/vn10.4_scale_lightning_nox@19623 branches/dev/stevenhardiman/vn10.4_ukca_tropopause_amendment@19627 branches/dev/alistairsellar/vn10.4_no_expvolc_so2@19808 branches/dev/marcuskoehler/vn10.4_ukca_fix_glomap_climatol_surfarea@24038 branches/dev/lukeabraham/vn10.4_UKCA_Tutorial_Solns@31335

These differences can be found in the file /home/ukca/Tutorial/worked_solutions/Task6.1/task6.1.rose.diff on PUMA.

For a working UM branch that has completed this task, please see fcm:um.x_br/dev/lukeabraham/vn10.4_UKCA_Tutorial_Solns@31335

The specific UM changes made are:

Index: src/atmosphere/UKCA/ukca_chem_strattrop.F90
===================================================================
--- src/atmosphere/UKCA/ukca_chem_strattrop.F90	(revision 31082)
+++ src/atmosphere/UKCA/ukca_chem_strattrop.F90	(revision 31335)
@@ -404,7 +404,7 @@
 TYPE(ratb_t) :: ratb_defs_strattrop_chem(198)
 
 ! reactions found in either Trop or Strat but not both
-TYPE(ratb_t), PARAMETER :: ratb_defs_strattrop_aer(1:15)=(/              &
+TYPE(ratb_t), PARAMETER :: ratb_defs_strattrop_aer(1:16)=(/              &
 ratb_t('CS2       ','O(3P)     ','COS       ','SO2       ','CO        ', &
 '          ',3.20e-11,  0.00,    650.00, 0.000, 0.000, 0.000, 0.000) ,   &
 ratb_t('CS2       ','OH        ','COS       ','SO2       ','          ', &
@@ -434,7 +434,9 @@
 ratb_t('Monoterp  ','O3        ','Sec_Org   ','          ','          ', &
 '          ',1.01e-15,  0.00,    732.00, 0.130, 0.000, 0.000, 0.000) ,   &
 ratb_t('Monoterp  ','NO3       ','Sec_Org   ','          ','          ', &
-'          ',1.19e-12,  0.00,   -925.00, 0.130, 0.000, 0.000, 0.000)     &
+'          ',1.19e-12,  0.00,   -925.00, 0.130, 0.000, 0.000, 0.000) ,   &
+ratb_t('ALICE     ','OH        ','BOB       ','Sec_Org   ','          ', & 
+'          ',2.70E-11,  0.00,   -390.00, 0.000, 0.000, 0.000, 0.000)     & 
   /)
 
 TYPE(rath_t), ALLOCATABLE :: rath_defs_strattrop_chem(:)
Index: src/atmosphere/UKCA/ukca_setup_chem_mod.F90
===================================================================
--- src/atmosphere/UKCA/ukca_setup_chem_mod.F90	(revision 31082)
+++ src/atmosphere/UKCA/ukca_setup_chem_mod.F90	(revision 31335)
@@ -262,7 +262,7 @@
     l_ukca_nr_aqchem = .TRUE.
     jpctr            = jpctr + 12
     jpspec           = jpspec + 12
-    jpbk             = jpbk + 15
+    jpbk             = jpbk + 16
     jptk             = jptk + 1
     jppj             = jppj + 4
     jphk             = jphk + 3

These differences can be found in the file /home/ukca/Tutorial/worked_solutions/Task6.1/task6.1.um.diff on PUMA.

If you open the .pk file in Xconv, you should still see the following fields:

 0    : 192   144   36    1     O3 MASS MIXING RATIO
 1    : 192   144   36    1     Molar flux density
 2    : 192   144   85    1     O3 MASS MIXING RATIO
 3    : 192   144   85    1     Field code =  2164
 4    : 192   144   85    1     Field code =  2165

Sample output from this task can be found at /work/n02/n02/ukca/Tutorial/vn10.4/sample_output/Task6.1/ai084a.pk19880901 on ARCHER.

Tutorial 7


Written by Luke Abraham 2016