Difference between revisions of "Solution to UKCA & UMUI Tutorial 9 Task 9.1"

From UKCA
Line 97: Line 97:
 
## Go to '''Profiles → Copy Profile → Copy time'''
 
## Go to '''Profiles → Copy Profile → Copy time'''
 
## You will now be asked for a new name to copy this profile to (e.g. '''TDYMUKCA''')
 
## You will now be asked for a new name to copy this profile to (e.g. '''TDYMUKCA''')
# Now select this new profile and edit it by going to '''Profiles → Edit Profile → Edit time'''
+
# Now select this new profile
  +
## Edit it by going to '''Profiles → Edit Profile → Edit time'''
 
## Set the '''Frequency (every)''' to '''3'''
 
## Set the '''Frequency (every)''' to '''3'''
 
## Change the '''Sampling offset''' to '''2'''
 
## Change the '''Sampling offset''' to '''2'''

Revision as of 11:22, 27 June 2013

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

Once you have added in your new user STASHmaster file, you can now output these diagnostics through the STASH panel, by placing entries in the STASH table. However, to do this properly you will need to make a new STASH Time Profile.

Go to Model Selection → Atmosphere → STASH → STASH. Specification of Diagnostics requirements to make these changes.

Create a new time profile

We want to output these diagnostics as daily means, but we cannot use the existing TDAYM time profile, as the sampling frequency is incorrect. We also don't want to alter the existing TDAYM profile as this will then affect all diagnostics currently outputted using this profile. To make the required changes you need to

  1. Select the TDAYM profile (it should now highlight yellow)
    1. Go to Profiles → Copy Profile → Copy time
    2. You will now be asked for a new name to copy this profile to (e.g. TDYMUKCA)
  2. Now select this new profile
    1. Edit it by going to Profiles → Edit Profile → Edit time
    2. Set the Frequency (every) to 3
    3. Change the Sampling offset to 2
    4. Click Close to save these changes

You have now created a new time profile with the correct sampling frequency for UKCA diagnostics.

Output the diagnostics

Output

Worked Solution


Written by Luke Abraham 2013