mom_regridding module reference

Generates vertical grids as part of the ALE algorithm.

More…

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.

build_zstar_grid()

Builds a z*-coordinate grid with partial steps (Adcroft and Campin, 2004).

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.

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.

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.

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:

\[z^n_{k+1/2} = z^{n-1}_{k+1/2} + \Delta z_{k+1/2}\]

with the positive upward coordinate convention

\[z_{k-1/2} = z_{k+1/2} + h_k\]

so that

\[h^n_k = h^{n-1}_k + ( \Delta z_{k-1/2} - \Delta z_{k+1/2} )\]

Original date of creation: 2008.06.09 by L. White

Type Documentation

type  mom_regridding/regridding_cs

Regridding control structure.

Type fields:
  • % coordinateresolution :: real, dimension(:), allocatable This array is set by function setCoordinateResolution() It contains the “resolution” or delta coordinate of the target coordinate. It has the units of the target coordinate, e.g. [Z ~> m] for z*, [nondim] for sigma, etc.

  • % coord_scale :: real This is a scaling factor that restores coordinateResolution to values in the natural units for output, perhaps [nondim].

  • % target_density :: real, dimension(:), allocatable This array is set by function

  • % target_density_set :: logical A flag to indicate that the target_density arrays has been filled with data.

  • % coordinateresolution_3d :: real, dimension(:,:,:), allocatable Nominal HYCOM1 3D near-surface resolution [Z ~> m].

  • % target_density_3d :: real, dimension(:,:,:), allocatable Nominal HYCOM1 3D density of interfaces [R ~> kg m-3].

  • % max_interface_depths :: real, dimension(:), allocatable This array is set by function

  • % max_layer_thickness :: real, dimension(:), allocatable This array is set by function

  • % nk :: integer Number of layers/levels in generated grid.

  • % regridding_scheme :: integer Indicates which grid to use in the vertical (z*, sigma, target interface densities)

  • % interp_cs :: type(interp_cs_type) Interpolation control structure.

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

  • % use_adjust_interface_motion :: logical If true, call

  • % ref_pressure :: real Reference pressure for potential density calculations [R L2 T-2 ~> Pa].

  • % use_depth_based_time_filter :: logical If true, always pass through the depth-based time filtering that uses CSold_grid_weight If false, allows bypassing of the call if CSold_grid_weight==0.

  • % old_grid_weight :: real 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.

  • % depth_of_time_filter_shallow :: real Depth above which no time-filtering of grid is applied [H ~> m or kg m-2].

  • % depth_of_time_filter_deep :: real Depth below which time-filtering of grid is applied at full effect [H ~> m or kg m-2].

  • % compressibility_fraction :: real Fraction (between 0 and 1) of compressibility to add to potential density profiles when interpolating for target grid positions [nondim].

  • % set_maximum_depths :: logical If true, each interface is given a maximum depth based on a rescaling of the indexing of coordinateResolution.

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

  • % remap_answer_date :: integer 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 :: logical If true, use the hybgen unmixing code before remapping.

  • % zlike_cs :: type(zlike_cs), pointer Control structure for z-like coordinate generator.

  • % sigma_cs :: type(sigma_cs), pointer Control structure for sigma coordinate generator.

  • % rho_cs :: type(rho_cs), pointer Control structure for rho coordinate generator.

  • % hycom_cs :: type(hycom_cs), pointer Control structure for hybrid coordinate generator.

  • % adapt_cs :: type(adapt_cs), pointer Control structure for adaptive coordinate generator.

  • % hybgen_cs :: type(hybgen_regrid_cs), pointer Control structure for hybgen regridding.

[source]

Function/Subroutine Documentation

subroutine mom_regridding/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 :: max_depth [in] The maximum depth of the ocean [Z ~> m].

  • param_file :: param_file [in] Parameter file

  • mdl :: mdl [in] Name of calling module.

  • coord_mode :: coord_mode [in] Coordinate mode

  • param_prefix :: param_prefix [in] String to prefix to parameter names. If empty, causes main model parameters to be used.

  • param_suffix :: param_suffix [in] String to append to parameter names.

Call to:

create_coord_param dz_function1 mom_string_functions::extract_integer mom_string_functions::extract_real mom_string_functions::extractword initcoord mom_error_handler::mom_error regrid_consts::regridding_adaptive regrid_consts::regridding_hybgen regrid_consts::regridding_hycom1 regriddingdefaultboundaryextrapolation regriddingdefaultinterpscheme regriddingdefaultminthickness regriddinginterpschemedoc rho_function1 set_regrid_max_depths set_regrid_max_thickness set_regrid_params set_target_densities set_target_densities_3d set_target_densities_from_gv setcoordinateresolution setcoordinateresolution_3d uniformresolution mom_io::verify_variable_units

[source]

subroutine mom_regridding/end_regridding(CS)

Deallocation of regridding memory.

Parameters:

cs :: [inout] Regridding control structure

Call to:

coord_adapt::end_coord_adapt coord_sigma::end_coord_sigma coord_zlike::end_coord_zlike

[source]

subroutine mom_regridding/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 :: h [in] Current 3D grid obtained after the last time step [H ~> m or kg m-2]

  • tv :: tv [in] Thermodynamical variables (T, S, …)

  • h_new :: 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 :: frac_shelf_h [in] Fractional ice shelf coverage [nondim]

  • pcm_cell :: [out] Use PCM remapping in cells where true

Call to:

build_grid_adaptive build_grid_hycom1 build_rho_grid build_sigma_grid build_zstar_grid calc_h_new_by_dz check_grid_column mom_error_handler::mom_error regrid_consts::regridding_adaptive regrid_consts::regridding_hybgen regrid_consts::regridding_hycom1

[source]

subroutine mom_regridding/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 :: do_conv_adj [out] Convective adjustment should be done

  • do_hybgen_unmix :: do_hybgen_unmix [out] Hybgen unmixing should be done

  • hybgen_cs :: [out] Control structure for hybgen regridding for sharing parameters.

Call to:

mom_error_handler::mom_error regrid_consts::regridding_adaptive regrid_consts::regridding_hybgen regrid_consts::regridding_hycom1

[source]

subroutine mom_regridding/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 :: 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 :: h_new [inout] New layer thicknesses in the same units as h [H ~> m or kg m-2]

Called from:

build_grid_hycom1 regridding_main

[source]

subroutine mom_regridding/check_grid_column(nk, h, dzInterface, msg)

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

Parameters:
  • nk :: nk [in] Number of cells

  • h :: h [in] Cell thicknesses [Z ~> m] or arbitrary units

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

  • msg :: msg [in] Message to append to errors

Call to:

mom_error_handler::mom_error

Called from:

regridding_main

[source]

subroutine mom_regridding/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 :: nk [in] Number of cells in source grid

  • z_old :: z_old [in] Old grid position [H ~> m or kg m-2]

  • z_new :: z_new [in] New grid position before filtering [H ~> m or kg m-2]

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

Call to:

mom_error_handler::mom_error

Called from:

build_grid_adaptive build_grid_hycom1 build_rho_grid build_sigma_grid build_zstar_grid

[source]

subroutine mom_regridding/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 :: 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 :: 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]

Call to:

adjust_interface_motion coord_zlike::build_zstar_column filtered_grid_motion mom_error_handler::mom_error

Called from:

regridding_main

[source]

subroutine mom_regridding/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 :: 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]

Call to:

coord_sigma::build_sigma_column filtered_grid_motion mom_error_handler::mom_error

Called from:

regridding_main

[source]

subroutine mom_regridding/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 :: 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 :: 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 :: frac_shelf_h [in] Fractional ice shelf coverage [nondim]

Call to:

filtered_grid_motion mom_error_handler::mom_error set_h_neglect

Called from:

regridding_main

[source]

subroutine mom_regridding/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.

Parameters:
  • g :: [in] Grid structure

  • gv :: [in] Ocean vertical grid structure

  • us :: [in] A dimensional unit scaling type

  • h :: 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 :: tv [in] Thermodynamics structure

  • remapcs :: [in] The remapping control structure

  • cs :: [in] Regridding control structure

  • h_new :: 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 :: 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]

Call to:

adjust_interface_motion calc_h_new_by_dz filtered_grid_motion mom_error_handler::mom_error set_h_neglect

Called from:

regridding_main

[source]

subroutine mom_regridding/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 :: 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 :: 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

Call to:

adjust_interface_motion mom_error_handler::assert coord_adapt::build_adapt_column filtered_grid_motion

Called from:

regridding_main

[source]

subroutine mom_regridding/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 :: nk [in] Number of layers in h_old

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

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

Call to:

mom_error_handler::mom_error

Called from:

build_grid_adaptive build_grid_hycom1 build_zstar_grid

[source]

subroutine mom_regridding/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 :: h [inout] Layer thicknesses [H ~> m or kg m-2]

Call to:

coord_rho::old_inflate_layers_1d

[source]

subroutine mom_regridding/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 :: h [inout] Layer thicknesses [H ~> m or kg m-2]

  • tv :: tv [inout] A structure pointing to various thermodynamic variables

[source]

function  mom_regridding/uniformresolution(nk, coordMode, maxDepth, rhoLight, rhoHeavy)

Return a uniform resolution vector in the units of the coordinate.

Parameters:
  • nk :: 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. 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]

Return:

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

Call to:

mom_error_handler::mom_error regrid_consts::regridding_adaptive regrid_consts::regridding_hybgen regrid_consts::regridding_hycom1

Called from:

initialize_regridding

[source]

subroutine mom_regridding/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 :: coord_mode [in] A string indicating the coordinate mode. See the documentation for regrid_consts() for the recognized values. for the recognized values.

  • param_file :: param_file [in] Parameter file

Call to:

coord_hycom::init_3d_coord_hycom coord_adapt::init_coord_adapt coord_sigma::init_coord_sigma coord_zlike::init_coord_zlike regrid_consts::regridding_adaptive regrid_consts::regridding_hybgen regrid_consts::regridding_hycom1

Called from:

initialize_regridding

[source]

subroutine mom_regridding/setcoordinateresolution(dz, CS, scale)

Set the fixed resolution data.

Parameters:
  • dz :: 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 :: 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.

Call to:

mom_error_handler::mom_error

Called from:

initialize_regridding

[source]

subroutine mom_regridding/setcoordinateresolution_3d(dz_3d, CS, scale)

Set the 3d fixed resolution data.

Parameters:
  • dz_3d :: 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 :: scale [in] A scaling factor converting dz to coordRes [Z m-1 ~> 1]

Call to:

mom_error_handler::mom_error

Called from:

initialize_regridding

[source]

subroutine mom_regridding/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

Called from:

initialize_regridding

[source]

subroutine mom_regridding/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 :: scale [in] A scaling factor converting densities [R m3 kg-1 ~> 1]

  • rho_int_3d :: rho_int_3d [in] Interface densities [kg m-3]

Call to:

mom_error_handler::mom_error

Called from:

initialize_regridding

[source]

subroutine mom_regridding/set_target_densities(CS, rho_int)

Set target densities based on vector of interface values.

Parameters:
  • cs :: [inout] Regridding control structure

  • rho_int :: rho_int [in] Interface densities [R ~> kg m-3]

Call to:

mom_error_handler::mom_error

Called from:

initialize_regridding

[source]

subroutine mom_regridding/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 :: 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]

Call to:

mom_error_handler::mom_error regrid_consts::regridding_hycom1

Called from:

initialize_regridding

[source]

subroutine mom_regridding/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 :: 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]

Call to:

regrid_consts::regridding_hycom1

Called from:

initialize_regridding

[source]

subroutine mom_regridding/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 :: filepath [in] The full path to the file to write

Call to:

getcoordinateunits regrid_consts::regridding_hybgen mom_hybgen_regrid::write_hybgen_coord_file

[source]

function  mom_regridding/set_h_neglect(GV, remap_answer_date, h_neglect_edge)

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 :: 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 :: h_neglect_edge [out] A negligibly small thickness used in remapping edge value calculations [H ~> m or kg m-2]

Return:

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

Called from:

build_grid_hycom1 build_rho_grid mom_oda_driver_mod::init_oda mom_tracer_initialization_from_z::mom_initialize_tracer_from_z

[source]

function  mom_regridding/set_dz_neglect(GV, US, remap_answer_date, dz_neglect_edge)

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 :: 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 :: dz_neglect_edge [out] A negligibly small vertical layer extent used in remapping edge value calculations [Z ~> m]

Return:

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

Called from:

mom_tracer_initialization_from_z::mom_initialize_tracer_from_z

[source]

function  mom_regridding/getcoordinateresolution(CS, undo_scaling)

Query the fixed resolution data.

Parameters:
  • cs :: [in] Regridding control structure

  • undo_scaling :: undo_scaling [in] If present and true, undo any internal rescaling of the resolution data.

Return:

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

[source]

function  mom_regridding/getcoordinateinterfaces(CS, undo_scaling)

Query the target coordinate interface positions.

Parameters:
  • cs :: [in] Regridding control structure

  • undo_scaling :: undo_scaling [in] If present and true, undo any internal rescaling of the resolution data.

Return:

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

Call to:

mom_error_handler::mom_error

[source]

function  mom_regridding/getcoordinateunits(CS)

Query the target coordinate units.

Parameters:

cs :: [in] Regridding control structure

Call to:

mom_error_handler::mom_error regrid_consts::regridding_adaptive regrid_consts::regridding_hybgen regrid_consts::regridding_hycom1

Called from:

write_regrid_file

[source]

function  mom_regridding/getcoordinateshortname(CS)

Query the short name of the coordinate.

Parameters:

cs :: [in] Regridding control structure

Call to:

mom_error_handler::mom_error regrid_consts::regridding_adaptive regrid_consts::regridding_hybgen regrid_consts::regridding_hycom1

[source]

subroutine mom_regridding/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 :: boundary_extrapolation [in] Extrapolate in boundary cells

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

  • old_grid_weight :: old_grid_weight [in] Weight given to old coordinate when time-filtering grid [nondim]

  • use_depth_based_time_filter :: use_depth_based_time_filter [in] Allow depth-based time filtering

  • depth_of_time_filter_shallow :: depth_of_time_filter_shallow [in] Depth to start cubic [H ~> m or kg m-2]

  • depth_of_time_filter_deep :: depth_of_time_filter_deep [in] Depth to end cubic [H ~> m or kg m-2]

  • interp_scheme :: interp_scheme [in] Interpolation method for state-dependent coordinates

  • use_adjust_interface_motion :: use_adjust_interface_motion [in] Call adjust_interface_motion()

  • compress_fraction :: compress_fraction [in] Fraction of compressibility to add to potential density [nondim]

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

  • integrate_downward_for_e :: integrate_downward_for_e [in] If true, integrate for interface positions downward from the top.

  • remap_answers_2018 :: 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 :: remap_answer_date [in] The vintage of the expressions to use for remapping

  • regrid_answer_date :: 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]

Call to:

mom_error_handler::mom_error regrid_consts::regridding_adaptive regrid_consts::regridding_hybgen regrid_consts::regridding_hycom1 coord_adapt::set_adapt_params regrid_interp::set_interp_answer_date regrid_interp::set_interp_extrap regrid_interp::set_interp_scheme coord_sigma::set_sigma_params coord_zlike::set_zlike_params

Called from:

mom_oda_driver_mod::init_oda initialize_regridding

[source]

function  mom_regridding/get_regrid_size(CS)

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

Parameters:

cs :: [inout] Regridding control structure

[source]

function  mom_regridding/get_zlike_cs(CS)

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

Parameters:

cs :: [in] Regridding control structure

Called from:

mom_diag_remap::diag_remap_update

[source]

function  mom_regridding/get_sigma_cs(CS)

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

Parameters:

cs :: [in] Regridding control structure

Called from:

mom_diag_remap::diag_remap_update

[source]

function  mom_regridding/get_rho_cs(CS)

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

Parameters:

cs :: [in] Regridding control structure

Called from:

mom_diag_remap::diag_remap_update

[source]

function  mom_regridding/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 :: depth [in] The maximum depth of the grid, often [Z ~> m]

Return:

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

Call to:

mom_error_handler::mom_error regrid_consts::regridding_adaptive regrid_consts::regridding_hybgen regrid_consts::regridding_hycom1

Called from:

mom_ale::ale_initthicknesstocoord

[source]

subroutine mom_regridding/dz_function1(string, dz)

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

Parameters:
  • string :: string [in] String with list of parameters in form dz_min, H_total, power, precision

  • dz :: dz [inout] Profile of nominal thicknesses [m] or other units

Call to:

mom_error_handler::mom_error

Called from:

initialize_regridding

[source]

function  mom_regridding/create_coord_param(param_prefix, param_name, param_suffix)

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 :: param_name The base name of the parameter (e.g. the one used for the main coordinate)

  • param_prefix :: param_prefix String to prefix to parameter names.

  • param_suffix :: param_suffix String to append to parameter names.

Return:

undefined :: Parameter name prepended by param_prefix and appended with param_suffix

Call to:

max_param_length mom_error_handler::mom_error

Called from:

initialize_regridding

[source]

function  mom_regridding/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 :: string [in] String with list of parameters in form dz_min, H_total, power, precision

  • rho_target :: rho_target [inout] Profile of interface densities [kg m-3]

Called from:

initialize_regridding

[source]

[source]