Solution to UKCA & UMUI Tutorial 5 Task 5.2
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
As the ALICE (and BOB) tracers are being output as daily means to the pb/UPB stream, you can examine the output 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 should 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.
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 into a UKCA tracer.
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@
This gives the following (non-graphical) output:
Written by Luke Abraham 2013