Solution to UKCA & UMUI Tutorial 4 Task 4.1

From UKCA
Revision as of 10:53, 21 June 2013 by Nla27 (talk | contribs)

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.

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_StratTrop.prestash user STASHmaster file, which can be found at

/home/ukca/userprestash/VN8.2/UKCA_Tr_StratTrop.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.2/Tutorial/Task4.1_UKCA_Tr_StratTrop.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,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,0,0,
 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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=74,

You can make a hand-edit file like this

# Hand edit to add tracers for UKCA tutorial
# vn8.2  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,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,0,0,
 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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

ed SIZES<<\EOF
/TR_UKCA=/
d
i
 TR_UKCA=74,
.
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.2/Tutorial/Task4.1_add_UKCA_Tr_StratTrop.ed

Add your hand-edit to the UMUI at Model Selectiom → 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   UPB      Y +  N X  
34  65 UKCA TUTORIAL TRACER: BOB           TDAYM    DALLTH   UPB      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,UPB)
  DIAGNOSTIC    ERROR: Diagnostic is not available for this model configuration.
Diag: "UKCA TUTORIAL TRACER: BOB           " (34,65) (TDAYM,DALLTH,UPB)
  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).

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 2013