MOM_lateral_mixing_coeffs module reference
Variable mixing coefficients
Data Types
Variable mixing coefficients |
Functions/Subroutines
Calculates the non-dimensional depth functions. |
|
Calculates and stores the non-dimensional resolution functions |
|
Calculates and stores functions of SQG mode |
|
Calculates and stores functions of isopycnal slopes, e.g. Sx, Sy, S*N, mostly used in the Visbeck et al. style scaling of diffusivity |
|
Calculates factors used when setting diffusivity coefficients similar to Visbeck et al., 1997. This is on older implementation that is susceptible to large values of Eady growth rate for incropping layers. |
|
Calculates the Eady growth rate (2D fields) for use in MEKE and the Visbeck schemes |
|
The original calc_slope_function() that calculated slopes using interface positions only, not accounting for density variations. |
|
Calculates and returns isopycnal slopes with wider halos for use in finding QG viscosity. |
|
Calculates the Leith Laplacian and bi-harmonic viscosity coefficients |
|
Initializes the variables mixing coefficients container |
|
Destructor for VarMix control structure |
Detailed Description
This module provides a container for various factors used in prescribing diffusivities, that are a function of the state (in particular the stratification and isoneutral slopes).
The resolution function
The resolution function is expressed in terms of the ratio of grid-spacing to deformation radius. The square of the resolution parameter is
where the grid spacing is calculated as
Todo: Check this reference to Bob on/off paper. The resolution function used in scaling diffusivities ([39]) is
The resolution function can be applied independently to thickness diffusion (module mom_thickness_diffuse), tracer diffusion (mom_tracer_hordiff) lateral viscosity (mom_hor_visc).
Robert Hallberg, 2013: Using a resolution function to regulate parameterizations of oceanic mesoscale eddy effects. Ocean Modelling, 71, pp 92-103. http://dx.doi.org/10.1016/j.ocemod.2013.08.007
Symbol |
Module parameter |
|---|---|
- |
USE_VARIABLE_MIXING |
- |
RESOLN_SCALED_KH |
- |
RESOLN_SCALED_KHTH |
- |
RESOLN_SCALED_KHTR |
\(\alpha\) |
KH_RES_SCALE_COEF (for thickness and tracer diffusivity) |
\(p\) |
KH_RES_FN_POWER (for thickness and tracer diffusivity) |
\(\alpha\) |
VISC_RES_SCALE_COEF (for lateral viscosity) |
\(p\) |
VISC_RES_FN_POWER (for lateral viscosity) |
- |
GILL_EQUATORIAL_LD |
Visbeck diffusivity
This module also calculates factors used in setting the thickness diffusivity similar to a Visbeck et al., 1997, scheme. The factors are combined in mom_thickness_diffuse::thickness_diffuse but calculated in this module.
where \(S\) is the magnitude of the isoneutral slope and \(N\) is the Brunt-Vaisala frequency.
Visbeck, Marshall, Haine and Spall, 1997: Specification of Eddy Transfer Coefficients in Coarse-Resolution Ocean Circulation Models. J. Phys. Oceanogr. http://dx.doi.org/10.1175/1520-0485(1997)027%3C0381:SOETCI%3E2.0.CO;2
Symbol |
Module parameter |
|---|---|
- |
USE_VARIABLE_MIXING |
\(\alpha_s\) |
KHTH_SLOPE_CFF (for mom_thickness_diffuse module) |
\(\alpha_s\) |
KHTR_SLOPE_CFF (for mom_tracer_hordiff module) |
\(L_{s}\) |
VISBECK_L_SCALE |
\(S_{max}\) |
VISBECK_MAX_SLOPE |
Vertical structure function for KhTh
The thickness diffusivity can be prescribed a vertical distribution with the shape of the equivalent barotropic velocity mode. The structure function is stored in the control structure for this module (varmix_cs) but is calculated using subroutines in mom_wave_speed.
Symbol |
Module parameter |
|---|---|
- |
KHTH_USE_EBT_STRUCT |
Type Documentation
- type, public :: VarMix_CS
Variable mixing coefficients
- Parameters
initialized
True if this control structure has been initialized.
use_variable_mixing
If true, use the variable mixing.
Resoln_scaling_used
If true, a resolution function is used somewhere to scale away one of the viscosities or diffusivities when the deformation radius is well resolved.
Resoln_scaled_Kh
If true, scale away the Laplacian viscosity when the deformation radius is well resolved.
Resoln_scaled_KhTh
If true, scale away the thickness diffusivity when the deformation radius is well resolved.
Depth_scaled_KhTh
If true, KHTH is scaled away when the depth is shallower than a reference depth.
Resoln_scaled_KhTr
If true, scale away the tracer diffusivity when the deformation radius is well resolved.
interpolate_Res_fn
If true, interpolate the resolution function to the velocity points from the thickness points; otherwise interpolate the wave speed and calculate the resolution function independently at each point.
use_stored_slopes
If true, stores isopycnal slopes in this structure.
Resoln_use_ebt
If true, use the equivalent barotropic wave speed instead of the first baroclinic wave speed for calculating the resolution function.
khth_use_ebt_struct
If true, uses the equivalent barotropic structure as the vertical structure of thickness diffusivity.
kdgl90_use_ebt_struct
If true, uses the equivalent barotropic structure as the vertical structure of diffusivity in the GL90 scheme.
kdgl90_use_sqg_struct
If true, uses the surface quasigeostrophic structure as the vertical structure of diffusivity in the GL90 scheme.
khth_use_sqg_struct
If true, uses the surface quasigeostrophic structure as the vertical structure of thickness diffusivity.
khtr_use_ebt_struct
If true, uses the equivalent barotropic structure as the vertical structure of tracer diffusivity.
khtr_use_sqg_struct
If true, uses the surface quasigeostrophic structure as the vertical structure of tracer diffusivity.
calculate_cg1
If true, calls wave_speed() to calculate the first baroclinic wave speed and populate CS%cg1. This parameter is set depending on other parameters.
calculate_Rd_dx
If true, calculates Rd/dx and populate CS%Rd_dx_h. This parameter is set depending on other parameters.
calculate_res_fns
If true, calculate all the resolution factors. This parameter is set depending on other parameters.
calculate_depth_fns
If true, calculate all the depth factors. This parameter is set depending on other parameters.
calculate_Eady_growth_rate
If true, calculate all the Eady growth rates. This parameter is set depending on other parameters.
use_stanley_iso
If true, use Stanley parameterization in MOM_isopycnal_slopes
use_simpler_Eady_growth_rate
If true, use a simpler method to calculate the Eady growth rate that avoids division by layer thickness. This parameter is set depending on other parameters.
full_depth_Eady_growth_rate
If true, calculate the Eady growth rate based on an average that includes contributions from sea-level changes in its denominator, rather than just the nominal depth of the bathymetry. This only applies when using the model interface heights as a proxy for isopycnal slopes.
OBC_friendly
If true, use only interior data for thickness weighting and to calculate stratification and other fields at open boundary condition faces.
res_fn_OBC_bug
If false, use only interior data for calculating the resolution functions at open boundary condition faces and vertices.
cropping_distance
Distance from surface or bottom to filter out outcropped or incropped interfaces for the Eady growth rate calc [Z ~> m]
h_min_N2
The minimum vertical distance to use in the denominator of the buoyancy frequency used in the slope calculation [H ~> m or kg m-2]
SN_u
S*N at u-points [T-1 ~> s-1]
SN_v
S*N at v-points [T-1 ~> s-1]
L2u
Length scale^2 at u-points [L2 ~> m2]
L2v
Length scale^2 at v-points [L2 ~> m2]
cg1
The first baroclinic gravity wave speed [L T-1 ~> m s-1].
Res_fn_h
Non-dimensional function of the ratio the first baroclinic deformation radius to the grid spacing at h points [nondim].
Res_fn_q
Non-dimensional function of the ratio the first baroclinic deformation radius to the grid spacing at q points [nondim].
Res_fn_u
Non-dimensional function of the ratio the first baroclinic deformation radius to the grid spacing at u points [nondim].
Res_fn_v
Non-dimensional function of the ratio the first baroclinic deformation radius to the grid spacing at v points [nondim].
Depth_fn_u
Non-dimensional function of the ratio of the depth to a reference depth (maximum 1) at u points [nondim]
Depth_fn_v
Non-dimensional function of the ratio of the depth to a reference depth (maximum 1) at v points [nondim]
beta_dx2_h
The magnitude of the gradient of the Coriolis parameter times the grid spacing squared at h points [L T-1 ~> m s-1].
beta_dx2_q
The magnitude of the gradient of the Coriolis parameter times the grid spacing squared at q points [L T-1 ~> m s-1].
beta_dx2_u
The magnitude of the gradient of the Coriolis parameter times the grid spacing squared at u points [L T-1 ~> m s-1].
beta_dx2_v
The magnitude of the gradient of the Coriolis parameter times the grid spacing squared at v points [L T-1 ~> m s-1].
f2_dx2_h
The Coriolis parameter squared times the grid spacing squared at h [L2 T-2 ~> m2 s-2].
f2_dx2_q
The Coriolis parameter squared times the grid spacing squared at q [L2 T-2 ~> m2 s-2].
f2_dx2_u
The Coriolis parameter squared times the grid spacing squared at u [L2 T-2 ~> m2 s-2].
f2_dx2_v
The Coriolis parameter squared times the grid spacing squared at v [L2 T-2 ~> m2 s-2].
Rd_dx_h
Deformation radius over grid spacing [nondim]
slope_x
Zonal isopycnal slope [Z L-1 ~> nondim]
slope_y
Meridional isopycnal slope [Z L-1 ~> nondim]
ebt_struct
EBT vertical structure to scale diffusivities with [nondim]
sqg_struct
SQG vertical structure to scale diffusivities with [nondim]
BS_struct
Vertical structure function used in backscatter [nondim]
khth_struct
Vertical structure function used in thickness diffusivity [nondim]
khtr_struct
Vertical structure function used in tracer diffusivity [nondim]
kdgl90_struct
Vertical structure function used in GL90 diffusivity [nondim]
BS_EBT_power
Power to raise EBT vertical structure to. Default 0.0.
sqg_expo
Exponent for SQG vertical structure [nondim]. Default 1.0
interpolated_sqg_struct
If true, interpolate properties to velocity points and then interpolate the buoyancy frequencies and layer thicknesses back to tracer points when calculating the SQG vertical structure.
BS_use_sqg_struct
If true, use sqg_stuct for backscatter vertical structure.
Laplac3_const_u
Laplacian metric-dependent constants at u-points [L3 ~> m3]
Laplac3_const_v
Laplacian metric-dependent constants at u-points [L3 ~> m3]
KH_u_QG
QG Leith GM coefficient at u-points [L2 T-1 ~> m2 s-1]
KH_v_QG
QG Leith GM coefficient at v-points [L2 T-1 ~> m2 s-1]
use_Visbeck
Use Visbeck formulation for thickness diffusivity
VarMix_Ktop
Top layer to start downward integrals
Visbeck_L_scale
Fixed length scale in Visbeck formula [L ~> m], or if negative a scaling factor [nondim] relating this length scale squared to the cell area
Eady_GR_D_scale
Depth over which to average SN [Z ~> m]
Res_coef_khth
A coefficient [nondim] that determines the function of resolution, used for thickness and tracer mixing, as: F = 1 / (1 + (Res_coef_khth*Ld/dx)^Res_fn_power)
Res_coef_visc
A coefficient [nondim] that determines the function of resolution, used for lateral viscosity, as: F = 1 / (1 + (Res_coef_visc*Ld/dx)^Res_fn_power)
depth_scaled_khth_h0
The depth above which KHTH is linearly scaled away [Z ~> m]
depth_scaled_khth_exp
The exponent used in the depth dependent scaling function for KHTH [nondim]
kappa_smooth
A diffusivity for smoothing T/S in vanished layers [H Z T-1 ~> m2 s-1 or kg m-1 s-1]
Res_fn_power_khth
The power of dx/Ld in the KhTh resolution function. Any positive integer power may be used, but even powers and especially 2 are coded to be more efficient.
Res_fn_power_visc
The power of dx/Ld in the Kh resolution function. Any positive integer power may be used, but even powers and especially 2 are coded to be more efficient.
Visbeck_S_max
Upper bound on slope used in Eady growth rate [Z L-1 ~> nondim].
use_QG_Leith_GM
If true, uses the QG Leith viscosity as the GM coefficient
id_SN_u
Diagnostic identifier
id_SN_v
Diagnostic identifier
id_L2u
Diagnostic identifier
id_L2v
Diagnostic identifier
id_Res_fn
Diagnostic identifier
id_N2_u
Diagnostic identifier
id_N2_v
Diagnostic identifier
id_S2_u
Diagnostic identifier
id_S2_v
Diagnostic identifier
id_dzu
Diagnostic identifier
id_dzv
Diagnostic identifier
id_dzSxN
Diagnostic identifier
id_dzSyN
Diagnostic identifier
id_Rd_dx
Diagnostic identifier
id_KH_u_QG
Diagnostic identifier
id_KH_v_QG
Diagnostic identifier
id_sqg_struct
Diagnostic identifier
id_BS_struct
Diagnostic identifier
id_khth_struct
Diagnostic identifier
id_khtr_struct
Diagnostic identifier
id_kdgl90_struct
Diagnostic identifier
diag
Diagnostic identifier
wave_speed
Wave speed control structure
pass_cg1
For group halo pass
debug
If true, write out checksums of data for debugging
Functions/Subroutine Documentation
- subroutine calc_depth_function(G, CS)
Calculates the non-dimensional depth functions.
- Parameters
G [in]
Ocean grid structure
CS [inout]
Variable mixing control structure
Callees call graph
Callers call graph
- subroutine calc_resoln_function(h, tv, G, GV, US, CS, MEKE, OBC, dt)
Calculates and stores the non-dimensional resolution functions
- Parameters
G [inout]
Ocean grid structure
GV [in]
Vertical grid structure
h [in]
Layer thickness [H ~> m or kg m-2]
tv [in]
Thermodynamic variables
US [in]
A dimensional unit scaling type
CS [inout]
Variable mixing control structure
MEKE [in]
MEKE struct
OBC
Open boundaries control structure
dt [in]
Time increment [T ~> s]
Callees call graph
Text view
mom_lateral_mixing_coeffs::calc_resoln_function → mom_checksums::interface::hchksum
mom_lateral_mixing_coeffs::calc_resoln_function → mom_checksums::interface::uvchksum
mom_lateral_mixing_coeffs::calc_resoln_function → mom_diag_mediator::interface::post_data
mom_lateral_mixing_coeffs::calc_resoln_function → mom_diag_mediator::query_averaging_enabled
mom_lateral_mixing_coeffs::calc_resoln_function → mom_domain_infra::do_group_pass
mom_lateral_mixing_coeffs::calc_resoln_function → mom_domain_infra::interface::create_group_pass
mom_lateral_mixing_coeffs::calc_resoln_function → mom_domain_infra::interface::pass_var
mom_lateral_mixing_coeffs::calc_resoln_function → mom_error_handler::mom_error
mom_lateral_mixing_coeffs::calc_resoln_function → mom_lateral_mixing_coeffs::calc_sqg_struct
mom_lateral_mixing_coeffs::calc_resoln_function → mom_wave_speed::wave_speed
Callers call graph
- subroutine calc_sqg_struct(h, tv, G, GV, US, CS, dt, MEKE, OBC)
Calculates and stores functions of SQG mode
- Parameters
G [inout]
Ocean grid structure
GV [in]
Vertical grid structure
US [in]
A dimensional unit scaling type
h [in]
Layer thickness [H ~> m or kg m-2]
tv [in]
Thermodynamic variables
dt [in]
Time increment [T ~> s]
CS [inout]
Variable mixing control struct
MEKE [in]
MEKE struct
OBC
Open boundaries control structure
Callees call graph
Text view
mom_lateral_mixing_coeffs::calc_sqg_struct → mom_diag_mediator::interface::post_data
mom_lateral_mixing_coeffs::calc_sqg_struct → mom_diag_mediator::query_averaging_enabled
mom_lateral_mixing_coeffs::calc_sqg_struct → mom_eos::eos_domain
mom_lateral_mixing_coeffs::calc_sqg_struct → mom_eos::interface::calculate_density_derivs
mom_lateral_mixing_coeffs::calc_sqg_struct → mom_error_handler::mom_error
mom_lateral_mixing_coeffs::calc_sqg_struct → mom_interface_heights::interface::find_eta
mom_lateral_mixing_coeffs::calc_sqg_struct → mom_interface_heights::interface::thickness_to_dz
mom_lateral_mixing_coeffs::calc_sqg_struct → mom_isopycnal_slopes::calc_isoneutral_slopes
Callers call graph
- subroutine calc_slope_functions(h, tv, dt, G, GV, US, CS, OBC)
Calculates and stores functions of isopycnal slopes, e.g. Sx, Sy, S*N, mostly used in the Visbeck et al. style scaling of diffusivity
- Parameters
G [inout]
Ocean grid structure
GV [in]
Vertical grid structure
US [in]
A dimensional unit scaling type
h [inout]
Layer thickness [H ~> m or kg m-2]
tv [in]
Thermodynamic variables
dt [in]
Time increment [T ~> s]
CS [inout]
Variable mixing control structure
OBC
Open boundaries control structure
Callees call graph
Text view
mom_lateral_mixing_coeffs::calc_slope_functions → mom_diag_mediator::interface::post_data
mom_lateral_mixing_coeffs::calc_slope_functions → mom_diag_mediator::query_averaging_enabled
mom_lateral_mixing_coeffs::calc_slope_functions → mom_error_handler::mom_error
mom_lateral_mixing_coeffs::calc_slope_functions → mom_interface_heights::interface::find_eta
mom_lateral_mixing_coeffs::calc_slope_functions → mom_isopycnal_slopes::calc_isoneutral_slopes
mom_lateral_mixing_coeffs::calc_slope_functions → mom_lateral_mixing_coeffs::calc_eady_growth_rate_2d
mom_lateral_mixing_coeffs::calc_slope_functions → mom_lateral_mixing_coeffs::calc_slope_functions_using_just_e
mom_lateral_mixing_coeffs::calc_slope_functions → mom_lateral_mixing_coeffs::calc_visbeck_coeffs_old
Callers call graph
- subroutine calc_Visbeck_coeffs_old(h, slope_x, slope_y, N2_u, N2_v, G, GV, US, CS, OBC)
Calculates factors used when setting diffusivity coefficients similar to Visbeck et al., 1997. This is on older implementation that is susceptible to large values of Eady growth rate for incropping layers.
- Parameters
G [inout]
Ocean grid structure
GV [in]
Vertical grid structure
h [in]
Layer thickness [H ~> m or kg m-2]
slope_x [in]
Zonal isoneutral slope [Z L-1 ~> nondim]
N2_u [in]
Buoyancy (Brunt-Vaisala) frequency at u-points [L2 Z-2 T-2 ~> s-2]
slope_y [in]
Meridional isoneutral slope [Z L-1 ~> nondim]
N2_v [in]
Buoyancy (Brunt-Vaisala) frequency at v-points [L2 Z-2 T-2 ~> s-2]
US [in]
A dimensional unit scaling type
CS [inout]
Variable mixing control structure
OBC
Open boundaries control structure.
Callees call graph
Text view
mom_lateral_mixing_coeffs::calc_visbeck_coeffs_old → mom_checksums::interface::uvchksum
mom_lateral_mixing_coeffs::calc_visbeck_coeffs_old → mom_diag_mediator::interface::post_data
mom_lateral_mixing_coeffs::calc_visbeck_coeffs_old → mom_diag_mediator::query_averaging_enabled
mom_lateral_mixing_coeffs::calc_visbeck_coeffs_old → mom_error_handler::mom_error
Callers call graph
- subroutine calc_Eady_growth_rate_2D(CS, G, GV, US, h, e, dzu, dzv, dzSxN, dzSyN, SN_u, SN_v)
Calculates the Eady growth rate (2D fields) for use in MEKE and the Visbeck schemes
- Parameters
CS [inout]
Variable mixing coefficients
G [in]
Ocean grid structure
GV [in]
Vertical grid structure
US [in]
A dimensional unit scaling type
h [in]
Interface height [Z ~> m]
e [in]
Interface height [Z ~> m]
dzu [in]
dz at u-points [Z ~> m]
dzv [in]
dz at v-points [Z ~> m]
dzSxN [in]
dz Sx N at u-points [Z T-1 ~> m s-1]
dzSyN [in]
dz Sy N at v-points [Z T-1 ~> m s-1]
SN_u [inout]
SN at u-points [T-1 ~> s-1]
SN_v [inout]
SN at v-points [T-1 ~> s-1]
SN_cpy
SN at u-points [T-1 ~> s-1]
Callees call graph
Callers call graph
- subroutine calc_slope_functions_using_just_e(h, G, GV, US, CS, e)
The original calc_slope_function() that calculated slopes using interface positions only, not accounting for density variations.
- Parameters
G [inout]
Ocean grid structure
GV [in]
Vertical grid structure
h [inout]
Layer thickness [H ~> m or kg m-2]
US [in]
A dimensional unit scaling type
CS [inout]
Variable mixing control structure
e [in]
Interface position [Z ~> m]
Callees call graph
Callers call graph
- subroutine calc_QG_slopes(h, tv, dt, G, GV, US, slope_x, slope_y, CS, OBC)
Calculates and returns isopycnal slopes with wider halos for use in finding QG viscosity.
- Parameters
G [in]
Ocean grid structure
GV [in]
Vertical grid structure
US [in]
A dimensional unit scaling type
h [in]
Layer thickness [H ~> m or kg m-2]
tv [in]
Thermodynamic variables
dt [in]
Time increment [T ~> s]
slope_x [inout]
Isopycnal slope in i-dir [Z L-1 ~> nondim]
slope_y [inout]
Isopycnal slope in j-dir [Z L-1 ~> nondim]
CS [in]
Variable mixing control structure
OBC
Open boundaries control structure
Callees call graph
Callers call graph
- subroutine calc_QG_Leith_viscosity(CS, G, GV, US, h, dz, k, div_xx_dx, div_xx_dy, slope_x, slope_y, vort_xy_dx, vort_xy_dy)
Calculates the Leith Laplacian and bi-harmonic viscosity coefficients
- Parameters
CS [inout]
Variable mixing coefficients
G [in]
Ocean grid structure
GV [in]
The ocean's vertical grid structure.
US [in]
A dimensional unit scaling type
h [in]
Layer thickness [H ~> m or kg m-2]
dz [in]
Layer vertical extents [Z ~> m]
k [in]
Layer for which to calculate vorticity magnitude
div_xx_dx [in]
x-derivative of horizontal divergence (d/dx(du/dx + dv/dy)) [L-1 T-1 ~> m-1 s-1]
div_xx_dy [in]
y-derivative of horizontal divergence (d/dy(du/dx + dv/dy)) [L-1 T-1 ~> m-1 s-1]
slope_x [inout]
Isopycnal slope in i-dir [Z L-1 ~> nondim]
slope_y [inout]
Isopycnal slope in j-dir [Z L-1 ~> nondim]
vort_xy_dx [inout]
x-derivative of vertical vorticity (d/dx(dv/dx - du/dy)) [L-1 T-1 ~> m-1 s-1]
vort_xy_dy [inout]
y-derivative of vertical vorticity (d/dy(dv/dx - du/dy)) [L-1 T-1 ~> m-1 s-1]
Callees call graph
Callers call graph
- subroutine VarMix_init(Time, G, GV, US, param_file, diag, CS)
Initializes the variables mixing coefficients container
- Parameters
Time [in]
Current model time
G [in]
Ocean grid structure
GV [in]
The ocean's vertical grid structure
US [in]
A dimensional unit scaling type
param_file [in]
Parameter file handles
diag [inout]
Diagnostics control structure
CS [inout]
Variable mixing coefficients
Callees call graph
Text view
mom_lateral_mixing_coeffs::varmix_init → mom_diag_mediator::register_diag_field
mom_lateral_mixing_coeffs::varmix_init → mom_error_handler::mom_error
mom_lateral_mixing_coeffs::varmix_init → mom_file_parser::interface::get_param
mom_lateral_mixing_coeffs::varmix_init → mom_file_parser::interface::log_version
mom_lateral_mixing_coeffs::varmix_init → mom_wave_speed::wave_speed_init
- subroutine VarMix_end(CS)
Destructor for VarMix control structure