Solution to UKCA Chemistry and Aerosol Tutorial 6 Task 6.1: Difference between revisions

From UKCA
(Created page with " Back to UKCA Chemistry and Aerosol Tutorials [[UKCA Chemistry and Aerosol Tutorial 8#Task 8.1: Add a bimolecular reaction | Back to th…")
 
 
(7 intermediate revisions by the same user not shown)
Line 8: Line 8:


<blockquote>
<blockquote>
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:
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:
<br/>
<br/>
<br/>
<br/>
<math>
<math>
\textrm{ALICE} + \textrm{OH} \longrightarrow \textrm{BOB} + \textrm{SEC\_ORG}
\textrm{ALICE} + \textrm{OH} \longrightarrow \textrm{BOB} + \textrm{Sec\_Org}
</math>
</math>
<br/>
<br/>
Line 33: Line 33:
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
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 ',' ',' ',&
ratb_t('ALICE ','OH ','BOB ','Sec_Org ',' ',&
' ', 2.70E-11, 0.00, -390.00, 0.000, 0.000, 0.000, 0.000) &
' ', 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'''.
(remembering to add a comma at the end of the line above) and increase the size of the '''ratb_defs_strattrop05''' array to '''21''' and the size of the '''ratb_defs_strattrop_chem''' master array to '''201'''.


===Hand-edit to increase JPBK and JPNR===
===Hand-edit to increase JPBK and JPNR===
Line 46: Line 46:
d
d
i
i
JPBK=199,
JPBK=216,
.
.
/JPNR/
/JPNR/
d
d
i
i
JPNR=284,
JPNR=309,
.
.
w
w
Line 62: Line 62:
An example hand-edit can be found at
An example hand-edit can be found at


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


on PUMA.
on PUMA.
Line 72: Line 72:
'''Sample output''' from this job can be found in
'''Sample output''' from this job can be found in


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


on HECToR, and in
on ARCHER, and in


/projects/ukca/Tutorial/sample_ouput/Task6.1/
<strike>/projects/ukca/Tutorial/vn8.4/sample_ouput/Task6.1/</strike>


on MONSooN.
on MONSooN.
Line 86: Line 86:
The code changes can be viewed by using the following FCM command
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
fcm diff fcm:um_br/dev/luke/vn8.4_UKCA_Tutorial_Solns@14697 fcm:um_br/dev/luke/vn8.4_UKCA_Tutorial_Solns@14703


This gives the following (non-graphical) output:
This gives the following output:


Index: src/atmosphere/UKCA/ukca_chem_strattrop.F90
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 14697)
+++ src/atmosphere/UKCA/ukca_chem_strattrop.F90 (revision 12170)
+++ src/atmosphere/UKCA/ukca_chem_strattrop.F90 (revision 14703)
@@ -235,7 +235,7 @@
@@ -399,7 +399,7 @@
chch_t( 87,'Sec_Org ', 1,'TR ',' ', 1, 1, 0) & ! 87 DD:41,WD:34
chch_t( 90,'BOB ', 1,'TR ',' ', 0, 0, 0) &
/)
/)
-TYPE(RATB_T), DIMENSION( 198) :: ratb_defs_strattrop_chem
-TYPE(RATB_T) :: ratb_defs_strattrop_chem(200)
+TYPE(RATB_T), DIMENSION( 199) :: ratb_defs_strattrop_chem
+TYPE(RATB_T) :: ratb_defs_strattrop_chem(201)
! reactions found in either Trop or Strat but not both
! reactions found in either Trop or Strat but not both
TYPE(RATB_T), DIMENSION( 15),PARAMETER :: ratb_defs_strattrop_aer=(/ &
TYPE(RATB_T), PARAMETER :: ratb_defs_strattrop_aer(1:15)=(/ &
@@ -755,7 +755,7 @@
@@ -1011,7 +1011,7 @@
TYPE(RATB_T), DIMENSION( 45 ) :: ratb_defs_strattrop02
TYPE(RATB_T) :: ratb_defs_strattrop02(45)
TYPE(RATB_T), DIMENSION( 45 ) :: ratb_defs_strattrop03
TYPE(RATB_T) :: ratb_defs_strattrop03(45)
TYPE(RATB_T), DIMENSION( 45 ) :: ratb_defs_strattrop04
TYPE(RATB_T) :: ratb_defs_strattrop04(45)
-TYPE(RATB_T), DIMENSION( 18 ) :: ratb_defs_strattrop05
-TYPE(RATB_T) :: ratb_defs_strattrop05(20)
+TYPE(RATB_T), DIMENSION( 19 ) :: ratb_defs_strattrop05
+TYPE(RATB_T) :: ratb_defs_strattrop05(21)
REAL, DIMENSION( 360) :: depvel_defs_strattrop01
REAL :: depvel_defs_strattrop01(360)
REAL, DIMENSION( 360) :: depvel_defs_strattrop02
REAL :: depvel_defs_strattrop02(360)
@@ -1190,7 +1190,9 @@
@@ -1649,7 +1649,9 @@
ratb_t('n-PrOO ','NO ','EtCHO ','HO2 ','NO2 ',& ! B196
ratb_t('ISO2 ','O2 ','OH ','HCHO ','MACR ',& ! B198
' ', 2.90E-12, 0.00, -350.00, 0.000, 0.000, 0.000, 0.000), & ! B196 IUPAC2005
' ', 4.00E-03, 0.00, 0.00, 0.000, 0.000, 0.000, 0.000) ,& ! B198 ATA HOx recyc - added by hand
ratb_t('n-PrOO ','NO3 ','EtCHO ','HO2 ','NO2 ',& ! B197
ratb_t('ISO2 ','N2 ','HO2 ','MGLY ','HACET ',& ! B199
-' ', 2.70E-12, 0.00, -360.00, 0.000, 0.000, 0.000, 0.000) & ! B197 MCM3.2
-'OH ', 8.00E-02, 0.00, 0.00, 1.000, 1.000, 0.650, 0.600) & ! B199 ATA HOx recyc - added by hand
+' ', 2.70E-12, 0.00, -360.00, 0.000, 0.000, 0.000, 0.000), & ! B197 MCM3.2
+'OH ', 8.00E-02, 0.00, 0.00, 1.000, 1.000, 0.650, 0.600) ,& ! B199 ATA HOx recyc - added by hand
+ratb_t('ALICE ','OH ','BOB ',' ',' ',& ! UKCA TUTORIAL RXN 01
+ratb_t('ALICE ','OH ','BOB ','Sec_Org ',' ',& ! UKCA TUTORIAL RXN 01
+' ', 2.70E-11, 0.00, -390.00, 0.000, 0.000, 0.000, 0.000) & ! UKCA TUTORIAL RXN 01
+' ', 2.70E-11, 0.00, -390.00, 0.000, 0.000, 0.000, 0.000) & ! UKCA TUTORIAL RXN 01
/)
/)

Latest revision as of 14:33, 15 December 2015

Back to UKCA Chemistry and Aerosol 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 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

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       ','Sec_Org   ','          ',& 
'          ',  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 21 and the size of the ratb_defs_strattrop_chem master array to 201.

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=216,
.
/JPNR/
d
i
 JPNR=309,
.
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.4/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/vn8.4/sample_output/Task6.1/

on ARCHER, and in

/projects/ukca/Tutorial/vn8.4/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 fcm:um_br/dev/luke/vn8.4_UKCA_Tutorial_Solns@14697 fcm:um_br/dev/luke/vn8.4_UKCA_Tutorial_Solns@14703

This gives the following output:

Index: src/atmosphere/UKCA/ukca_chem_strattrop.F90
===================================================================
--- src/atmosphere/UKCA/ukca_chem_strattrop.F90	(revision 14697)
+++ src/atmosphere/UKCA/ukca_chem_strattrop.F90	(revision 14703)
@@ -399,7 +399,7 @@
 chch_t( 90,'BOB       ',  1,'TR        ','          ',  0,  0,  0)   & 
   /)
 
-TYPE(RATB_T) :: ratb_defs_strattrop_chem(200)
+TYPE(RATB_T) :: ratb_defs_strattrop_chem(201)
 
 ! reactions found in either Trop or Strat but not both 
 TYPE(RATB_T), PARAMETER :: ratb_defs_strattrop_aer(1:15)=(/              &
@@ -1011,7 +1011,7 @@
 TYPE(RATB_T) :: ratb_defs_strattrop02(45)
 TYPE(RATB_T) :: ratb_defs_strattrop03(45)
 TYPE(RATB_T) :: ratb_defs_strattrop04(45)
-TYPE(RATB_T) :: ratb_defs_strattrop05(20)
+TYPE(RATB_T) :: ratb_defs_strattrop05(21)
 
 REAL :: depvel_defs_strattrop01(360)
 REAL :: depvel_defs_strattrop02(360)
@@ -1649,7 +1649,9 @@
 ratb_t('ISO2      ','O2        ','OH        ','HCHO      ','MACR      ',& ! B198
 '          ',  4.00E-03,  0.00,      0.00, 0.000, 0.000, 0.000, 0.000) ,& ! B198  ATA HOx recyc - added by hand
 ratb_t('ISO2      ','N2        ','HO2       ','MGLY      ','HACET     ',& ! B199
-'OH        ',  8.00E-02,  0.00,      0.00, 1.000, 1.000, 0.650, 0.600) &  ! B199  ATA HOx recyc - added by hand
+'OH        ',  8.00E-02,  0.00,      0.00, 1.000, 1.000, 0.650, 0.600) ,& ! B199  ATA HOx recyc - added by hand
+ratb_t('ALICE     ','OH        ','BOB       ','Sec_Org   ','          ',& ! 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 2014