MOM_diag_remap module reference

provides runtime remapping of diagnostics to z star, sigma and rho vertical coordinates.

The diag_remap_ctrl type represents a remapping of diagnostics to a particular vertical coordinate. The module is used by the diag mediator module in the following way:

  1. diag_remap_init() is called to initialize a diag_remap_ctrl instance.

  2. diag_remap_configure_axes() is called to read the configuration file and set up the vertical coordinate / axes definitions.

  3. diag_remap_get_axes_info() returns information needed for the diag mediator to define new axes for the remapped diagnostics.

  4. diag_remap_update() is called periodically (whenever h, T or S change) to either create or update the target remapping grids.

  5. diag_remap_do_remap() is called from within a diag post() to do the remapping before the diagnostic is written out.

Data Types

diag_remap_ctrl

Represents remapping of diagnostics to a particular vertical coordinate.

Functions/Subroutines

diag_remap_init

Initialize a diagnostic remapping type with the given vertical coordinate.

diag_remap_end

De-init a diagnostic remapping type. Free allocated memory.

diag_remap_diag_registration_closed

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.

diag_remap_set_active

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.

diag_remap_configure_axes

Configure the vertical axes for a diagnostic remapping control structure. Reads a configuration parameters to determine coordinate generation.

diag_remap_get_axes_info

Get layer and interface axes ids for this coordinate Needed when defining axes groups.

diag_remap_axes_configured

Whether or not the axes for this vertical coordinated has been configured. Configuration is complete when diag_remap_configure_axes() has been successfully called.

diag_remap_update

Build/update target vertical grids for diagnostic remapping.

diag_remap_do_remap

Remap diagnostic field to alternative vertical grid.

do_remap

The internal routine to remap a diagnostic field to an alternative vertical grid.

diag_remap_calc_hmask

Calculate masks for target grid

vertically_reintegrate_diag_field

Vertically re-grid an already vertically-integrated diagnostic field to alternative vertical grid.

vertically_reintegrate_field

The internal routine to vertically re-grid an already vertically-integrated diagnostic field to an alternative vertical grid.

vertically_interpolate_diag_field

Vertically interpolate diagnostic field to alternative vertical grid.

vertically_interpolate_field

Internal routine to vertically interpolate a diagnostic field to an alternative vertical grid.

horizontally_average_diag_field

Horizontally average a diagnostic field

horizontally_average_field

Horizontally average a diagnostic field

Type Documentation

type :: diag_remap_ctrl

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.

Parameters
  • configured

    Whether vertical coordinate has been configured

  • initialized

    Whether remappping initialized

  • used

    Whether this coordinate actually gets used.

  • vertical_coord

    The vertical coordinate that we remap to

  • vertical_coord_name

    The coordinate name as understood by ALE

  • Z_based_coord

    If true, this coordinate is based on remapping of geometric distances across layers (in [Z ~> m]) rather than layer thicknesses (in [H ~> m or kg m-2]). This distinction only matters in non-Boussinesq mode.

  • diag_coord_name

    A name for the purpose of run-time parameters

  • diag_module_suffix

    The suffix for the module to appear in diag_table

  • remap_cs

    Remapping control structure use for this axes

  • regrid_cs

    Regridding control structure that defines the coordinates for this axes

  • nz

    Number of vertical levels used for remapping

  • h

    Remap grid thicknesses in [H ~> m or kg m-2] or vertical extents in [Z ~> m], depending on the setting of Z_based_coord.

  • h_extensive

    Remap grid thicknesses in [H ~> m or kg m-2] or vertical extents in [Z ~> m] for remapping extensive variables

  • interface_axes_id

    Vertical axes id for remapping at interfaces

  • layer_axes_id

    Vertical axes id for remapping on layers

  • om4_remap_via_sub_cells

    Use the OM4-era ramap_via_sub_cells

  • answer_date

    The vintage of the order of arithmetic and expressions to use for remapping. Values below 20190101 recover the answers from 2018, while higher values use more robust forms of the same remapping expressions.

Functions/Subroutine Documentation

subroutine diag_remap_init(remap_cs, coord_tuple, om4_remap_via_sub_cells, answer_date, GV)

Initialize a diagnostic remapping type with the given vertical coordinate.

Parameters
  • remap_cs [inout]

    Diag remapping control structure

  • coord_tuple [in]

    A string in form of MODULE_SUFFIX PARAMETER_SUFFIX COORDINATE_NAME

  • om4_remap_via_sub_cells [in]

    Use the OM4-era ramap_via_sub_cells

  • answer_date [in]

    The vintage of the order of arithmetic and expressions to use for remapping. Values below 20190101 recover the answers from 2018, while higher values use more robust forms of the same remapping expressions.

  • GV [in]

    The ocean vertical grid structure, used here to evaluate whether the model is in non-Boussinesq mode.

Callees call graph
Callees of mom_diag_remap::diag_remap_init calls cluster_mom_diag_remap MOM_diag_remap cluster_mom_string_functions MOM_string_functions cluster_regrid_consts regrid_consts mom_diag_remap::diag_remap_init diag_remap_init mom_string_functions::extractword extractWord mom_diag_remap::diag_remap_init->mom_string_functions::extractword regrid_consts::coordinatemode coordinateMode mom_diag_remap::diag_remap_init->regrid_consts::coordinatemode
Text view
Callers call graph
Callers of mom_diag_remap::diag_remap_init calls cluster_mom_diag_mediator MOM_diag_mediator cluster_mom_diag_remap MOM_diag_remap mom_diag_mediator::diag_mediator_init diag_mediator_init mom_diag_remap::diag_remap_init diag_remap_init mom_diag_mediator::diag_mediator_init->mom_diag_remap::diag_remap_init
Text view
subroutine diag_remap_end(remap_cs)

De-init a diagnostic remapping type. Free allocated memory.

Parameters
  • remap_cs [inout]

    Diag remapping control structure

Callers call graph
Callers of mom_diag_remap::diag_remap_end calls cluster_mom_diag_mediator MOM_diag_mediator cluster_mom_diag_remap MOM_diag_remap mom_diag_mediator::diag_mediator_end diag_mediator_end mom_diag_remap::diag_remap_end diag_remap_end mom_diag_mediator::diag_mediator_end->mom_diag_remap::diag_remap_end mom_diag_remap::diag_remap_diag_registration_closed diag_remap_diag_registration_closed mom_diag_remap::diag_remap_diag_registration_closed->mom_diag_remap::diag_remap_end
Text view
subroutine 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.

Parameters
  • remap_cs [inout]

    Diag remapping control structure

Callees call graph
Callees of mom_diag_remap::diag_remap_diag_registration_closed calls cluster_mom_diag_remap MOM_diag_remap cluster_mom_regridding MOM_regridding mom_diag_remap::diag_remap_diag_registration_closed diag_remap_diag_registration_closed mom_diag_remap::diag_remap_end diag_remap_end mom_diag_remap::diag_remap_diag_registration_closed->mom_diag_remap::diag_remap_end mom_regridding::end_regridding end_regridding mom_diag_remap::diag_remap_diag_registration_closed->mom_regridding::end_regridding
Text view
Callers call graph
Callers of mom_diag_remap::diag_remap_diag_registration_closed calls cluster_mom_diag_mediator MOM_diag_mediator cluster_mom_diag_remap MOM_diag_remap mom_diag_mediator::diag_mediator_close_registration diag_mediator_close_registration mom_diag_remap::diag_remap_diag_registration_closed diag_remap_diag_registration_closed mom_diag_mediator::diag_mediator_close_registration->mom_diag_remap::diag_remap_diag_registration_closed
Text view
subroutine 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.

Parameters
  • remap_cs [inout]

    Diag remapping control structure

Callers call graph
Callers of mom_diag_remap::diag_remap_set_active calls cluster_mom_diag_mediator MOM_diag_mediator cluster_mom_diag_remap MOM_diag_remap mom_diag_mediator::register_diag_field register_diag_field mom_diag_remap::diag_remap_set_active diag_remap_set_active mom_diag_mediator::register_diag_field->mom_diag_remap::diag_remap_set_active
Text view
subroutine diag_remap_configure_axes(remap_cs, G, GV, US, param_file)

Configure the vertical axes for a diagnostic remapping control structure. Reads a configuration parameters to determine coordinate generation.

Parameters
  • remap_cs [inout]

    Diag remap control structure

  • G [in]

    The ocean's grid type

  • GV [in]

    ocean vertical grid structure

  • US [in]

    A dimensional unit scaling type

  • param_file [in]

    Parameter file structure

Callees call graph
Callees of mom_diag_remap::diag_remap_configure_axes calls cluster_mom_diag_manager_infra MOM_diag_manager_infra cluster_mom_diag_remap MOM_diag_remap cluster_mom_regridding MOM_regridding cluster_mom_string_functions MOM_string_functions cluster_regrid_consts regrid_consts mom_diag_manager_infra::mom_diag_axis_init MOM_diag_axis_init mom_diag_remap::diag_remap_configure_axes diag_remap_configure_axes mom_diag_remap::diag_remap_configure_axes->mom_diag_manager_infra::mom_diag_axis_init mom_regridding::get_regrid_size get_regrid_size mom_diag_remap::diag_remap_configure_axes->mom_regridding::get_regrid_size mom_regridding::getcoordinateinterfaces getCoordinateInterfaces mom_diag_remap::diag_remap_configure_axes->mom_regridding::getcoordinateinterfaces mom_regridding::initialize_regridding initialize_regridding mom_diag_remap::diag_remap_configure_axes->mom_regridding::initialize_regridding mom_regridding::set_regrid_params set_regrid_params mom_diag_remap::diag_remap_configure_axes->mom_regridding::set_regrid_params mom_string_functions::lowercase lowercase mom_diag_remap::diag_remap_configure_axes->mom_string_functions::lowercase regrid_consts::coordinatemode coordinateMode mom_diag_remap::diag_remap_configure_axes->regrid_consts::coordinatemode
Text view
Callers call graph
Callers of mom_diag_remap::diag_remap_configure_axes calls cluster_mom_diag_mediator MOM_diag_mediator cluster_mom_diag_remap MOM_diag_remap mom_diag_mediator::set_axes_info set_axes_info mom_diag_remap::diag_remap_configure_axes diag_remap_configure_axes mom_diag_mediator::set_axes_info->mom_diag_remap::diag_remap_configure_axes
Text view
subroutine 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.

Parameters
  • remap_cs [in]

    Diagnostic coordinate control structure

  • nz [out]

    Number of vertical levels for the coordinate

  • id_layer [out]

    1D-axes id for layer points

  • id_interface [out]

    1D-axes id for interface points

Callers call graph
Callers of mom_diag_remap::diag_remap_get_axes_info calls cluster_mom_diag_mediator MOM_diag_mediator cluster_mom_diag_remap MOM_diag_remap mom_diag_mediator::set_axes_info set_axes_info mom_diag_remap::diag_remap_get_axes_info diag_remap_get_axes_info mom_diag_mediator::set_axes_info->mom_diag_remap::diag_remap_get_axes_info mom_diag_mediator::set_axes_info_dsamp set_axes_info_dsamp [private/internal] mom_diag_mediator::set_axes_info_dsamp->mom_diag_remap::diag_remap_get_axes_info
Text view
function 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.

Parameters
  • remap_cs [in]

    Diagnostic coordinate control structure

Callers call graph
Callers of mom_diag_remap::diag_remap_axes_configured calls cluster_mom_diag_mediator MOM_diag_mediator cluster_mom_diag_remap MOM_diag_remap mom_diag_mediator::set_axes_info set_axes_info mom_diag_remap::diag_remap_axes_configured diag_remap_axes_configured mom_diag_mediator::set_axes_info->mom_diag_remap::diag_remap_axes_configured mom_diag_mediator::set_axes_info_dsamp set_axes_info_dsamp [private/internal] mom_diag_mediator::set_axes_info_dsamp->mom_diag_remap::diag_remap_axes_configured mom_diag_mediator::set_masks_for_axes set_masks_for_axes mom_diag_mediator::set_masks_for_axes->mom_diag_remap::diag_remap_axes_configured
Text view
subroutine diag_remap_update(remap_cs, G, GV, US, h, T, S, eqn_of_state, h_target)

Build/update target vertical grids for diagnostic remapping.

Note: The target grids need to be updated whenever sea surface height or layer thicknesses changes. In the case of density-based coordinates then technically we should also regenerate the target grid whenever T/S change.

Parameters
  • remap_cs [inout]

    Diagnostic coordinate control structure

  • G

    The ocean's grid type

  • GV [in]

    ocean vertical grid structure

  • US [in]

    A dimensional unit scaling type

  • h [in]

    New thickness in [H ~> m or kg m-2] or [Z ~> m], depending on the value of remap_cs%Z_based_coord

  • T [in]

    New temperatures [C ~> degC]

  • S [in]

    New salinities [S ~> ppt]

  • eqn_of_state [in]

    A pointer to the equation of state

  • h_target [inout]

    The new diagnostic thicknesses in [H ~> m or kg m-2] or [Z ~> m], depending on the value of remap_cs%Z_based_coord

Callees call graph
Callees of mom_diag_remap::diag_remap_update calls cluster_coord_rho coord_rho cluster_coord_sigma coord_sigma cluster_coord_zlike coord_zlike cluster_mom_diag_remap MOM_diag_remap cluster_mom_error_handler MOM_error_handler cluster_mom_regridding MOM_regridding cluster_mom_remapping MOM_remapping cluster_regrid_consts regrid_consts coord_rho::build_rho_column build_rho_column coord_sigma::build_sigma_column build_sigma_column coord_zlike::build_zstar_column build_zstar_column mom_diag_remap::diag_remap_update diag_remap_update mom_diag_remap::diag_remap_update->coord_rho::build_rho_column mom_diag_remap::diag_remap_update->coord_sigma::build_sigma_column mom_diag_remap::diag_remap_update->coord_zlike::build_zstar_column mom_error_handler::mom_error MOM_error mom_diag_remap::diag_remap_update->mom_error_handler::mom_error mom_regridding::get_rho_cs get_rho_CS mom_diag_remap::diag_remap_update->mom_regridding::get_rho_cs mom_regridding::get_sigma_cs get_sigma_CS mom_diag_remap::diag_remap_update->mom_regridding::get_sigma_cs mom_regridding::get_zlike_cs get_zlike_CS mom_diag_remap::diag_remap_update->mom_regridding::get_zlike_cs mom_regridding::set_dz_neglect set_dz_neglect mom_diag_remap::diag_remap_update->mom_regridding::set_dz_neglect mom_regridding::set_h_neglect set_h_neglect mom_diag_remap::diag_remap_update->mom_regridding::set_h_neglect mom_remapping::initialize_remapping initialize_remapping mom_diag_remap::diag_remap_update->mom_remapping::initialize_remapping regrid_consts::coordinatemode coordinateMode mom_diag_remap::diag_remap_update->regrid_consts::coordinatemode
Text view
Callers call graph
Callers of mom_diag_remap::diag_remap_update calls cluster_mom_diag_mediator MOM_diag_mediator cluster_mom_diag_remap MOM_diag_remap mom_diag_mediator::diag_update_remap_grids diag_update_remap_grids mom_diag_remap::diag_remap_update diag_remap_update mom_diag_mediator::diag_update_remap_grids->mom_diag_remap::diag_remap_update
Text view
subroutine diag_remap_do_remap(remap_cs, G, GV, US, h, OBC_u, OBC_v, staggered_in_x, staggered_in_y, mask, field, remapped_field)

Remap diagnostic field to alternative vertical grid.

Parameters
  • remap_cs [in]

    Diagnostic coordinate control structure

  • G [in]

    Ocean grid structure

  • GV [in]

    ocean vertical grid structure

  • US [in]

    A dimensional unit scaling type

  • h [in]

    The current thicknesses [H ~> m or kg m-2] or [Z ~> m], depending on the value of remap_CS%Z_based_coord

  • OBC_u [in]

    An array that indicates the presence and direction of any open boundary conditions at u-points, with a value of 0 for no OBC, 1 for an Eastern OBC or -1 for a Western OBC

  • OBC_v [in]

    An array that indicates the presence and direction of any open boundary conditions at v-points, with a value of 0 for no OBC, 1 for a Northern OBC or -1 for a Southern OBC

  • staggered_in_x [in]

    True is the x-axis location is at u or q points

  • staggered_in_y [in]

    True is the y-axis location is at v or q points

  • mask

    A mask for the field [nondim].

  • field [in]

    The diagnostic field to be remapped [A]

  • remapped_field [out]

    Field remapped to new coordinate [A]

  • isdf

    The starting i- and j-indices in memory for field

  • jsdf

    The starting i- and j-indices in memory for field

Callees call graph
Callees of mom_diag_remap::diag_remap_do_remap calls cluster_mom_diag_remap MOM_diag_remap cluster_mom_error_handler MOM_error_handler mom_diag_remap::diag_remap_do_remap diag_remap_do_remap mom_diag_remap::do_remap do_remap [private/internal] mom_diag_remap::diag_remap_do_remap->mom_diag_remap::do_remap mom_error_handler::assert assert mom_diag_remap::diag_remap_do_remap->mom_error_handler::assert
Text view
Callers call graph
Callers of mom_diag_remap::diag_remap_do_remap calls cluster_mom_diag_mediator MOM_diag_mediator cluster_mom_diag_remap MOM_diag_remap mom_diag_mediator::post_data_3d post_data_3d [private/internal] mom_diag_remap::diag_remap_do_remap diag_remap_do_remap mom_diag_mediator::post_data_3d->mom_diag_remap::diag_remap_do_remap
Text view
subroutine do_remap(remap_cs, G, GV, US, isdf, jsdf, h, OBC_u, OBC_v, staggered_in_x, staggered_in_y, field, remapped_field, mask)

The internal routine to remap a diagnostic field to an alternative vertical grid.

Parameters
  • remap_cs [in]

    Diagnostic coordinate control structure

  • G [in]

    Ocean grid structure

  • GV [in]

    ocean vertical grid structure

  • US [in]

    A dimensional unit scaling type

  • isdf [in]

    The starting i-index in memory for field

  • jsdf [in]

    The starting j-index in memory for field

  • h [in]

    The current thicknesses [H ~> m or kg m-2] or [Z ~> m], depending on the value of remap_CS%Z_based_coord

  • OBC_u [in]

    An array that indicates the presence and direction of any open boundary conditions at u-points, with a value of 0 for no OBC, 1 for an Eastern OBC or -1 for a Western OBC

  • OBC_v [in]

    An array that indicates the presence and direction of any open boundary conditions at v-points, with a value of 0 for no OBC, 1 for a Northern OBC or -1 for a Southern OBC

  • staggered_in_x [in]

    True is the x-axis location is at u or q points

  • staggered_in_y [in]

    True is the y-axis location is at v or q points

  • field [in]

    The diagnostic field to be remapped [A]

  • remapped_field [out]

    Field remapped to new coordinate [A]

  • mask [in]

    A mask for the field [nondim]

Callees call graph
Callees of mom_diag_remap::do_remap calls cluster_mom_diag_remap MOM_diag_remap cluster_mom_error_handler MOM_error_handler cluster_mom_remapping MOM_remapping mom_diag_remap::do_remap do_remap [private/internal] mom_error_handler::assert assert mom_diag_remap::do_remap->mom_error_handler::assert mom_remapping::remapping_core_h remapping_core_h mom_diag_remap::do_remap->mom_remapping::remapping_core_h
Text view
Callers call graph
Callers of mom_diag_remap::do_remap calls cluster_mom_diag_remap MOM_diag_remap mom_diag_remap::diag_remap_do_remap diag_remap_do_remap mom_diag_remap::do_remap do_remap [private/internal] mom_diag_remap::diag_remap_do_remap->mom_diag_remap::do_remap
Text view
subroutine diag_remap_calc_hmask(remap_cs, G, mask)

Calculate masks for target grid

Parameters
  • remap_cs [in]

    Diagnostic coordinate control structure

  • G [in]

    Ocean grid structure

  • mask [out]

    h-point mask for target grid [nondim]

Callees call graph
Callees of mom_diag_remap::diag_remap_calc_hmask calls cluster_mom_diag_remap MOM_diag_remap cluster_mom_error_handler MOM_error_handler cluster_regrid_consts regrid_consts mom_diag_remap::diag_remap_calc_hmask diag_remap_calc_hmask mom_error_handler::assert assert mom_diag_remap::diag_remap_calc_hmask->mom_error_handler::assert regrid_consts::coordinatemode coordinateMode mom_diag_remap::diag_remap_calc_hmask->regrid_consts::coordinatemode
Text view
Callers call graph
Callers of mom_diag_remap::diag_remap_calc_hmask calls cluster_mom_diag_mediator MOM_diag_mediator cluster_mom_diag_remap MOM_diag_remap mom_diag_mediator::set_masks_for_axes set_masks_for_axes mom_diag_remap::diag_remap_calc_hmask diag_remap_calc_hmask mom_diag_mediator::set_masks_for_axes->mom_diag_remap::diag_remap_calc_hmask
Text view
subroutine vertically_reintegrate_diag_field(remap_cs, G, h, h_target, OBC_u, OBC_v, staggered_in_x, staggered_in_y, mask, field, reintegrated_field)

Vertically re-grid an already vertically-integrated diagnostic field to alternative vertical grid.

Parameters
  • remap_cs [in]

    Diagnostic coordinate control structure

  • G [in]

    Ocean grid structure

  • h [in]

    The thicknesses of the source grid [H ~> m or kg m-2] or [Z ~> m]

  • h_target [in]

    The thicknesses of the target grid [H ~> m or kg m-2] or [Z ~> m]

  • OBC_u [in]

    An array that indicates the presence and direction of any open boundary conditions at u-points, with a value of 0 for no OBC, 1 for an Eastern OBC or -1 for a Western OBC

  • OBC_v [in]

    An array that indicates the presence and direction of any open boundary conditions at v-points, with a value of 0 for no OBC, 1 for a Northern OBC or -1 for a Southern OBC

  • staggered_in_x [in]

    True is the x-axis location is at u or q points

  • staggered_in_y [in]

    True is the y-axis location is at v or q points

  • mask

    A mask for the field [nondim]. Note that because this is a pointer it retains its declared indexing conventions.

  • field [in]

    The diagnostic field to be remapped [A]

  • reintegrated_field [out]

    Field argument remapped to alternative coordinate [A]

  • isdf

    The starting i- and j-indices in memory for field

  • jsdf

    The starting i- and j-indices in memory for field

Callees call graph
Callees of mom_diag_remap::vertically_reintegrate_diag_field calls cluster_mom_diag_remap MOM_diag_remap cluster_mom_error_handler MOM_error_handler mom_diag_remap::vertically_reintegrate_diag_field vertically_reintegrate_diag_field mom_diag_remap::vertically_reintegrate_field vertically_reintegrate_field [private/internal] mom_diag_remap::vertically_reintegrate_diag_field->mom_diag_remap::vertically_reintegrate_field mom_error_handler::assert assert mom_diag_remap::vertically_reintegrate_diag_field->mom_error_handler::assert
Text view
Callers call graph
Callers of mom_diag_remap::vertically_reintegrate_diag_field calls cluster_mom_diag_mediator MOM_diag_mediator cluster_mom_diag_remap MOM_diag_remap mom_diag_mediator::post_data_3d post_data_3d [private/internal] mom_diag_remap::vertically_reintegrate_diag_field vertically_reintegrate_diag_field mom_diag_mediator::post_data_3d->mom_diag_remap::vertically_reintegrate_diag_field
Text view
subroutine vertically_reintegrate_field(remap_cs, G, isdf, jsdf, h, h_target, OBC_u, OBC_v, staggered_in_x, staggered_in_y, field, reintegrated_field, mask)

The internal routine to vertically re-grid an already vertically-integrated diagnostic field to an alternative vertical grid.

Parameters
  • remap_cs [in]

    Diagnostic coordinate control structure

  • G [in]

    Ocean grid structure

  • isdf [in]

    The starting i-index in memory for field

  • jsdf [in]

    The starting j-index in memory for field

  • h [in]

    The thicknesses of the source grid [H ~> m or kg m-2] or [Z ~> m]

  • h_target [in]

    The thicknesses of the target grid [H ~> m or kg m-2] or [Z ~> m]

  • OBC_u [in]

    An array that indicates the presence and direction of any open boundary conditions at u-points, with a value of 0 for no OBC, 1 for an Eastern OBC or -1 for a Western OBC

  • OBC_v [in]

    An array that indicates the presence and direction of any open boundary conditions at v-points, with a value of 0 for no OBC, 1 for a Northern OBC or -1 for a Southern OBC

  • staggered_in_x [in]

    True is the x-axis location is at u or q points

  • staggered_in_y [in]

    True is the y-axis location is at v or q points

  • field [in]

    The diagnostic field to be remapped [A]

  • reintegrated_field [out]

    Field argument remapped to alternative coordinate [A]

  • mask [in]

    A mask for the field [nondim]

Callees call graph
Callees of mom_diag_remap::vertically_reintegrate_field calls cluster_mom_diag_remap MOM_diag_remap cluster_mom_error_handler MOM_error_handler cluster_mom_remapping MOM_remapping mom_diag_remap::vertically_reintegrate_field vertically_reintegrate_field [private/internal] mom_error_handler::assert assert mom_diag_remap::vertically_reintegrate_field->mom_error_handler::assert mom_remapping::reintegrate_column reintegrate_column mom_diag_remap::vertically_reintegrate_field->mom_remapping::reintegrate_column
Text view
Callers call graph
Callers of mom_diag_remap::vertically_reintegrate_field calls cluster_mom_diag_remap MOM_diag_remap mom_diag_remap::vertically_reintegrate_diag_field vertically_reintegrate_diag_field mom_diag_remap::vertically_reintegrate_field vertically_reintegrate_field [private/internal] mom_diag_remap::vertically_reintegrate_diag_field->mom_diag_remap::vertically_reintegrate_field
Text view
subroutine vertically_interpolate_diag_field(remap_cs, G, h, OBC_u, OBC_v, staggered_in_x, staggered_in_y, mask, field, interpolated_field)

Vertically interpolate diagnostic field to alternative vertical grid.

Parameters
  • remap_cs [in]

    Diagnostic coordinate control structure

  • G [in]

    Ocean grid structure

  • h [in]

    The current thicknesses [H ~> m or kg m-2] or [Z ~> m], depending on the value of remap_cs%Z_based_coord

  • OBC_u [in]

    An array that indicates the presence and direction of any open boundary conditions at u-points, with a value of 0 for no OBC, 1 for an Eastern OBC or -1 for a Western OBC

  • OBC_v [in]

    An array that indicates the presence and direction of any open boundary conditions at v-points, with a value of 0 for no OBC, 1 for a Northern OBC or -1 for a Southern OBC

  • staggered_in_x [in]

    True is the x-axis location is at u or q points

  • staggered_in_y [in]

    True is the y-axis location is at v or q points

  • mask

    A mask for the field [nondim]. Note that because this is a pointer it retains its declared indexing conventions.

  • field [in]

    The diagnostic field to be remapped [A]

  • interpolated_field [inout]

    Field argument remapped to alternative coordinate [A]

  • isdf

    The starting i- and j-indices in memory for field

  • jsdf

    The starting i- and j-indices in memory for field

Callees call graph
Callees of mom_diag_remap::vertically_interpolate_diag_field calls cluster_mom_diag_remap MOM_diag_remap cluster_mom_error_handler MOM_error_handler mom_diag_remap::vertically_interpolate_diag_field vertically_interpolate_diag_field mom_diag_remap::vertically_interpolate_field vertically_interpolate_field [private/internal] mom_diag_remap::vertically_interpolate_diag_field->mom_diag_remap::vertically_interpolate_field mom_error_handler::assert assert mom_diag_remap::vertically_interpolate_diag_field->mom_error_handler::assert
Text view
Callers call graph
Callers of mom_diag_remap::vertically_interpolate_diag_field calls cluster_mom_diag_mediator MOM_diag_mediator cluster_mom_diag_remap MOM_diag_remap mom_diag_mediator::post_data_3d post_data_3d [private/internal] mom_diag_remap::vertically_interpolate_diag_field vertically_interpolate_diag_field mom_diag_mediator::post_data_3d->mom_diag_remap::vertically_interpolate_diag_field
Text view
subroutine vertically_interpolate_field(remap_cs, G, isdf, jsdf, h, OBC_u, OBC_v, staggered_in_x, staggered_in_y, field, interpolated_field, mask)

Internal routine to vertically interpolate a diagnostic field to an alternative vertical grid.

Parameters
  • remap_cs [in]

    Diagnostic coordinate control structure

  • G [in]

    Ocean grid structure

  • isdf [in]

    The starting i-index in memory for field

  • jsdf [in]

    The starting j-index in memory for field

  • h [in]

    The current thicknesses [H ~> m or kg m-2] or [Z ~> m], depending on the value of remap_cs%Z_based_coord

  • OBC_u [in]

    An array that indicates the presence and direction of any open boundary conditions at u-points, with a value of 0 for no OBC, 1 for an Eastern OBC or -1 for a Western OBC

  • OBC_v [in]

    An array that indicates the presence and direction of any open boundary conditions at v-points, with a value of 0 for no OBC, 1 for a Northern OBC or -1 for a Southern OBC

  • staggered_in_x [in]

    True is the x-axis location is at u or q points

  • staggered_in_y [in]

    True is the y-axis location is at v or q points

  • field [in]

    The diagnostic field to be remapped [A]

  • interpolated_field [out]

    Field argument remapped to alternative coordinate [A]

  • mask [in]

    A mask for the field [nondim]

  • i

    Grid index

  • j

    Grid index

Callees call graph
Callees of mom_diag_remap::vertically_interpolate_field calls cluster_mom_diag_remap MOM_diag_remap cluster_mom_error_handler MOM_error_handler cluster_mom_remapping MOM_remapping mom_diag_remap::vertically_interpolate_field vertically_interpolate_field [private/internal] mom_error_handler::assert assert mom_diag_remap::vertically_interpolate_field->mom_error_handler::assert mom_remapping::interpolate_column interpolate_column mom_diag_remap::vertically_interpolate_field->mom_remapping::interpolate_column
Text view
Callers call graph
Callers of mom_diag_remap::vertically_interpolate_field calls cluster_mom_diag_remap MOM_diag_remap mom_diag_remap::vertically_interpolate_diag_field vertically_interpolate_diag_field mom_diag_remap::vertically_interpolate_field vertically_interpolate_field [private/internal] mom_diag_remap::vertically_interpolate_diag_field->mom_diag_remap::vertically_interpolate_field
Text view
subroutine horizontally_average_diag_field(G, GV, h, staggered_in_x, staggered_in_y, is_layer, is_extensive, field, averaged_field, averaged_mask)

Horizontally average a diagnostic field

Parameters
  • G [in]

    Ocean grid structure

  • GV [in]

    The ocean vertical grid structure

  • h [in]

    The current thicknesses [H ~> m or kg m-2]

  • staggered_in_x [in]

    True if the x-axis location is at u or q points

  • staggered_in_y [in]

    True if the y-axis location is at v or q points

  • is_layer [in]

    True if the z-axis location is at h points

  • is_extensive [in]

    True if the z-direction is spatially integrated (over layers)

  • field [in]

    The diagnostic field to be remapped [A]

  • averaged_field [out]

    Field argument horizontally averaged [A]

  • averaged_mask [out]

    Mask for horizontally averaged field [nondim]

  • isdf

    The starting i- and j-indices in memory for field

  • jsdf

    The starting i- and j-indices in memory for field

Callees call graph
Callees of mom_diag_remap::horizontally_average_diag_field calls cluster_mom_diag_remap MOM_diag_remap mom_diag_remap::horizontally_average_diag_field horizontally_average_diag_field mom_diag_remap::horizontally_average_field horizontally_average_field [private/internal] mom_diag_remap::horizontally_average_diag_field->mom_diag_remap::horizontally_average_field
Text view
Callers call graph
Callers of mom_diag_remap::horizontally_average_diag_field calls cluster_mom_diag_mediator MOM_diag_mediator cluster_mom_diag_remap MOM_diag_remap mom_diag_mediator::post_xy_average post_xy_average [private/internal] mom_diag_remap::horizontally_average_diag_field horizontally_average_diag_field mom_diag_mediator::post_xy_average->mom_diag_remap::horizontally_average_diag_field
Text view
subroutine horizontally_average_field(G, GV, isdf, jsdf, h, staggered_in_x, staggered_in_y, is_layer, is_extensive, field, averaged_field, averaged_mask)

Horizontally average a diagnostic field

Parameters
  • G [in]

    Ocean grid structure

  • GV [in]

    The ocean vertical grid structure

  • isdf [in]

    The starting i-index in memory for field

  • jsdf [in]

    The starting j-index in memory for field

  • h [in]

    The current thicknesses [H ~> m or kg m-2]

  • staggered_in_x [in]

    True if the x-axis location is at u or q points

  • staggered_in_y [in]

    True if the y-axis location is at v or q points

  • is_layer [in]

    True if the z-axis location is at h points

  • is_extensive [in]

    True if the z-direction is spatially integrated (over layers)

  • field [in]

    The diagnostic field to be remapped [A]

  • averaged_field [out]

    Field argument horizontally averaged [A]

  • averaged_mask [out]

    Mask for horizontally averaged field [nondim]

Callees call graph
Callees of mom_diag_remap::horizontally_average_field calls cluster_mom_coms MOM_coms cluster_mom_diag_remap MOM_diag_remap cluster_mom_error_handler MOM_error_handler mom_coms::efp_to_real EFP_to_real mom_coms::interface::efp_sum_across_pes EFP_sum_across_PEs (interface) mom_coms::interface::reproducing_sum_efp reproducing_sum_EFP (interface) mom_diag_remap::horizontally_average_field horizontally_average_field [private/internal] mom_diag_remap::horizontally_average_field->mom_coms::efp_to_real mom_diag_remap::horizontally_average_field->mom_coms::interface::efp_sum_across_pes mom_diag_remap::horizontally_average_field->mom_coms::interface::reproducing_sum_efp mom_error_handler::assert assert mom_diag_remap::horizontally_average_field->mom_error_handler::assert
Text view
Callers call graph
Callers of mom_diag_remap::horizontally_average_field calls cluster_mom_diag_remap MOM_diag_remap mom_diag_remap::horizontally_average_diag_field horizontally_average_diag_field mom_diag_remap::horizontally_average_field horizontally_average_field [private/internal] mom_diag_remap::horizontally_average_diag_field->mom_diag_remap::horizontally_average_field
Text view
API generated with Flint · Rendered from reStructuredText