Solution to UKCA Chemistry and Aerosol Tutorial 5 Task 5.2

From UKCA

Back to UKCA Chemistry and Aerosol 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. L_ukca_achem) THEN

statement and

  • increase the value of n_chem_emissions to 22.
  • Edit em_chem_spec so that it now includes ALICE:
                 (/'NO        ','CH4       ','CO        ','HCHO      ', &
                   'C2H6      ','C3H8      ','Me2CO     ','MeCHO     ', &
                   'C5H8      ','BC_fossil ','BC_biofuel','OC_fossil ', &
                   'OC_biofuel','Monoterp  ','NVOC      ','ALICE     ', &
                   'SO2_low   ', &
                   'SO2_high  ','DMS       ','NH3       ','SO2_nat   ', &
                   'BC_biomass','OC_biomass','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 pa 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/vn8.4/sample_output/Task5.2/

on ARCHER, and in

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

This gives the following (non-graphical) output:

Index: src/atmosphere/UKCA/ukca_setd1defs.F90
===================================================================
--- src/atmosphere/UKCA/ukca_setd1defs.F90	(revision 14692)
+++ src/atmosphere/UKCA/ukca_setd1defs.F90	(revision 14697)
@@ -273,14 +273,15 @@
              nr_phot        = 55         ! photolytic (ATA)
 
           ELSE IF (L_ukca_strattrop .AND. L_ukca_achem) THEN
-             n_chem_emissions = 21      ! em_chem_spec below
+             n_chem_emissions = 22      ! em_chem_spec below
              n_3d_emissions   = 2       ! volc SO2 & aircraft NOX
              ALLOCATE(em_chem_spec(n_chem_emissions+n_3d_emissions))
              em_chem_spec =                                             &
                  (/'NO        ','CH4       ','CO        ','HCHO      ', &
                    'C2H6      ','C3H8      ','Me2CO     ','MeCHO     ', &
                    'C5H8      ','BC_fossil ','BC_biofuel','OC_fossil ', &
-                   'OC_biofuel','Monoterp  ','NVOC      ','SO2_low   ', &
+                   'OC_biofuel','Monoterp  ','NVOC      ','ALICE     ', &
+                   'SO2_low   ', &
                    'SO2_high  ','DMS       ','NH3       ','SO2_nat   ', &
                    'BC_biomass','OC_biomass','NO_aircrft'/)
              n_aero_tracers = 12
@@ -624,6 +625,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 14692)
+++ src/atmosphere/UKCA/ukca_constants.F90	(revision 14697)
@@ -385,6 +385,11 @@
       REAL, PARAMETER :: m_alkaooh  = 90.0
       REAL, PARAMETER :: m_aromooh  = 130.0
       REAL, PARAMETER :: m_mekooh   = 104.0
+
+!     UKCA Tutorial ALICE tracer - same  as mass of air in g/mol
+!     as the value of C_ALICE=1.0000 (above)
+!     Required for ukca_emission_ctl
+      REAL, PARAMETER :: M_ALICE      = 28.97
      
 !     The mass of organic nitrate is an approximation, 
 !     calculated as the average of ORGNIT formed by two 
Index: src/atmosphere/UKCA/ukca_emission_ctl.F90
===================================================================
--- src/atmosphere/UKCA/ukca_emission_ctl.F90	(revision 14692)
+++ src/atmosphere/UKCA/ukca_emission_ctl.F90	(revision 14697)
@@ -380,6 +380,8 @@
             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



Written by Luke Abraham 2014