MOM_regridding module reference
Generates vertical grids as part of the ALE algorithm
Data Types
Regridding control structure |
Functions/Subroutines
Initialization and configures a regridding control structure based on customizable run-time parameters |
|
Deallocation of regridding memory |
|
Dispatching regridding routine for orchestrating regridding & remapping |
|
This routine returns flags indicating which pre-remapping state adjustments are needed depending on the coordinate mode in use. |
|
Calculates h_new from h + delta_k dzInterface |
|
Check that the total thickness of new and old grids are consistent |
|
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. |
|
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 . |
|
This routine builds a grid based on terrain-following coordinates. |
|
This routine builds a new grid based on a given set of target interface densities. |
|
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. |
|
This subroutine builds an adaptive grid that follows density surfaces where possible, subject to constraints on the smoothness of interface heights. |
|
Adjust dz_Interface to ensure non-negative future thicknesses |
|
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. |
|
Achieve convective adjustment by swapping layers |
|
Return a uniform resolution vector in the units of the coordinate |
|
Initialize the coordinate resolutions by calling the appropriate initialization routine for the specified coordinate mode. |
|
Set the fixed resolution data |
|
Set the 3d fixed resolution data |
|
Set target densities based on the old Rlay variable |
|
Set target densities based on vector of interface values |
|
Set target densities based on vector of interface values |
|
Set maximum interface depths based on a vector of input values. |
|
Set maximum layer thicknesses based on a vector of input values. |
|
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 appropriate values for the negligible thicknesses used for remapping based on an answer date. |
|
Set appropriate values for the negligible vertical layer extents used for remapping based on an answer date. |
|
Query the fixed resolution data |
|
Query the target coordinate interface positions |
|
Query the target coordinate units |
|
Query the short name of the coordinate |
|
Can be used to set any of the parameters for MOM_regridding. |
|
Returns the number of levels/layers in the regridding control structure |
|
This returns a copy of the zlike_CS stored in the regridding control structure. |
|
This returns a copy of the sigma_CS stored in the regridding control structure. |
|
This returns a copy of the rho_CS stored in the regridding control structure. |
|
Return coordinate-derived thicknesses for fixed coordinate systems |
|
Parses a string and generates a dz(:) profile that goes like k**power. |
|
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) |
|
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:
with the positive upward coordinate convention
so that
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
Text view
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::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::initialize_regridding → mom_regridding::rho_function1
mom_regridding::initialize_regridding → mom_regridding::set_regrid_max_depths
mom_regridding::initialize_regridding → mom_regridding::set_regrid_max_thickness
mom_regridding::initialize_regridding → mom_regridding::set_regrid_params
mom_regridding::initialize_regridding → mom_regridding::set_target_densities
mom_regridding::initialize_regridding → mom_regridding::set_target_densities_3d
mom_regridding::initialize_regridding → mom_regridding::set_target_densities_from_gv
mom_regridding::initialize_regridding → mom_regridding::setcoordinateresolution
mom_regridding::initialize_regridding → mom_regridding::setcoordinateresolution_3d
mom_regridding::initialize_regridding → mom_regridding::uniformresolution
mom_regridding::initialize_regridding → mom_string_functions::extract_integer
mom_regridding::initialize_regridding → mom_string_functions::extract_real
mom_regridding::initialize_regridding → mom_string_functions::extractword
mom_regridding::initialize_regridding → mom_string_functions::slasher
mom_regridding::initialize_regridding → regrid_consts::coordinatemode
mom_regridding::initialize_regridding → regrid_consts::interface::coordinateunits
mom_regridding::initialize_regridding → regrid_consts::interface::state_dependent
- subroutine end_regridding(CS)
Deallocation of regridding memory
- Parameters
CS [inout]
Regridding control structure
Callees call graph
Text view
mom_regridding::end_regridding → coord_adapt::end_coord_adapt
mom_regridding::end_regridding → coord_hycom::end_coord_hycom
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
Callers call graph
- 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
Text view
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
Callers call graph
- 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
- 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
- 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
- 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]
Callers call graph
Text view
mom_regridding::build_grid_adaptive → mom_regridding::filtered_grid_motion
mom_regridding::build_grid_hycom1 → mom_regridding::filtered_grid_motion
mom_regridding::build_rho_grid → mom_regridding::filtered_grid_motion
mom_regridding::build_sigma_grid → mom_regridding::filtered_grid_motion
mom_regridding::build_zstar_grid → mom_regridding::filtered_grid_motion
- 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
- 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
- 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
- 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
Text view
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::build_grid_hycom1 → mom_regridding::calc_h_new_by_dz
mom_regridding::build_grid_hycom1 → mom_regridding::filtered_grid_motion
mom_regridding::build_grid_hycom1 → mom_regridding::set_h_neglect
- 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
- 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]
- 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
Callers call graph
- 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
- 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
Callers call graph
- 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
- 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.
Callers call graph
- 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
Callers call graph
- 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
- 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]
Callers call graph
- 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]
Callers call graph
- 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
Callers call graph
- 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
Callers call graph
- 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
- 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
Text view
mom_diag_remap::diag_remap_update → mom_regridding::set_h_neglect
mom_oda_driver_mod::init_oda → mom_regridding::set_h_neglect
mom_regridding::build_grid_hycom1 → mom_regridding::set_h_neglect
mom_regridding::build_rho_grid → mom_regridding::set_h_neglect
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_regridding::set_h_neglect
- 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]
- 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
- 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]
- function getCoordinateUnits(CS)
Query the target coordinate units
- Parameters
CS [in]
Regridding control structure
- function getCoordinateShortName(CS)
Query the short name of the coordinate
- Parameters
CS [in]
Regridding control structure
Callers call graph
- 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
Text view
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
mom_regridding::set_regrid_params → regrid_interp::set_interp_answer_date
mom_regridding::set_regrid_params → regrid_interp::set_interp_extrap
mom_regridding::set_regrid_params → regrid_interp::set_interp_scheme
Callers call graph
Text view
mom_ale::ale_update_regrid_weights → mom_regridding::set_regrid_params
mom_diag_remap::diag_remap_configure_axes → mom_regridding::set_regrid_params
mom_oda_driver_mod::init_oda → mom_regridding::set_regrid_params
mom_regridding::initialize_regridding → mom_regridding::set_regrid_params
mom_state_initialization::mom_temp_salt_initialize_from_z → mom_regridding::set_regrid_params
- 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
- 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
- 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
- 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
- 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]
- 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
- 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
Callers call graph
- 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]