Solution to UKCA & UMUI Tutorial 6 Task 6.1

From UKCA
Revision as of 15:54, 15 July 2013 by Nla27 (talk | contribs) (→‎Hand-edit to increase JPBK and JPNR)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Back to UKCA & UMUI Tutorials

Back to the adding new chemical reactions tutorial

Task

You were asked to

You should now add in the bimolecular reaction of ALICE with OH to form BOB. This reaction is given by:



Parameter Value
2.70E-11
0.00
-390.00

Solution

Changes to ukca_chem_strattrop.F90

The only UKCA code changes that are required, are in ukca_chem_strattrop.F90. You should add the following line at the end of the ratb_defs_strattrop05 array

ratb_t('ALICE     ','OH        ','BOB       ','          ','          ',& 
'          ',  2.70E-11,  0.00,   -390.00, 0.000, 0.000, 0.000, 0.000)  & 

(remembering to add a comma at the end of the line above) and increase the size of the ratb_defs_strattrop05 array to 19 and the size of the ratb_defs_strattrop_chem master array to 199.

Hand-edit to increase JPBK and JPNR

You will now need to make a hand-edit to increase the size of JPBK and JPNR, which are set in CNTLATM. This should look like

ed CNTLATM<<\EOF
/JPBK/
d
i
 JPBK=199,
.
/JPNR/
d
i
 JPNR=284,
.
w
q
EOF
Figure 1: Surface plot of the BOB tracer after bimolecular reaction has been applied.

You should make this script executable (chmod a+rx script.ed) and add it to the UMUI in the Model Selection → Input/Output Control and Resource → User hand edit files by placing it in the table and putting a Y in the Include Y/N column.

An example hand-edit can be found at

/home/ukca/hand_edits/VN8.2/Tutorial/Task6.1_incr_JPvals.ed

on PUMA.

Output

Now that we are forming BOB, this tracer field will be non-zero. If you open the pb file (located in your archive directory) in Xconv and plot the surface of 34065, you should see a field similar to that in Figure 1.

Sample output from this job can be found in

/work/n02/n02/ukca/Tutorial/sample_output/Task6.1/

on HECToR, and in

/projects/ukca/Tutorial/sample_ouput/Task6.1/

on MONSooN.

Worked Solution

There is a worked solution to this problem in the UMUI Tutorial experiment. This is job g: Tutorial: solution to Task 6.1 - add a new bimolecular reaction.

The code changes can be viewed by using the following FCM command

fcm diff -g fcm:um_br/dev/luke/vn8.2_UKCA_Tutorial_Solns@12168 fcm:um_br/dev/luke/vn8.2_UKCA_Tutorial_Solns@12170

This gives the following (non-graphical) output:

Index: src/atmosphere/UKCA/ukca_chem_strattrop.F90
===================================================================
--- src/atmosphere/UKCA/ukca_chem_strattrop.F90	(revision 12168)
+++ src/atmosphere/UKCA/ukca_chem_strattrop.F90	(revision 12170)
@@ -235,7 +235,7 @@
 chch_t( 87,'Sec_Org   ',  1,'TR        ','          ',  1,  1,  0)   & !  87 DD:41,WD:34
   /)
 
-TYPE(RATB_T), DIMENSION( 198) :: ratb_defs_strattrop_chem
+TYPE(RATB_T), DIMENSION( 199) :: ratb_defs_strattrop_chem
 
 ! reactions found in either Trop or Strat but not both 
 TYPE(RATB_T), DIMENSION(  15),PARAMETER :: ratb_defs_strattrop_aer=(/    &
@@ -755,7 +755,7 @@
 TYPE(RATB_T), DIMENSION(  45 ) :: ratb_defs_strattrop02
 TYPE(RATB_T), DIMENSION(  45 ) :: ratb_defs_strattrop03
 TYPE(RATB_T), DIMENSION(  45 ) :: ratb_defs_strattrop04
-TYPE(RATB_T), DIMENSION(  18 ) :: ratb_defs_strattrop05
+TYPE(RATB_T), DIMENSION(  19 ) :: ratb_defs_strattrop05
 
 REAL, DIMENSION(  360) :: depvel_defs_strattrop01
 REAL, DIMENSION(  360) :: depvel_defs_strattrop02
@@ -1190,7 +1190,9 @@
 ratb_t('n-PrOO    ','NO        ','EtCHO     ','HO2       ','NO2       ',& ! B196 
 '          ',  2.90E-12,  0.00,   -350.00, 0.000, 0.000, 0.000, 0.000), & ! B196 IUPAC2005   
 ratb_t('n-PrOO    ','NO3       ','EtCHO     ','HO2       ','NO2       ',& ! B197 
-'          ',  2.70E-12,  0.00,   -360.00, 0.000, 0.000, 0.000, 0.000)  & ! B197 MCM3.2  
+'          ',  2.70E-12,  0.00,   -360.00, 0.000, 0.000, 0.000, 0.000), & ! B197 MCM3.2  
+ratb_t('ALICE     ','OH        ','BOB       ','          ','          ',& ! UKCA TUTORIAL RXN 01
+'          ',  2.70E-11,  0.00,   -390.00, 0.000, 0.000, 0.000, 0.000)  & ! UKCA TUTORIAL RXN 01
   /) 
   
 !---------------------------------------------------------------------- 

Written by Luke Abraham 2013