Difference between revisions of "Solution to UKCA & UMUI Tutorial 5 Task 5.2"
Line 12: | Line 12: | ||
===Code changes to 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 |
In '''ukca_setd1defs.F90''' you should scroll-down to the code block controlled by the |
||
Line 25: | Line 27: | ||
'C5H8 ','ALICE ','NO_aircrft'/) |
'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 |
||
+ | |||
+ | ==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: |
||
+ | |||
---- |
---- |
Revision as of 17:28, 20 June 2013
Back to the adding new chemical emissions tutorial
Task
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
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