mom_state_initialization module reference¶
Initialization functions for state variables, u, v, h, T and S.
Functions/Subroutines¶
Initialize temporally evolving fields, either as initial conditions or by reading them from a restart (or saves) file. |
|
Reads the layer thicknesses or interface heights from a file. |
|
Adjust interface heights to fit the bathymetry and diagnose layer thickness. |
|
Initializes thickness to be uniform. |
|
Initialize thickness from a 1D list. |
|
|
Search density space for location of layers (not implemented!) |
Depress the sea-surface based on an initial condition file. |
|
Adjust the layer thicknesses by cutting away the top of each model column at the depth where the hydrostatic pressure matches an imposed surface pressure read from file. |
|
Calculate the hydrostatic equilibrium position of the surface under an ice shelf. |
|
Adjust the layer thicknesses by removing the top of the water column above the depth where the hydrostatic pressure matches p_surf. |
|
Initialize horizontal velocity components from file. |
|
Initialize horizontal velocity components to zero. |
|
Sets the initial velocity components to uniform. |
|
Sets the initial velocity components to be circular with no flow at edges of domain and center. |
|
Initializes temperature and salinity from file. |
|
Initializes temperature and salinity from a 1D profile. |
|
Initializes temperature and salinity by fitting to density. |
|
Initializes T and S with linear profiles according to reference surface layer salinity and temperature and a specified range. |
|
This subroutine sets the inverse restoration time (Idamp), and the values towards which the interface heights and an arbitrary number of tracers should be restored within each sponge. |
|
This subroutine sets the 4 bottom depths at velocity points to be the maximum of the adjacent depths. |
|
Subroutine to pre-compute global integrals of grid quantities for later use in reporting diagnostics. |
|
This subroutine sets the 4 bottom depths at velocity points to be the minimum of the adjacent depths. |
|
This subroutine determines the isopycnal or other coordinate interfaces and layer potential temperatures and salinities directly from a z-space file on a latitude-longitude grid. |
|
Find interface positions corresponding to interpolated depths in a density profile. |
|
Run simple unit tests. |
Detailed Description¶
Initialization functions for state variables, u, v, h, T and S.
Function/Subroutine Documentation¶
-
subroutine
mom_state_initialization/
mom_initialize_state
(u, v, h, tv, Time, G, GV, US, PF, dirs, restart_CS, ALE_CSp, tracer_Reg, sponge_CSp, ALE_sponge_CSp, oda_incupd_CSp, OBC, Time_in, frac_shelf_h, mass_shelf)¶ Initialize temporally evolving fields, either as initial conditions or by reading them from a restart (or saves) file.
- Parameters:
g :: [inout] The ocean’s grid structure.
gv :: [in] The ocean’s vertical grid structure.
us :: [in] A dimensional unit scaling type
u :: [out] The zonal velocity that is being
v :: [out] The meridional velocity that is being
h :: [out] Layer thicknesses [H ~> m or kg m-2]
tv :: [inout] A structure pointing to various thermodynamic variables
time :: [inout] Time at the start of the run segment.
pf :: [in] A structure indicating the open file to parse for model parameter values.
dirs :: [in] A structure containing several relevant directory paths.
restart_cs :: [inout] MOM restart control structure
ale_csp :: The ALE control structure for remapping
tracer_reg :: A pointer to the tracer registry
sponge_csp :: The layerwise sponge control structure.
ale_sponge_csp :: The ALE sponge control structure.
obc :: The open boundary condition control structure.
oda_incupd_csp :: The oda_incupd control structure.
time_in :: [in] Time at the start of the run segment.
frac_shelf_h :: [in] The fraction of the grid cell covered
mass_shelf :: [in] The mass per unit area of the overlying
- Call to:
adjustment_initialization::adjustment_initialize_temperature_salinity
mom_ale::ale_regrid_accelerated
baroclinic_zone_initialization::baroclinic_zone_init_temperature_salinity
benchmark_initialization::benchmark_init_temperature_salinity
bfb_initialization::bfb_initialize_sponges_southonly
mom_interface_heights::calc_derived_thermo
calc_sfc_displacement
mom_error_handler::calltree_enter
mom_error_handler::calltree_leave
circle_obcs_initialization::circle_obcs_initialize_thickness
dense_water_initialization::dense_water_initialize_sponges
depress_surface
dome2d_initialization::dome2d_initialize_sponges
dome_initialization::dome_initialize_sponges
dumbbell_initialization::dumbbell_initialize_sponges
dyed_channel_initialization::dyed_channel_set_obc_tracer_data
dyed_obcs_initialization::dyed_obcs_set_obc_data
external_gwave_initialization::external_gwave_initialize_thickness
initialize_oda_incupd_file
initialize_sponges_file
initialize_temp_salt_fit
initialize_temp_salt_from_file
initialize_temp_salt_from_profile
initialize_temp_salt_linear
initialize_thickness_from_file
initialize_thickness_list
initialize_thickness_search
initialize_thickness_uniform
initialize_velocity_circular
initialize_velocity_from_file
initialize_velocity_uniform
initialize_velocity_zero
isomip_initialization::isomip_initialize_temperature_salinity
lock_exchange_initialization::lock_exchange_initialize_thickness
mom_string_functions::lowercase
mdl
mom_temp_salt_initialize_from_z
neverworld_initialization::neverworld_initialize_thickness
phillips_initialization::phillips_initialize_sponges
mom_restart::restart_registry_lock
rgc_initialization::rgc_initialize_sponges
rossby_front_2d_initialization::rossby_front_initialize_velocity
scm_cvmix_tests::scm_cvmix_tests_ts_init
seamount_initialization::seamount_initialize_temperature_salinity
sloshing_initialization::sloshing_initialize_temperature_salinity
soliton_initialization::soliton_initialize_thickness
supercritical_initialization::supercritical_set_obc_data
trim_for_ice
mom_open_boundary::update_obc_segment_data
user_initialization::user_initialize_sponges
- Called from:
-
subroutine
mom_state_initialization/
initialize_thickness_from_file
(h, depth_tot, G, GV, US, param_file, file_has_thickness, just_read, mass_file)¶ Reads the layer thicknesses or interface heights from a file.
- Parameters:
g :: [in] The ocean’s grid structure
gv :: [in] The ocean’s vertical grid structure
us :: [in] A dimensional unit scaling type
h :: [out] The thickness that is being initialized, in height
depth_tot :: [in] The nominal total depth of the ocean [Z ~> m]
param_file :: [in] A structure indicating the open file to parse for model parameter values.
file_has_thickness :: [in] If true, this file contains layer thicknesses; otherwise it contains interface heights.
just_read :: [in] If true, this call will only read parameters without changing h.
mass_file :: [in] If true, this file contains layer thicknesses in units of mass per unit area.
- Call to:
adjustetatofitbathymetry
mom_error_handler::calltree_enter
mom_error_handler::calltree_leave
- Called from:
-
subroutine
mom_state_initialization/
adjustetatofitbathymetry
(G, GV, US, eta, h, ht, dZ_ref_eta)¶ Adjust interface heights to fit the bathymetry and diagnose layer thickness.
If the bottom most interface is below the topography then the bottom-most layers are contracted to ANGSTROM thickness (which may be 0). If the bottom most interface is above the topography then the entire column is dilated (expanded) to fill the void.
- Parameters:
g :: [in] The ocean’s grid structure
gv :: [in] The ocean’s vertical grid structure
us :: [in] A dimensional unit scaling type
eta :: [inout] Interface heights [Z ~> m].
h :: [inout] Layer thicknesses [Z ~> m]
ht :: [in] Tolerance to exceed adjustment criteria [Z ~> m]
dz_ref_eta :: [in] The difference between the reference heights for bathyT and eta [Z ~> m], 0 by default.
- Called from:
initialize_thickness_from_file
mom_temp_salt_initialize_from_z
-
subroutine
mom_state_initialization/
initialize_thickness_uniform
(h, depth_tot, G, GV, param_file, just_read)¶ Initializes thickness to be uniform.
- Parameters:
g :: [in] The ocean’s grid structure.
gv :: [in] The ocean’s vertical grid structure.
h :: [out] The thickness that is being initialized [Z ~> m]
depth_tot :: [in] The nominal total depth of the ocean [Z ~> m]
param_file :: [in] A structure indicating the open file to parse for model parameter values.
just_read :: [in] If true, this call will only read parameters without changing h.
- Call to:
mom_error_handler::calltree_enter
mom_error_handler::calltree_leave
- Called from:
-
subroutine
mom_state_initialization/
initialize_thickness_list
(h, depth_tot, G, GV, US, param_file, just_read)¶ Initialize thickness from a 1D list.
- Parameters:
g :: [in] The ocean’s grid structure.
gv :: [in] The ocean’s vertical grid structure.
us :: [in] A dimensional unit scaling type
h :: [out] The thickness that is being initialized [Z ~> m]
depth_tot :: [in] The nominal total depth of the ocean [Z ~> m]
param_file :: [in] A structure indicating the open file to parse for model parameter values.
just_read :: [in] If true, this call will only read parameters without changing h.
- Call to:
mom_error_handler::calltree_enter
mom_error_handler::calltree_leave
- Called from:
-
subroutine
mom_state_initialization/
initialize_thickness_searchNone
()¶ Search density space for location of layers (not implemented!)
- Called from:
-
subroutine
mom_state_initialization/
depress_surface
(h, G, GV, US, param_file, tv, just_read, z_top_shelf)¶ Depress the sea-surface based on an initial condition file.
- Parameters:
g :: [in] The ocean’s grid structure
gv :: [in] The ocean’s vertical grid structure
us :: [in] A dimensional unit scaling type
h :: [inout] Layer thicknesses [H ~> m or kg m-2]
param_file :: [in] A structure to parse for run-time parameters
tv :: [in] A structure pointing to various thermodynamic variables
just_read :: [in] If true, this call will only read parameters without changing h.
z_top_shelf :: [in] Top interface position under ice shelf [Z ~> m]
- Called from:
-
subroutine
mom_state_initialization/
trim_for_ice
(PF, G, GV, US, ALE_CSp, tv, h, just_read)¶ Adjust the layer thicknesses by cutting away the top of each model column at the depth where the hydrostatic pressure matches an imposed surface pressure read from file.
- Parameters:
pf :: [in] Parameter file structure
g :: [in] Ocean grid structure
gv :: [in] Vertical grid structure
us :: [in] A dimensional unit scaling type
ale_csp :: ALE control structure
tv :: [inout] Thermodynamics structure
h :: [inout] Layer thickness [H ~> m or kg m-2]
just_read :: [in] If true, this call will only read parameters without changing h.
- Call to:
cut_off_column_top
mom_remapping::initialize_remapping
mom_ale::ts_plm_edge_values
- Called from:
-
subroutine
mom_state_initialization/
calc_sfc_displacement
(PF, G, GV, US, mass_shelf, tv, h)¶ Calculate the hydrostatic equilibrium position of the surface under an ice shelf.
- Parameters:
pf :: [in] Parameter file structure
g :: [in] Ocean grid structure
gv :: [in] Vertical grid structure
us :: [in] A dimensional unit scaling type
mass_shelf :: [in] Ice shelf mass [R Z ~> kg m-2]
tv :: [inout] Thermodynamics structure
h :: [inout] Layer thickness [H ~> m or kg m-2]
- Call to:
depress_surface
mdl
- Called from:
-
subroutine
mom_state_initialization/
cut_off_column_top
(nk, tv, GV, US, G_earth, depth, min_thickness, T, T_t, T_b, S, S_t, S_b, p_surf, h, remap_CS, z_tol, remap_answer_date)¶ Adjust the layer thicknesses by removing the top of the water column above the depth where the hydrostatic pressure matches p_surf.
- Parameters:
nk :: [in] Number of layers
tv :: [in] Thermodynamics structure
gv :: [in] The ocean’s vertical grid structure.
us :: [in] A dimensional unit scaling type
g_earth :: [in] Gravitational acceleration [L2 Z-1 T-2 ~> m s-2]
depth :: [in] Depth of ocean column [Z ~> m].
min_thickness :: [in] Smallest thickness allowed [H ~> m or kg m-2].
t :: [inout] Layer mean temperature [C ~> degC]
t_t :: [in] Temperature at top of layer [C ~> degC]
t_b :: [in] Temperature at bottom of layer [C ~> degC]
s :: [inout] Layer mean salinity [S ~> ppt]
s_t :: [in] Salinity at top of layer [S ~> ppt]
s_b :: [in] Salinity at bottom of layer [S ~> ppt]
p_surf :: [in] Imposed pressure on ocean at surface [R L2 T-2 ~> Pa]
h :: [inout] Layer thickness [H ~> m or kg m-2]
remap_cs :: Remapping structure for remapping T and S, if associated
z_tol :: [in] The tolerance with which to find the depth matching the specified pressure [Z ~> m].
remap_answer_date :: [in] The vintage of the order of arithmetic and expressions to use for remapping. Values below 20190101 recover the remapping answers from 2018, while higher values use more robust forms of the same remapping expressions.
- Call to:
mom_density_integrals::find_depth_of_pressure_in_cell
mom_remapping::remapping_core_h
- Called from:
-
subroutine
mom_state_initialization/
initialize_velocity_from_file
(u, v, G, GV, US, param_file, just_read)¶ Initialize horizontal velocity components from file.
- Parameters:
g :: [in] The ocean’s grid structure
gv :: [in] The ocean’s vertical grid structure.
u :: [out] The zonal velocity that is being initialized [L T-1 ~> m s-1]
v :: [out] The meridional velocity that is being initialized [L T-1 ~> m s-1]
us :: [in] A dimensional unit scaling type
param_file :: [in] A structure indicating the open file to parse for model parameter values.
just_read :: [in] If true, this call will only read parameters without changing u or v.
- Call to:
mom_error_handler::calltree_enter
mom_error_handler::calltree_leave
- Called from:
-
subroutine
mom_state_initialization/
initialize_velocity_zero
(u, v, G, GV, param_file, just_read)¶ Initialize horizontal velocity components to zero.
- Parameters:
g :: [in] The ocean’s grid structure
gv :: [in] The ocean’s vertical grid structure.
u :: [out] The zonal velocity that is being initialized [L T-1 ~> m s-1]
v :: [out] The meridional velocity that is being initialized [L T-1 ~> m s-1]
param_file :: [in] A structure indicating the open file to parse for model parameter values.
just_read :: [in] If true, this call will only read parameters without changing h.
- Call to:
mom_error_handler::calltree_enter
mom_error_handler::calltree_leave
- Called from:
-
subroutine
mom_state_initialization/
initialize_velocity_uniform
(u, v, G, GV, US, param_file, just_read)¶ Sets the initial velocity components to uniform.
- Parameters:
g :: [in] The ocean’s grid structure
gv :: [in] The ocean’s vertical grid structure.
u :: [out] The zonal velocity that is being initialized [L T-1 ~> m s-1]
v :: [out] The meridional velocity that is being initialized [L T-1 ~> m s-1]
us :: [in] A dimensional unit scaling type
param_file :: [in] A structure indicating the open file to parse for model parameter values.
just_read :: [in] If true, this call will only read parameters without changing u or v.
- Called from:
-
subroutine
mom_state_initialization/
initialize_velocity_circular
(u, v, G, GV, US, param_file, just_read)¶ Sets the initial velocity components to be circular with no flow at edges of domain and center.
- Parameters:
g :: [in] The ocean’s grid structure
gv :: [in] The ocean’s vertical grid structure.
u :: [out] The zonal velocity that is being initialized [L T-1 ~> m s-1]
v :: [out] The meridional velocity that is being initialized [L T-1 ~> m s-1]
us :: [in] A dimensional unit scaling type
param_file :: [in] A structure indicating the open file to parse for model parameter values.
just_read :: [in] If true, this call will only read parameters without changing u or v.
- Call to:
my_psi
- Called from:
-
subroutine
mom_state_initialization/
initialize_temp_salt_from_file
(T, S, G, GV, US, param_file, just_read)¶ Initializes temperature and salinity from file.
- Parameters:
g :: [in] The ocean’s grid structure
gv :: [in] The ocean’s vertical grid structure
t :: [out] The potential temperature that is being initialized [C ~> degC]
s :: [out] The salinity that is being initialized [S ~> ppt]
us :: [in] A dimensional unit scaling type
param_file :: [in] A structure to parse for run-time parameters
just_read :: [in] If true, this call will only read parameters without changing T or S.
- Called from:
-
subroutine
mom_state_initialization/
initialize_temp_salt_from_profile
(T, S, G, GV, US, param_file, just_read)¶ Initializes temperature and salinity from a 1D profile.
- Parameters:
g :: [in] The ocean’s grid structure
gv :: [in] The ocean’s vertical grid structure
t :: [out] The potential temperature that is being initialized [C ~> degC]
s :: [out] The salinity that is being initialized [S ~> ppt]
us :: [in] A dimensional unit scaling type
param_file :: [in] A structure to parse for run-time parameters
just_read :: [in] If true, this call will only read parameters without changing T or S.
- Called from:
-
subroutine
mom_state_initialization/
initialize_temp_salt_fit
(T, S, G, GV, US, param_file, eqn_of_state, P_Ref, just_read)¶ Initializes temperature and salinity by fitting to density.
- Parameters:
g :: [in] The ocean’s grid structure.
gv :: [in] The ocean’s vertical grid structure.
t :: [out] The potential temperature that is being initialized [C ~> degC].
s :: [out] The salinity that is being initialized [S ~> ppt].
us :: [in] A dimensional unit scaling type
param_file :: [in] A structure to parse for run-time parameters.
eqn_of_state :: [in] Equation of state structure
p_ref :: [in] The coordinate-density reference pressure [R L2 T-2 ~> Pa].
just_read :: [in] If true, this call will only read parameters without changing T or S.
- Called from:
-
subroutine
mom_state_initialization/
initialize_temp_salt_linear
(T, S, G, GV, US, param_file, just_read)¶ Initializes T and S with linear profiles according to reference surface layer salinity and temperature and a specified range.
- Parameters:
g :: [in] The ocean’s grid structure
gv :: [in] The ocean’s vertical grid structure
t :: [out] The potential temperature that is being initialized [C ~> degC]
s :: [out] The salinity that is being initialized [S ~> ppt]
us :: [in] A dimensional unit scaling type
param_file :: [in] A structure to parse for run-time parameters
just_read :: [in] If present and true, this call will only read parameters without changing T or S.
- Called from:
-
subroutine
mom_state_initialization/
initialize_sponges_file
(G, GV, US, use_temperature, tv, u, v, depth_tot, param_file, Layer_CSp, ALE_CSp, Time)¶ This subroutine sets the inverse restoration time (Idamp), and the values towards which the interface heights and an arbitrary number of tracers should be restored within each sponge. The interface height is always subject to damping, and must always be the first registered field.
- Parameters:
g :: [in] The ocean’s grid structure.
gv :: [in] The ocean’s vertical grid structure.
us :: [in] A dimensional unit scaling type
use_temperature :: [in] If true, T & S are state variables.
tv :: [in] A structure pointing to various thermodynamic variables.
u :: [in] The zonal velocity that is being
v :: [in] The meridional velocity that is being
depth_tot :: [in] The nominal total depth of the ocean [Z ~> m]
param_file :: [in] A structure to parse for run-time parameters.
layer_csp :: A pointer that is set to point to the control structure for this module (in layered mode).
ale_csp :: A pointer that is set to point to the control structure for this module (in ALE mode).
time :: [in] Time at the start of the run segment. Time_in overrides any value set for Time.
- Call to:
separate_idamp_for_uv
- Called from:
-
subroutine
mom_state_initialization/
initialize_oda_incupd_file
(G, GV, US, use_temperature, tv, h, u, v, param_file, oda_incupd_CSp, restart_CS, Time)¶ - Parameters:
g :: [inout] The ocean’s grid structure.
gv :: [in] The ocean’s vertical grid structure.
us :: [in] A dimensional unit scaling type
use_temperature :: [in] If true, T & S are state variables.
tv :: [in] A structure pointing to various thermodynamic variables.
h :: [inout] Layer thickness [H ~> m or kg m-2] (in)
u :: [in] The zonal velocity that is being
v :: [in] The meridional velocity that is being
param_file :: [in] A structure to parse for run-time parameters.
oda_incupd_csp :: A pointer that is set to point to the control structure for this module.
restart_cs :: [in] MOM restart control structure
time :: [in] Time at the start of the run segment. Time_in overrides any value set for Time.
- Called from:
-
subroutine
mom_state_initialization/
set_velocity_depth_max
(G)¶ This subroutine sets the 4 bottom depths at velocity points to be the maximum of the adjacent depths.
- Parameters:
g :: [inout] The ocean’s grid structure
-
subroutine
mom_state_initialization/
compute_global_grid_integrals
(G, US)¶ Subroutine to pre-compute global integrals of grid quantities for later use in reporting diagnostics.
- Parameters:
g :: [inout] The ocean’s grid structure
us :: [in] A dimensional unit scaling type
-
subroutine
mom_state_initialization/
set_velocity_depth_min
(G)¶ This subroutine sets the 4 bottom depths at velocity points to be the minimum of the adjacent depths.
- Parameters:
g :: [inout] The ocean’s grid structure
-
subroutine
mom_state_initialization/
mom_temp_salt_initialize_from_z
(h, tv, depth_tot, G, GV, US, PF, just_read, frac_shelf_h)¶ This subroutine determines the isopycnal or other coordinate interfaces and layer potential temperatures and salinities directly from a z-space file on a latitude-longitude grid.
- Parameters:
g :: [inout] The ocean’s grid structure
gv :: [in] The ocean’s vertical grid structure
h :: [out] Layer thicknesses being initialized [H ~> m or kg m-2]
tv :: [inout] A structure pointing to various thermodynamic variables including temperature and salinity
depth_tot :: [in] The nominal total depth of the ocean [Z ~> m]
us :: [in] A dimensional unit scaling type
pf :: [in] A structure indicating the open file to parse for model parameter values.
just_read :: [in] If true, this call will only read parameters without changing T or S.
frac_shelf_h :: [in] The fraction of the grid cell covered
- Call to:
- Called from:
-
subroutine
mom_state_initialization/
find_interfaces
(rho, zin, nk_data, Rb, Z_bot, zi, G, GV, US, nlevs, nkml, hml, eps_z, eps_rho, density_extrap_bug)¶ Find interface positions corresponding to interpolated depths in a density profile.
- Parameters:
g :: [in] The ocean’s grid structure
gv :: [in] The ocean’s vertical grid structure
nk_data :: [in] The number of levels in the input data
rho :: [in] Potential density in z-space [R ~> kg m-3]
zin :: [in] Input data levels [Z ~> m].
rb :: [in] target interface densities [R ~> kg m-3]
z_bot :: [in] The (usually negative) height of the seafloor
zi :: [out] The returned interface heights [Z ~> m]
us :: [in] A dimensional unit scaling type
nlevs :: [in] number of valid points in each column
nkml :: [in] number of mixed layer pieces to distribute over a depth of hml.
hml :: [in] mixed layer depth [Z ~> m].
eps_z :: [in] A negligibly small layer thickness [Z ~> m].
eps_rho :: [in] A negligibly small density difference [R ~> kg m-3].
density_extrap_bug :: [in] If true use an expression with an indexing bug for projecting the densities at the bottom of unstable profiles from data when finding the initial interface locations in layered mode from a dataset of T and S.
- Called from:
-
subroutine
mom_state_initialization/
mom_state_init_tests
(G, GV, US, tv)¶ Run simple unit tests.
- Parameters:
g :: [inout] The ocean’s grid structure.
gv :: [in] The ocean’s vertical grid structure.
us :: [in] A dimensional unit scaling type
tv :: [in] Thermodynamics structure.
- Call to: