Solution to UKCA & UMUI Tutorial 9 Task 9.1

From UKCA
Revision as of 11:00, 27 June 2013 by Nla27 (talk | contribs) (Created page with " Back to the adding new diagnostics tutorial ==Task== You were asked to <blockquote> Output diagnostics of the reactio…")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Back to the adding new diagnostics tutorial

Task

You were asked to

Output diagnostics of the reaction to STASH code 34461, the dry deposition of ALICE to STASH code 34462, and the wet deposition of BOB to 34463. They should be outputted as a daily mean to the pb/UPB stream.

and were given the hint

Remember to use the correct sampling frequency.

Solution

As well as making some code changes and making a new user STASHmaster file, you will also need to make some changes to the STASH table to output the diagnostics correctly.

Changes to asad_flux_dat.F90

The only code changes that need to be made are in asad_flux_dat.F90, where you will need to add the following diagnostic specification blocks

       asad_flux_defn('RXN',34461,'B',.FALSE.,0,3,                      &
       (/'ALICE     ','OH        '/),                                   &
       (/'BOB       ','          ','          ','          '/)),        &
       asad_flux_defn('DEP',34462,'D',.FALSE.,0,1,                      &
       (/'ALICE     ','          '/),                                   &
       (/'          ','          ','          ','          '/)),        &
       asad_flux_defn('DEP',34463,'W',.FALSE.,0,1,                      &
       (/'BOB       ','          '/),                                   &
       (/'          ','          ','          ','          '/))         &

It is probably best to make this as a separate array, rather than add this to the end of an existing array. You should then add this array into the asad_chemical_fluxes master array that holds all the possible diagnostics. You should also increase the n_chemical_fluxes integer by 3 to 235 to take account of these extra fluxes.

STASHmaster file

You will need to make a user STASHmaster file which looks like

H1| SUBMODEL_NUMBER=1
H2| SUBMODEL_NAME=ATMOS
H3| UM_VERSION=8.2
#
#|Model |Sectn | Item |Name                                |
#|Space |Point | Time | Grid |LevelT|LevelF|LevelL|PseudT|PseudF|PseudL|LevCom|
#| Option Codes                   | Version Mask         | Halo |
#|DataT |DumpP | PC1  PC2  PC3  PC4  PC5  PC6  PC7  PC8  PC9  PCA |
#|Rotate| PPF  | USER | LBVC | BLEV | TLEV |RBLEVV| CFLL | CFFF |
#
#===============================================================================
#
1|    1 |   34 |  461 |UKCA Tutorial: ALICE+OH->BOB Flux   |
2|    0 |    0 |    1 |    1 |    2 |   10 |   11 |    0 |    0 |    0 |    0 |
3| 000000000000000000000000000000 | 00000000000000000001 |    3 |
4|    1 |    0 | -99  -99  -99  -99  -99  -99  -99  -99  -99  -99 |
5|    0 | 1871 |    0 |   65 |    0 |    0 |    0 |    0 |    0 |
#
1|    1 |   34 |  462 |UKCA Tutorial: ALICE Dry Dep (3D)   |
2|    0 |    0 |    1 |    1 |    2 |   10 |   11 |    0 |    0 |    0 |    0 |
3| 000000000000000000000000000000 | 00000000000000000001 |    3 |
4|    1 |    0 | -99  -99  -99  -99  -99  -99  -99  -99  -99  -99 |
5|    0 | 1871 |    0 |   65 |    0 |    0 |    0 |    0 |    0 |
#
1|    1 |   34 |  463 |UKCA Tutorial: BOB Wet Dep (3D)     |
2|    0 |    0 |    1 |    1 |    2 |   10 |   11 |    0 |    0 |    0 |    0 |
3| 000000000000000000000000000000 | 00000000000000000001 |    3 |
4|    1 |    0 | -99  -99  -99  -99  -99  -99  -99  -99  -99  -99 |
5|    0 | 1871 |    0 |   65 |    0 |    0 |    0 |    0 |    0 |
#
#===============================================================================
#
1|   -1 |   -1 |   -1 |END OF FILE MARK                    |
2|    0 |    0 |    0 |    0 |    0 |    0 |    0 |    0 |    0 |    0 |    0 |
3| 000000000000000000000000000000 | 00000000000000000000 |    0 |
4|    0 |    0 | -99  -99  -99  -99  -30  -99  -99  -99  -99  -99 |
5|    0 |    0 |    0 |    0 |    0 |    0 |    0 |    0 |    0 |
#

This should be included in the UMUI in Model Selection → Atmosphere → STASH → User-STASHmaster files. Diags, Progs & Ancils and the three diagnostics should be initialised to zero (Option 3) in Model Selection → Atmosphere → STASH → Initialisation of User Prognostics.

An example STASHmaster file can be found at

/home/ukca/userprestash/VN8.2/Tutorial/Task9.1_Tutorial_Diags.presm

UMUI STASH table changes

Create a new time profile

Output the diagnostics

Output

Worked Solution


Written by Luke Abraham 2013