-
Notifications
You must be signed in to change notification settings - Fork 59
MOM6 diagnostic vertical remapping
This page outlines work done to allow MOM6 diagnostics to be vertically regridded at runtime onto one or more of the grids supported by the MOM6 ALE module.
MOM6 has a generalised vertical coordinate however until recently it was only possible to output diagnostics in either 'model' or, for a limited number of diagnostics, z* coordinates. This feature uses existing code/functionality within MOM6 to allow diagnostics to be output in any one of the supported vertical coordinates. Presently this includes z*, rho and sigma coordinates. HYCOM and slight coordinates will also be supported in the future.
A requirement of this feature was to minimize changes to programming and user interfaces. The API for registering and posting diagnostics from within MOM6 has not changed, and is done with the following calls:
diag_id = register_diag_field(model_name, diag_name, axes, ...)
call post_data(diag_id, data, diag_control)
On the call to register_diag_field()
the FMS infrastructure is used to check which (if any) vertical coordinates have been requested for the diagnostic. If regridding is required then the necessary target grids and vertical axes will be configured.
When a diagnostic is posted then the ALE module is used to regrid or interpolate data to the necessary target grids before passing to FMS for buffering/writing out.
Before a diagnostic can be regridded it's target coordinate must be defined. For example, in the case of z* coordinates the depth of nominal interfaces must be specified, and in the case of rho coordinates the density of target layers need to be given. Presently this is done from within the MOM_input
configuration file using the DIAG_REMP_<COORD>_GRID_DEF
option, where <COORD>
is one of Z, RHO, SIGMA
. Below is an excerpt from the model documentation.
DIAG_REMAP_Z_GRID_DEF = "FILE:OM3_zgrid.nc,zw,zt" ! default = ""
! This sets the file and variable names that define the
! vertical grid used for diagnostic output remapping.
! It should look like:
! FILE:<file>,<varI>,<varL> - where <file> is a file within
! the INPUTDIR, <varI> is
! the name of the variable that
! contains interface positions,
! <varL> is the name of the variable
! that contains layer positions,
! UNIFORM - vertical grid is uniform
! between surface and max depth.
MOM6 uses the diag_table
to specify which diagnostics will be written out. To request that a diagnostic be regridded a suffix is appended to the diagnostic model name. Currently supported suffixes are: _z, _rho, _sigma
. So, for example, to output the temp
diagnostics in both model and z* coordinates one would have the following entries in the diag_table
:
"ocean_model", 0, "seconds", 1, "seconds","time"
"ocean_model_z", 0, "seconds", 1, "seconds","time"
"ocean_model", "temp", "temp", "ocean_model", "all",.false., "none", 2
"ocean_model_z", "temp", "temp", "ocean_model_z", "all",.false., "none", 2
- The creation of vertical grids by the ALE module has been 'kernelised', meaning that rather than grids being made for the whole domain in a single call it is now done on a per-column basis. This was done to allow the diagnostic regridder to create
- A new module diag_remap was created. It is responsible for runtime remapping of diagnostics and defines remapping types for all supported vertical coordinates.
- Extensive modifications to the
diag_mediator
were made to support transparent registering and posting of new diagnostics. - The model source code was updated in various places with calls to
diag_update_remap_grids()
. This is because the diagnostic target grids may need to be updated whenever sea surface height or the density profile changes. When the model is run inDEBUG
mode checks exists to ensure that the target grids are updated appropriately.
There are currently several tests for this feature. They can be found under the title MOM6_diagnostics on the ARCCSS MOM6 Jenkins page. The tests include:
- Check that all diagnostics available for a particular model configuration can in fact be output.
- Check similarity between new z* diagnostics created by this feature and the ‘old z*’ diagnostics which are created using specialised remapping code.
- Check similarity of some diagnostics between the new RHO diagnostics and the model ‘layer’ diags.
- The performance impact of this feature needs to be quantified.
- The target coordinate configuration should be improved.
It is now possible to regrid / interpolate any MOM6 diagnostic from model coordinates to zstar, rho or sigma coordinates simply by configuring the new target coordinate and adding an entry in the diag_table
.