Difference between revisions of "UKCA Chemistry and Aerosol vn10.4 Tutorial 3"

From UKCA
Line 15: Line 15:
   
 
In the following page you will learn more about how the Unified Model's output is organised and managed. You should use this information to complete the task above. A [[#Solution to Task 3.1|worked solution]] is provided at the end of the tutorial.
 
In the following page you will learn more about how the Unified Model's output is organised and managed. You should use this information to complete the task above. A [[#Solution to Task 3.1|worked solution]] is provided at the end of the tutorial.
  +
  +
==What is STASH?==
  +
  +
''STASH'' is the Unified Model's storage handling and diagnostic system. It is designed to cope with the many different configurations that the UM can be used in, but still provide output in a consistent and standard way. A full technical description of STASH can be found in '''Unified Model Documentation Paper C4''' which can be downloaded from the [http://collab.metoffice.gov.uk/twiki/pub/Support/Umdp Met Office Collaboration Twiki (password required)].
  +
  +
===Prognostic and Diagnostic Fields===
  +
  +
The UM considers variables (or ''fields'') to be of two different types, ''prognostic'' or ''diagnostic''. '''Prognostic''' fields are ones which the model must have values for, prior to each timestep, as the equations of motion the model solves require these fields (these are fields such as specific humidity or potential temperature) so they must exist in the model start dump. '''Diagnostic''' fields are all other fields that are derived from prognostic ones, and as such the model does not need to have prior values for these. Ancillary files (such as emissions, SSTs etc) contain prognostic fields.
  +
  +
From a user's perspective, STASH is used to output fields during the run, and from this point of view it does not matter if these are prognostic or diagnostic fields. However, you will need to consider these differences when you [[UKCA_Chemistry_and_Aerosol_Tutorial_4 | add new chemical tracers]].
  +
  +
===STASH Sections and Items===
  +
  +
Each field that is considered by STASH has a unique address which is given by a '''section''' and an '''item''' number. Prognostic fields are mostly held in section 0 (with the exception of tracers) and diagnostics are organised by areas of the code, e.g. short-wave radiation diagnostics are held in section 1, long-wave radiation diagnostics are held in section 2 etc. Some sections will always be on, and some sections will only be on if a certain process is selected, e.g. the interactive land-surface scheme. Each section can hold up to 512 items, where each item is a separate prognostic or diagnostic field, and can be either 2D or 3D.
  +
  +
Each field has its own entry in a '''STASHmaster file'''. There is a master list of fields which is held in the ''STASHmaster_A'' file, which is located at
  +
   
 
==STASH Panel==
 
==STASH Panel==
Line 20: Line 37:
 
[[Image:rose_stash_001.png|thumb|300px|right|Figure 1: The STASH panel in Rose.]]
 
[[Image:rose_stash_001.png|thumb|300px|right|Figure 1: The STASH panel in Rose.]]
 
The STASH panel can be found at '''um <math>\rightarrow</math> namelist <math>\rightarrow</math> Model Input and Output <math>\rightarrow</math> STASH Requests and Profiles <math>\rightarrow</math> STASH Requests'''.
 
The STASH panel can be found at '''um <math>\rightarrow</math> namelist <math>\rightarrow</math> Model Input and Output <math>\rightarrow</math> STASH Requests and Profiles <math>\rightarrow</math> STASH Requests'''.
  +
  +
It is usually intially sorted by section/item numbers, but you can change the ordering by clicking on the items on the bar at the top (e.g. '''use_name'''). This can be helpful to see which items are going to which output stream.
   
 
Add in
 
Add in

Revision as of 16:37, 22 November 2016

UKCA Chemistry and Aerosol Tutorials at vn10.4

When using the UM, it is likely that you will want to add new diagnostics, and we will cover writing out chemical fluxes in a later tutorial. Here we will cover selecting new diagnostics in STASH.

Task 3.1: add new output

TASK 3.1: Output the daily-mean UKCA ozone field to the UPK, and then add-in the same diagnostic on pressure levels using the DP36CCM domain.

In the following page you will learn more about how the Unified Model's output is organised and managed. You should use this information to complete the task above. A worked solution is provided at the end of the tutorial.

What is STASH?

STASH is the Unified Model's storage handling and diagnostic system. It is designed to cope with the many different configurations that the UM can be used in, but still provide output in a consistent and standard way. A full technical description of STASH can be found in Unified Model Documentation Paper C4 which can be downloaded from the Met Office Collaboration Twiki (password required).

Prognostic and Diagnostic Fields

The UM considers variables (or fields) to be of two different types, prognostic or diagnostic. Prognostic fields are ones which the model must have values for, prior to each timestep, as the equations of motion the model solves require these fields (these are fields such as specific humidity or potential temperature) so they must exist in the model start dump. Diagnostic fields are all other fields that are derived from prognostic ones, and as such the model does not need to have prior values for these. Ancillary files (such as emissions, SSTs etc) contain prognostic fields.

From a user's perspective, STASH is used to output fields during the run, and from this point of view it does not matter if these are prognostic or diagnostic fields. However, you will need to consider these differences when you add new chemical tracers.

STASH Sections and Items

Each field that is considered by STASH has a unique address which is given by a section and an item number. Prognostic fields are mostly held in section 0 (with the exception of tracers) and diagnostics are organised by areas of the code, e.g. short-wave radiation diagnostics are held in section 1, long-wave radiation diagnostics are held in section 2 etc. Some sections will always be on, and some sections will only be on if a certain process is selected, e.g. the interactive land-surface scheme. Each section can hold up to 512 items, where each item is a separate prognostic or diagnostic field, and can be either 2D or 3D.

Each field has its own entry in a STASHmaster file. There is a master list of fields which is held in the STASHmaster_A file, which is located at


STASH Panel

Figure 1: The STASH panel in Rose.

The STASH panel can be found at um namelist Model Input and Output STASH Requests and Profiles STASH Requests.

It is usually intially sorted by section/item numbers, but you can change the ordering by clicking on the items on the bar at the top (e.g. use_name). This can be helpful to see which items are going to which output stream.

Add in

  1. UKCA Ozone on model theta levels daily mean to UPK
  2. Turn on pressure level diagnostics in UKCA panel (need for this will be retired at a later version)
  3. UKCA Ozone on pressure levels (DP36CCM) daily mean to UPK
  4. Heaviside Function on same pressure levels from s50 daily mean to UPK
  5. Change periodic re-init of UPK (pp10) to 1 day from 90 (not needed to fit files, but better for file management)
  • Remember to run the stashindicies.TidyStashTransform macro!

Solution to Task 3.1

See u-ag308@21303

Time for re-run of fcm_make2_um = ~00:02:00

[16:50:53 luke@eslogin007 History_Data]$ convsh
convsh1.93 % readfile 0 ag308a.pk19880901
file ag308a.pk19880901 is a byte swapped 64 bit ieee um file 
 
convsh1.93 % list_fields 

 0    : 192   144   36    1     O3 MASS MIXING RATIO
 1    : 192   144   36    1     Molar flux density
 2    : 192   144   85    1     O3 MASS MIXING RATIO

convsh1.93 % 

See sample output in /work/n02/n02/ukca/Tutorial/vn10.4/sample_output/Task3.1



Written by Luke Abraham 2016