Diagnostics Manager Module & Saving model output
Summary
This module handles the writing of diagnostic output to netCDF files. The user can specify which fields should be output and at which temporal resolution (e.g. monthly means, daily means … ). The source code is located at src/shared/diag_manager/diag_manager.F90
.
Namelist options
Name |
Default |
Description |
---|---|---|
|
False |
Decides whether to append the pelist_name to file name |
|
False |
Allow both time average and instantaneous fields in the same output file |
|
31 |
Sets the maximum number of output files allowed |
|
300 |
Sets the maximum number of output fields allowed |
|
300 |
Sets the maximum number of input fields allowed |
|
60 |
Sets the maximum number of independent axes |
|
False |
to log the registration of the data field, put the OPTIONAL parameter
|
|
False |
Write out the number of bytes of data saved to this file |
|
False |
When set to true, bounds are checked in |
|
25 |
Set maximum number of axes for output (e.g. time and space axes) |
|
False |
Let the |
|
True |
If |
|
True |
If |
Diagnostics
This part of the code does not have its own diagnostics, but rather handles the saving of all variables. See also /src/extra/python/isca/diagtable.py
Output files
In order to save output in Isca, an output file is created first in your experiment runscript (see examples in /exp/test_cases/
). Commonly used output timesteps include monthly, daily or x-hourly.
diag.add_file('atmos_monthly', 30, 'days', time_units='days')
diag.add_file('atmos_daily', 1, 'days', time_units='days')
diag.add_file('atmos_6_hourly', 6, 'hours', time_units='hours')
The frequency at which data is saved can be set in the main_nml
:
'main_nml': {
'dt_atmos': 600,
'days': 30,
'calendar': 'thirty_day'
}
For example, set 'days': 15
and 'calendar': 'fifteen_day'
.
Output fields
An output field is created via diag.add_field(module, name, time_avg, files)
in the experiment runscript.
The default for time_avg
= False, the default for files
= None.
time_avg
is usually set to True for most variables when an output field is defined.
If files
= None, then the diagnostics will be saved to all of the given output files (in our example monthly, daily and 6h).
An output file can be specified via e.g. files=['atmos_6_hourly']
in
diag.add_field('dynamics', 'ucomp', time_avg=True, files=['atmos_6_hourly'])
if 6h zonal winds shall be saved, but not monthly/daily
Below is a list of commonly saved diagnostics. See the relevant modules for an exhaustive list of available diagnostics.
Module |
Name |
Dimensions |
Description |
Units |
---|---|---|---|---|
|
|
(time, lat, lon) |
surface pressure |
\(Pa\) |
|
|
(phalf) |
vertical coordinate sigma values |
\(Pa\) |
|
|
(phalf) |
vertical coordinate pressure values |
\(Pa\) |
|
|
(time, lat, lon) |
sea level pressure |
\(Pa\) |
|
|
(time, pfull, lat, lon) |
geopotential height at full model levels |
\(m\) |
|
|
(lat, lon) |
geopotential height at the surface |
\(m\) |
|
|
(time, pfull, lat, lon) |
zonal component of the horizontal winds |
\(m/s\) |
|
|
(time, pfull, lat, lon) |
meridional component of the horizontal winds |
\(m/s\) |
|
|
(time, pfull, lat, lon) |
vertical velocity |
\(Pa/s\) |
|
|
(time, pfull, lat, lon) |
specific humidity |
\(kg/kg\) |
|
|
(time, pfull, lat, lon) |
temperature |
\(K\) |
|
|
(time, pfull, lat, lon) |
vorticity |
\(1/s\) |
|
|
(time, pfull, lat, lon) |
divergence |
\(1/s\) |
|
|
(time, lat, lon) |
precipitation from resolved, parameterised and snow |
\(kg/(m^2 s)\) |
|
|
(time, pfull, lat, lon) |
relative humidity |
\(\%\) |
|
|
(time, lat, lon) |
surface temperature |
\(K\) |
|
|
(time, lat, lon) |
sensible heat flux at the surface (up) |
\(W/m^2\) |
|
|
(time, lat, lon) |
latent heat flux at the surface (up) |
\(W/m^2\) |
|
|
(time, lat, lon) |
net shortwave flux at the surface (down) |
\(W/m^2\) |
|
|
(time, lat, lon) |
longwave flux at the surface (down only) |
\(W/m^2\) |
Relevant modules and subroutines
The diag_manager_mod
uses several modules and subroutines, including
diag_axis
diag_grid
diag_output
diag_util
diag_data
diag_table