Difference between revisions of "UKCA & UMUI Tutorial 9"
Line 11: | Line 11: | ||
Within the '''asad_flux_dat.F90''' module the diagnostics are defined in blocks with the format |
Within the '''asad_flux_dat.F90''' module the diagnostics are defined in blocks with the format |
||
− | asad_flux_defn(<span style="color:blue">'Diagnostic type'</span>,<span style="color:red">STASH code</span>,<span style="color:blue">'Diagnostic specification'</span>,<span style="color: |
+ | asad_flux_defn(<span style="color:blue">'Diagnostic type'</span>,<span style="color:red">STASH code</span>,<span style="color:blue">'Diagnostic specification'</span>,<span style="color:brown">Mask</span>,Reaction number,<span style="color:purple">Number of species</span>, & |
(/'<span style="color:purple">Species</span>/<span style="color:green">Reactant 1</span>','<span style="color:green">Reactant 2</span>'/), & |
(/'<span style="color:purple">Species</span>/<span style="color:green">Reactant 1</span>','<span style="color:green">Reactant 2</span>'/), & |
||
(/'<span style="color:green">Product 1</span>','<span style="color:green">Product 2</span>','<span style="color:green">Product 3</span>','<span style="color:green">Product 4</span>'/)), & |
(/'<span style="color:green">Product 1</span>','<span style="color:green">Product 2</span>','<span style="color:green">Product 3</span>','<span style="color:green">Product 4</span>'/)), & |
Revision as of 10:12, 26 June 2013
Adding New Diagnostics
If you are using one of the chemistry schemes that uses ASAD (e.g. CheT/TropIsop, CheS/Strat, CheST/StratTrop) then you can make use of the ASAD Reaction Flux Diagnostics module (held in asad_chem_flux_diags.F90). These allow you to straight-forwardly out new reaction and deposition fluxes.
To output new diagnostics you will first need to define them in the asad_flux_dat.F90 module, and then create a new STASHmaster file for them.
Flux Definitions in asad_flux_dat.F90
Within the asad_flux_dat.F90 module the diagnostics are defined in blocks with the format
asad_flux_defn('Diagnostic type',STASH code,'Diagnostic specification',Mask,Reaction number,Number of species, & (/'Species/Reactant 1','Reactant 2'/), & (/'Product 1','Product 2','Product 3','Product 4'/)), &
Which have the following meaning:
Diagnostic Type
This is a three character string which defines what type of diagnostic is being requested. This can take the values
- RXN to output the flux through a reaction (in moles/gridcell/s)
- DEP to output the deposition flux of a species (in moles/gridcell/s)
- EMS to output the emission flux into a species (in moles/gridcell/s)
- NET to output the net chemical tendency of a species (in moles/gridcell/s)
- STE to output the net dynamical tendency of a species (in moles/gridcell/s)
- MAS to output the mass of the atmosphere (in kg/gridcell)
- PSC to output polar stratospheric cloud diagnostics (1 when the gridcell contains a PSC, 0 otherwise - monthly mean field will be a fraction in range 0 → 1)
- TPM to output the tropospheric mask (1 for troposphere, 0 otherwise - monthly mean field will be a fraction in range 0 → 1)
- OUT to output a tracer in mmr. Only really useful if the field is masked to give the tropospheric concentration only (see the discussion of the Mask option)
- RTE to output the rate of a reaction (in gridcell/s)
STASH Code
This is a 5 digit integer defining the STASH code that the diagnostic will be outputted to. Currently this must be in section 34.
Diagnostic Specification
This is a one character string which is needed to further define what diagnostic is required. If it isn't needed then it should just be set to X or left blank.
- RXN
- B to output the flux through a bimolecular reaction
- T to output the flux through a termolecular reaction
- H to output the flux through a heterogeneous reaction
- J to output the flux through a photolysis reaction
- DEP
- D to output the dry deposition flux
- W to output the wet deposition flux
- EMS
- S to output a surface emission (2D)
- A to output aircraft emissions (3D)
- L to output lightning emissions (3D)
- V to output volcanic SO2 emissions (3D)
- T to output SO2 emissions (3D)
- PSC
- 1 to output the fraction of Type 1 PSCs
- 2 to output the fraction of Type 2 PSCs
- RTE
- B to output the rate of a bimolecular reaction
- T to output the rate of a termolecular reaction
- H to output the rate of a heterogeneous reaction
- J to output the rate of a photolysis reaction
Mask
This is a logical which defines whether only the tropospheric values of the diagnostic are outputted (.TRUE.) or not (.FALSE.). It is calculated every timestep.
For the STE diagnostic this is required if you wish to output the diagnosed stratosphere-troposphere exchange of a species. For the OUT diagnostic this can be used to output only the tropospheric concentration of a tracer. This is also used in the calculation of the of the TPM diagnostic.
Reaction number
This is an integer, and should only be used in the special case of there being two (or more) reactions with the exactly the same reactants and products, but with different rate coefficients. In this case the first reaction in the list would be given number 1 and the second 2 etc. If this is not needed then it should be set to 0 (which will be usual for most reactions).
Number of Species
This is an integer, and should give the total number of species, so this will be 1 for diagnostics such as DEP, STE, NET etc., which only consider a single species, and the total number of reactants and products for diagnostics RXN and RTE.
Species
This is a 10-character string giving the exact name of the species that the diagnostic should be considered for (including capitalisation). This is only used for the DEP, EMS, NET, STE, and OUT. For the RXN and RTE diagnostics the full list of reactants and products should be given (see below). For the MAS, PSC, and TPM diagnostics this isn't needed and could either be set to XXX or left blank. If it is needed the other reactant/product slots should be left blank.
Reactants and Products
These are 10-character strings, and should be as the reaction is defined in the ukca_chem_scheme.F90 modules.
Written by Luke Abraham 2013