Solution to UKCA Chemistry and Aerosol Tutorial 4 Task 4.1

From UKCA
Revision as of 15:03, 26 February 2014 by Nla27 (talk) (Output)

Back to UKCA Chemistry and Aerosol Tutorials

Back to the adding new chemical tracers tutorial

Task

You were asked to

Add in two new tracers in to slots 64 and 65. The tracer in slot 64 will be called ALICE and the tracer in slot 65 will be called BOB. You should also output these two tracers through the pa/UPA stream in STASH as daily means.

Solution

1. The user STASHmaster file

Go to Model Selection → Atmosphere → STASH → User-STASHmaster files. Diags, Progs & Ancills.. In this panel you will see that a number of user STASHmaster files listed. The one containing the tracers is UKCA_Tr_StratTrop.prestash.

Take a copy of the UKCA_Tr_StratTropAeroMODE.prestash user STASHmaster file, which can be found at

/home/ukca/userprestash/VN8.4/UKCA_Tr_StratTropAeroMODE.prestash

on PUMA, and copy it to your own directory. Edit this file to add the lines

#
1|    1 |   34 |   64 |UKCA TUTORIAL TRACER: ALICE         |
2|    2 |    0 |    1 |    1 |    2 |   10 |   11 |    0 |    0 |    0 |    0 |
3| 000000000000000000000000000064 | 00000000000000000001 |    1 |
4|    1 |    0 | -99  -99  -99  -99  -99  -99  -99  -99  -99  -99 |
5|    0 | 1861 |    0 |   65 |    0 |    0 |    0 |    0 |    0 |
#
1|    1 |   34 |   65 |UKCA TUTORIAL TRACER: BOB           |
2|    2 |    0 |    1 |    1 |    2 |   10 |   11 |    0 |    0 |    0 |    0 |
3| 000000000000000000000000000065 | 00000000000000000001 |    1 |
4|    1 |    0 | -99  -99  -99  -99  -99  -99  -99  -99  -99  -99 |
5|    0 | 1861 |    0 |   65 |    0 |    0 |    0 |    0 |    0 |
#

An example file can be found at

/home/ukca/userprestash/VN8.4/Tutorial/Task4.1_UKCA_Tr_StratTropAeroMODE.prestash

2. Initialise the new tracers

Go to Model Selection → Atmosphere → STASH → Initialisation of User Prognostics, scroll down the list of variables until you find your new tracers and set these to option 3 (i.e. zero).

3. Add the hand-edit

Run the /home/ukca/bin/make_tracer_list script on your user STASHmaster file to produce the following output

TC_UKCA=1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,0,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,0,1,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,
1,1,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,0,0,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,0,1,1,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,1,1,
TR_UKCA=106,

You can make a hand-edit file like this

# Hand edit to add tracers for UKCA tutorial
# vn8.4  64:ALICE, 65:BOB

ed SIZES<<\EOF
/TC_UKCA=/
d
d
d
d
d
i
 TC_UKCA=1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
 1,0,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,0,1,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,
 1,1,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,0,0,1,1,1,1,1,
 1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,0,1,1,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
 0,0,0,0,0,0,0,1,1,
.
w
q
EOF


and make this script executable (chmod a+rx script.ed).

An example of this hand-edit can be found at

/home/ukca/hand_edits/VN8.4/Tutorial/Task4.1_add_UKCA_Tr_StratTropAeroMODE.ed

Add your hand-edit to the UMUI at Model Selection → 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.

Changes to STASH

Go to the STASH panel at Model Selection → Atmosphere → STASH → STASH. Specification of Diagnostic requirements and go to Diagnostics → Load New Diagnostics and scroll down the list until you come to section 34 and double-click where it says UKCA Chemistry. Scroll down the list until you get to the ALICE and BOB tracers, and add them to STASH like so

34  64 UKCA TUTORIAL TRACER: ALICE         TDAYM    DALLTH   UPA      Y +  N X  
34  65 UKCA TUTORIAL TRACER: BOB           TDAYM    DALLTH   UPA      Y +  N X

You will see that the final two columns say N (Avail) and X (I+P+A). This is because STASH thinks that these tracers are not available as they are not turned on until the Process stage when the hand-edit defined above is applied. Also, if you verify diagnostics you get the following warning

Diag: "UKCA TUTORIAL TRACER: ALICE         " (34,64) (TDAYM,DALLTH,UPA)
  DIAGNOSTIC    ERROR: Diagnostic is not available for this model configuration.
Diag: "UKCA TUTORIAL TRACER: BOB           " (34,65) (TDAYM,DALLTH,UPA)
  DIAGNOSTIC    ERROR: Diagnostic is not available for this model configuration.

However, you should not worry about this, as the tracers are available and will be output. However, they will contain zeros as nothing has been placed into them (yet).

Note: If you find that you get this error message, but with different names (although the section and item numbers are the same) then you should save your job and close it. Now when you re-open it and open the STASH panel again you will find that the names have been updated. This occurs because STASH only reads the user STASHmaster files the first time the panel is opened (in that job instance) so you must re-load the job for the changes to properly take effect.

Output

If you open a pa file in your job directory you will find that it now contains the 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

If you open 34064 and 34065 you will find that they only contain zeros.

Sample output from this job can be found in

/work/n02/n02/ukca/Tutorial/vn8.4/sample_output/Task4.1/

on ARCHER, and in

/projects/ukca/Tutorial/vn8.4/sample_ouput/Task4.1/

on MONSooN.

Worked Solution

There is a worked solution to this problem in the UMUI Tutorial experiment. This is job c: Tutorial: solution to Task 4.1 - adding new chemical tracers to the UMUI.


Written by Luke Abraham 2014