Solution to UKCA & UMUI Tutorial 5 Task 5.2

From UKCA

Back to UKCA & UMUI Tutorials

Back to the adding new chemical emissions tutorial

Task

You were asked to

You should now make the UKCA code changes to add your emission into the ALICE tracer. No run-time processing of this surface emission is required.

Solution

As no run-time processing of this field is required, the only changes that need to be made are those in ukca_setd1defs.F90

Code changes to ukca_setd1defs.F90

em_chem_spec changes

In ukca_setd1defs.F90 you should scroll-down to the code block controlled by the

          ELSE IF (L_ukca_strattrop .AND. .NOT. L_ukca_achem) THEN

statement and

  • increase the value of n_chem_emissions to 10.
  • Edit em_chem_spec so that it now includes ALICE:
                 (/'NO        ','CH4       ','CO        ','HCHO      ', &
                   'C2H6      ','C3H8      ','Me2CO     ','MeCHO     ', &
                   'C5H8      ','ALICE     ','NO_aircrft'/)

STASH changes

Edit the IF block controlling which STASH codes are assigned to which species, and add the following

          ELSEIF (em_chem_spec(i) == 'ALICE     ') THEN
            UkcaD1Codes(J+i)%item = 316

Code changes to ukca_constants.F90

You need to add the following line to define the molar mass of ALICE

     REAL, PARAMETER :: M_ALICE      = 28.97

Code changes to ukca_emission_ctl.F90

You need to add the following line to the WHERE block adding in the molar masses of the emitted species (defined in em_chem_spec) to the molmass array

            WHERE (em_chem_spec == 'ALICE     ') molmass = M_ALICE

Output

Figure 1: Surface plot of the ALICE tracer after emissions have been applied.

As the ALICE (and BOB) tracers are being output as daily means to the pb/UPB stream, you can examine the output (located in your archive directory) to see if the emission is being correctly applied. Opening the pb file there are 3 fields:

0    : 192   145   85    1     Stash code = 34001
1    : 192   145   85    1     Stash code = 34064
2    : 192   145   85    1     Stash code = 34065

The first (34001) is ozone, and 34065 is BOB (which will still contain zeros). View the surface of 34064 and you should now see that it is non-zero. An example of this is shown in Figure 1.

You should note that this will not match up exactly with the emission field in the ancillary file, partly because of the time interpolation that is done between the monthly emission fields, and partly because the field in the tracer is a daily mean of a tracer that has these emissions applied every timestep (and currently with no loss processes), and which is also undergoing boundary layer mixing to mix concentrations out of the surface layer.

Sample output from this job can be found in

/work/n02/n02/ukca/Tutorial/sample_output/Task5.2/

on HECToR, and in

/projects/ukca/Tutorial/sample_ouput/Task5.2/

on MONSooN.

Worked Solution

There is a worked solution to this problem in the UMUI Tutorial experiment. This is job f: Tutorial: solution to Task 5.2 - adding new chemical emissions in UKCA.

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@12148 fcm:um_br/dev/luke/vn8.2_UKCA_Tutorial_Solns@12168

This gives the following (non-graphical) output:

Index: src/atmosphere/UKCA/ukca_setd1defs.F90
===================================================================
--- src/atmosphere/UKCA/ukca_setd1defs.F90(revision 12148)
+++ src/atmosphere/UKCA/ukca_setd1defs.F90(revision 12168)
@@ -248,14 +248,14 @@
                 nr_phot         = 38
              END IF
           ELSE IF (L_ukca_strattrop .AND. .NOT. L_ukca_achem) THEN
-             n_chem_emissions = 9
+             n_chem_emissions = 10
              n_3d_emissions = 1       ! aircraft NOX
              n_aero_tracers =  0
              ALLOCATE(em_chem_spec(n_chem_emissions+n_3d_emissions))
              em_chem_spec =                                             &
                  (/'NO        ','CH4       ','CO        ','HCHO      ', &
                    'C2H6      ','C3H8      ','Me2CO     ','MeCHO     ', &
-                   'C5H8      ','NO_aircrft'/)
+                   'C5H8      ','ALICE     ','NO_aircrft'/)
              n_chem_tracers = 73         ! No chem tracers
              nr_therm       = 220        ! thermal reactions
              nr_phot        = 55         ! photolytic (ATA)
@@ -691,6 +691,8 @@
             UkcaD1Codes(J+i)%item = 314
           ELSEIF (em_chem_spec(i) == 'NVOC      ') THEN
             UkcaD1Codes(J+i)%item = 315
+          ELSEIF (em_chem_spec(i) == 'ALICE     ') THEN
+            UkcaD1Codes(J+i)%item = 316
           ELSEIF (em_chem_spec(i) == 'BC_biomass') THEN
             UkcaD1Codes(J+i)%item = 322
             UkcaD1Codes(J+i)%len_dim3 = tr_levels
Index: src/atmosphere/UKCA/ukca_constants.F90
===================================================================
--- src/atmosphere/UKCA/ukca_constants.F90(revision 12148)
+++ src/atmosphere/UKCA/ukca_constants.F90(revision 12168)
@@ -402,4 +402,8 @@
 !                  C8H9NO3: dimethyl nitrophenol -> 167
 !  -------------------------------------------------------------------
 
+!     UKCA Tutorial ALICE tracer - same  as mass of air in g/mol
+!     Required for ukca_emission_ctl
+      REAL, PARAMETER :: M_ALICE      = 28.97
+
       END MODULE UKCA_CONSTANTS
Index: src/atmosphere/UKCA/ukca_emission_ctl.F90
===================================================================
--- src/atmosphere/UKCA/ukca_emission_ctl.F90(revision 12148)
+++ src/atmosphere/UKCA/ukca_emission_ctl.F90(revision 12168)
@@ -324,7 +324,10 @@
             WHERE (em_chem_spec == 'OC_fossil ') molmass = m_c
             WHERE (em_chem_spec == 'OC_biofuel') molmass = m_c
             WHERE (em_chem_spec == 'OC_biomass') molmass = m_c
+! UKCA Tutorial Tracer
+            WHERE (em_chem_spec == 'ALICE     ') molmass = M_ALICE
 
+
 ! Check if all the emitted species have a valid molecular weight
             IF (ANY(molmass(:) < 0.00001)) THEN
               n = 0

Written by Luke Abraham 2013