mom_hybgen_regrid module reference
This module contains the hybgen regridding routines from HYCOM, with minor modifications to follow the MOM6 coding conventions.
Data Types
Control structure containing required parameters for the hybgen coordinate generator. |
Functions/Subroutines
Initialise a hybgen_regrid_CS control structure and store its parameters. |
|
Writes out a file containing any available data related to the vertical grid used by the MOM ocean model. |
|
This subroutine deallocates memory in the control structure for the hybgen module. |
|
This subroutine can be used to retrieve the parameters for the hybgen regrid module. |
|
Modify the input grid to give a new vertical grid based on the HYCOM hybgen code. |
|
Initialize some of the variables that are used for regridding or unmixing, including the stretched contraits on where the new interfaces can be. |
|
The cushion function from Bleck & Benjamin, 1992, which returns a smoothly varying but limited value that goes between dp0 and delp. |
|
Create a new grid for a column of water using the Hybgen algorithm. |
Detailed Description
This module contains the hybgen regridding routines from HYCOM, with minor modifications to follow the MOM6 coding conventions.
Type Documentation
- type mom_hybgen_regrid/hybgen_regrid_cs
Control structure containing required parameters for the hybgen coordinate generator.
- Type fields:
% min_thickness ::
realMinimum thickness allowed for layers [H ~> m or kg m-2].% nk ::
integerNumber of layers on the target grid.% ref_pressure ::
realReference pressure for density calculations [R L2 T-2 ~> Pa].% hybiso ::
realHybgen uses PCM if layer is within hybiso of target density [R ~> kg m-3].% nsigma ::
integerNumber of sigma levels used by HYBGEN.% dp00i ::
realDeep isopycnal spacing minimum thickness [H ~> m or kg m-2].% qhybrlx ::
realFractional relaxation within a regridding step [nondim].% dp0k ::
real, dimension(:), allocatableminimum deep z-layer separation [H ~> m or kg m-2]% ds0k ::
real, dimension(:), allocatableminimum shallow z-layer separation [H ~> m or kg m-2]% coord_scale ::
realA scaling factor to restores the depth coordinates to values in m [m H-1 ~> 1 or m3 kg-1].% rho_coord_scale ::
realA scaling factor to restores the denesity coordinates to values in kg m-3 [kg m-3 R-1 ~> 1].% dpns ::
realdepth to start terrain following [H ~> m or kg m-2]% dsns ::
realdepth to stop terrain following [H ~> m or kg m-2]% min_dilate ::
realThe minimum amount of dilation that is permitted when converting target coordinates from z to z* [nondim]. This limit applies when wetting occurs.% max_dilate ::
realThe maximum amount of dilation that is permitted when converting target coordinates from z to z* [nondim]. This limit applies when drying occurs.% thkbot ::
realThickness of a bottom boundary layer, within which hybgen does something different. [H ~> m or kg m-2].% topiso_const ::
realShallowest depth for isopycnal layers [H ~> m or kg m-2].% target_density ::
real, dimension(:), allocatableNominal density of interfaces [R ~> kg m-3].% dp_far_from_sfc ::
realA distance that determines when an interface is suffiently far from the surface that certain adjustments can be made in the Hybgen regridding code [H ~> m or kg m-2]. In Hycom, this is set to tenm (nominally 10 m).% dp_far_from_bot ::
realA distance that determines when an interface is suffiently far from the bottom that certain adjustments can be made in the Hybgen regridding code [H ~> m or kg m-2]. In Hycom, this is set to onem (nominally 1 m).% h_thin ::
realA layer thickness below which a layer is considered to be too thin for certain adjustments to be made in the Hybgen regridding code [H ~> m or kg m-2]. In Hycom, this is set to onemm (nominally 0.001 m).% rho_eps ::
realA small nonzero density that is used to prevent division by zero in several expressions in the Hybgen regridding code [R ~> kg m-3].% onem ::
realNominally one m in thickness units [H ~> m or kg m-2], used only in certain debugging tests.
Function/Subroutine Documentation
- subroutine mom_hybgen_regrid/init_hybgen_regrid(CS, GV, US, param_file)
Initialise a hybgen_regrid_CS control structure and store its parameters.
- Parameters:
cs :: Unassociated pointer to hold the control structure
gv :: [in] Ocean vertical grid structure
us :: [in] A dimensional unit scaling type
param_file ::
param_file[in] Parameter file
- Call to:
- subroutine mom_hybgen_regrid/write_hybgen_coord_file(GV, CS, filepath)
Writes out a file containing any available data related to the vertical grid used by the MOM ocean model.
- Parameters:
gv :: [in] The ocean’s vertical grid structure
cs :: [in] Control structure for this module
filepath ::
filepath[in] The full path to the file to write
- Call to:
- Called from:
- subroutine mom_hybgen_regrid/end_hybgen_regrid(CS)
This subroutine deallocates memory in the control structure for the hybgen module.
- Parameters:
cs :: Coordinate control structure
- subroutine mom_hybgen_regrid/get_hybgen_regrid_params(CS, nk, ref_pressure, hybiso, nsigma, dp00i, qhybrlx, dp0k, ds0k, dpns, dsns, min_dilate, max_dilate, thkbot, topiso_const, target_density)
This subroutine can be used to retrieve the parameters for the hybgen regrid module.
- Parameters:
cs :: Coordinate regridding control structure
nk ::
nk[out] Number of layers on the target gridref_pressure ::
ref_pressure[out] Reference pressure for density calculations [R L2 T-2 ~> Pa]hybiso ::
hybiso[out] Hybgen uses PCM if layer is within hybiso of target density [R ~> kg m-3]nsigma ::
nsigma[out] Number of sigma levels used by HYBGENdp00i ::
dp00i[out] Deep isopycnal spacing minimum thickness [H ~> m or kg m-2]qhybrlx ::
qhybrlx[out] Fractional relaxation amount per timestep, 0 < qyhbrlx <= 1 [nondim]dp0k ::
dp0k[out] minimum deep z-layer separation [H ~> m or kg m-2]ds0k ::
ds0k[out] minimum shallow z-layer separation [H ~> m or kg m-2]dpns ::
dpns[out] depth to start terrain following [H ~> m or kg m-2]dsns ::
dsns[out] depth to stop terrain following [H ~> m or kg m-2]min_dilate ::
min_dilate[out] The minimum amount of dilation that is permitted when converting target coordinates from z to z* [nondim]. This limit applies when wetting occurs.max_dilate ::
max_dilate[out] The maximum amount of dilation that is permitted when converting target coordinates from z to z* [nondim]. This limit applies when drying occurs.thkbot ::
thkbot[out] Thickness of a bottom boundary layer, within which hybgen does something different. [H ~> m or kg m-2]topiso_const ::
topiso_const[out] Shallowest depth for isopycnal layers [H ~> m or kg m-2]target_density ::
target_density[out] Nominal density of interfaces [R ~> kg m-3]
- Call to:
- Called from:
- subroutine mom_hybgen_regrid/hybgen_regrid(G, GV, US, dp, nom_depth_H, tv, CS, dzInterface, PCM_cell)
Modify the input grid to give a new vertical grid based on the HYCOM hybgen code.
- Parameters:
g :: [in] Ocean grid structure
gv :: [in] Ocean vertical grid structure
us :: [in] A dimensional unit scaling type
dp ::
dp[in] Source grid layer thicknesses [H ~> m or kg m-2]nom_depth_h :: [in] The bathymetric depth of this column
tv ::
tv[in] Thermodynamics structurecs :: [in] hybgen control structure
dzinterface :: [inout] The change in height of each interface,
pcm_cell :: [inout] If true, PCM remapping should be used in a cell.
- Call to:
- subroutine mom_hybgen_regrid/hybgen_column_init(nk, nsigma, dp0k, ds0k, dp00i, topiso_i_j, qhybrlx, dpns, dsns, h_tot, dilate, h_col, fixlay, qhrlx, dp0ij, dp0cum)
Initialize some of the variables that are used for regridding or unmixing, including the stretched contraits on where the new interfaces can be.
- Parameters:
nk ::
nk[in] The number of layers in the new gridnsigma ::
nsigma[in] The number of sigma levelsdp0k ::
dp0k[in] Layer deep z-level spacing minimum thicknesses [H ~> m or kg m-2]ds0k ::
ds0k[in] Layer shallow z-level spacing minimum thicknesses [H ~> m or kg m-2]dp00i ::
dp00i[in] Deep isopycnal spacing minimum thickness [H ~> m or kg m-2]topiso_i_j ::
topiso_i_j[in] Shallowest depth for isopycnal layers [H ~> m or kg m-2]qhybrlx ::
qhybrlx[in] Fractional relaxation amount per timestep, 0 < qyhbrlx <= 1 [nondim]h_tot ::
h_tot[in] The sum of the initial layer thicknesses [H ~> m or kg m-2]dilate ::
dilate[in] A factor by which to dilate the target positions from z to z* [nondim]h_col ::
h_col[in] Initial layer thicknesses [H ~> m or kg m-2]dpns ::
dpns[in] Vertical sum of dp0k [H ~> m or kg m-2]dsns ::
dsns[in] Vertical sum of ds0k [H ~> m or kg m-2]fixlay ::
fixlay[out] Deepest fixed coordinate layerqhrlx ::
qhrlx[out] Fractional relaxation within a timestep (between 0 and 1) [nondim]dp0ij ::
dp0ij[out] minimum layer thickness [H ~> m or kg m-2]dp0cum ::
dp0cum[out] minimum interface depth [H ~> m or kg m-2]
- Called from:
- function mom_hybgen_regrid/cushn(delp, dp0)
The cushion function from Bleck & Benjamin, 1992, which returns a smoothly varying but limited value that goes between dp0 and delp.
- Called from:
- subroutine mom_hybgen_regrid/hybgen_column_regrid(CS, nk, thkbot, Rcv_tgt, fixlay, qhrlx, dp0ij, dp0cum, Rcv, h_in, dp_int)
Create a new grid for a column of water using the Hybgen algorithm.
- Parameters:
cs :: [in] hybgen regridding control structure
nk ::
nk[in] number of layersthkbot ::
thkbot[in] thickness of bottom boundary layer [H ~> m or kg m-2]rcv_tgt :: [in] Target potential density [R ~> kg m-3]
fixlay ::
fixlay[in] deepest fixed coordinate layerqhrlx ::
qhrlx[in] relaxation coefficient per timestep [nondim]dp0ij ::
dp0ij[in] minimum layer thickness [H ~> m or kg m-2]dp0cum ::
dp0cum[in] minimum interface depth [H ~> m or kg m-2]rcv :: [in] Coordinate potential density [R ~> kg m-3]
h_in ::
h_in[in] Layer thicknesses [H ~> m or kg m-2]dp_int ::
dp_int[out] The change in interface positions [H ~> m or kg m-2]
- Call to:
- Called from: