Difference between revisions of "UKCA Chemistry and Aerosol UMvn13.0 Tutorial 10"

From UKCA
(Created page with "UKCA Chemistry and Aerosol Tutorials at UMvn13.0 {| class="wikitable" border = "1px" |- | Difficulty || '''<span style="color:green">EASY</span>''' |- | Time...")
 
 
(8 intermediate revisions by the same user not shown)
Line 7: Line 7:
 
| Time to Complete || '''Under 1 hour'''
 
| Time to Complete || '''Under 1 hour'''
 
|-
 
|-
| Video instructions ||
+
| Video instructions || [https://www.youtube.com/watch?v=n3yE-oYy-gU&t=12959s Walkthrough (YouTube)]
 
|}
 
|}
   
'''Remember to run <tt>mosrs-cache-password</tt> in your Rose suite and UM branch terminals.'''
+
'''Remember to run <tt>mosrs-cache-password</tt>.'''
   
 
==What you will learn in this Tutorial==
 
==What you will learn in this Tutorial==
Line 16: Line 16:
 
In this tutorial you will learn how the wet deposition of chemical species is handelled in UKCA. You will then add-in the wet deposition of one of your new tracers.
 
In this tutorial you will learn how the wet deposition of chemical species is handelled in UKCA. You will then add-in the wet deposition of one of your new tracers.
   
==Task 8.1: Add wet deposition of a species==
+
==Task 10.1: Add wet deposition of a species==
   
<span style="color:green">'''Task 8.1:''' Add in wet deposition for '''BOB''', using the following values:</span>
+
<span style="color:green">'''Task 10.1:''' Add in wet deposition for '''BOB''', using the following values:</span>
   
 
{| class="wikitable" border = "1px"
 
{| class="wikitable" border = "1px"
Line 41: Line 41:
 
where <math>k\left(298\right)</math> is the rate constant at 298K.
 
where <math>k\left(298\right)</math> is the rate constant at 298K.
   
During this tutorial you will be tasked with adding the wet deposition of one of your new tracers.
+
During this tutorial you will be tasked with adding the wet deposition of one of your new tracers. '''You will only need to make changes to your UKCA branch.'''
   
 
'''References'''
 
'''References'''
Line 48: Line 48:
 
==Turning on Wet Deposition for a Species==
 
==Turning on Wet Deposition for a Species==
   
  +
=== <tt>src/science/core/chemistry/ukca_chem_master.F90</tt> ===
===Chemistry Scheme Specification===
 
   
Within the UKCA code, whether a species is wet deposited or not is controlled in the '''<code>ukca_chem_master.F90</code>''' module. In the '''<code>chch_defs_master</code>''' array there are lines like
+
Within the UKCA code, whether a species is wet deposited or not is controlled in the '''<tt>ukca_chem_master.F90</tt>''' module. In the '''<tt>chch_defs_master</tt>''' array there are lines like
   
 
! 9 DD: 6,WD: 4,
 
! 9 DD: 6,WD: 4,
Line 62: Line 62:
 
Where the <span style="color:red">'''1'''</span> in the 7th column turns on wet deposition of that species (being 0 otherwise). You will need to change the 0 to a '''1''' for the species that you wish to now wet deposit.
 
Where the <span style="color:red">'''1'''</span> in the 7th column turns on wet deposition of that species (being 0 otherwise). You will need to change the 0 to a '''1''' for the species that you wish to now wet deposit.
   
 
The parameters required to calculate <math>H_{eff}</math> are held in the '''<tt>henry_defs_master</tt>''' array (of defined size '''<tt>n_wet_master</tt>'''), and has format
===Setting Henry's Law values===
 
 
In the '''<code>ukca_chem_master.F90</code>''' module the parameters required to calculate <math>H_{eff}</math> are held in the '''<code>henry_defs_master</code>''' array (of defined size '''<code>n_wet_master</code>'''), and has format
 
   
 
{| class="wikitable" border = "1px"
 
{| class="wikitable" border = "1px"
| '''<code>N</code>''' || '''<code><span style="color:red">'SPECIES&nbsp;&nbsp;&nbsp;'</span></code>'''
+
| '''<tt>N</tt>''' || '''<tt><span style="color:red">'SPECIES&nbsp;&nbsp;&nbsp;'</span></tt>'''
 
|-
 
|-
 
| <math>\ k(298)\ </math> || <math>\ -\left({\Delta H}/R\right)\ </math> || <math>\ k(298)</math> for the 1st dissociation || <math>\ -\left({\Delta H}/R\right)</math> for the 1st dissociation || <math>\ k(298)</math> for the 2nd dissociation || <math>\ -\left({\Delta H}/R\right)</math> for the 2nd dissociation
 
| <math>\ k(298)\ </math> || <math>\ -\left({\Delta H}/R\right)\ </math> || <math>\ k(298)</math> for the 1st dissociation || <math>\ -\left({\Delta H}/R\right)</math> for the 1st dissociation || <math>\ k(298)</math> for the 2nd dissociation || <math>\ -\left({\Delta H}/R\right)</math> for the 2nd dissociation
 
|-
 
|-
| '''<code><span style="color:red">SCHEME</span></code>''' || '''<code><span style="color:green">QUALIFIER</span></code>''' || '''<code><span style="color:blue">DISQUALIFIER</span></code>''' || '''<code>VN</code>'''
+
| '''<tt><span style="color:red">SCHEME</span></tt>''' || '''<tt><span style="color:green">QUALIFIER</span></tt>''' || '''<tt><span style="color:blue">DISQUALIFIER</span></tt>''' || '''<tt>VN</tt>'''
 
|}
 
|}
   
Line 101: Line 99:
 
(/0.21e+06,0.87e+04,0.157e+02,0.00e+00,0.00e+00,0.00e+00/),s,0,0,107), &
 
(/0.21e+06,0.87e+04,0.157e+02,0.00e+00,0.00e+00,0.00e+00/),s,0,0,107), &
   
==Solution to Task 8.1: Add wet deposition of a species==
+
==Worked Solution to Task 10.1: Add wet deposition of a species==
   
 
You were given the task
 
You were given the task
Line 118: Line 116:
 
|}
 
|}
   
 
The specific UKCA changes made are:
For a working Rose suite that has completed this task, please see
 
 
* https://code.metoffice.gov.uk/trac/ukca/changeset/568/main/branches/dev/lukeabraham/um13.0_ukca_tutorial_solutions
* '''vm:''' <code>u-ca024@182959</code>
 
   
The specific Rose changes made are:
 
* '''vm:''' https://code.metoffice.gov.uk/trac/roses-u/changeset/182959/c/a/0/2/4/trunk
 
   
 
Index: src/science/core/chemistry/ukca_chem_master.F90
'''vm:'''
 
Index: app/fcm_make/rose-app.conf
 
 
===================================================================
 
===================================================================
--- app/fcm_make/rose-app.conf (revision 182833)
+
--- src/science/core/chemistry/ukca_chem_master.F90 (revision 567)
+++ app/fcm_make/rose-app.conf (revision 182959)
+
+++ src/science/core/chemistry/ukca_chem_master.F90 (revision 568)
@@ -43,4 +43,4 @@
+
@@ -106,7 +106,7 @@
 
INTEGER, PARAMETER :: n_chch_master = 358 ! number of known species
thread_utils=false
 
timer_version=3A
 
um_rev=$BASE_UM_REV
 
-um_sources=branches/dev/lukeabraham/vn11.8_UKCA_Tutorial_Solns@94072
 
+um_sources=branches/dev/lukeabraham/vn11.8_UKCA_Tutorial_Solns@94120
 
 
These differences can be found in the file '''<code>Tutorials/vn11.8/worked_solutions/Task08.1/Task08.1_rose.patch</code>'''.
 
 
The specific UM changes made are:
 
* https://code.metoffice.gov.uk/trac/um/changeset/94120/main/branches/dev/lukeabraham/vn11.8_UKCA_Tutorial_Solns
 
 
Index: src/atmosphere/UKCA/ukca_chem_master.F90
 
===================================================================
 
--- src/atmosphere/UKCA/ukca_chem_master.F90 (revision 94072)
 
+++ src/atmosphere/UKCA/ukca_chem_master.F90 (revision 94120)
 
@@ -97,7 +97,7 @@
 
INTEGER, PARAMETER :: n_chch_master = 329 ! number of known species
 
 
INTEGER, PARAMETER :: n_het_master = 18 ! number of heterogeneous reactions
 
INTEGER, PARAMETER :: n_het_master = 18 ! number of heterogeneous reactions
INTEGER, PARAMETER :: n_dry_master = 150 ! number of dry deposition reactions
+
INTEGER, PARAMETER :: n_dry_master = 162 ! number of dry deposition reactions
-INTEGER, PARAMETER :: n_wet_master = 106 ! number of wet deposition reactions
+
-INTEGER, PARAMETER :: n_wet_master = 159 ! number of wet deposition reactions
+INTEGER, PARAMETER :: n_wet_master = 107 ! number of wet deposition reactions
+
+INTEGER, PARAMETER :: n_wet_master = 160 ! number of wet deposition reactions
INTEGER, PARAMETER :: n_bimol_master= 855 ! number of bimolecular reactions
+
INTEGER, PARAMETER :: n_bimol_master = 1211 ! number of bimolecular reactions
INTEGER, PARAMETER :: n_ratj_master = 158 ! number of photolysis reactions
+
INTEGER, PARAMETER :: n_ratj_master = 183 ! number of photolysis reactions
INTEGER, PARAMETER :: n_ratt_master = 76 ! number of termolecular reactions
+
INTEGER, PARAMETER :: n_ratt_master = 116 ! number of termolecular reactions
@@ -847,7 +847,7 @@
+
@@ -921,7 +921,7 @@
! 272
+
! 284
chch_t1(272,'ALICE ',1,'TR ',' ',1,0,st,0,0,111), &
+
chch_t1(284,'ALICE ',1,'TR ',' ',1,0,st+cs,0,0,131), &
! 273
+
! 285
-chch_t1(273,'BOB ',1,'TR ',' ',0,0,st,0,0,111) &
+
-chch_t1(285,'BOB ',1,'TR ',' ',0,0,st+cs,0,0,131) &
+chch_t1(273,'BOB ',1,'TR ',' ',0,1,st,0,0,111) &
+
+chch_t1(285,'BOB ',1,'TR ',' ',0,1,st+cs,0,0,131) &
/)
+
]
 
 
  +
! ----------------------------------------------------------------------
 
@@ -2058,7 +2058,10 @@
+
@@ -2498,7 +2498,10 @@
(/2.30e+02,4.90e+03,0.00e+00,0.00e+00,0.00e+00,0.00e+00/),cs,0,0,107), &
+
[1.84e+05,6.00e+03,0.00e+00,0.00e+00,0.00e+00,0.00e+00],cs,0,0,119), &
! WD: 96. Using MeOH Henry's Law Coeffs
+
! WD: 120 (Schwantes (2020) MVKN)
wetdep( 96, 'ARNOH17 ', &
+
wetdep(120, 'RU10NO3 ', &
-(/2.30e+02,4.90e+03,0.00e+00,0.00e+00,0.00e+00,0.00e+00/),cs,0,0,107) &
+
-[1.84e+05,6.00e+03,0.00e+00,0.00e+00,0.00e+00,0.00e+00],cs,0,0,119) &
+(/2.30e+02,4.90e+03,0.00e+00,0.00e+00,0.00e+00,0.00e+00/),cs,0,0,107), &
+
+[1.84e+05,6.00e+03,0.00e+00,0.00e+00,0.00e+00,0.00e+00],cs,0,0,119), &
+! UKCA Tutorial: wet deposition of BOB
+
+! UKCA Tutorial: wet deposition of BOB
+wetdep(97,'BOB ', &
+
+wetdep(121,'BOB ', &
+(/0.21e+06,0.87e+04,0.20e+02,0.00e+00,0.00e+00,0.00e+00/),st,0,0,107) &
+
+[0.21e+06,0.87e+04,0.20e+02,0.00e+00,0.00e+00,0.00e+00],st+cs,0,0,131) &
/)
+
]
 
 
 
! ---------------------------------------------------------------------
 
! ---------------------------------------------------------------------
   
These differences can be found in the file '''<code>Tutorials/vn11.8/worked_solutions/Task08.1/Task08.1_code.patch</code>'''.
+
These differences can be found here:
  +
  +
Tutorials/UMvn13.0/worked_solutions/Task10.1/Task10.1_ukca.patch
  +
  +
Sample output from this task can be found at
  +
  +
Tutorials/UMvn13.0/sample_output/Task10.1/
  +
  +
'''Note''' that while the concentrations of ALICE and BOB will have changed slightly, it will be hard to see any differences when plotting the species. If you look in the
  +
  +
cylc-run/'''[SUITE-ID]'''/work/1/atmos/pe_output/atmos.fort6.pe0
  +
  +
file and search for <tt>BOB</tt> you will be able to see the following lines
  +
  +
285 BOB TR 0 1 131
  +
  +
and
   
  +
BOB
Sample output from this task can be found at '''<code>Tutorials/vn11.8/sample_output/Task08.1/atmosa.pa19810901_00</code>'''.
 
  +
0.210000E+06 0.870000E+04 0.200000E+02 0.000000E+00 0.000000E+00 0.000000E+00
   
  +
These are showing that the dry deposition switch is now on (the '''1''' after the <tt>TR 0</tt>) and provides the list of Henry's Law values.
''Note that there is a typo in the above solution - all entries should be added with the same version number (i.e. 111), however in this case a version number of 107 would still work as it is lower than 111. If the version number were set higher than the version number being used then the changes would not initially be included.''
 
   
 
==Checklist==
 
==Checklist==
   
: <span style="font-size:20px">☐</span> Put a 1 in the W column of the <code>chch_defs_master</code> in <code>ukca_chem_master.F90</code>.
+
: <span style="font-size:20px">☐</span> Put a 1 in the W column of the <tt>chch_defs_master</tt> in <tt>ukca_chem_master.F90</tt>.
: <span style="font-size:20px">☐</span> Append the Henry's Law parameter values in the <code>depvel_defs_master</code> array, and increment <code>n_wet_master</code>.
+
: <span style="font-size:20px">☐</span> Append the Henry's Law parameter values in the <tt>depvel_defs_master</tt> array, and increment <tt>n_wet_master</tt>.
   
 
[[UKCA Chemistry and Aerosol UMvn13.0 Tutorial 11|Tutorial 11]]
 
[[UKCA Chemistry and Aerosol UMvn13.0 Tutorial 11|Tutorial 11]]

Latest revision as of 13:49, 13 May 2023

UKCA Chemistry and Aerosol Tutorials at UMvn13.0

Difficulty EASY
Time to Complete Under 1 hour
Video instructions Walkthrough (YouTube)

Remember to run mosrs-cache-password.

What you will learn in this Tutorial

In this tutorial you will learn how the wet deposition of chemical species is handelled in UKCA. You will then add-in the wet deposition of one of your new tracers.

Task 10.1: Add wet deposition of a species

Task 10.1: Add in wet deposition for BOB, using the following values:

for the 1st dissociation for the 1st dissociation for the 2nd dissociation for the 2nd dissociation

Adding Wet Deposition

The formulation used in UKCA is described in Giannakopoulos (1999)[1]. This scheme uses the following formula to calculate the effective Henry's Law coefficient

where is the rate constant at 298K.

During this tutorial you will be tasked with adding the wet deposition of one of your new tracers. You will only need to make changes to your UKCA branch.

References

  1. Giannakopoulos, C., M. P. Chipperfield, K. S. Law, and J. A. Pyle (1999), Validation and intercomparison of wet and dry deposition schemes using 210Pb in a global three-dimensional off-line chemical transport model, J. Geophys. Res., 104(D19), 23761–23784, doi:10.1029/1999JD900392.

Turning on Wet Deposition for a Species

src/science/core/chemistry/ukca_chem_master.F90

Within the UKCA code, whether a species is wet deposited or not is controlled in the ukca_chem_master.F90 module. In the chch_defs_master array there are lines like

!   9 DD:  6,WD:  4,
! No dry deposition for HO2NO2 in R and T schemes
chch_t1( 9,'HO2NO2    ',1,'TR        ','          ',0,1,r+t,0,0,107),          &
chch_t1( 9,'HO2NO2    ',1,'TR        ','          ',1,1,ti+s+st+cs,0,0,107),   &
!  10 DD:  7,WD:  5,   (20)
chch_t1(10,'HONO2     ',1,'TR        ','          ',1,1,ti+s+t+st+r+cs,        &
                                                                0,0,107),      &

Where the 1 in the 7th column turns on wet deposition of that species (being 0 otherwise). You will need to change the 0 to a 1 for the species that you wish to now wet deposit.

The parameters required to calculate are held in the henry_defs_master array (of defined size n_wet_master), and has format

N 'SPECIES   '
for the 1st dissociation for the 1st dissociation for the 2nd dissociation for the 2nd dissociation
SCHEME QUALIFIER DISQUALIFIER VN

Columns 3 and 4 are used if the species dissociates in the aqueous phase. In this case, is further multiplied by a factor of

where

and column 3 contains the values of and column 4 contains the value of . Similarly, if the species dissociates a second time then a further factor of is applied, where this value of is calculated from the values of and in columns 5 and 6.

Examples for this array are

! WD: 4
wetdep(4,'HO2NO2    ',                                                         &
(/0.13e+05,0.69e+04,0.10e-04,0.00e+00,0.00e+00,0.0e+00/),ti+t+st+r+cs,0,0,107),&
wetdep(4,'HO2NO2    ',                                                         &
(/0.20e+05,0.00e+00,0.10e-04,0.00e+00,0.00e+00,0.00e+00/),s,0,0,107),          &
! WD: 5
wetdep(5,'HONO2     ',                                                         &
(/0.21e+06,0.87e+04,0.20e+02,0.00e+00,0.00e+00,0.0e+00/),ti+t+st+r+cs,0,0,107),&
wetdep(5,'HONO2     ',                                                         &
(/0.21e+06,0.87e+04,0.157e+02,0.00e+00,0.00e+00,0.00e+00/),s,0,0,107),         &

Worked Solution to Task 10.1: Add wet deposition of a species

You were given the task

  • Add in wet deposition for BOB, using the following values:
for the 1st dissociation for the 1st dissociation for the 2nd dissociation for the 2nd dissociation

The specific UKCA changes made are:


Index: src/science/core/chemistry/ukca_chem_master.F90
===================================================================
--- src/science/core/chemistry/ukca_chem_master.F90	(revision 567)
+++ src/science/core/chemistry/ukca_chem_master.F90	(revision 568)
@@ -106,7 +106,7 @@
 INTEGER, PARAMETER :: n_chch_master = 358 ! number of known species
 INTEGER, PARAMETER :: n_het_master  =  18 ! number of heterogeneous reactions
 INTEGER, PARAMETER :: n_dry_master  = 162 ! number of dry deposition reactions
-INTEGER, PARAMETER :: n_wet_master  = 159 ! number of wet deposition reactions
+INTEGER, PARAMETER :: n_wet_master  = 160 ! number of wet deposition 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
@@ -921,7 +921,7 @@
 ! 284
 chch_t1(284,'ALICE     ',1,'TR        ','          ',1,0,st+cs,0,0,131),       &
 ! 285
-chch_t1(285,'BOB       ',1,'TR        ','          ',0,0,st+cs,0,0,131)        &
+chch_t1(285,'BOB       ',1,'TR        ','          ',0,1,st+cs,0,0,131)        &
 ]
 
 
@@ -2498,7 +2498,10 @@
 [1.84e+05,6.00e+03,0.00e+00,0.00e+00,0.00e+00,0.00e+00],cs,0,0,119),           &
 ! WD: 120  (Schwantes (2020) MVKN)
 wetdep(120, 'RU10NO3   ',                                                      &
-[1.84e+05,6.00e+03,0.00e+00,0.00e+00,0.00e+00,0.00e+00],cs,0,0,119)            &
+[1.84e+05,6.00e+03,0.00e+00,0.00e+00,0.00e+00,0.00e+00],cs,0,0,119),           &
+! UKCA Tutorial: wet deposition of BOB
+wetdep(121,'BOB       ',                                                       &
+[0.21e+06,0.87e+04,0.20e+02,0.00e+00,0.00e+00,0.00e+00],st+cs,0,0,131)         &
 ]
 
 ! ---------------------------------------------------------------------

These differences can be found here:

Tutorials/UMvn13.0/worked_solutions/Task10.1/Task10.1_ukca.patch

Sample output from this task can be found at

Tutorials/UMvn13.0/sample_output/Task10.1/

Note that while the concentrations of ALICE and BOB will have changed slightly, it will be hard to see any differences when plotting the species. If you look in the

cylc-run/[SUITE-ID]/work/1/atmos/pe_output/atmos.fort6.pe0

file and search for BOB you will be able to see the following lines

285 BOB        TR 0 1 131

and

BOB
0.210000E+06   0.870000E+04   0.200000E+02   0.000000E+00   0.000000E+00   0.000000E+00

These are showing that the dry deposition switch is now on (the 1 after the TR 0) and provides the list of Henry's Law values.

Checklist

Put a 1 in the W column of the chch_defs_master in ukca_chem_master.F90.
Append the Henry's Law parameter values in the depvel_defs_master array, and increment n_wet_master.

Tutorial 11

UKCA Chemistry and Aerosol Tutorials at UMvn13.0


Written by Luke Abraham 2022