MOM6
|
This module is used for runtime remapping of diagnostics to z star, sigma and rho vertical coordinates. It defines the diag_remap_ctrl type which represents a remapping of diagnostics to a particular vertical coordinate. The module is used by the diag mediator module in the following way: 1) _init() is called to initialise a diag_remap_ctrl instance. 2) _configure_axes() is called to read the configuration file and set up the vertical coordinate / axes definitions. 3) _get_axes_info() returns information needed for the diag mediator to define new axes for the remapped diagnostics. 4) _update() is called periodically (whenever h, T or S change) to either create or update the target remapping grids. 5) _do_remap() is called from within a diag post() to do the remapping before the diagnostic is written out.
Data Types | |
type | diag_remap_ctrl |
This type represents remapping of diagnostics to a particular vertical coordinate. There is one of these types for each vertical coordinate. The vertical axes of a diagnostic will reference an instance of this type indicating how (or if) the diagnostic should be vertically remapped when being posted. More... | |
Functions/Subroutines | |
subroutine, public | diag_remap_init (remap_cs, coord_tuple) |
Initialize a diagnostic remapping type with the given vertical coordinate. More... | |
subroutine, public | diag_remap_end (remap_cs) |
De-init a diagnostic remapping type. Free allocated memory. More... | |
subroutine, public | diag_remap_diag_registration_closed (remap_cs) |
Inform that all diagnostics have been registered. If _set_active() has not been called on the remapping control structure will be disabled. This saves time in the case that a vertical coordinate was configured but no diagnostics which use the coordinate appeared in the diag_table. More... | |
subroutine, public | diag_remap_set_active (remap_cs) |
Indicate that this remapping type is actually used by the diag manager. If this is never called then the type will be disabled to save time. See further explanation with diag_remap_registration_closed. More... | |
subroutine, public | diag_remap_configure_axes (remap_cs, GV, param_file) |
Configure the vertical axes for a diagnostic remapping control structure. Reads a configuration parameters to determine coordinate generation. More... | |
subroutine, public | diag_remap_get_axes_info (remap_cs, nz, id_layer, id_interface) |
Get layer and interface axes ids for this coordinate Needed when defining axes groups. More... | |
logical function, public | diag_remap_axes_configured (remap_cs) |
Whether or not the axes for this vertical coordinated has been configured. Configuration is complete when diag_remap_configure_axes() has been successfully called. More... | |
subroutine, public | diag_remap_update (remap_cs, G, h, T, S, eqn_of_state) |
Build/update target vertical grids for diagnostic remapping. More... | |
subroutine, public | diag_remap_do_remap (remap_cs, G, h, staggered_in_x, staggered_in_y, mask, missing_value, field, remapped_field) |
Remap diagnostic field to alternative vertical grid. More... | |
subroutine, public | vertically_reintegrate_diag_field (remap_cs, G, h, staggered_in_x, staggered_in_y, mask, missing_value, field, reintegrated_field) |
Vertically re-grid an already vertically-integrated diagnostic field to alternative vertical grid. More... | |
subroutine, public | vertically_interpolate_diag_field (remap_cs, G, h, staggered_in_x, staggered_in_y, mask, missing_value, field, interpolated_field) |
Vertically interpolate diagnostic field to alternative vertical grid. More... | |
subroutine, public | horizontally_average_diag_field (G, h, staggered_in_x, staggered_in_y, is_layer, is_extensive, missing_value, field, averaged_field) |
Horizontally average field. More... | |
logical function, public mom_diag_remap::diag_remap_axes_configured | ( | type(diag_remap_ctrl), intent(in) | remap_cs | ) |
Whether or not the axes for this vertical coordinated has been configured. Configuration is complete when diag_remap_configure_axes() has been successfully called.
Definition at line 210 of file MOM_diag_remap.F90.
subroutine, public mom_diag_remap::diag_remap_configure_axes | ( | type(diag_remap_ctrl), intent(inout) | remap_cs, |
type(verticalgrid_type), intent(in) | GV, | ||
type(param_file_type), intent(in) | param_file | ||
) |
Configure the vertical axes for a diagnostic remapping control structure. Reads a configuration parameters to determine coordinate generation.
[in,out] | remap_cs | Diag remap control structure |
[in] | gv | ocean vertical grid structure |
[in] | param_file | Parameter file structure |
Definition at line 136 of file MOM_diag_remap.F90.
References regrid_consts::coordinatemode(), and mom_string_functions::lowercase().
subroutine, public mom_diag_remap::diag_remap_diag_registration_closed | ( | type(diag_remap_ctrl), intent(inout) | remap_cs | ) |
Inform that all diagnostics have been registered. If _set_active() has not been called on the remapping control structure will be disabled. This saves time in the case that a vertical coordinate was configured but no diagnostics which use the coordinate appeared in the diag_table.
[in,out] | remap_cs | Diag remapping control structure |
Definition at line 115 of file MOM_diag_remap.F90.
References diag_remap_end().
subroutine, public mom_diag_remap::diag_remap_do_remap | ( | type(diag_remap_ctrl), intent(in) | remap_cs, |
type(ocean_grid_type), intent(in) | G, | ||
real, dimension(:,:,:), intent(in) | h, | ||
logical, intent(in) | staggered_in_x, | ||
logical, intent(in) | staggered_in_y, | ||
real, dimension(:,:,:), pointer | mask, | ||
real, intent(in) | missing_value, | ||
real, dimension(:,:,:), intent(in) | field, | ||
real, dimension(:,:,:), intent(inout) | remapped_field | ||
) |
Remap diagnostic field to alternative vertical grid.
[in] | remap_cs | Diagnostic coodinate control structure |
[in] | g | Ocean grid structure |
[in] | h | The current thicknesses |
[in] | staggered_in_x | True is the x-axis location is at u or q points |
[in] | staggered_in_y | True is the y-axis location is at v or q points |
mask | A mask for the field | |
[in] | missing_value | A missing_value to assign land/vanished points |
[in] | field | The diagnostic field to be remapped |
[in,out] | remapped_field | Field remapped to new coordinate |
Definition at line 286 of file MOM_diag_remap.F90.
References mom_error_handler::assert(), regrid_consts::coordinatemode(), and mom_remapping::remapping_core_h().
subroutine, public mom_diag_remap::diag_remap_end | ( | type(diag_remap_ctrl), intent(inout) | remap_cs | ) |
De-init a diagnostic remapping type. Free allocated memory.
[in,out] | remap_cs | Diag remapping control structure |
Definition at line 98 of file MOM_diag_remap.F90.
Referenced by diag_remap_diag_registration_closed().
subroutine, public mom_diag_remap::diag_remap_get_axes_info | ( | type(diag_remap_ctrl), intent(in) | remap_cs, |
integer, intent(out) | nz, | ||
integer, intent(out) | id_layer, | ||
integer, intent(out) | id_interface | ||
) |
Get layer and interface axes ids for this coordinate Needed when defining axes groups.
[in] | remap_cs | Diagnostic coordinate control structure |
[out] | nz | Number of vertical levels for the coordinate |
[out] | id_layer | 1D-axes id for layer points |
[out] | id_interface | 1D-axes id for interface points |
Definition at line 194 of file MOM_diag_remap.F90.
subroutine, public mom_diag_remap::diag_remap_init | ( | type(diag_remap_ctrl), intent(inout) | remap_cs, |
character(len=*), intent(in) | coord_tuple | ||
) |
Initialize a diagnostic remapping type with the given vertical coordinate.
[in,out] | remap_cs | Diag remapping control structure |
[in] | coord_tuple | A string in form of MODULE_SUFFIX PARAMETER_SUFFIX COORDINATE_NAME |
Definition at line 80 of file MOM_diag_remap.F90.
References regrid_consts::coordinatemode(), and mom_string_functions::extractword().
subroutine, public mom_diag_remap::diag_remap_set_active | ( | type(diag_remap_ctrl), intent(inout) | remap_cs | ) |
Indicate that this remapping type is actually used by the diag manager. If this is never called then the type will be disabled to save time. See further explanation with diag_remap_registration_closed.
[in,out] | remap_cs | Diag remapping control structure |
Definition at line 127 of file MOM_diag_remap.F90.
subroutine, public mom_diag_remap::diag_remap_update | ( | type(diag_remap_ctrl), intent(inout) | remap_cs, |
type(ocean_grid_type), pointer | G, | ||
real, dimension(:, :, :), intent(in) | h, | ||
real, dimension(:, :, :), intent(in) | T, | ||
real, dimension(:, :, :), intent(in) | S, | ||
type(eos_type), intent(in), pointer | eqn_of_state | ||
) |
Build/update target vertical grids for diagnostic remapping.
[in,out] | remap_cs | Diagnostic coordinate control structure |
g | The ocean's grid type | |
[in] | s | New thickness, T and S |
[in] | eqn_of_state | A pointer to the equation of state |
Definition at line 223 of file MOM_diag_remap.F90.
References coord_rho::build_rho_column(), coord_sigma::build_sigma_column(), coord_zlike::build_zstar_column(), regrid_consts::coordinatemode(), mom_regridding::get_rho_cs(), mom_regridding::get_sigma_cs(), mom_regridding::get_zlike_cs(), and mom_error_handler::mom_error().
subroutine, public mom_diag_remap::horizontally_average_diag_field | ( | type(ocean_grid_type), intent(in) | G, |
real, dimension(:,:,:), intent(in) | h, | ||
logical, intent(in) | staggered_in_x, | ||
logical, intent(in) | staggered_in_y, | ||
logical, intent(in) | is_layer, | ||
logical, intent(in) | is_extensive, | ||
real, intent(in) | missing_value, | ||
real, dimension(:,:,:), intent(in) | field, | ||
real, dimension(:), intent(inout) | averaged_field | ||
) |
Horizontally average field.
[in] | g | Ocean grid structure |
[in] | h | The current thicknesses |
[in] | staggered_in_x | True if the x-axis location is at u or q points |
[in] | staggered_in_y | True if the y-axis location is at v or q points |
[in] | is_layer | True if the z-axis location is at h points |
[in] | is_extensive | True if the z-direction is spatially integrated (over layers) |
[in] | missing_value | A missing_value to assign land/vanished points |
[in] | field | The diagnostic field to be remapped |
[in,out] | averaged_field | Field argument horizontally averaged |
Definition at line 517 of file MOM_diag_remap.F90.
References mom_error_handler::assert().
Referenced by mom_diag_mediator::post_xy_average().
subroutine, public mom_diag_remap::vertically_interpolate_diag_field | ( | type(diag_remap_ctrl), intent(in) | remap_cs, |
type(ocean_grid_type), intent(in) | G, | ||
real, dimension(:,:,:), intent(in) | h, | ||
logical, intent(in) | staggered_in_x, | ||
logical, intent(in) | staggered_in_y, | ||
real, dimension(:,:,:), pointer | mask, | ||
real, intent(in) | missing_value, | ||
real, dimension(:,:,:), intent(in) | field, | ||
real, dimension(:,:,:), intent(inout) | interpolated_field | ||
) |
Vertically interpolate diagnostic field to alternative vertical grid.
[in] | remap_cs | Diagnostic coodinate control structure |
[in] | g | Ocean grid structure |
[in] | h | The current thicknesses |
[in] | staggered_in_x | True is the x-axis location is at u or q points |
[in] | staggered_in_y | True is the y-axis location is at v or q points |
mask | A mask for the field | |
[in] | missing_value | A missing_value to assign land/vanished points |
[in] | field | The diagnostic field to be remapped |
[in,out] | interpolated_field | Field argument remapped to alternative coordinate |
Definition at line 444 of file MOM_diag_remap.F90.
References mom_error_handler::assert(), and mom_diag_vkernels::interpolate_column().
subroutine, public mom_diag_remap::vertically_reintegrate_diag_field | ( | type(diag_remap_ctrl), intent(in) | remap_cs, |
type(ocean_grid_type), intent(in) | G, | ||
real, dimension(:,:,:), intent(in) | h, | ||
logical, intent(in) | staggered_in_x, | ||
logical, intent(in) | staggered_in_y, | ||
real, dimension(:,:,:), pointer | mask, | ||
real, intent(in) | missing_value, | ||
real, dimension(:,:,:), intent(in) | field, | ||
real, dimension(:,:,:), intent(inout) | reintegrated_field | ||
) |
Vertically re-grid an already vertically-integrated diagnostic field to alternative vertical grid.
[in] | remap_cs | Diagnostic coodinate control structure |
[in] | g | Ocean grid structure |
[in] | h | The current thicknesses |
[in] | staggered_in_x | True is the x-axis location is at u or q points |
[in] | staggered_in_y | True is the y-axis location is at v or q points |
mask | A mask for the field | |
[in] | missing_value | A missing_value to assign land/vanished points |
[in] | field | The diagnostic field to be remapped |
[in,out] | reintegrated_field | Field argument remapped to alternative coordinate |
Definition at line 373 of file MOM_diag_remap.F90.
References mom_error_handler::assert(), and mom_diag_vkernels::reintegrate_column().