Difference between revisions of "Solution to UKCA & UMUI Tutorial 7 Task 7.1"

From UKCA
Line 91: Line 91:
   
 
/home/ukca/hand_edits/VN8.2/Tutorial/Task7.1_incr_JPvals.ed
 
/home/ukca/hand_edits/VN8.2/Tutorial/Task7.1_incr_JPvals.ed
  +
  +
==Output==
  +
  +
If you view the ALICE (34064) field in the '''pb''' after these changes, and compare it to the equivalent field after the [[Solution to UKCA & UMUI Tutorial 6 Task 6.1 | previous Task (6.1)]] you will see that there are some difference. However, we will not be able to quantify these differences correctly until [[UKCA & UMUI Tutorial 9 | Tutorial 9: Adding new UKCA diagnostics]].
   
 
==Worked Solution==
 
==Worked Solution==
  +
  +
fcm diff -g fcm:um_br/dev/luke/vn8.2_UKCA_Tutorial_Solns@12170 fcm:um_br/dev/luke/vn8.2_UKCA_Tutorial_Solns@12214
  +
  +
Index: src/atmosphere/UKCA/ukca_surfddr.F90
  +
===================================================================
  +
--- src/atmosphere/UKCA/ukca_surfddr.F90 (revision 12170)
  +
+++ src/atmosphere/UKCA/ukca_surfddr.F90 (revision 12214)
  +
@@ -277,7 +277,7 @@
  +
500.0, 12500. /)
  +
CASE ('NH3 ')
  +
rsurf(:,n)=hno3
  +
- CASE ('CO ')
  +
+ CASE ('CO ','ALICE ')
  +
rsurf(:,n)=(/3700.,7300.,4550.,1960.,4550.0,r_null,r_null, &
  +
4550.0,r_null /) ! Shrub+bare soil set to C3 grass (guess)
  +
CASE ('CH4 ')
  +
Index: src/atmosphere/UKCA/ukca_chem_strattrop.F90
  +
===================================================================
  +
--- src/atmosphere/UKCA/ukca_chem_strattrop.F90 (revision 12170)
  +
+++ src/atmosphere/UKCA/ukca_chem_strattrop.F90 (revision 12214)
  +
@@ -56,7 +56,7 @@
  +
INTEGER, PARAMETER, PUBLIC :: nhet_st_tpht = 2 ! trophet rxns
  +
  +
! No of dry deposited species
  +
-INTEGER, PARAMETER, PUBLIC :: ndry_strattrop = 36 ! Stratospheric chemistry
  +
+INTEGER, PARAMETER, PUBLIC :: ndry_strattrop = 37 ! Stratospheric chemistry
  +
INTEGER, PARAMETER, PUBLIC :: ndry_st_aer = 5 ! Aerosol chemistry
  +
  +
! No of wet deposited species
  +
@@ -141,7 +141,7 @@
  +
chch_t( 73,'CO2 ', 1,'CT ',' ', 0, 0, 0), & ! 73
  +
chch_t( 74,'O2 ', 1,'CT ',' ', 0, 0, 0), & ! 74
  +
chch_t( 75,'N2 ', 1,'CT ',' ', 0, 0, 0), & ! 75
  +
-chch_t( 76,'ALICE ', 1,'TR ',' ', 0, 0, 0), & ! 76
  +
+chch_t( 76,'ALICE ', 1,'TR ',' ', 1, 0, 0), & ! 76
  +
chch_t( 77,'BOB ', 1,'TR ',' ', 0, 0, 0) & ! 77
  +
/)
  +
  +
@@ -759,7 +759,7 @@
  +
  +
REAL, DIMENSION( 360) :: depvel_defs_strattrop01
  +
REAL, DIMENSION( 360) :: depvel_defs_strattrop02
  +
-REAL, DIMENSION( 360) :: depvel_defs_strattrop03
  +
+REAL, DIMENSION( 390) :: depvel_defs_strattrop03
  +
  +
INTEGER(KIND=jpim), PARAMETER :: zhook_in = 0
  +
INTEGER(KIND=jpim), PARAMETER :: zhook_out = 1
  +
@@ -2120,7 +2120,13 @@
  +
0.83, 0.04, 0.44, 0.06, 0.05, 0.06, & ! 36.2
  +
0.63, 0.06, 0.35, 0.08, 0.06, 0.07, & ! 36.3
  +
0.03, 0.03, 0.03, 0.03, 0.03, 0.03, & ! 36.4
  +
- 0.01, 0.01, 0.01, 0.01, 0.01, 0.01 & ! 36.5
  +
+ 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, & ! 36.5
  +
+! 37 ALICE - same as for CO
  +
+ 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, & ! 37.1
  +
+ 0.03, 0.03, 0.03, 0.03, 0.03, 0.03, & ! 37.2
  +
+ 0.03, 0.03, 0.03, 0.03, 0.03, 0.03, & ! 37.3
  +
+ 0.03, 0.03, 0.03, 0.03, 0.03, 0.03, & ! 37.4
  +
+ 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 & ! 37.5
  +
/)
  +
  +
  +
Index: src/atmosphere/UKCA/ukca_aerod.F90
  +
===================================================================
  +
--- src/atmosphere/UKCA/ukca_aerod.F90 (revision 12170)
  +
+++ src/atmosphere/UKCA/ukca_aerod.F90 (revision 12214)
  +
@@ -222,6 +222,8 @@
  +
d0(j) = d_h2o * SQRT(m_h2o / m_meoh)
  +
CASE ('Monoterp')
  +
d0(j) = d_h2o * SQRT(m_h2o / m_monoterp)
  +
+ CASE ('ALICE ')
  +
+ d0(j) = d_h2o * SQRT(m_h2o / m_ALICE)
  +
END SELECT
  +
END DO
  +
!
  +
   
   

Revision as of 15:27, 24 June 2013

Back to the adding dry deposition tutorial

Task

You were asked to

You should now add in the dry deposition of ALICE. This species deposits in a similar way to CO. You will need to adjust depvel_defs_scheme as well ukca_aerod.F90 and ukca_surfddr.F90. The values for depvel_defs_scheme are:

0.00 0.00 0.00 0.00 0.00 0.00
0.03 0.03 0.03 0.03 0.03 0.03
0.03 0.03 0.03 0.03 0.03 0.03
0.03 0.03 0.03 0.03 0.03 0.03
0.00 0.00 0.00 0.00 0.00 0.00

i.e. the same as for CO.

and were given the hint

The changes to ukca_surfddr.F90 can be made very easily by adding ALICE to the CO block in the CASE statement.

Solution

You will need to make changes to 3 UKCA routines and make 1 hand-edit.

Changes to ukca_chem_strattrop.F90

chch_defs array

First, you will need to change the 0 in the 6th column of the chch_defs_strattrop_chem to 1:

chch_t( 76,'ALICE     ',  1,'TR        ','          ',  1,  0,  0),  & !  76

Additions for depvel_defs

To add in the values for the deposition velocity into the depvel_defs_strattrop array you will need to

  • Increase the value of ndry_strattrop from 36 to 37
  • Increase the size of depvel_defs_strattrop03 from 360 to 390
  • Add this code block to end of the depvel_defs_strattrop03 array (remembering to add a comma to end of the line preceeding this)
  0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  & !     37.1
  0.03,  0.03,  0.03,  0.03,  0.03,  0.03,  & !     37.2
  0.03,  0.03,  0.03,  0.03,  0.03,  0.03,  & !     37.3
  0.03,  0.03,  0.03,  0.03,  0.03,  0.03,  & !     37.4
  0.00,  0.00,  0.00,  0.00,  0.00,  0.00   & !     37.5

Changes to ukca_aerod.F90

You will need to add the following block to the CASE statement within this routine

            CASE ('ALICE   ')
              d0(j) = d_h2o * SQRT(m_h2o / m_ALICE)

the value of m_ALICE having been set in Task 5.2 - adding new emissions to UKCA.

Changes to ukca_surfddr.F90

As has been noted in the hint for this task, the only change required to ukca_surfddr.F90 is to add 'ALICE ' to the CO section of the CASE statement:

            CASE ('CO        ','ALICE     ')
        rsurf(:,n)=(/3700.,7300.,4550.,1960.,4550.0,r_null,r_null,     &
          4550.0,r_null /)  ! Shrub+bare soil set to C3 grass (guess)

Hand-edit to increase the value of JPDD

You will need to add a hand-edit to 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.

It should contain the following:

ed CNTLATM<<\EOF
/JPDD/
d
i
 JPDD = 37,
.
w
q
EOF

An example hand-edit can be found at

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

Output

If you view the ALICE (34064) field in the pb after these changes, and compare it to the equivalent field after the previous Task (6.1) you will see that there are some difference. However, we will not be able to quantify these differences correctly until Tutorial 9: Adding new UKCA diagnostics.

Worked Solution

fcm diff -g fcm:um_br/dev/luke/vn8.2_UKCA_Tutorial_Solns@12170 fcm:um_br/dev/luke/vn8.2_UKCA_Tutorial_Solns@12214
Index: src/atmosphere/UKCA/ukca_surfddr.F90
===================================================================
--- src/atmosphere/UKCA/ukca_surfddr.F90	(revision 12170)
+++ src/atmosphere/UKCA/ukca_surfddr.F90	(revision 12214)
@@ -277,7 +277,7 @@
           500.0, 12500. /)
             CASE ('NH3       ')
         rsurf(:,n)=hno3
-            CASE ('CO        ')
+            CASE ('CO        ','ALICE     ')
         rsurf(:,n)=(/3700.,7300.,4550.,1960.,4550.0,r_null,r_null,     &
           4550.0,r_null /)  ! Shrub+bare soil set to C3 grass (guess)
             CASE ('CH4       ')
Index: src/atmosphere/UKCA/ukca_chem_strattrop.F90
===================================================================
--- src/atmosphere/UKCA/ukca_chem_strattrop.F90	(revision 12170)
+++ src/atmosphere/UKCA/ukca_chem_strattrop.F90	(revision 12214)
@@ -56,7 +56,7 @@
 INTEGER, PARAMETER, PUBLIC :: nhet_st_tpht   = 2         ! trophet rxns
 
 ! No of dry deposited species
-INTEGER, PARAMETER, PUBLIC :: ndry_strattrop = 36        ! Stratospheric chemistry
+INTEGER, PARAMETER, PUBLIC :: ndry_strattrop = 37        ! Stratospheric chemistry
 INTEGER, PARAMETER, PUBLIC :: ndry_st_aer    = 5         ! Aerosol chemistry
 
 ! No of wet deposited species
@@ -141,7 +141,7 @@
 chch_t( 73,'CO2       ',  1,'CT        ','          ',  0,  0,  0),  & !  73
 chch_t( 74,'O2        ',  1,'CT        ','          ',  0,  0,  0),  & !  74
 chch_t( 75,'N2        ',  1,'CT        ','          ',  0,  0,  0),  & !  75
-chch_t( 76,'ALICE     ',  1,'TR        ','          ',  0,  0,  0),  & !  76
+chch_t( 76,'ALICE     ',  1,'TR        ','          ',  1,  0,  0),  & !  76
 chch_t( 77,'BOB       ',  1,'TR        ','          ',  0,  0,  0)   & !  77
   /)
 
@@ -759,7 +759,7 @@
 
 REAL, DIMENSION(  360) :: depvel_defs_strattrop01
 REAL, DIMENSION(  360) :: depvel_defs_strattrop02
-REAL, DIMENSION(  360) :: depvel_defs_strattrop03
+REAL, DIMENSION(  390) :: depvel_defs_strattrop03
 
 INTEGER(KIND=jpim), PARAMETER :: zhook_in  = 0
 INTEGER(KIND=jpim), PARAMETER :: zhook_out = 1
@@ -2120,7 +2120,13 @@
    0.83,  0.04,  0.44,  0.06,  0.05,  0.06,  & !     36.2
   0.63,  0.06,  0.35,  0.08,  0.06,  0.07,  & !     36.3
   0.03,  0.03,  0.03,  0.03,  0.03,  0.03,  & !     36.4
-  0.01,  0.01,  0.01,  0.01,  0.01,  0.01   & !     36.5
+  0.01,  0.01,  0.01,  0.01,  0.01,  0.01,  & !     36.5
+!  37  ALICE - same as for CO
+  0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  & !     37.1
+  0.03,  0.03,  0.03,  0.03,  0.03,  0.03,  & !     37.2
+  0.03,  0.03,  0.03,  0.03,  0.03,  0.03,  & !     37.3
+  0.03,  0.03,  0.03,  0.03,  0.03,  0.03,  & !     37.4
+  0.00,  0.00,  0.00,  0.00,  0.00,  0.00   & !     37.5
   /)
   
 
Index: src/atmosphere/UKCA/ukca_aerod.F90
===================================================================
--- src/atmosphere/UKCA/ukca_aerod.F90	(revision 12170)
+++ src/atmosphere/UKCA/ukca_aerod.F90	(revision 12214)
@@ -222,6 +222,8 @@
               d0(j) = d_h2o * SQRT(m_h2o / m_meoh)
             CASE ('Monoterp')
               d0(j) = d_h2o * SQRT(m_h2o / m_monoterp)
+            CASE ('ALICE   ')
+              d0(j) = d_h2o * SQRT(m_h2o / m_ALICE)
           END SELECT
         END DO
 ! 




Written by Luke Abraham 2013