MOM_interface_heights module reference
Functions for calculating interface heights, including free surface height.
Generic Interfaces
Calculates the heights of the free surface or all interfaces from layer thicknesses. |
|
Calculates layer thickness in thickness units from geometric distance between the interfaces around that layer in height units. |
|
Converts layer thickness in thickness units into the vertical distance between the interfaces around a layer in height units. |
Functions/Subroutines
Calculates the change in height across layers, using the appropriate form for consistency with the calculation of the pressure gradient forces. |
|
Calculates the heights of all interfaces between layers, using the appropriate form for consistency with the calculation of the pressure gradient forces. Additionally, these height may be dilated for consistency with the corresponding time-average quantity from the barotropic calculation. |
|
Calculates the free surface height, using the appropriate form for consistency with the calculation of the pressure gradient forces. Additionally, the sea surface height may be adjusted for consistency with the corresponding time-average quantity from the barotropic calculation. |
|
Calculate derived thermodynamic quantities for re-use later. |
|
Determine the column average specific volumes. |
|
Calculate the integrated mass of the water column. |
|
Determine the in situ density averaged over a specified distance from the bottom, calculating it as the inverse of the mass-weighted average specific volume. |
|
Converts thickness from geometric height units to thickness units, perhaps via an inversion of the integral of the density in pressure using variables stored in the thermo_var_ptrs type when in non-Boussinesq mode. |
|
Converts thickness from geometric height units to thickness units, working via an inversion of the integral of the density in pressure when in non-Boussinesq mode. |
|
Converts thickness from geometric height units to thickness units, perhaps using a simple conversion factor that may be problematic in non-Boussinesq mode. |
|
Converts layer thicknesses in thickness units to the vertical distance between edges in height units, perhaps by multiplication by the precomputed layer-mean specific volume stored in an array in the thermo_var_ptrs type when in non-Boussinesq mode. |
|
Converts a vertical i- / k- slice of layer thicknesses in thickness units to the vertical distance between edges in height units, perhaps by multiplication by the precomputed layer-mean specific volume stored in an array in the thermo_var_ptrs type when in non-Boussinesq mode. |
|
Convert mixed layer depths in height units into the thickness of water in the mixed in thickness units. |
Generic Interface Documentation
- interface find_eta
Calculates the heights of the free surface or all interfaces from layer thicknesses.
Callers call graph
Text view
mom::finish_mom_initialization → mom_interface_heights::interface::find_eta
mom::initialize_mom → mom_interface_heights::interface::find_eta
mom_ale::pre_ale_diagnostics → mom_interface_heights::interface::find_eta
mom_diabatic_driver::diabatic → mom_interface_heights::interface::find_eta
mom_diagnostics::calculate_vertical_integrals → mom_interface_heights::interface::find_eta
mom_interface_filter::interface_filter → mom_interface_heights::interface::find_eta
mom_lateral_mixing_coeffs::calc_qg_slopes → mom_interface_heights::interface::find_eta
mom_lateral_mixing_coeffs::calc_slope_functions → mom_interface_heights::interface::find_eta
mom_lateral_mixing_coeffs::calc_sqg_struct → mom_interface_heights::interface::find_eta
mom_meke::ml_meke_calculate_features → mom_interface_heights::interface::find_eta
mom_porous_barriers::calc_eta_at_uv → mom_interface_heights::interface::find_eta
mom_state_initialization::calc_sfc_displacement → mom_interface_heights::interface::find_eta
mom_state_initialization::depress_surface → mom_interface_heights::interface::find_eta
mom_sum_output::write_energy → mom_interface_heights::interface::find_eta
mom_thickness_diffuse::thickness_diffuse → mom_interface_heights::interface::find_eta
- interface dz_to_thickness
Calculates layer thickness in thickness units from geometric distance between the interfaces around that layer in height units.
- interface thickness_to_dz
Converts layer thickness in thickness units into the vertical distance between the interfaces around a layer in height units.
Callers call graph
Text view
dome_tracer::initialize_dome_tracer → mom_interface_heights::interface::thickness_to_dz
dumbbell_initialization::dumbbell_initialize_sponges → mom_interface_heights::interface::thickness_to_dz
mom::step_mom → mom_interface_heights::interface::thickness_to_dz
mom_bkgnd_mixing::calculate_bkgnd_mixing → mom_interface_heights::interface::thickness_to_dz
mom_cvmix_conv::calculate_cvmix_conv → mom_interface_heights::interface::thickness_to_dz
mom_cvmix_kpp::kpp_calculate → mom_interface_heights::interface::thickness_to_dz
mom_cvmix_kpp::kpp_compute_bld → mom_interface_heights::interface::thickness_to_dz
mom_cvmix_shear::calculate_cvmix_shear → mom_interface_heights::interface::thickness_to_dz
mom_diabatic_aux::differential_diffuse_t_s → mom_interface_heights::interface::thickness_to_dz
mom_diabatic_driver::diabatic_ale → mom_interface_heights::interface::thickness_to_dz
mom_diabatic_driver::diabatic_ale_legacy → mom_interface_heights::interface::thickness_to_dz
mom_diabatic_driver::layered_diabatic → mom_interface_heights::interface::thickness_to_dz
mom_diag_mediator::diag_update_remap_grids → mom_interface_heights::interface::thickness_to_dz
mom_diag_mediator::post_data_3d → mom_interface_heights::interface::thickness_to_dz
mom_diagnose_mld::diagnosemldbydensitydifference → mom_interface_heights::interface::thickness_to_dz
mom_diagnose_mld::diagnosemldbyenergy → mom_interface_heights::interface::thickness_to_dz
mom_diapyc_energy_req::diapyc_energy_req_test → mom_interface_heights::interface::thickness_to_dz
mom_dynamics_split_rk2::step_mom_dyn_split_rk2 → mom_interface_heights::interface::thickness_to_dz
mom_dynamics_split_rk2b::step_mom_dyn_split_rk2b → mom_interface_heights::interface::thickness_to_dz
mom_dynamics_unsplit::step_mom_dyn_unsplit → mom_interface_heights::interface::thickness_to_dz
mom_dynamics_unsplit_rk2::step_mom_dyn_unsplit_rk2 → mom_interface_heights::interface::thickness_to_dz
mom_energetic_pbl::energetic_pbl → mom_interface_heights::interface::thickness_to_dz
mom_forcing_type::calculatebuoyancyflux1d → mom_interface_heights::interface::thickness_to_dz
mom_full_convection::full_convection → mom_interface_heights::interface::thickness_to_dz
mom_hor_visc::horizontal_viscosity_block → mom_interface_heights::interface::thickness_to_dz
mom_int_tide_input::find_n2_bottom → mom_interface_heights::interface::thickness_to_dz
mom_kappa_shear::calc_kappa_shear_vertex → mom_interface_heights::interface::thickness_to_dz
mom_kappa_shear::calculate_kappa_shear → mom_interface_heights::interface::thickness_to_dz
mom_lateral_mixing_coeffs::calc_sqg_struct → mom_interface_heights::interface::thickness_to_dz
mom_offline_main::offline_diabatic_ale → mom_interface_heights::interface::thickness_to_dz
mom_open_boundary::update_obc_segment_dz → mom_interface_heights::interface::thickness_to_dz
mom_set_diffusivity::add_lotw_bbl_diffusivity → mom_interface_heights::interface::thickness_to_dz
mom_set_diffusivity::find_n2 → mom_interface_heights::interface::thickness_to_dz
mom_set_diffusivity::find_tke_to_kd → mom_interface_heights::interface::thickness_to_dz
mom_set_diffusivity::set_bbl_tke → mom_interface_heights::interface::thickness_to_dz
mom_set_diffusivity::set_diffusivity → mom_interface_heights::interface::thickness_to_dz
mom_set_visc::set_viscous_bbl → mom_interface_heights::interface::thickness_to_dz
mom_set_visc::set_viscous_ml → mom_interface_heights::interface::thickness_to_dz
mom_thickness_diffuse::thickness_diffuse_full → mom_interface_heights::interface::thickness_to_dz
mom_tracer_registry::post_tracer_integral_diagnostics → mom_interface_heights::interface::thickness_to_dz
mom_wave_speed::wave_speeds → mom_interface_heights::interface::thickness_to_dz
nw2_tracers::initialize_nw2_tracers → mom_interface_heights::interface::thickness_to_dz
nw2_tracers::nw2_tracer_column_physics → mom_interface_heights::interface::thickness_to_dz
regional_dyes::dye_tracer_column_physics → mom_interface_heights::interface::thickness_to_dz
regional_dyes::initialize_dye_tracer → mom_interface_heights::interface::thickness_to_dz
Functions/Subroutine Documentation
- subroutine find_dz_for_eta(h, tv, G, GV, US, dz_lay, halo_size)
Calculates the change in height across layers, using the appropriate form for consistency with the calculation of the pressure gradient forces.
- 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]
tv [in]
A structure pointing to various thermodynamic variables.
dz_lay [out]
Height change across layers [Z ~> m]
halo_size [in]
width of halo points on which to calculate eta.
Callees call graph
- subroutine find_eta_3d(h, tv, G, GV, US, eta, eta_bt, halo_size, dZref)
Calculates the heights of all interfaces between layers, using the appropriate form for consistency with the calculation of the pressure gradient forces. Additionally, these height may be dilated for consistency with the corresponding time-average quantity from the barotropic calculation.
- 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]
tv [in]
A structure pointing to various thermodynamic variables.
eta [out]
layer interface heights [Z ~> m]
eta_bt [in]
optional barotropic variable that gives the "correct" free surface height (Boussinesq) or total water column mass per unit area (non-Boussinesq). This is used to dilate the layer thicknesses when calculating interface heights [H ~> m or kg m-2]. In Boussinesq mode, eta_bt and G%bathyT use the same reference height.
halo_size [in]
width of halo points on which to calculate eta.
dZref [in]
The difference in the reference height between G%bathyT and eta [Z ~> m]. The default is 0.
Callees call graph
- subroutine find_eta_2d(h, tv, G, GV, US, eta, eta_bt, halo_size, dZref)
Calculates the free surface height, using the appropriate form for consistency with the calculation of the pressure gradient forces. Additionally, the sea surface height may be adjusted for consistency with the corresponding time-average quantity from the barotropic calculation.
- 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]
tv [in]
A structure pointing to various thermodynamic variables.
eta [out]
free surface height relative to mean sea level (z=0) often [Z ~> m].
eta_bt [in]
optional barotropic variable that gives the "correct" free surface height (Boussinesq) or total water column mass per unit area (non-Boussinesq) [H ~> m or kg m-2]. In Boussinesq mode, eta_bt and G%bathyT use the same reference height.
halo_size [in]
width of halo points on which to calculate eta.
dZref [in]
The difference in the reference height between G%bathyT and eta [Z ~> m]. The default is 0.
Callees call graph
- subroutine calc_derived_thermo(tv, h, G, GV, US, halo, debug)
Calculate derived thermodynamic quantities for re-use later.
- Parameters
G [in]
The ocean's grid structure
GV [in]
The ocean's vertical grid structure
US [in]
A dimensional unit scaling type
tv [inout]
A structure pointing to various thermodynamic variables, some of which will be set here.
h [in]
Layer thicknesses [H ~> m or kg m-2].
halo [in]
Width of halo within which to calculate thicknesses
debug [in]
If present and true, write debugging checksums
Callees call graph
Callers call graph
Text view
mom::ale_regridding_and_remapping → mom_interface_heights::calc_derived_thermo
mom::initialize_mom → mom_interface_heights::calc_derived_thermo
mom::post_diabatic_halo_updates → mom_interface_heights::calc_derived_thermo
mom::step_mom_thermo → mom_interface_heights::calc_derived_thermo
mom::step_mom_tracer_dyn → mom_interface_heights::calc_derived_thermo
mom::step_offline → mom_interface_heights::calc_derived_thermo
mom_ale::ale_regrid_accelerated → mom_interface_heights::calc_derived_thermo
mom_diabatic_driver::layered_diabatic → mom_interface_heights::calc_derived_thermo
mom_hybgen_unmix::hybgen_unmix → mom_interface_heights::calc_derived_thermo
mom_offline_main::update_offline_fields → mom_interface_heights::calc_derived_thermo
- subroutine find_col_avg_SpV(h, SpV_avg, tv, G, GV, US, halo_size)
Determine the column average specific volumes.
- 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]
SpV_avg [inout]
Column average specific volume [R-1 ~> m3 kg-1]
tv [in]
Structure containing pointers to any available thermodynamic fields.
halo_size [in]
width of halo points on which to work
- subroutine find_col_mass(h, tv, G, GV, US, mass, p_bot, p_surf)
Calculate the integrated mass of the water column.
- Parameters
G [in]
The ocean's grid structure.
GV [in]
The ocean's vertical grid structure.
US [in]
A dimensional unit scaling type
tv [in]
A structure pointing to various thermodynamic variables.
h [in]
Layer thicknesses [H ~> m or kg m-2]
mass [out]
Integrated mass of the water column [R Z ~> kg m-2]
p_bot [out]
Bottom pressure = g * mass + psurf [R L2 T-2 ~> Pa]
p_surf
A pointer to surface pressure [R L2 T-2 ~> Pa]
Callees call graph
- subroutine find_rho_bottom(G, GV, US, tv, h, dz, pres_int, dz_avg, j, Rho_bot, h_bot, k_bot)
Determine the in situ density averaged over a specified distance from the bottom, calculating it as the inverse of the mass-weighted average specific volume.
- Parameters
G [in]
The ocean's grid structure
GV [in]
The ocean's vertical grid structure
US [in]
A dimensional unit scaling type
tv [in]
Structure containing pointers to any available thermodynamic fields.
h [in]
Layer thicknesses [H ~> m or kg m-2]
dz [in]
Height change across layers [Z ~> m]
pres_int [in]
Pressure at each interface [R L2 T-2 ~> Pa]
dz_avg [in]
The vertical distance over which to average [Z ~> m]
j [in]
j-index of row to work on
Rho_bot [out]
Near-bottom density [R ~> kg m-3].
h_bot [out]
Bottom boundary layer thickness [H ~> m or kg m-2]
k_bot [out]
Bottom boundary layer top layer index
Callees call graph
Callers call graph
- subroutine dz_to_thickness_tv(dz, tv, h, G, GV, US, halo_size)
Converts thickness from geometric height units to thickness units, perhaps via an inversion of the integral of the density in pressure using variables stored in the thermo_var_ptrs type when in non-Boussinesq mode.
- Parameters
G [in]
The ocean's grid structure
GV [in]
The ocean's vertical grid structure
US [in]
A dimensional unit scaling type
dz [in]
Geometric layer thicknesses in height units [Z ~> m]
tv [in]
A structure pointing to various thermodynamic variables
h [inout]
Output thicknesses in thickness units [H ~> m or kg m-2]. This is essentially intent out, but declared as intent inout to preserve any initialized values in halo points.
halo_size [in]
Width of halo within which to calculate thicknesses
Callees call graph
- subroutine dz_to_thickness_EOS(dz, Temp, Saln, EoS, h, G, GV, US, halo_size, p_surf)
Converts thickness from geometric height units to thickness units, working via an inversion of the integral of the density in pressure when in non-Boussinesq mode.
- Parameters
G [in]
The ocean's grid structure
GV [in]
The ocean's vertical grid structure
US [in]
A dimensional unit scaling type
dz [in]
Geometric layer thicknesses in height units [Z ~> m]
Temp [in]
Input layer temperatures [C ~> degC]
Saln [in]
Input layer salinities [S ~> ppt]
EoS [in]
Equation of state structure
h [inout]
Output thicknesses in thickness units [H ~> m or kg m-2]. This is essentially intent out, but declared as intent inout to preserve any initialized values in halo points.
halo_size [in]
Width of halo within which to calculate thicknesses
p_surf [in]
Surface pressures [R L2 T-2 ~> Pa]
Callees call graph
Callers call graph
- subroutine dz_to_thickness_simple(dz, h, G, GV, US, halo_size, layer_mode)
Converts thickness from geometric height units to thickness units, perhaps using a simple conversion factor that may be problematic in non-Boussinesq mode.
- Parameters
G [in]
The ocean's grid structure
GV [in]
The ocean's vertical grid structure
US [in]
A dimensional unit scaling type
dz [in]
Geometric layer thicknesses in height units [Z ~> m]
h [inout]
Output thicknesses in thickness units [H ~> m or kg m-2]. This is essentially intent out, but declared as intent inout to preserve any initialized values in halo points.
halo_size [in]
Width of halo within which to calculate thicknesses
layer_mode [in]
If present and true, do the conversion that is appropriate in pure isopycnal layer mode with no state variables or equation of state. Otherwise use a simple constant rescaling factor and avoid the use of GV%Rlay.
- subroutine thickness_to_dz_3d(h, tv, dz, G, GV, US, halo_size)
Converts layer thicknesses in thickness units to the vertical distance between edges in height units, perhaps by multiplication by the precomputed layer-mean specific volume stored in an array in the thermo_var_ptrs type when in non-Boussinesq mode.
- 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]
Input thicknesses in thickness units [H ~> m or kg m-2].
tv [in]
A structure pointing to various thermodynamic variables
dz [inout]
Geometric layer thicknesses in height units [Z ~> m] This is essentially intent out, but declared as intent inout to preserve any initialized values in halo points.
halo_size [in]
Width of halo within which to calculate thicknesses
Callees call graph
- subroutine thickness_to_dz_jslice(h, tv, dz, j, G, GV, halo_size)
Converts a vertical i- / k- slice of layer thicknesses in thickness units to the vertical distance between edges in height units, perhaps by multiplication by the precomputed layer-mean specific volume stored in an array in the thermo_var_ptrs type when in non-Boussinesq mode.
- Parameters
G [in]
The ocean's grid structure
GV [in]
The ocean's vertical grid structure
h [in]
Input thicknesses in thickness units [H ~> m or kg m-2].
tv [in]
A structure pointing to various thermodynamic variables
dz [inout]
Geometric layer thicknesses in height units [Z ~> m] This is essentially intent out, but declared as intent inout to preserve any initialized values in halo points.
j [in]
The second (j-) index of the input thicknesses to work with
halo_size [in]
Width of halo within which to calculate thicknesses
Callees call graph
- subroutine convert_MLD_to_ML_thickness(MLD_in, h, h_MLD, tv, G, GV, halo)
Convert mixed layer depths in height units into the thickness of water in the mixed in thickness units.
- Parameters
G [in]
The ocean's grid structure
GV [in]
The ocean's vertical grid structure
MLD_in [in]
Input mixed layer depth [Z ~> m].
h [in]
Layer thicknesses [H ~> m or kg m-2]
h_MLD [out]
Thickness of water in the mixed layer [H ~> m or kg m-2]
tv [in]
Structure containing pointers to any available thermodynamic fields.
halo [in]
Halo width over which to calculate frazil
Callees call graph
Callers call graph
Text view
mom_diabatic_driver::diabatic → mom_interface_heights::convert_mld_to_ml_thickness
mom_diabatic_driver::diabatic_ale → mom_interface_heights::convert_mld_to_ml_thickness
mom_diabatic_driver::diabatic_ale_legacy → mom_interface_heights::convert_mld_to_ml_thickness
mom_diabatic_driver::layered_diabatic → mom_interface_heights::convert_mld_to_ml_thickness
mom_tracer_flow_control::call_tracer_column_fns → mom_interface_heights::convert_mld_to_ml_thickness