mom_verticalgrid module reference¶
Provides a transparent vertical ocean grid type and supporting routines.
Data Types¶
Describes the vertical ocean grid, including unit conversion factors. |
Functions/Subroutines¶
Allocates and initializes the ocean model vertical grid structure. |
|
Set the scaling factors for restart files to the scaling factors for this run. |
|
Returns the model’s thickness units, usually m or kg/m^2. |
|
Returns the model’s thickness flux units, usually m^3/s or kg/s. |
|
Returns the model’s tracer flux units. |
|
This sets the coordinate data for the “layer mode” of the isopycnal model. |
|
Deallocates the model’s vertical grid structure. |
Detailed Description¶
Provides a transparent vertical ocean grid type and supporting routines.
Type Documentation¶
-
type
mom_verticalgrid/
verticalgrid_type
¶ Describes the vertical ocean grid, including unit conversion factors.
- Type fields
%
ke
[integer] :: The number of layers/levels in the vertical.%
max_depth
[real] :: The maximum depth of the ocean [Z ~> m].%
mks_g_earth
[real] :: The gravitational acceleration in unscaled MKS units [m s-2].%
g_earth
[real] :: The gravitational acceleration [L2 Z-1 T-2 ~> m s-2].%
rho0
[real] :: The density used in the Boussinesq approximation or nominal density used to convert depths into mass units [R ~> kg m-3].%
zaxisunits
[character (len=40)] :: The units that vertical coordinates are written in.%
zaxislongname
[character (len=40)] :: Coordinate name to appear in files, e.g. “Target Potential Density” or “Height”.%
slayer
[real(:),allocatable] :: Coordinate values of layer centers.%
sinterface
[real(:),allocatable] :: Coordinate values on interfaces.%
direction
[integer] :: Direction defaults to 1, positive up.%
boussinesq
[logical] :: If true, make the Boussinesq approximation.%
angstrom_h
[real] :: A one-Angstrom thickness in the model thickness units [H ~> m or kg m-2].%
angstrom_z
[real] :: A one-Angstrom thickness in the model depth units [Z ~> m].%
angstrom_m
[real] :: A one-Angstrom thickness [m].%
h_subroundoff
[real] :: A thickness that is so small that it can be added to a thickness of Angstrom or larger without changing it at the bit level [H ~> m or kg m-2]. If Angstrom is 0 or exceedingly small, this is negligible compared to 1e-17 m.%
g_prime
[real(:),allocatable] :: The reduced gravity at each interface [L2 Z-1 T-2 ~> m s-2].%
rlay
[real(:),allocatable] :: The target coordinate value (potential density) in each layer [R ~> kg m-3].%
nkml
[integer] :: The number of layers at the top that should be treated as parts of a homogeneous region.%
nk_rho_varies
[integer] :: The number of layers at the top where the density does not track any target density.%
h_to_kg_m2
[real] :: A constant that translates thicknesses from the units of thickness to kg m-2.%
kg_m2_to_h
[real] :: A constant that translates thicknesses from kg m-2 to the units of thickness.%
m_to_h
[real] :: A constant that translates distances in m to the units of thickness.%
h_to_m
[real] :: A constant that translates distances in the units of thickness to m.%
h_to_pa
[real] :: A constant that translates the units of thickness to pressure [Pa].%
h_to_z
[real] :: A constant that translates thickness units to the units of depth.%
z_to_h
[real] :: A constant that translates depth units to thickness units.%
h_to_rz
[real] :: A constant that translates thickness units to the units of mass per unit area.%
rz_to_h
[real] :: A constant that translates mass per unit area units to thickness units.%
h_to_mks
[real] :: A constant that translates thickness units to its MKS unit (m or kg m-2) based on GVBoussinesq.%
m_to_h_restart
[real] :: A copy of the m_to_H that is used in restart files.
Function/Subroutine Documentation¶
-
subroutine
mom_verticalgrid/
verticalgridinit
(param_file, GV, US)¶ Allocates and initializes the ocean model vertical grid structure.
- Parameters
param_file :: [in] Parameter file handle/type
gv :: The container for vertical grid data
us :: [in] A dimensional unit scaling type
- Call to
- Called from
-
subroutine
mom_verticalgrid/
fix_restart_scaling
(GV)¶ Set the scaling factors for restart files to the scaling factors for this run.
- Parameters
gv :: [inout] The ocean’s vertical grid structure
-
function
mom_verticalgrid/
get_thickness_units
(GV) [character(len=48)]¶ Returns the model’s thickness units, usually m or kg/m^2.
- Return
undefined :: The vertical thickness units
- Parameters
gv :: [in] The ocean’s vertical grid structure
- Called from
mom_ale::ale_register_diags
mom_diabatic_driver::diabatic_driver_init
mom_diagnostics::register_transport_diags
-
function
mom_verticalgrid/
get_flux_units
(GV) [character(len=48)]¶ Returns the model’s thickness flux units, usually m^3/s or kg/s.
- Return
undefined :: The thickness flux units
- Parameters
gv :: [in] The ocean’s vertical grid structure
-
function
mom_verticalgrid/
get_tr_flux_units
(GV, tr_units, tr_vol_conc_units, tr_mass_conc_units) [character(len=48)]¶ Returns the model’s tracer flux units.
- Return
undefined :: The model’s flux units for a tracer.
- Parameters
gv :: [in] The ocean’s vertical grid structure.
tr_units :: [in] Units for a tracer, for example Celsius or PSU.
tr_vol_conc_units :: [in] The concentration units per unit volume, for example if the units are umol m-3, tr_vol_conc_units would be umol.
tr_mass_conc_units :: [in] The concentration units per unit mass of sea water, for example if the units are mol kg-1, tr_vol_conc_units would be mol.
- Call to
-
subroutine
mom_verticalgrid/
setverticalgridaxes
(Rlay, GV, scale)¶ This sets the coordinate data for the “layer mode” of the isopycnal model.
- Parameters
gv :: [inout] The container for vertical grid data
rlay :: [in] The layer target density [R ~> kg m-3]
scale :: [in] A unit scaling factor for Rlay
- Called from
-
subroutine
mom_verticalgrid/
verticalgridend
(GV)¶ Deallocates the model’s vertical grid structure.
- Parameters
gv :: The ocean’s vertical grid structure