Difference between revisions of "Solution to UKCA & UMUI Tutorial 6 Task 6.1"
Line 60: | Line 60: | ||
/home/ukca/hand_edits/VN8.2/Tutorial/Task6.1_incr_JPvals.ed |
/home/ukca/hand_edits/VN8.2/Tutorial/Task6.1_incr_JPvals.ed |
||
+ | |||
+ | ==Output== |
||
+ | |||
+ | [[Image:UKCA_Tutorial_BOB_Surface.png|thumb|300px|right|Figure 1: Surface plot of the BOB tracer after bimolecular reaction has been applied.]] |
||
+ | Now that we are forming BOB, this tracer field will be non-zero. If you open the '''pb''' file in Xconv and plot the surface of 34065, you should see a field similar to that in Figure 1. |
||
==Worked Solution== |
==Worked Solution== |
||
Line 104: | Line 109: | ||
!---------------------------------------------------------------------- |
!---------------------------------------------------------------------- |
||
− | |||
− | |||
− | |||
---- |
---- |
Revision as of 16:38, 21 June 2013
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
You should make this script executable (chmod a+rx script.ed) and add it to the UMUI in the Model Selectiom → 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
Output
Now that we are forming BOB, this tracer field will be non-zero. If you open the pb file in Xconv and plot the surface of 34065, you should see a field similar to that in Figure 1.
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