MOM_regridding module reference

Generates vertical grids as part of the ALE algorithm

Data Types

regridding_CS

Regridding control structure

Functions/Subroutines

initialize_regridding

Initialization and configures a regridding control structure based on customizable run-time parameters

end_regridding

Deallocation of regridding memory

regridding_main

Dispatching regridding routine for orchestrating regridding & remapping

regridding_preadjust_reqs

This routine returns flags indicating which pre-remapping state adjustments are needed depending on the coordinate mode in use.

calc_h_new_by_dz

Calculates h_new from h + delta_k dzInterface

check_grid_column

Check that the total thickness of new and old grids are consistent

filtered_grid_motion

Returns the change in interface position motion after filtering and assuming the top and bottom interfaces do not move. The filtering is a function of depth, and is applied as the integrated average filtering over the trajectory of the interface. By design, this code can not give tangled interfaces provided that z_old and z_new are not already tangled.

build_zstar_grid

Builds a z*-coordinate grid with partial steps (Adcroft and Campin, 2004). z* is defined as z* = (z-eta)/(H+eta)*H s.t. z*=0 when z=eta and z*=-H when z=-H .

build_sigma_grid

This routine builds a grid based on terrain-following coordinates.

build_rho_grid

This routine builds a new grid based on a given set of target interface densities.

build_grid_HyCOM1

Builds a simple HyCOM-like grid with the deepest location of potential density interpolated from the column profile and a clipping of depth for each interface to a fixed z* or p* grid. This should probably be (optionally?) changed to find the nearest location of the target density.

build_grid_adaptive

This subroutine builds an adaptive grid that follows density surfaces where possible, subject to constraints on the smoothness of interface heights.

adjust_interface_motion

Adjust dz_Interface to ensure non-negative future thicknesses

inflate_vanished_layers_old

make sure all layers are at least as thick as the minimum thickness allowed for regridding purposes by inflating thin layers. This breaks mass conservation and adds mass to the model when there are excessively thin layers.

convective_adjustment

Achieve convective adjustment by swapping layers

uniformResolution

Return a uniform resolution vector in the units of the coordinate

initCoord

Initialize the coordinate resolutions by calling the appropriate initialization routine for the specified coordinate mode.

setCoordinateResolution

Set the fixed resolution data

setCoordinateResolution_3d

Set the 3d fixed resolution data

set_target_densities_from_GV

Set target densities based on the old Rlay variable

set_target_densities_3d

Set target densities based on vector of interface values

set_target_densities

Set target densities based on vector of interface values

set_regrid_max_depths

Set maximum interface depths based on a vector of input values.

set_regrid_max_thickness

Set maximum layer thicknesses based on a vector of input values.

write_regrid_file

Write the vertical coordinate information into a file. This subroutine writes out a file containing any available data related to the vertical grid used by the MOM ocean model when in ALE mode.

set_h_neglect

Set appropriate values for the negligible thicknesses used for remapping based on an answer date.

set_dz_neglect

Set appropriate values for the negligible vertical layer extents used for remapping based on an answer date.

getCoordinateResolution

Query the fixed resolution data

getCoordinateInterfaces

Query the target coordinate interface positions

getCoordinateUnits

Query the target coordinate units

getCoordinateShortName

Query the short name of the coordinate

set_regrid_params

Can be used to set any of the parameters for MOM_regridding.

get_regrid_size

Returns the number of levels/layers in the regridding control structure

get_zlike_CS

This returns a copy of the zlike_CS stored in the regridding control structure.

get_sigma_CS

This returns a copy of the sigma_CS stored in the regridding control structure.

get_rho_CS

This returns a copy of the rho_CS stored in the regridding control structure.

getStaticThickness

Return coordinate-derived thicknesses for fixed coordinate systems

dz_function1

Parses a string and generates a dz(:) profile that goes like k**power.

create_coord_param

Construct the name of a parameter for a specific coordinate based on param_prefix and param_suffix. For the main, prognostic coordinate this will simply return the parameter name (e.g. P_REF)

rho_function1

Parses a string and generates a rho_target(:) profile with refined resolution downward and returns the number of levels

Detailed Description

A vertical grid is defined solely by the cell thicknesses, \(h\). Most calculations in this module start with the coordinate at the bottom of the column set to -depth, and use a increasing value of coordinate with decreasing k. This is consistent with the rest of MOM6 that uses position, \(z\) which is a negative quantity for most of the ocean.

A change in grid is define through a change in position of the interfaces:

\begin{equation*} z^n_{k+1/2} = z^{n-1}_{k+1/2} + \Delta z_{k+1/2} \end{equation*}

with the positive upward coordinate convention

\begin{equation*} z_{k-1/2} = z_{k+1/2} + h_k \end{equation*}

so that

\begin{equation*} h^n_k = h^{n-1}_k + ( \Delta z_{k-1/2} - \Delta z_{k+1/2} ) \end{equation*}

Original date of creation: 2008.06.09 by L. White

Type Documentation

type, public :: regridding_CS

Regridding control structure

Parameters
  • coordinateResolution

    This is a scaling factor that restores coordinateResolution to values in the natural units for output, perhaps [nondim]

  • coord_scale

    This array is set by function set_target_densities() This array is the nominal coordinate of interfaces and is the running sum of coordinateResolution, in [R ~> kg m-3]. i.e. target_density(k+1) = coordinateResolution(k) + coordinateResolution(k) It is only used in "rho" or "Hycom" mode.

  • target_density

    A flag to indicate that the target_density arrays has been filled with data.

  • target_density_set

    Nominal HYCOM1 3D near-surface resolution [Z ~> m]

  • coordinateResolution_3d

    Nominal HYCOM1 3D density of interfaces [R ~> kg m-3]

  • target_density_3d

    This array is set by function set_regrid_max_depths() It specifies the maximum depth that every interface is allowed to take [H ~> m or kg m-2].

  • max_interface_depths

    This array is set by function set_regrid_max_thickness() It specifies the maximum depth that every interface is allowed to take [H ~> m or kg m-2].

  • nk

    Number of layers/levels in generated grid

    Indicates which grid to use in the vertical (z*, sigma, target interface densities)

  • regridding_scheme

    Interpolation control structure

  • interp_CS

    Minimum thickness allowed when building the new grid through regridding [H ~> m or kg m-2].

  • min_thickness

    If true, call adjust_interface_motion() after initial grid generation

  • use_adjust_interface_motion

    Reference pressure for potential density calculations [R L2 T-2 ~> Pa]

  • ref_pressure

    If true, always pass through the depth-based time filtering that uses CS%old_grid_weight If false, allows bypassing of the call if CS%old_grid_weight==0

  • use_depth_based_time_filter

    Weight given to old coordinate when blending between new and old grids [nondim] Used only below depth_of_time_filter_shallow, with a cubic variation from zero to full effect between depth_of_time_filter_shallow and depth_of_time_filter_deep.

  • old_grid_weight

    Depth above which no time-filtering of grid is applied [H ~> m or kg m-2]

  • depth_of_time_filter_shallow

    Depth below which time-filtering of grid is applied at full effect [H ~> m or kg m-2]

  • depth_of_time_filter_deep

    Fraction (between 0 and 1) of compressibility to add to potential density profiles when interpolating for target grid positions [nondim]

  • compressibility_fraction

    If true, each interface is given a maximum depth based on a rescaling of the indexing of coordinateResolution.

  • set_maximum_depths

    If true, integrate for interface positions from the top downward. If false, integrate from the bottom upward, as does the rest of the model.

  • integrate_downward_for_e

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

  • use_hybgen_unmix

    If true, use the hybgen unmixing code before remapping

  • zlike_CS

    Control structure for z-like coordinate generator

  • sigma_CS

    Control structure for sigma coordinate generator

  • rho_CS

    Control structure for rho coordinate generator

  • hycom_CS

    Control structure for hybrid coordinate generator

  • adapt_CS

    Control structure for adaptive coordinate generator

  • hybgen_CS

    Control structure for hybgen regridding

Functions/Subroutine Documentation

subroutine initialize_regridding(CS, G, GV, US, max_depth, param_file, mdl, coord_mode, param_prefix, param_suffix)

Initialization and configures a regridding control structure based on customizable run-time parameters

Parameters
  • CS [inout]

    Regridding control structure

  • G [in]

    Ocean grid structure

  • GV [in]

    Ocean vertical grid structure

  • US [in]

    A dimensional unit scaling type

  • max_depth [in]

    The maximum depth of the ocean [Z ~> m].

  • param_file [in]

    Parameter file

  • mdl [in]

    Name of calling module.

  • coord_mode [in]

    Coordinate mode

  • param_prefix [in]

    String to prefix to parameter names. If empty, causes main model parameters to be used.

  • param_suffix [in]

    String to append to parameter names.

Callees call graph
Callees of mom_regridding::initialize_regridding calls cluster_coord_hycom coord_hycom cluster_mom_coms_infra MOM_coms_infra cluster_mom_domain_infra MOM_domain_infra cluster_mom_error_handler MOM_error_handler cluster_mom_file_parser MOM_file_parser cluster_mom_io MOM_io cluster_mom_io_infra MOM_io_infra cluster_mom_regridding MOM_regridding cluster_mom_string_functions MOM_string_functions cluster_regrid_consts regrid_consts coord_hycom::set_hycom_params set_hycom_params mom_coms_infra::interface::max_across_pes max_across_PEs (interface) mom_domain_infra::interface::pass_var pass_var (interface) mom_error_handler::mom_error MOM_error mom_file_parser::interface::get_param get_param (interface) mom_file_parser::interface::log_param log_param (interface) mom_io::field_size field_size mom_io::interface::mom_read_data MOM_read_data (interface) mom_io::interface::read_variable read_variable (interface) mom_io::verify_variable_units verify_variable_units mom_io_infra::field_exists field_exists mom_io_infra::interface::file_exists file_exists (interface) mom_regridding::create_coord_param create_coord_param [private/internal] mom_regridding::dz_function1 dz_function1 [private/internal] mom_regridding::initcoord initCoord [private/internal] mom_regridding::initialize_regridding initialize_regridding mom_regridding::initialize_regridding->coord_hycom::set_hycom_params mom_regridding::initialize_regridding->mom_coms_infra::interface::max_across_pes mom_regridding::initialize_regridding->mom_domain_infra::interface::pass_var mom_regridding::initialize_regridding->mom_error_handler::mom_error mom_regridding::initialize_regridding->mom_file_parser::interface::get_param mom_regridding::initialize_regridding->mom_file_parser::interface::log_param mom_regridding::initialize_regridding->mom_io::field_size mom_regridding::initialize_regridding->mom_io::interface::mom_read_data mom_regridding::initialize_regridding->mom_io::interface::read_variable mom_regridding::initialize_regridding->mom_io::verify_variable_units mom_regridding::initialize_regridding->mom_io_infra::field_exists mom_regridding::initialize_regridding->mom_io_infra::interface::file_exists mom_regridding::initialize_regridding->mom_regridding::create_coord_param mom_regridding::initialize_regridding->mom_regridding::dz_function1 mom_regridding::initialize_regridding->mom_regridding::initcoord mom_regridding::rho_function1 rho_function1 [private/internal] mom_regridding::initialize_regridding->mom_regridding::rho_function1 mom_regridding::set_regrid_max_depths set_regrid_max_depths mom_regridding::initialize_regridding->mom_regridding::set_regrid_max_depths mom_regridding::set_regrid_max_thickness set_regrid_max_thickness mom_regridding::initialize_regridding->mom_regridding::set_regrid_max_thickness mom_regridding::set_regrid_params set_regrid_params mom_regridding::initialize_regridding->mom_regridding::set_regrid_params mom_regridding::set_target_densities set_target_densities mom_regridding::initialize_regridding->mom_regridding::set_target_densities mom_regridding::set_target_densities_3d set_target_densities_3d [private/internal] mom_regridding::initialize_regridding->mom_regridding::set_target_densities_3d mom_regridding::set_target_densities_from_gv set_target_densities_from_GV mom_regridding::initialize_regridding->mom_regridding::set_target_densities_from_gv mom_regridding::setcoordinateresolution setCoordinateResolution mom_regridding::initialize_regridding->mom_regridding::setcoordinateresolution mom_regridding::setcoordinateresolution_3d setCoordinateResolution_3d [private/internal] mom_regridding::initialize_regridding->mom_regridding::setcoordinateresolution_3d mom_regridding::uniformresolution uniformResolution mom_regridding::initialize_regridding->mom_regridding::uniformresolution mom_string_functions::extract_integer extract_integer mom_regridding::initialize_regridding->mom_string_functions::extract_integer mom_string_functions::extract_real extract_real mom_regridding::initialize_regridding->mom_string_functions::extract_real mom_string_functions::extractword extractWord mom_regridding::initialize_regridding->mom_string_functions::extractword mom_string_functions::slasher slasher mom_regridding::initialize_regridding->mom_string_functions::slasher regrid_consts::coordinatemode coordinateMode mom_regridding::initialize_regridding->regrid_consts::coordinatemode regrid_consts::interface::coordinateunits coordinateUnits (interface) mom_regridding::initialize_regridding->regrid_consts::interface::coordinateunits regrid_consts::interface::state_dependent state_dependent (interface) mom_regridding::initialize_regridding->regrid_consts::interface::state_dependent
Text view
Callers call graph
Callers of mom_regridding::initialize_regridding calls cluster_mom_ale MOM_ALE cluster_mom_diag_remap MOM_diag_remap cluster_mom_oda_driver_mod MOM_oda_driver_mod cluster_mom_regridding MOM_regridding mom_ale::ale_initregridding ALE_initRegridding mom_regridding::initialize_regridding initialize_regridding mom_ale::ale_initregridding->mom_regridding::initialize_regridding mom_diag_remap::diag_remap_configure_axes diag_remap_configure_axes mom_diag_remap::diag_remap_configure_axes->mom_regridding::initialize_regridding mom_oda_driver_mod::init_oda init_oda mom_oda_driver_mod::init_oda->mom_regridding::initialize_regridding
Text view
subroutine end_regridding(CS)

Deallocation of regridding memory

Parameters
  • CS [inout]

    Regridding control structure

Callees call graph
Callees of mom_regridding::end_regridding calls cluster_coord_adapt coord_adapt cluster_coord_hycom coord_hycom cluster_coord_rho coord_rho cluster_coord_sigma coord_sigma cluster_coord_zlike coord_zlike cluster_mom_hybgen_regrid MOM_hybgen_regrid cluster_mom_regridding MOM_regridding coord_adapt::end_coord_adapt end_coord_adapt coord_hycom::end_coord_hycom end_coord_hycom coord_rho::end_coord_rho end_coord_rho coord_sigma::end_coord_sigma end_coord_sigma coord_zlike::end_coord_zlike end_coord_zlike mom_hybgen_regrid::end_hybgen_regrid end_hybgen_regrid mom_regridding::end_regridding end_regridding mom_regridding::end_regridding->coord_adapt::end_coord_adapt mom_regridding::end_regridding->coord_hycom::end_coord_hycom mom_regridding::end_regridding->coord_rho::end_coord_rho mom_regridding::end_regridding->coord_sigma::end_coord_sigma mom_regridding::end_regridding->coord_zlike::end_coord_zlike mom_regridding::end_regridding->mom_hybgen_regrid::end_hybgen_regrid
Text view
Callers call graph
Callers of mom_regridding::end_regridding calls cluster_mom_ale MOM_ALE cluster_mom_diag_remap MOM_diag_remap cluster_mom_regridding MOM_regridding mom_ale::ale_end ALE_end mom_regridding::end_regridding end_regridding mom_ale::ale_end->mom_regridding::end_regridding mom_diag_remap::diag_remap_diag_registration_closed diag_remap_diag_registration_closed mom_diag_remap::diag_remap_diag_registration_closed->mom_regridding::end_regridding
Text view
subroutine regridding_main(remapCS, CS, G, GV, US, h, tv, h_new, dzInterface, frac_shelf_h, PCM_cell)

Dispatching regridding routine for orchestrating regridding & remapping

Parameters
  • remapCS [in]

    Remapping parameters and options

  • CS [in]

    Regridding control structure

  • G [in]

    Ocean grid structure

  • GV [in]

    Ocean vertical grid structure

  • US [in]

    A dimensional unit scaling type

  • h [in]

    Current 3D grid obtained after the last time step [H ~> m or kg m-2]

  • tv [in]

    Thermodynamical variables (T, S, ...)

  • h_new [inout]

    New 3D grid consistent with target coordinate [H ~> m or kg m-2]

  • dzInterface [inout]

    The change in position of each interface [H ~> m or kg m-2]

  • frac_shelf_h [in]

    Fractional ice shelf coverage [nondim]

  • PCM_cell [out]

    Use PCM remapping in cells where true

  • nom_depth_H

    The nominal ocean depth at each point in thickness units [H ~> m or kg m-2]

  • tot_h

    The total thickness of the water column [H ~> m or kg m-2]

  • tot_dz

    The total distance between the top and bottom of the water column [Z ~> m]

Callees call graph
Callees of mom_regridding::regridding_main calls cluster_mom_error_handler MOM_error_handler cluster_mom_hybgen_regrid MOM_hybgen_regrid cluster_mom_regridding MOM_regridding mom_error_handler::mom_error MOM_error mom_hybgen_regrid::hybgen_regrid hybgen_regrid mom_regridding::build_grid_adaptive build_grid_adaptive [private/internal] mom_regridding::build_grid_hycom1 build_grid_HyCOM1 [private/internal] mom_regridding::build_rho_grid build_rho_grid [private/internal] mom_regridding::build_sigma_grid build_sigma_grid [private/internal] mom_regridding::build_zstar_grid build_zstar_grid [private/internal] mom_regridding::calc_h_new_by_dz calc_h_new_by_dz [private/internal] mom_regridding::regridding_main regridding_main mom_regridding::regridding_main->mom_error_handler::mom_error mom_regridding::regridding_main->mom_hybgen_regrid::hybgen_regrid mom_regridding::regridding_main->mom_regridding::build_grid_adaptive mom_regridding::regridding_main->mom_regridding::build_grid_hycom1 mom_regridding::regridding_main->mom_regridding::build_rho_grid mom_regridding::regridding_main->mom_regridding::build_sigma_grid mom_regridding::regridding_main->mom_regridding::build_zstar_grid mom_regridding::regridding_main->mom_regridding::calc_h_new_by_dz
Text view
Callers call graph
Callers of mom_regridding::regridding_main calls cluster_mom_ale MOM_ALE cluster_mom_regridding MOM_regridding cluster_mom_state_initialization MOM_state_initialization mom_ale::ale_offline_inputs ALE_offline_inputs mom_regridding::regridding_main regridding_main mom_ale::ale_offline_inputs->mom_regridding::regridding_main mom_ale::ale_regrid ALE_regrid mom_ale::ale_regrid->mom_regridding::regridding_main mom_ale::ale_regrid_accelerated ALE_regrid_accelerated mom_ale::ale_regrid_accelerated->mom_regridding::regridding_main mom_state_initialization::mom_temp_salt_initialize_from_z MOM_temp_salt_initialize_from_Z [private/internal] mom_state_initialization::mom_temp_salt_initialize_from_z->mom_regridding::regridding_main
Text view
subroutine regridding_preadjust_reqs(CS, do_conv_adj, do_hybgen_unmix, hybgen_CS)

This routine returns flags indicating which pre-remapping state adjustments are needed depending on the coordinate mode in use.

Parameters
  • CS [in]

    Regridding control structure

  • do_conv_adj [out]

    Convective adjustment should be done

  • do_hybgen_unmix [out]

    Hybgen unmixing should be done

  • hybgen_CS [out]

    Control structure for hybgen regridding for sharing parameters.

Callees call graph
Callees of mom_regridding::regridding_preadjust_reqs calls cluster_mom_error_handler MOM_error_handler cluster_mom_regridding MOM_regridding mom_error_handler::mom_error MOM_error mom_regridding::regridding_preadjust_reqs regridding_preadjust_reqs mom_regridding::regridding_preadjust_reqs->mom_error_handler::mom_error
Text view
Callers call graph
Callers of mom_regridding::regridding_preadjust_reqs calls cluster_mom_ale MOM_ALE cluster_mom_regridding MOM_regridding cluster_mom_state_initialization MOM_state_initialization mom_ale::ale_init ALE_init mom_regridding::regridding_preadjust_reqs regridding_preadjust_reqs mom_ale::ale_init->mom_regridding::regridding_preadjust_reqs mom_state_initialization::mom_temp_salt_initialize_from_z MOM_temp_salt_initialize_from_Z [private/internal] mom_state_initialization::mom_temp_salt_initialize_from_z->mom_regridding::regridding_preadjust_reqs
Text view
subroutine calc_h_new_by_dz(CS, G, GV, h, dzInterface, h_new)

Calculates h_new from h + delta_k dzInterface

Parameters
  • CS [in]

    Regridding control structure

  • G [in]

    Grid structure

  • GV [in]

    Ocean vertical grid structure

  • h [in]

    Old layer thicknesses [H ~> m or kg m-2] or other units

  • dzInterface [in]

    Change in interface positions in the same units as h [H ~> m or kg m-2]

  • h_new [inout]

    New layer thicknesses in the same units as h [H ~> m or kg m-2]

Callers call graph
Callers of mom_regridding::calc_h_new_by_dz calls cluster_mom_regridding MOM_regridding mom_regridding::build_grid_hycom1 build_grid_HyCOM1 [private/internal] mom_regridding::calc_h_new_by_dz calc_h_new_by_dz [private/internal] mom_regridding::build_grid_hycom1->mom_regridding::calc_h_new_by_dz mom_regridding::regridding_main regridding_main mom_regridding::regridding_main->mom_regridding::calc_h_new_by_dz
Text view
subroutine check_grid_column(nk, h, dzInterface, msg)

Check that the total thickness of new and old grids are consistent

Parameters
  • nk [in]

    Number of cells

  • h [in]

    Cell thicknesses [Z ~> m] or arbitrary units

  • dzInterface [in]

    Change in interface positions (same units as h), often [Z ~> m]

  • msg [in]

    Message to append to errors

Callees call graph
Callees of mom_regridding::check_grid_column calls cluster_mom_error_handler MOM_error_handler cluster_mom_regridding MOM_regridding mom_error_handler::mom_error MOM_error mom_regridding::check_grid_column check_grid_column mom_regridding::check_grid_column->mom_error_handler::mom_error
Text view
subroutine filtered_grid_motion(CS, nk, z_old, z_new, dz_g)

Returns the change in interface position motion after filtering and assuming the top and bottom interfaces do not move. The filtering is a function of depth, and is applied as the integrated average filtering over the trajectory of the interface. By design, this code can not give tangled interfaces provided that z_old and z_new are not already tangled.

Parameters
  • CS [in]

    Regridding control structure

  • nk [in]

    Number of cells in source grid

  • z_old [in]

    Old grid position [H ~> m or kg m-2]

  • z_new [in]

    New grid position before filtering [H ~> m or kg m-2]

  • dz_g [inout]

    Change in interface positions including the effects of filtering [H ~> m or kg m-2]

Callees call graph
Callees of mom_regridding::filtered_grid_motion calls cluster_mom_error_handler MOM_error_handler cluster_mom_regridding MOM_regridding mom_error_handler::mom_error MOM_error mom_regridding::filtered_grid_motion filtered_grid_motion [private/internal] mom_regridding::filtered_grid_motion->mom_error_handler::mom_error
Text view
Callers call graph
Callers of mom_regridding::filtered_grid_motion calls cluster_mom_regridding MOM_regridding mom_regridding::build_grid_adaptive build_grid_adaptive [private/internal] mom_regridding::filtered_grid_motion filtered_grid_motion [private/internal] mom_regridding::build_grid_adaptive->mom_regridding::filtered_grid_motion mom_regridding::build_grid_hycom1 build_grid_HyCOM1 [private/internal] mom_regridding::build_grid_hycom1->mom_regridding::filtered_grid_motion mom_regridding::build_rho_grid build_rho_grid [private/internal] mom_regridding::build_rho_grid->mom_regridding::filtered_grid_motion mom_regridding::build_sigma_grid build_sigma_grid [private/internal] mom_regridding::build_sigma_grid->mom_regridding::filtered_grid_motion mom_regridding::build_zstar_grid build_zstar_grid [private/internal] mom_regridding::build_zstar_grid->mom_regridding::filtered_grid_motion
Text view
subroutine build_zstar_grid(CS, G, GV, h, nom_depth_H, dzInterface, frac_shelf_h, zScale)

Builds a z*-coordinate grid with partial steps (Adcroft and Campin, 2004). z* is defined as z* = (z-eta)/(H+eta)*H s.t. z*=0 when z=eta and z*=-H when z=-H .

Parameters
  • CS [in]

    Regridding control structure

  • G [in]

    Ocean grid structure

  • GV [in]

    ocean vertical grid structure

  • h [in]

    Layer thicknesses [H ~> m or kg m-2]

  • nom_depth_H [in]

    The bathymetric depth of this column relative to mean sea level or another locally valid reference height, converted to thickness units [H ~> m or kg m-2]

  • dzInterface [inout]

    The change in interface depth [H ~> m or kg m-2].

  • frac_shelf_h [in]

    Fractional ice shelf coverage [nondim].

  • zScale [in]

    Scaling factor from the target coordinate resolution in Z to desired units for zInterface, usually Z_to_H in which case it is in units of [H Z-1 ~> nondim or kg m-3]

Callees call graph
Callees of mom_regridding::build_zstar_grid calls cluster_coord_zlike coord_zlike cluster_mom_regridding MOM_regridding coord_zlike::build_zstar_column build_zstar_column mom_regridding::adjust_interface_motion adjust_interface_motion [private/internal] mom_regridding::build_zstar_grid build_zstar_grid [private/internal] mom_regridding::build_zstar_grid->coord_zlike::build_zstar_column mom_regridding::build_zstar_grid->mom_regridding::adjust_interface_motion mom_regridding::filtered_grid_motion filtered_grid_motion [private/internal] mom_regridding::build_zstar_grid->mom_regridding::filtered_grid_motion
Text view
Callers call graph
Callers of mom_regridding::build_zstar_grid calls cluster_mom_regridding MOM_regridding mom_regridding::build_zstar_grid build_zstar_grid [private/internal] mom_regridding::regridding_main regridding_main mom_regridding::regridding_main->mom_regridding::build_zstar_grid
Text view
subroutine build_sigma_grid(CS, G, GV, h, nom_depth_H, dzInterface)

This routine builds a grid based on terrain-following coordinates.

Parameters
  • CS [in]

    Regridding control structure

  • G [in]

    Ocean grid structure

  • GV [in]

    ocean vertical grid structure

  • h [in]

    Layer thicknesses [H ~> m or kg m-2]

  • nom_depth_H [in]

    The bathymetric depth of this column relative to mean sea level or another locally valid reference height, converted to thickness units [H ~> m or kg m-2]

  • dzInterface [inout]

    The change in interface depth [H ~> m or kg m-2]

Callees call graph
Callees of mom_regridding::build_sigma_grid calls cluster_coord_sigma coord_sigma cluster_mom_regridding MOM_regridding coord_sigma::build_sigma_column build_sigma_column mom_regridding::build_sigma_grid build_sigma_grid [private/internal] mom_regridding::build_sigma_grid->coord_sigma::build_sigma_column mom_regridding::filtered_grid_motion filtered_grid_motion [private/internal] mom_regridding::build_sigma_grid->mom_regridding::filtered_grid_motion
Text view
Callers call graph
Callers of mom_regridding::build_sigma_grid calls cluster_mom_regridding MOM_regridding mom_regridding::build_sigma_grid build_sigma_grid [private/internal] mom_regridding::regridding_main regridding_main mom_regridding::regridding_main->mom_regridding::build_sigma_grid
Text view
subroutine build_rho_grid(G, GV, US, h, nom_depth_H, tv, dzInterface, remapCS, CS, frac_shelf_h)

This routine builds a new grid based on a given set of target interface densities.

Parameters
  • CS [in]

    Regridding control structure

  • G [in]

    Ocean grid structure

  • GV [in]

    Ocean vertical grid structure

  • US [in]

    A dimensional unit scaling type

  • h [in]

    Layer thicknesses [H ~> m or kg m-2]

  • nom_depth_H [in]

    The bathymetric depth of this column relative to mean sea level or another locally valid reference height, converted to thickness units [H ~> m or kg m-2]

  • tv [in]

    Thermodynamics structure

  • dzInterface [inout]

    The change in interface depth [H ~> m or kg m-2]

  • remapCS [in]

    The remapping control structure

  • frac_shelf_h [in]

    Fractional ice shelf coverage [nondim]

Callees call graph
Callees of mom_regridding::build_rho_grid calls cluster_coord_rho coord_rho cluster_mom_error_handler MOM_error_handler cluster_mom_regridding MOM_regridding coord_rho::build_rho_column build_rho_column mom_error_handler::mom_error MOM_error mom_regridding::build_rho_grid build_rho_grid [private/internal] mom_regridding::build_rho_grid->coord_rho::build_rho_column mom_regridding::build_rho_grid->mom_error_handler::mom_error mom_regridding::filtered_grid_motion filtered_grid_motion [private/internal] mom_regridding::build_rho_grid->mom_regridding::filtered_grid_motion mom_regridding::set_h_neglect set_h_neglect mom_regridding::build_rho_grid->mom_regridding::set_h_neglect
Text view
Callers call graph
Callers of mom_regridding::build_rho_grid calls cluster_mom_regridding MOM_regridding mom_regridding::build_rho_grid build_rho_grid [private/internal] mom_regridding::regridding_main regridding_main mom_regridding::regridding_main->mom_regridding::build_rho_grid
Text view
subroutine build_grid_HyCOM1(G, GV, US, h, nom_depth_H, tv, h_new, dzInterface, remapCS, CS, frac_shelf_h, zScale)

Builds a simple HyCOM-like grid with the deepest location of potential density interpolated from the column profile and a clipping of depth for each interface to a fixed z* or p* grid. This should probably be (optionally?) changed to find the nearest location of the target density.

Remark: Based on Bleck, 2002: An ocean-ice general circulation model framed in hybrid isopycnic-Cartesian coordinates, Ocean Modelling 37, 55-88. http://dx.doi.org/10.1016/S1463-5003(01)00012-9

Parameters
  • G [in]

    Grid structure

  • GV [in]

    Ocean vertical grid structure

  • US [in]

    A dimensional unit scaling type

  • h [in]

    Existing model thickness [H ~> m or kg m-2]

  • nom_depth_H [in]

    The bathymetric depth of this column relative to mean sea level or another locally valid reference height, converted to thickness units [H ~> m or kg m-2]

  • tv [in]

    Thermodynamics structure

  • remapCS [in]

    The remapping control structure

  • CS [in]

    Regridding control structure

  • h_new [inout]

    New layer thicknesses [H ~> m or kg m-2]

  • dzInterface [inout]

    Changes in interface position in thickness units [H ~> m or kg m-2]

  • frac_shelf_h [in]

    Fractional ice shelf coverage [nondim]

  • zScale [in]

    Scaling factor from the target coordinate resolution in Z to desired units for zInterface, usually Z_to_H in which case it is in units of [H Z-1 ~> nondim or kg m-3]

Callees call graph
Callees of mom_regridding::build_grid_hycom1 calls cluster_coord_hycom coord_hycom cluster_mom_error_handler MOM_error_handler cluster_mom_regridding MOM_regridding coord_hycom::build_hycom1_column build_hycom1_column mom_error_handler::mom_error MOM_error mom_regridding::adjust_interface_motion adjust_interface_motion [private/internal] mom_regridding::build_grid_hycom1 build_grid_HyCOM1 [private/internal] mom_regridding::build_grid_hycom1->coord_hycom::build_hycom1_column mom_regridding::build_grid_hycom1->mom_error_handler::mom_error mom_regridding::build_grid_hycom1->mom_regridding::adjust_interface_motion mom_regridding::calc_h_new_by_dz calc_h_new_by_dz [private/internal] mom_regridding::build_grid_hycom1->mom_regridding::calc_h_new_by_dz mom_regridding::filtered_grid_motion filtered_grid_motion [private/internal] mom_regridding::build_grid_hycom1->mom_regridding::filtered_grid_motion mom_regridding::set_h_neglect set_h_neglect mom_regridding::build_grid_hycom1->mom_regridding::set_h_neglect
Text view
Callers call graph
Callers of mom_regridding::build_grid_hycom1 calls cluster_mom_regridding MOM_regridding mom_regridding::build_grid_hycom1 build_grid_HyCOM1 [private/internal] mom_regridding::regridding_main regridding_main mom_regridding::regridding_main->mom_regridding::build_grid_hycom1
Text view
subroutine build_grid_adaptive(G, GV, US, h, nom_depth_H, tv, dzInterface, remapCS, CS)

This subroutine builds an adaptive grid that follows density surfaces where possible, subject to constraints on the smoothness of interface heights.

Parameters
  • G [in]

    The ocean's grid structure

  • GV [in]

    The ocean's vertical grid structure

  • US [in]

    A dimensional unit scaling type

  • h [in]

    Layer thicknesses [H ~> m or kg m-2]

  • nom_depth_H [in]

    The bathymetric depth of this column relative to mean sea level or another locally valid reference height, converted to thickness units [H ~> m or kg m-2]

  • tv [in]

    A structure pointing to various thermodynamic variables

  • CS [in]

    Regridding control structure

  • dzInterface [inout]

    The change in interface depth [H ~> m or kg m-2]

  • remapCS [in]

    The remapping control structure

Callees call graph
Callees of mom_regridding::build_grid_adaptive calls cluster_coord_adapt coord_adapt cluster_mom_error_handler MOM_error_handler cluster_mom_regridding MOM_regridding coord_adapt::build_adapt_column build_adapt_column mom_error_handler::assert assert mom_regridding::adjust_interface_motion adjust_interface_motion [private/internal] mom_regridding::build_grid_adaptive build_grid_adaptive [private/internal] mom_regridding::build_grid_adaptive->coord_adapt::build_adapt_column mom_regridding::build_grid_adaptive->mom_error_handler::assert mom_regridding::build_grid_adaptive->mom_regridding::adjust_interface_motion mom_regridding::filtered_grid_motion filtered_grid_motion [private/internal] mom_regridding::build_grid_adaptive->mom_regridding::filtered_grid_motion
Text view
Callers call graph
Callers of mom_regridding::build_grid_adaptive calls cluster_mom_regridding MOM_regridding mom_regridding::build_grid_adaptive build_grid_adaptive [private/internal] mom_regridding::regridding_main regridding_main mom_regridding::regridding_main->mom_regridding::build_grid_adaptive
Text view
subroutine adjust_interface_motion(CS, nk, h_old, dz_int)

Adjust dz_Interface to ensure non-negative future thicknesses

Parameters
  • CS [in]

    Regridding control structure

  • nk [in]

    Number of layers in h_old

  • h_old [in]

    Layer thicknesses on the old grid [H ~> m or kg m-2]

  • dz_int [inout]

    Interface movements, adjusted to keep the thicknesses thicker than their minimum value [H ~> m or kg m-2]

Callees call graph
Callees of mom_regridding::adjust_interface_motion calls cluster_mom_error_handler MOM_error_handler cluster_mom_regridding MOM_regridding mom_error_handler::mom_error MOM_error mom_regridding::adjust_interface_motion adjust_interface_motion [private/internal] mom_regridding::adjust_interface_motion->mom_error_handler::mom_error
Text view
Callers call graph
Callers of mom_regridding::adjust_interface_motion calls cluster_mom_regridding MOM_regridding mom_regridding::adjust_interface_motion adjust_interface_motion [private/internal] mom_regridding::build_grid_adaptive build_grid_adaptive [private/internal] mom_regridding::build_grid_adaptive->mom_regridding::adjust_interface_motion mom_regridding::build_grid_hycom1 build_grid_HyCOM1 [private/internal] mom_regridding::build_grid_hycom1->mom_regridding::adjust_interface_motion mom_regridding::build_zstar_grid build_zstar_grid [private/internal] mom_regridding::build_zstar_grid->mom_regridding::adjust_interface_motion
Text view
subroutine inflate_vanished_layers_old(CS, G, GV, h)

make sure all layers are at least as thick as the minimum thickness allowed for regridding purposes by inflating thin layers. This breaks mass conservation and adds mass to the model when there are excessively thin layers.

Parameters
  • CS [in]

    Regridding control structure

  • G [in]

    The ocean's grid structure

  • GV [in]

    The ocean's vertical grid structure

  • h [inout]

    Layer thicknesses [H ~> m or kg m-2]

Callees call graph
Callees of mom_regridding::inflate_vanished_layers_old calls cluster_coord_rho coord_rho cluster_mom_regridding MOM_regridding coord_rho::old_inflate_layers_1d old_inflate_layers_1d mom_regridding::inflate_vanished_layers_old inflate_vanished_layers_old mom_regridding::inflate_vanished_layers_old->coord_rho::old_inflate_layers_1d
Text view
Callers call graph
Callers of mom_regridding::inflate_vanished_layers_old calls cluster_mom_ale MOM_ALE cluster_mom_regridding MOM_regridding mom_ale::adjustgridforintegrity adjustGridForIntegrity mom_regridding::inflate_vanished_layers_old inflate_vanished_layers_old mom_ale::adjustgridforintegrity->mom_regridding::inflate_vanished_layers_old
Text view
subroutine convective_adjustment(G, GV, h, tv)

Achieve convective adjustment by swapping layers

Parameters
  • G [in]

    The ocean's grid structure

  • GV [in]

    The ocean's vertical grid structure

  • h [inout]

    Layer thicknesses [H ~> m or kg m-2]

  • tv [inout]

    A structure pointing to various thermodynamic variables

Callees call graph
Callees of mom_regridding::convective_adjustment calls cluster_mom_eos MOM_EOS cluster_mom_regridding MOM_regridding mom_eos::interface::calculate_density calculate_density (interface) mom_regridding::convective_adjustment convective_adjustment mom_regridding::convective_adjustment->mom_eos::interface::calculate_density
Text view
Callers call graph
Callers of mom_regridding::convective_adjustment calls cluster_mom_ale MOM_ALE cluster_mom_regridding MOM_regridding cluster_mom_state_initialization MOM_state_initialization mom_ale::ale_regrid_accelerated ALE_regrid_accelerated mom_regridding::convective_adjustment convective_adjustment mom_ale::ale_regrid_accelerated->mom_regridding::convective_adjustment mom_ale::pre_ale_adjustments pre_ALE_adjustments mom_ale::pre_ale_adjustments->mom_regridding::convective_adjustment mom_state_initialization::mom_temp_salt_initialize_from_z MOM_temp_salt_initialize_from_Z [private/internal] mom_state_initialization::mom_temp_salt_initialize_from_z->mom_regridding::convective_adjustment
Text view
function uniformResolution(nk, coordMode, maxDepth, rhoLight, rhoHeavy)

Return a uniform resolution vector in the units of the coordinate

Parameters
  • nk [in]

    Number of cells in source grid

  • coordMode [in]

    A string indicating the coordinate mode. See the documentation for regrid_consts for the recognized values.

  • maxDepth [in]

    The range of the grid values in some modes, in coordinate dependent units that might be [m] or [kg m-3] or [nondim] or something else.

  • rhoLight [in]

    The minimum value of the grid in RHO mode [kg m-3]

  • rhoHeavy [in]

    The maximum value of the grid in RHO mode [kg m-3]

  • uniformResolution

    The returned uniform resolution grid, in coordinate dependent units that might be [m] or [kg m-3] or [nondim] or something else.

Callees call graph
Callees of mom_regridding::uniformresolution calls cluster_mom_error_handler MOM_error_handler cluster_mom_regridding MOM_regridding cluster_regrid_consts regrid_consts mom_error_handler::mom_error MOM_error mom_regridding::uniformresolution uniformResolution mom_regridding::uniformresolution->mom_error_handler::mom_error regrid_consts::coordinatemode coordinateMode mom_regridding::uniformresolution->regrid_consts::coordinatemode
Text view
Callers call graph
Callers of mom_regridding::uniformresolution calls cluster_mom_regridding MOM_regridding mom_regridding::initialize_regridding initialize_regridding mom_regridding::uniformresolution uniformResolution mom_regridding::initialize_regridding->mom_regridding::uniformresolution
Text view
subroutine initCoord(CS, G, GV, US, coord_mode, param_file)

Initialize the coordinate resolutions by calling the appropriate initialization routine for the specified coordinate mode.

Parameters
  • CS [inout]

    Regridding control structure

  • G [in]

    Ocean grid structure

  • GV [in]

    Ocean vertical grid structure

  • US [in]

    A dimensional unit scaling type

  • coord_mode [in]

    A string indicating the coordinate mode. See the documentation for regrid_consts for the recognized values.

  • param_file [in]

    Parameter file

Callees call graph
Callees of mom_regridding::initcoord calls cluster_coord_adapt coord_adapt cluster_coord_hycom coord_hycom cluster_coord_rho coord_rho cluster_coord_sigma coord_sigma cluster_coord_zlike coord_zlike cluster_mom_hybgen_regrid MOM_hybgen_regrid cluster_mom_regridding MOM_regridding cluster_regrid_consts regrid_consts coord_adapt::init_coord_adapt init_coord_adapt coord_hycom::init_3d_coord_hycom init_3d_coord_hycom coord_hycom::init_coord_hycom init_coord_hycom coord_rho::init_coord_rho init_coord_rho coord_sigma::init_coord_sigma init_coord_sigma coord_zlike::init_coord_zlike init_coord_zlike mom_hybgen_regrid::init_hybgen_regrid init_hybgen_regrid mom_regridding::initcoord initCoord [private/internal] mom_regridding::initcoord->coord_adapt::init_coord_adapt mom_regridding::initcoord->coord_hycom::init_3d_coord_hycom mom_regridding::initcoord->coord_hycom::init_coord_hycom mom_regridding::initcoord->coord_rho::init_coord_rho mom_regridding::initcoord->coord_sigma::init_coord_sigma mom_regridding::initcoord->coord_zlike::init_coord_zlike mom_regridding::initcoord->mom_hybgen_regrid::init_hybgen_regrid regrid_consts::coordinatemode coordinateMode mom_regridding::initcoord->regrid_consts::coordinatemode
Text view
Callers call graph
Callers of mom_regridding::initcoord calls cluster_mom_regridding MOM_regridding mom_regridding::initcoord initCoord [private/internal] mom_regridding::initialize_regridding initialize_regridding mom_regridding::initialize_regridding->mom_regridding::initcoord
Text view
subroutine setCoordinateResolution(dz, CS, scale)

Set the fixed resolution data

Parameters
  • dz [in]

    A vector of vertical grid spacings, in arbitrary coordinate dependent units, such as [m] for a z-coordinate or [kg m-3] for a density coordinate.

  • CS [inout]

    Regridding control structure

  • scale [in]

    A scaling factor converting dz to the internal represetation of coordRes, in various units that depend on the coordinate, such as [Z m-1 ~> 1] for a z-coordinate or [R m3 kg-1 ~> 1] for a density coordinate.

Callees call graph
Callees of mom_regridding::setcoordinateresolution calls cluster_mom_error_handler MOM_error_handler cluster_mom_regridding MOM_regridding mom_error_handler::mom_error MOM_error mom_regridding::setcoordinateresolution setCoordinateResolution mom_regridding::setcoordinateresolution->mom_error_handler::mom_error
Text view
Callers call graph
Callers of mom_regridding::setcoordinateresolution calls cluster_mom_regridding MOM_regridding mom_regridding::initialize_regridding initialize_regridding mom_regridding::setcoordinateresolution setCoordinateResolution mom_regridding::initialize_regridding->mom_regridding::setcoordinateresolution
Text view
subroutine setCoordinateResolution_3d(dz_3d, CS, scale)

Set the 3d fixed resolution data

Parameters
  • dz_3d [in]

    A vector of vertical grid spacings, in arbitrary coordinate dependent units, such as [m] for a z-coordinate or [kg m-3] for a density coordinate.

  • CS [inout]

    Regridding control structure

  • scale [in]

    A scaling factor converting dz to coordRes [Z m-1 ~> 1]

Callees call graph
Callees of mom_regridding::setcoordinateresolution_3d calls cluster_mom_error_handler MOM_error_handler cluster_mom_regridding MOM_regridding mom_error_handler::mom_error MOM_error mom_regridding::setcoordinateresolution_3d setCoordinateResolution_3d [private/internal] mom_regridding::setcoordinateresolution_3d->mom_error_handler::mom_error
Text view
Callers call graph
Callers of mom_regridding::setcoordinateresolution_3d calls cluster_mom_regridding MOM_regridding mom_regridding::initialize_regridding initialize_regridding mom_regridding::setcoordinateresolution_3d setCoordinateResolution_3d [private/internal] mom_regridding::initialize_regridding->mom_regridding::setcoordinateresolution_3d
Text view
subroutine set_target_densities_from_GV(GV, US, CS)

Set target densities based on the old Rlay variable

Parameters
  • GV [in]

    Ocean vertical grid structure

  • US [in]

    A dimensional unit scaling type

  • CS [inout]

    Regridding control structure

Callers call graph
Callers of mom_regridding::set_target_densities_from_gv calls cluster_mom_regridding MOM_regridding mom_regridding::initialize_regridding initialize_regridding mom_regridding::set_target_densities_from_gv set_target_densities_from_GV mom_regridding::initialize_regridding->mom_regridding::set_target_densities_from_gv
Text view
subroutine set_target_densities_3d(CS, G, scale, rho_int_3d)

Set target densities based on vector of interface values

Parameters
  • CS [inout]

    Regridding control structure

  • G [in]

    Ocean grid structure

  • scale [in]

    A scaling factor converting densities [R m3 kg-1 ~> 1]

  • rho_int_3d [in]

    Interface densities [kg m-3]

Callees call graph
Callees of mom_regridding::set_target_densities_3d calls cluster_mom_error_handler MOM_error_handler cluster_mom_regridding MOM_regridding mom_error_handler::mom_error MOM_error mom_regridding::set_target_densities_3d set_target_densities_3d [private/internal] mom_regridding::set_target_densities_3d->mom_error_handler::mom_error
Text view
Callers call graph
Callers of mom_regridding::set_target_densities_3d calls cluster_mom_regridding MOM_regridding mom_regridding::initialize_regridding initialize_regridding mom_regridding::set_target_densities_3d set_target_densities_3d [private/internal] mom_regridding::initialize_regridding->mom_regridding::set_target_densities_3d
Text view
subroutine set_target_densities(CS, rho_int)

Set target densities based on vector of interface values

Parameters
  • CS [inout]

    Regridding control structure

  • rho_int [in]

    Interface densities [R ~> kg m-3]

Callees call graph
Callees of mom_regridding::set_target_densities calls cluster_mom_error_handler MOM_error_handler cluster_mom_regridding MOM_regridding mom_error_handler::mom_error MOM_error mom_regridding::set_target_densities set_target_densities mom_regridding::set_target_densities->mom_error_handler::mom_error
Text view
Callers call graph
Callers of mom_regridding::set_target_densities calls cluster_mom_regridding MOM_regridding mom_regridding::initialize_regridding initialize_regridding mom_regridding::set_target_densities set_target_densities mom_regridding::initialize_regridding->mom_regridding::set_target_densities
Text view
subroutine set_regrid_max_depths(CS, max_depths, units_to_H)

Set maximum interface depths based on a vector of input values.

Parameters
  • CS [inout]

    Regridding control structure

  • max_depths [in]

    Maximum interface depths, in arbitrary units, often [m]

  • units_to_H [in]

    A conversion factor for max_depths into H units, often in [H m-1 ~> 1 or kg m-3]

Callees call graph
Callees of mom_regridding::set_regrid_max_depths calls cluster_coord_hycom coord_hycom cluster_mom_error_handler MOM_error_handler cluster_mom_regridding MOM_regridding coord_hycom::set_hycom_params set_hycom_params mom_error_handler::mom_error MOM_error mom_regridding::set_regrid_max_depths set_regrid_max_depths mom_regridding::set_regrid_max_depths->coord_hycom::set_hycom_params mom_regridding::set_regrid_max_depths->mom_error_handler::mom_error
Text view
Callers call graph
Callers of mom_regridding::set_regrid_max_depths calls cluster_mom_regridding MOM_regridding mom_regridding::initialize_regridding initialize_regridding mom_regridding::set_regrid_max_depths set_regrid_max_depths mom_regridding::initialize_regridding->mom_regridding::set_regrid_max_depths
Text view
subroutine set_regrid_max_thickness(CS, max_h, units_to_H)

Set maximum layer thicknesses based on a vector of input values.

Parameters
  • CS [inout]

    Regridding control structure

  • max_h [in]

    Maximum layer thicknesses, in arbitrary units, often [m]

  • units_to_H [in]

    A conversion factor for max_h into H units, often [H m-1 ~> 1 or kg m-3]

Callees call graph
Callees of mom_regridding::set_regrid_max_thickness calls cluster_coord_hycom coord_hycom cluster_mom_regridding MOM_regridding coord_hycom::set_hycom_params set_hycom_params mom_regridding::set_regrid_max_thickness set_regrid_max_thickness mom_regridding::set_regrid_max_thickness->coord_hycom::set_hycom_params
Text view
Callers call graph
Callers of mom_regridding::set_regrid_max_thickness calls cluster_mom_regridding MOM_regridding mom_regridding::initialize_regridding initialize_regridding mom_regridding::set_regrid_max_thickness set_regrid_max_thickness mom_regridding::initialize_regridding->mom_regridding::set_regrid_max_thickness
Text view
subroutine write_regrid_file(CS, GV, filepath)

Write the vertical coordinate information into a file. This subroutine writes out a file containing any available data related to the vertical grid used by the MOM ocean model when in ALE mode.

Parameters
  • CS [in]

    Regridding control structure

  • GV [in]

    ocean vertical grid structure

  • filepath [in]

    The full path to the file to write

Callees call graph
Callees of mom_regridding::write_regrid_file calls cluster_mom_hybgen_regrid MOM_hybgen_regrid cluster_mom_io MOM_io cluster_mom_regridding MOM_regridding mom_hybgen_regrid::write_hybgen_coord_file write_Hybgen_coord_file mom_io::create_mom_file create_MOM_file mom_io::interface::mom_write_field MOM_write_field (interface) mom_io::var_desc var_desc mom_regridding::getcoordinateunits getCoordinateUnits mom_regridding::write_regrid_file write_regrid_file mom_regridding::write_regrid_file->mom_hybgen_regrid::write_hybgen_coord_file mom_regridding::write_regrid_file->mom_io::create_mom_file mom_regridding::write_regrid_file->mom_io::interface::mom_write_field mom_regridding::write_regrid_file->mom_io::var_desc mom_regridding::write_regrid_file->mom_regridding::getcoordinateunits
Text view
Callers call graph
Callers of mom_regridding::write_regrid_file calls cluster_mom_ale MOM_ALE cluster_mom_regridding MOM_regridding mom_ale::ale_writecoordinatefile ALE_writeCoordinateFile mom_regridding::write_regrid_file write_regrid_file mom_ale::ale_writecoordinatefile->mom_regridding::write_regrid_file
Text view
function set_h_neglect(GV, remap_answer_date, h_neglect_edge) result(h_neglect)

Set appropriate values for the negligible thicknesses used for remapping based on an answer date.

Parameters
  • GV [in]

    Ocean vertical grid structure

  • remap_answer_date [in]

    The vintage of the expressions to use for remapping. Values below 20190101 recover the remapping answers from 2018. Higher values use more robust forms of the same remapping algorithms.

  • h_neglect_edge [out]

    A negligibly small thickness used in remapping edge value calculations [H ~> m or kg m-2]

  • h_neglect

    A negligibly small thickness used in remapping cell reconstructions [H ~> m or kg m-2]

Callers call graph
Callers of mom_regridding::set_h_neglect calls cluster_mom_diag_remap MOM_diag_remap cluster_mom_oda_driver_mod MOM_oda_driver_mod cluster_mom_regridding MOM_regridding cluster_mom_state_initialization MOM_state_initialization cluster_mom_tracer_initialization_from_z MOM_tracer_initialization_from_Z mom_diag_remap::diag_remap_update diag_remap_update mom_regridding::set_h_neglect set_h_neglect mom_diag_remap::diag_remap_update->mom_regridding::set_h_neglect mom_oda_driver_mod::init_oda init_oda mom_oda_driver_mod::init_oda->mom_regridding::set_h_neglect mom_regridding::build_grid_hycom1 build_grid_HyCOM1 [private/internal] mom_regridding::build_grid_hycom1->mom_regridding::set_h_neglect mom_regridding::build_rho_grid build_rho_grid [private/internal] mom_regridding::build_rho_grid->mom_regridding::set_h_neglect mom_state_initialization::mom_temp_salt_initialize_from_z MOM_temp_salt_initialize_from_Z [private/internal] mom_state_initialization::mom_temp_salt_initialize_from_z->mom_regridding::set_h_neglect mom_tracer_initialization_from_z::mom_initialize_tracer_from_z MOM_initialize_tracer_from_Z mom_tracer_initialization_from_z::mom_initialize_tracer_from_z->mom_regridding::set_h_neglect
Text view
function set_dz_neglect(GV, US, remap_answer_date, dz_neglect_edge) result(dz_neglect)

Set appropriate values for the negligible vertical layer extents used for remapping based on an answer date.

Parameters
  • GV [in]

    Ocean vertical grid structure

  • US [in]

    A dimensional unit scaling type

  • remap_answer_date [in]

    The vintage of the expressions to use for remapping. Values below 20190101 recover the remapping answers from 2018. Higher values use more robust forms of the same remapping algorithms.

  • dz_neglect_edge [out]

    A negligibly small vertical layer extent used in remapping edge value calculations [Z ~> m]

  • dz_neglect

    A negligibly small vertical layer extent used in remapping cell reconstructions [Z ~> m]

Callers call graph
Callers of mom_regridding::set_dz_neglect calls cluster_mom_diag_remap MOM_diag_remap cluster_mom_regridding MOM_regridding cluster_mom_state_initialization MOM_state_initialization cluster_mom_tracer_initialization_from_z MOM_tracer_initialization_from_Z mom_diag_remap::diag_remap_update diag_remap_update mom_regridding::set_dz_neglect set_dz_neglect mom_diag_remap::diag_remap_update->mom_regridding::set_dz_neglect mom_state_initialization::mom_temp_salt_initialize_from_z MOM_temp_salt_initialize_from_Z [private/internal] mom_state_initialization::mom_temp_salt_initialize_from_z->mom_regridding::set_dz_neglect mom_tracer_initialization_from_z::mom_initialize_tracer_from_z MOM_initialize_tracer_from_Z mom_tracer_initialization_from_z::mom_initialize_tracer_from_z->mom_regridding::set_dz_neglect
Text view
function getCoordinateResolution(CS, undo_scaling)

Query the fixed resolution data

Parameters
  • CS [in]

    Regridding control structure

  • undo_scaling [in]

    If present and true, undo any internal rescaling of the resolution data.

  • getCoordinateResolution

    The resolution or delta of the target coordinate, in units that depend on the coordinate [various]

Callers call graph
Callers of mom_regridding::getcoordinateresolution calls cluster_mom_regridding MOM_regridding cluster_mom_state_initialization MOM_state_initialization mom_regridding::getcoordinateresolution getCoordinateResolution mom_state_initialization::mom_temp_salt_initialize_from_z MOM_temp_salt_initialize_from_Z [private/internal] mom_state_initialization::mom_temp_salt_initialize_from_z->mom_regridding::getcoordinateresolution
Text view
function getCoordinateInterfaces(CS, undo_scaling)

Query the target coordinate interface positions

Parameters
  • CS [in]

    Regridding control structure

  • undo_scaling [in]

    If present and true, undo any internal rescaling of the resolution data.

  • getCoordinateInterfaces

    Interface positions in target coordinate, in units that depend on the coordinate [various]

Callees call graph
Callees of mom_regridding::getcoordinateinterfaces calls cluster_mom_error_handler MOM_error_handler cluster_mom_regridding MOM_regridding mom_error_handler::mom_error MOM_error mom_regridding::getcoordinateinterfaces getCoordinateInterfaces mom_regridding::getcoordinateinterfaces->mom_error_handler::mom_error
Text view
Callers call graph
Callers of mom_regridding::getcoordinateinterfaces calls cluster_mom_ale MOM_ALE cluster_mom_diag_remap MOM_diag_remap cluster_mom_regridding MOM_regridding mom_ale::ale_getcoordinate ALE_getCoordinate mom_regridding::getcoordinateinterfaces getCoordinateInterfaces mom_ale::ale_getcoordinate->mom_regridding::getcoordinateinterfaces mom_ale::ale_updateverticalgridtype ALE_updateVerticalGridType mom_ale::ale_updateverticalgridtype->mom_regridding::getcoordinateinterfaces mom_diag_remap::diag_remap_configure_axes diag_remap_configure_axes mom_diag_remap::diag_remap_configure_axes->mom_regridding::getcoordinateinterfaces
Text view
function getCoordinateUnits(CS)

Query the target coordinate units

Parameters
  • CS [in]

    Regridding control structure

Callees call graph
Callees of mom_regridding::getcoordinateunits calls cluster_mom_error_handler MOM_error_handler cluster_mom_regridding MOM_regridding mom_error_handler::mom_error MOM_error mom_regridding::getcoordinateunits getCoordinateUnits mom_regridding::getcoordinateunits->mom_error_handler::mom_error
Text view
Callers call graph
Callers of mom_regridding::getcoordinateunits calls cluster_mom_ale MOM_ALE cluster_mom_regridding MOM_regridding mom_ale::ale_getcoordinateunits ALE_getCoordinateUnits mom_regridding::getcoordinateunits getCoordinateUnits mom_ale::ale_getcoordinateunits->mom_regridding::getcoordinateunits mom_ale::ale_updateverticalgridtype ALE_updateVerticalGridType mom_ale::ale_updateverticalgridtype->mom_regridding::getcoordinateunits mom_regridding::write_regrid_file write_regrid_file mom_regridding::write_regrid_file->mom_regridding::getcoordinateunits
Text view
function getCoordinateShortName(CS)

Query the short name of the coordinate

Parameters
  • CS [in]

    Regridding control structure

Callees call graph
Callees of mom_regridding::getcoordinateshortname calls cluster_mom_error_handler MOM_error_handler cluster_mom_regridding MOM_regridding mom_error_handler::mom_error MOM_error mom_regridding::getcoordinateshortname getCoordinateShortName mom_regridding::getcoordinateshortname->mom_error_handler::mom_error
Text view
Callers call graph
Callers of mom_regridding::getcoordinateshortname calls cluster_mom_ale MOM_ALE cluster_mom_regridding MOM_regridding mom_ale::ale_updateverticalgridtype ALE_updateVerticalGridType mom_regridding::getcoordinateshortname getCoordinateShortName mom_ale::ale_updateverticalgridtype->mom_regridding::getcoordinateshortname
Text view
subroutine set_regrid_params(CS, boundary_extrapolation, min_thickness, old_grid_weight, use_depth_based_time_filter, depth_of_time_filter_shallow, depth_of_time_filter_deep, interp_scheme, use_adjust_interface_motion, compress_fraction, ref_pressure, integrate_downward_for_e, remap_answers_2018, remap_answer_date, regrid_answer_date, adaptTimeRatio, adaptZoom, adaptZoomCoeff, adaptBuoyCoeff, adaptAlpha, adaptDoMin, adaptDrho0)

Can be used to set any of the parameters for MOM_regridding.

Parameters
  • CS [inout]

    Regridding control structure

  • boundary_extrapolation [in]

    Extrapolate in boundary cells

  • min_thickness [in]

    Minimum thickness allowed when building the new grid [H ~> m or kg m-2]

  • old_grid_weight [in]

    Weight given to old coordinate when time-filtering grid [nondim]

  • use_depth_based_time_filter [in]

    Allow depth-based time filtering

  • depth_of_time_filter_shallow [in]

    Depth to start cubic [H ~> m or kg m-2]

  • depth_of_time_filter_deep [in]

    Depth to end cubic [H ~> m or kg m-2]

  • interp_scheme [in]

    Interpolation method for state-dependent coordinates

  • use_adjust_interface_motion [in]

    Call adjust_interface_motion()

  • compress_fraction [in]

    Fraction of compressibility to add to potential density [nondim]

  • ref_pressure [in]

    The reference pressure for density-dependent coordinates [R L2 T-2 ~> Pa]

  • integrate_downward_for_e [in]

    If true, integrate for interface positions downward from the top.

  • remap_answers_2018 [in]

    If true, use the order of arithmetic and expressions that recover the remapping answers from 2018. Otherwise use more robust but mathematically equivalent expressions.

  • remap_answer_date [in]

    The vintage of the expressions to use for remapping

  • regrid_answer_date [in]

    The vintage of the expressions to use for regridding

  • adaptTimeRatio [in]

    Ratio of the ALE timestep to the grid timescale [nondim].

  • adaptZoom [in]

    Depth of near-surface zooming region [H ~> m or kg m-2].

  • adaptZoomCoeff [in]

    Coefficient of near-surface zooming diffusivity [nondim].

  • adaptBuoyCoeff [in]

    Coefficient of buoyancy diffusivity [nondim].

  • adaptAlpha [in]

    Scaling factor on optimization tendency [nondim].

  • adaptDoMin [in]

    If true, make a HyCOM-like mixed layer by preventing interfaces from being shallower than the depths specified by the regridding coordinate.

  • adaptDrho0 [in]

    Reference density difference for stratification-dependent diffusion. [R ~> kg m-3]

Callees call graph
Callees of mom_regridding::set_regrid_params calls cluster_coord_adapt coord_adapt cluster_coord_hycom coord_hycom cluster_coord_rho coord_rho cluster_coord_sigma coord_sigma cluster_coord_zlike coord_zlike cluster_mom_error_handler MOM_error_handler cluster_mom_regridding MOM_regridding cluster_regrid_interp regrid_interp coord_adapt::set_adapt_params set_adapt_params coord_hycom::set_hycom_params set_hycom_params coord_rho::set_rho_params set_rho_params coord_sigma::set_sigma_params set_sigma_params coord_zlike::set_zlike_params set_zlike_params mom_error_handler::mom_error MOM_error mom_regridding::set_regrid_params set_regrid_params mom_regridding::set_regrid_params->coord_adapt::set_adapt_params mom_regridding::set_regrid_params->coord_hycom::set_hycom_params mom_regridding::set_regrid_params->coord_rho::set_rho_params mom_regridding::set_regrid_params->coord_sigma::set_sigma_params mom_regridding::set_regrid_params->coord_zlike::set_zlike_params mom_regridding::set_regrid_params->mom_error_handler::mom_error regrid_interp::set_interp_answer_date set_interp_answer_date mom_regridding::set_regrid_params->regrid_interp::set_interp_answer_date regrid_interp::set_interp_extrap set_interp_extrap mom_regridding::set_regrid_params->regrid_interp::set_interp_extrap regrid_interp::set_interp_scheme set_interp_scheme mom_regridding::set_regrid_params->regrid_interp::set_interp_scheme
Text view
Callers call graph
Callers of mom_regridding::set_regrid_params calls cluster_mom_ale MOM_ALE cluster_mom_diag_remap MOM_diag_remap cluster_mom_oda_driver_mod MOM_oda_driver_mod cluster_mom_regridding MOM_regridding cluster_mom_state_initialization MOM_state_initialization mom_ale::ale_init ALE_init mom_regridding::set_regrid_params set_regrid_params mom_ale::ale_init->mom_regridding::set_regrid_params mom_ale::ale_update_regrid_weights ALE_update_regrid_weights mom_ale::ale_update_regrid_weights->mom_regridding::set_regrid_params mom_diag_remap::diag_remap_configure_axes diag_remap_configure_axes mom_diag_remap::diag_remap_configure_axes->mom_regridding::set_regrid_params mom_oda_driver_mod::init_oda init_oda mom_oda_driver_mod::init_oda->mom_regridding::set_regrid_params mom_regridding::initialize_regridding initialize_regridding mom_regridding::initialize_regridding->mom_regridding::set_regrid_params mom_state_initialization::mom_temp_salt_initialize_from_z MOM_temp_salt_initialize_from_Z [private/internal] mom_state_initialization::mom_temp_salt_initialize_from_z->mom_regridding::set_regrid_params
Text view
integer function get_regrid_size(CS)

Returns the number of levels/layers in the regridding control structure

Parameters
  • CS [inout]

    Regridding control structure

Callers call graph
Callers of mom_regridding::get_regrid_size calls cluster_mom_diag_remap MOM_diag_remap cluster_mom_regridding MOM_regridding mom_diag_remap::diag_remap_configure_axes diag_remap_configure_axes mom_regridding::get_regrid_size get_regrid_size mom_diag_remap::diag_remap_configure_axes->mom_regridding::get_regrid_size
Text view
function get_zlike_CS(CS)

This returns a copy of the zlike_CS stored in the regridding control structure.

Parameters
  • CS [in]

    Regridding control structure

Callers call graph
Callers of mom_regridding::get_zlike_cs calls cluster_mom_diag_remap MOM_diag_remap cluster_mom_regridding MOM_regridding mom_diag_remap::diag_remap_update diag_remap_update mom_regridding::get_zlike_cs get_zlike_CS mom_diag_remap::diag_remap_update->mom_regridding::get_zlike_cs
Text view
function get_sigma_CS(CS)

This returns a copy of the sigma_CS stored in the regridding control structure.

Parameters
  • CS [in]

    Regridding control structure

Callers call graph
Callers of mom_regridding::get_sigma_cs calls cluster_mom_diag_remap MOM_diag_remap cluster_mom_regridding MOM_regridding mom_diag_remap::diag_remap_update diag_remap_update mom_regridding::get_sigma_cs get_sigma_CS mom_diag_remap::diag_remap_update->mom_regridding::get_sigma_cs
Text view
function get_rho_CS(CS)

This returns a copy of the rho_CS stored in the regridding control structure.

Parameters
  • CS [in]

    Regridding control structure

Callers call graph
Callers of mom_regridding::get_rho_cs calls cluster_mom_diag_remap MOM_diag_remap cluster_mom_regridding MOM_regridding mom_diag_remap::diag_remap_update diag_remap_update mom_regridding::get_rho_cs get_rho_CS mom_diag_remap::diag_remap_update->mom_regridding::get_rho_cs
Text view
function getStaticThickness(CS, SSH, depth)

Return coordinate-derived thicknesses for fixed coordinate systems

Parameters
  • CS [in]

    Regridding control structure

  • SSH [in]

    The sea surface height, in the same units as depth, often [Z ~> m]

  • depth [in]

    The maximum depth of the grid, often [Z ~> m]

  • getStaticThickness

    The returned thicknesses in the units of depth, often [Z ~> m]

Callees call graph
Callees of mom_regridding::getstaticthickness calls cluster_mom_error_handler MOM_error_handler cluster_mom_regridding MOM_regridding mom_error_handler::mom_error MOM_error mom_regridding::getstaticthickness getStaticThickness mom_regridding::getstaticthickness->mom_error_handler::mom_error
Text view
Callers call graph
Callers of mom_regridding::getstaticthickness calls cluster_mom_ale MOM_ALE cluster_mom_regridding MOM_regridding mom_ale::ale_initthicknesstocoord ALE_initThicknessToCoord mom_regridding::getstaticthickness getStaticThickness mom_ale::ale_initthicknesstocoord->mom_regridding::getstaticthickness
Text view
subroutine dz_function1(string, dz)

Parses a string and generates a dz(:) profile that goes like k**power.

Parameters
  • string [in]

    String with list of parameters in form dz_min, H_total, power, precision

  • dz [inout]

    Profile of nominal thicknesses [m] or other units

Callees call graph
Callees of mom_regridding::dz_function1 calls cluster_mom_error_handler MOM_error_handler cluster_mom_regridding MOM_regridding mom_error_handler::mom_error MOM_error mom_regridding::dz_function1 dz_function1 [private/internal] mom_regridding::dz_function1->mom_error_handler::mom_error
Text view
Callers call graph
Callers of mom_regridding::dz_function1 calls cluster_mom_regridding MOM_regridding mom_regridding::dz_function1 dz_function1 [private/internal] mom_regridding::initialize_regridding initialize_regridding mom_regridding::initialize_regridding->mom_regridding::dz_function1
Text view
function create_coord_param(param_prefix, param_name, param_suffix) result(coord_param)

Construct the name of a parameter for a specific coordinate based on param_prefix and param_suffix. For the main, prognostic coordinate this will simply return the parameter name (e.g. P_REF)

Parameters
  • param_name

    The base name of the parameter (e.g. the one used for the main coordinate)

  • param_prefix

    String to prefix to parameter names.

  • param_suffix

    String to append to parameter names.

  • coord_param

    Parameter name prepended by param_prefix and appended with param_suffix

Callees call graph
Callees of mom_regridding::create_coord_param calls cluster_mom_error_handler MOM_error_handler cluster_mom_regridding MOM_regridding mom_error_handler::mom_error MOM_error mom_regridding::create_coord_param create_coord_param [private/internal] mom_regridding::create_coord_param->mom_error_handler::mom_error
Text view
Callers call graph
Callers of mom_regridding::create_coord_param calls cluster_mom_regridding MOM_regridding mom_regridding::create_coord_param create_coord_param [private/internal] mom_regridding::initialize_regridding initialize_regridding mom_regridding::initialize_regridding->mom_regridding::create_coord_param
Text view
integer function rho_function1(string, rho_target)

Parses a string and generates a rho_target(:) profile with refined resolution downward and returns the number of levels

Parameters
  • string [in]

    String with list of parameters in form dz_min, H_total, power, precision

  • rho_target [inout]

    Profile of interface densities [kg m-3]

Callers call graph
Callers of mom_regridding::rho_function1 calls cluster_mom_regridding MOM_regridding mom_regridding::initialize_regridding initialize_regridding mom_regridding::rho_function1 rho_function1 [private/internal] mom_regridding::initialize_regridding->mom_regridding::rho_function1
Text view
API generated with Flint · Rendered from reStructuredText