MOM_CVMix_KPP module reference
Provides the K-Profile Parameterization (KPP) of Large et al., 1994, via CVMix.
Data Types
Enhancement for Vt2 based on Li and Fox-Kemper, 2017 |
Functions/Subroutines
Routine to register restarts, pass-through to children modules |
|
Initialize the CVMix KPP module and set up diagnostics Returns True if KPP is to be used, False otherwise. |
|
KPP vertical diffusivity/viscosity and non-local tracer transport |
|
Compute OBL depth |
|
Apply a 1-1-4-1-1 Laplacian filter one time on BLD to reduce any horizontal two-grid-point noise |
|
Copies KPP surface boundary layer depth into BLD, in units of [Z ~> m] unless other units are specified. |
|
Copies CS%Lam2 into Lam2. |
|
Apply KPP non-local transport of surface fluxes for a given tracer |
|
Apply KPP non-local transport of surface fluxes for temperature. |
|
Apply KPP non-local transport of surface fluxes for salinity. |
|
Compute Stokes Drift components and integrals needed to compute Stokes TKE production parameters. |
|
Clear pointers, deallocate memory |
Type Documentation
- type, public :: KPP_CS
Enhancement for Vt2 based on Li and Fox-Kemper, 2017
Control structure for containing KPP parameters/data
- Parameters
Ri_crit
Critical bulk Richardson number (defines OBL depth) [nondim]
vonKarman
von Karman constant (dimensionless) [nondim]
cs
Parameter for computing velocity scale function (dimensionless) [nondim]
cs2
Parameter for multiplying by non-local term [nondim] This is active for NLT_SHAPE_CUBIC_LMD only
La_min
An arbitrary lower-bound on the Langmuir number [nondim].
enhance_diffusion
If True, add enhanced diffusivity at base of boundary layer.
interpType
Type of interpolation to compute bulk Richardson number
interpType2
Type of interpolation to compute diff and visc at OBL_depth
StokesMOST
If True, use Stokes similarity package
computeEkman
If True, compute Ekman depth limit for OBLdepth
computeMoninObukhov
If True, compute Monin-Obukhov limit for OBLdepth
passiveMode
If True, makes KPP passive meaning it does NOT alter the diffusivity
deepOBLoffset
If non-zero, is a distance from the bottom that the OBL can not penetrate through [Z ~> m]
minOBLdepth
If non-zero, is a minimum depth for the OBL [Z ~> m]
surf_layer_ext
Fraction of OBL depth considered in the surface layer [nondim]
minVtsqr
Min for the squared unresolved velocity used in Rib CVMix calculation [L2 T-2 ~> m2 s-2]
fixedOBLdepth
If True, will fix the OBL depth at fixedOBLdepth_value
fixedOBLdepth_value
value for the fixed OBL depth when fixedOBLdepth==True [Z ~> m]
debug
If True, calculate checksums and write debugging information
MatchTechnique
Method used in CVMix for setting diffusivity and NLT profile functions
NLT_shape
MOM6 over-ride of CVMix NLT shape function
applyNonLocalTrans
If True, apply non-local transport to all tracers
n_smooth
Number of times smoothing operator is applied on OBLdepth.
deepen_only
If true, apply OBLdepth smoothing at a cell only if the OBLdepth gets deeper.
KPPzeroDiffusivity
If True, will set diffusivity and viscosity from KPP to zero for testing purposes.
KPPisAdditive
If True, will add KPP diffusivity to initial diffusivity. If False, will replace initial diffusivity wherever KPP diffusivity is non-zero.
min_thickness
A minimum thickness used to avoid division by small numbers in the vicinity of vanished layers [Z ~> m]
SW_METHOD
Sets method for using shortwave radiation in surface buoyancy flux
LT_K_Enhancement
Flags if enhancing mixing coefficients due to LT
LT_K_Shape
Integer for constant or shape function enhancement
LT_K_Method
Integer for mixing coefficients LT method
KPP_CVt2
Parameter for Stokes MOST convection entrainment [nondim]
KPP_K_ENH_FAC
Factor to multiply by K if Method is CONSTANT [nondim]
LT_Vt2_Enhancement
Flags if enhancing Vt2 due to LT
LT_VT2_METHOD
Integer for Vt2 LT method
KPP_VT2_ENH_FAC
Factor to multiply by VT2 if Method is CONSTANT [nondim]
MLD_guess_min
The minimum estimate of the mixed layer depth used to calculate the Langmuir number for Langmuir turbulence enhancement with KPP [Z ~> m]
KPP_ER_Cb
Entrainment Rule TKE buoyancy production weight [nondim]
KPP_ER_Cs
Entrainment Rule TKE Stokes production weight [nondim]
KPP_ER_Cu
Entrainment Rule TKE shear production weight [nondim]
STOKES_MIXING
Flag if model is mixing down Stokes gradient This is relevant for which current to use in RiB
OBL_depth_bounds_bug
If true, limit the KPP boundary layer depth relative to the top of the bottommost layer instead of the seafloor.
answer_date
The vintage of the order of arithmetic in the CVMix KPP calculations. Values below 20240501 recover the answers from early in 2024, while higher values use expressions that have been refactored for rotational symmetry. Values of 20260101 or higher replace some divisions with multiplication by reciprocals.
CVMix parameters
id_OBLdepth
Diagnostic handles
id_BulkRi
Diagnostic handles
id_N
Diagnostic handles
id_N2
Diagnostic handles
id_Ws
Diagnostic handles
id_Vt2
Diagnostic handles
id_BulkUz2
Diagnostic handles
id_BulkDrho
Diagnostic handles
id_uStar
Diagnostic handles
id_buoyFlux
Diagnostic handles
id_sigma
Diagnostic handles
id_Kv_KPP
Diagnostic handles
id_Kt_KPP
Diagnostic handles
id_Ks_KPP
Diagnostic handles
id_Tsurf
Diagnostic handles
id_Ssurf
Diagnostic handles
id_Usurf
Diagnostic handles
id_Vsurf
Diagnostic handles
id_Kd_in
Diagnostic handles
id_NLTt
Diagnostic handles
id_NLTs
Diagnostic handles
id_EnhK
Diagnostic handles
id_EnhVt2
Diagnostic handles
id_La_SL
Diagnostic handles
id_OBLdepth_original
Diagnostic handles
id_ERdepth
Diagnostic handles
id_RNdepth
Diagnostic handles
id_StokesXI
Diagnostic handles
id_BEdE_ER
Diagnostic handles
id_Lam2
Diagnostic handles
id_PU_TKE
Diagnostic handles
id_PS_TKE
Diagnostic handles
id_PB_TKE
Diagnostic handles
OBLdepth
Depth (positive) of ocean boundary layer (OBL) [Z ~> m]
Lam2
La^(-2) = Ustk0/u* [nondim]
BulkRi
Bulk Richardson number for each layer [nondim]
N
Brunt-Vaisala frequency [T-1 ~> s-1]
N2
Squared Brunt-Vaisala frequency [T-2 ~> s-2]
Ws
Turbulent velocity scale for scalars [Z T-1 ~> m s-1]
Vt2
Unresolved turbulence velocity^2 for bulk Ri [Z2 T-2 ~> m2 s-2]
Uz2
Square of bulk difference in resolved velocity [L2 T-2 ~> m2 s-2]
dRho
Bulk difference in density [R ~> kg m-3]
sigma
Sigma coordinate (dimensionless) [nondim]
Kv_KPP
Viscosity due to KPP [Z2 T-1 ~> m2 s-1]
Kt_KPP
Temp diffusivity from KPP [Z2 T-1 ~> m2 s-1]
Ks_KPP
Scalar diffusivity from KPP [Z2 T-1 ~> m2 s-1]
Tsurf
Temperature of surface layer [C ~> degC]
Ssurf
Salinity of surface layer [S ~> ppt]
Usurf
i-velocity of surface layer [L T-1 ~> m s-1]
Vsurf
j-velocity of surface layer [L T-1 ~> m s-1]
EnhK
Enhancement for mixing coefficient [nondim]
EnhVt2
Enhancement for Vt2 [nondim]
La_SL
Langmuir number used in KPP [nondim]
OBLdepth_original
Depth (positive) of OBL [Z ~> m] without smoothing
ERdepth
Percent use ER boundary layer depth [nondim]
RNdepth
Percent use Ri Number boundary layer depth [nondim]
StokesXI
Stokes similarity parameter [nondim]
BEdE_ER
Entrainment Rule's Parameterized BEdE [ m3 s-3 ]
kOBL
Level (+fraction) of OBL extent [nondim]
OBLdepthprev
previous Depth (positive) of OBL [Z ~> m]
PU_TKE
Parameterized shear TKE Production [ m3 s-3 ]
PS_TKE
Parameterized Stokes TKE Production [ m3 s-3 ]
PB_TKE
Parameterized buoyancy TKE Production [ m3 s-3 ]
Functions/Subroutine Documentation
- subroutine register_KPP_restarts(G, param_file, restart_CSp, CS)
Routine to register restarts, pass-through to children modules
- Parameters
G [in]
The ocean's grid structure
param_file [in]
A structure to parse for run-time parameters
restart_CSp
MOM restart control structure
CS
module control structure
mdl
name of this module
Callees call graph
Callers call graph
- logical function KPP_init(paramFile, G, GV, US, diag, Time, CS, passive)
Initialize the CVMix KPP module and set up diagnostics Returns True if KPP is to be used, False otherwise.
- Parameters
paramFile [in]
File parser
G [in]
Ocean grid
GV [in]
Vertical grid structure
US [in]
A dimensional unit scaling type
diag [in]
Diagnostics
Time [in]
Model time
CS
Control structure
passive [out]
Copy of %passiveMode
mdl
name of this module
string
local temporary string
langmuir_mixing_opt
Langmuir mixing option to be passed to CVMix, e.g., LWF16
langmuir_entrainment_opt
Langmuir entrainment option to be passed to CVMix, e.g., LWF16
CS_IS_ONE
Logical for setting Cs based on Non-local
lnoDGat1
True => G'(1) = 0 (shape function) False => compute G'(1) as in LMD94
Callees call graph
Text view
mom_cvmix_kpp::kpp_init → mom_diag_mediator::register_diag_field
mom_cvmix_kpp::kpp_init → mom_file_parser::closeparameterblock
mom_cvmix_kpp::kpp_init → mom_file_parser::interface::get_param
mom_cvmix_kpp::kpp_init → mom_file_parser::interface::log_version
mom_cvmix_kpp::kpp_init → mom_file_parser::openparameterblock
External calls
- cvmix_kpp
CVMix_init_kpp (cvmix_kpp::cvmix_init_kpp)
- subroutine KPP_calculate(CS, G, GV, US, h, tv, uStar, buoyFlux, Kt, Ks, Kv, nonLocalTransHeat, nonLocalTransScalar, Waves, lamult)
KPP vertical diffusivity/viscosity and non-local tracer transport
- Parameters
CS
Control structure
G [in]
Ocean grid
GV [in]
Ocean vertical grid
US [in]
A dimensional unit scaling type
h [in]
Layer thicknesses [H ~> m or kg m-2]
tv [in]
Thermodynamics structure.
uStar [in]
Surface friction velocity [Z T-1 ~> m s-1]
buoyFlux [in]
Surface buoyancy flux [L2 T-3 ~> m2 s-3]
Kt [inout]
(in) Vertical diffusivity of heat w/o KPP (out) Vertical diffusivity including KPP [H Z T-1 ~> m2 s-1 or kg m-1 s-1]
Ks [inout]
(in) Vertical diffusivity of salt w/o KPP (out) Vertical diffusivity including KPP [H Z T-1 ~> m2 s-1 or kg m-1 s-1]
Kv [inout]
(in) Vertical viscosity w/o KPP (out) Vertical viscosity including KPP [H Z T-1 ~> m2 s-1 or Pa s]
nonLocalTransHeat [inout]
Temp non-local transport [nondim]
nonLocalTransScalar [inout]
scalar non-local trans. [nondim]
Waves
Wave CS for Langmuir turbulence
lamult [in]
Langmuir enhancement multiplier [nondim]
Callees call graph
Text view
mom_cvmix_kpp::kpp_calculate → mom_checksums::interface::hchksum
mom_cvmix_kpp::kpp_calculate → mom_cpu_clock_infra::cpu_clock_begin
mom_cvmix_kpp::kpp_calculate → mom_cpu_clock_infra::cpu_clock_end
mom_cvmix_kpp::kpp_calculate → mom_diag_mediator::interface::post_data
mom_cvmix_kpp::kpp_calculate → mom_interface_heights::interface::thickness_to_dz
Callers call graph
External calls
- cvmix_kpp
CVMix_coeffs_kpp (cvmix_kpp::cvmix_coeffs_kpp)
- subroutine KPP_compute_BLD(CS, G, GV, US, h, Temp, Salt, u, v, tv, uStar, buoyFlux, Waves, lamult)
Compute OBL depth
- Parameters
CS
Control structure
G [inout]
Ocean grid
GV [in]
Ocean vertical grid
US [in]
A dimensional unit scaling type
h [in]
Layer thicknesses [H ~> m or kg m-2]
Temp [in]
potential/cons temp [C ~> degC]
Salt [in]
Salinity [S ~> ppt]
u [in]
Velocity i-component [L T-1 ~> m s-1]
v [in]
Velocity j-component [L T-1 ~> m s-1]
tv [in]
Thermodynamics structure.
uStar [in]
Surface friction velocity [Z T-1 ~> m s-1]
buoyFlux [in]
Surface buoyancy flux [L2 T-3 ~> m2 s-3]
Waves
Wave CS for Langmuir turbulence
lamult [in]
Langmuir enhancement factor [nondim]
Callees call graph
Text view
mom_cvmix_kpp::kpp_compute_bld → mom_checksums::interface::hchksum
mom_cvmix_kpp::kpp_compute_bld → mom_cpu_clock_infra::cpu_clock_begin
mom_cvmix_kpp::kpp_compute_bld → mom_cpu_clock_infra::cpu_clock_end
mom_cvmix_kpp::kpp_compute_bld → mom_cvmix_kpp::compute_stokesdrift
mom_cvmix_kpp::kpp_compute_bld → mom_cvmix_kpp::kpp_smooth_bld
mom_cvmix_kpp::kpp_compute_bld → mom_diag_mediator::interface::post_data
mom_cvmix_kpp::kpp_compute_bld → mom_eos::interface::calculate_density
mom_cvmix_kpp::kpp_compute_bld → mom_error_handler::mom_error
mom_cvmix_kpp::kpp_compute_bld → mom_interface_heights::interface::thickness_to_dz
mom_cvmix_kpp::kpp_compute_bld → mom_wave_interface::get_langmuir_number
Callers call graph
External calls
- cvmix_kpp
CVMix_kpp_compute_ER_depth (cvmix_kpp::cvmix_kpp_compute_er_depth)
CVMix_kpp_compute_OBL_depth (cvmix_kpp::cvmix_kpp_compute_obl_depth)
CVMix_kpp_compute_kOBL_depth (cvmix_kpp::cvmix_kpp_compute_kobl_depth)
CVMix_kpp_compute_turbulent_scales (cvmix_kpp::cvmix_kpp_compute_turbulent_scales)
CVmix_kpp_compute_bulk_Richardson (cvmix_kpp::cvmix_kpp_compute_bulk_richardson)
CVmix_kpp_compute_unresolved_shear (cvmix_kpp::cvmix_kpp_compute_unresolved_shear)
cvmix_kpp_compute_StokesXi (cvmix_kpp::cvmix_kpp_compute_stokesxi)
- subroutine KPP_smooth_BLD(CS, G, GV, US, dz)
Apply a 1-1-4-1-1 Laplacian filter one time on BLD to reduce any horizontal two-grid-point noise
- Parameters
CS
Control structure
G [inout]
Ocean grid
GV [in]
Ocean vertical grid
US [in]
A dimensional unit scaling type
dz [in]
Layer thicknesses [Z ~> m]
Callees call graph
External calls
- cvmix_kpp
CVMix_kpp_compute_kOBL_depth (cvmix_kpp::cvmix_kpp_compute_kobl_depth)
- subroutine KPP_get_BLD(CS, BLD, G, US, m_to_BLD_units)
Copies KPP surface boundary layer depth into BLD, in units of [Z ~> m] unless other units are specified.
- Parameters
CS
Control structure for this module
G [in]
Grid structure
US [in]
A dimensional unit scaling type
BLD [inout]
Boundary layer depth [Z ~> m] or other units
m_to_BLD_units [in]
A conversion factor from meters to the desired units for BLD [various]
Callers call graph
- subroutine KPP_get_Lam2(CS, Lam2, G, US)
Copies CS%Lam2 into Lam2.
- Parameters
CS
Control structure for this module
G [in]
Grid structure
US [in]
A dimensional unit scaling type
Lam2 [inout]
(Langmuir Number)^-2 [nondim]
Callers call graph
- subroutine KPP_NonLocalTransport(CS, G, GV, h, nonLocalTrans, surfFlux, dt, diag, tr_ptr, scalar, flux_scale)
Apply KPP non-local transport of surface fluxes for a given tracer
- Parameters
CS [in]
Control structure
G [in]
Ocean grid
GV [in]
Ocean vertical grid
h [in]
Layer/level thickness [H ~> m or kg m-2]
nonLocalTrans [in]
Non-local transport [nondim]
surfFlux [in]
Surface flux of scalar [conc H T-1 ~> conc m s-1 or conc kg m-2 s-1]
dt [in]
Time-step [T ~> s]
diag [in]
Diagnostics
tr_ptr [in]
tracer_type has diagnostic ids on it
scalar [inout]
Scalar (scalar units [conc])
flux_scale [in]
Scale factor to get surfFlux into proper units [various]
Callees call graph
Callers call graph
Text view
marbl_tracers::marbl_tracers_column_physics → mom_cvmix_kpp::kpp_nonlocaltransport
mom_cfc_cap::cfc_cap_column_physics → mom_cvmix_kpp::kpp_nonlocaltransport
mom_cvmix_kpp::kpp_nonlocaltransport_saln → mom_cvmix_kpp::kpp_nonlocaltransport
mom_cvmix_kpp::kpp_nonlocaltransport_temp → mom_cvmix_kpp::kpp_nonlocaltransport
pseudo_salt_tracer::pseudo_salt_tracer_column_physics → mom_cvmix_kpp::kpp_nonlocaltransport
- subroutine KPP_NonLocalTransport_temp(CS, G, GV, h, nonLocalTrans, surfFlux, dt, tr_ptr, scalar, C_p)
Apply KPP non-local transport of surface fluxes for temperature.
- Parameters
CS [in]
Control structure
G [in]
Ocean grid
GV [in]
Ocean vertical grid
h [in]
Layer/level thickness [H ~> m or kg m-2]
nonLocalTrans [in]
Non-local transport [nondim]
surfFlux [in]
Surface flux of temperature [C H T-1 ~> degC m s-1 or degC kg m-2 s-1]
dt [in]
Time-step [T ~> s]
tr_ptr [in]
tracer_type has diagnostic ids on it
scalar [inout]
temperature [C ~> degC]
C_p [in]
Seawater specific heat capacity [Q C-1 ~> J kg-1 degC-1]
Callees call graph
- subroutine KPP_NonLocalTransport_saln(CS, G, GV, h, nonLocalTrans, surfFlux, dt, tr_ptr, scalar)
Apply KPP non-local transport of surface fluxes for salinity.
- Parameters
CS [in]
Control structure
G [in]
Ocean grid
GV [in]
Ocean vertical grid
h [in]
Layer/level thickness [H ~> m or kg m-2]
nonLocalTrans [in]
Non-local transport [nondim]
surfFlux [in]
Surface flux of salt [S H T-1 ~> ppt m s-1 or ppt kg m-2 s-1]
dt [in]
Time-step [T ~> s]
scalar [inout]
Salinity [S ~> ppt]
tr_ptr [in]
tracer_type has diagnostic ids on it
Callees call graph
- subroutine Compute_StokesDrift(i, j, ztop, zbot, zBL, zSLtop, zSL, uS_i, vS_i, uS_k, vS_k, uS_SL, vS_SL, uSbar, vSbar, uSb_SL, vSb_SL, waves)
Compute Stokes Drift components and integrals needed to compute Stokes TKE production parameters.
- Parameters
waves
Wave CS for Langmuir turbulence
ztop [in]
boundary layer cellheight top (<0) [Z ~> m]
zbot [in]
boundary layer cellheight bottom (<0) [Z ~> m]
zBL [in]
boundary layer cellheight center (<0) [Z ~> m]
zSLtop [in]
surface layer cell top [Z ~> m]
zSL [in]
surface layer cell depth [Z ~> m]
uS_i [inout]
Zonal Stokes velocity at zbot interface [L T-1 ~> m s-1]
vS_i [inout]
Meridional Stokes velocity at zbot interface [L T-1 ~> m s-1]
uS_k [inout]
Zonal Stokes velocity at zbl [L T-1 ~> m s-1]
vS_k [inout]
Meridional Stokes velocity at zbl [L T-1 ~> m s-1]
uS_SL [inout]
Zonal Stokes velocity at zSL [L T-1 ~> m s-1]
vS_SL [inout]
Meridional Stokes velocity at zSL [L T-1 ~> m s-1]
uSbar [inout]
Mean zonal Stokes velocity at ztop [L T-1 ~> m s-1]
vSbar [inout]
Mean meridional Stokes velocity at zbot [L T-1 ~> m s-1]
uSb_SL [inout]
Mean zonal Stokes velocity at zSLtop [L T-1 ~> m s-1]
vSb_SL [inout]
Mean meridional Stokes velocity at zSL [L T-1 ~> m s-1]
i [in]
Meridional index of H-point
j [in]
Zonal index of H-point
b
wavenumber band index
fexp
dummy exponential function [nondim]
WaveNum
Wavenumber [Z-1 ~> m-1]
- subroutine KPP_end(CS)
Clear pointers, deallocate memory
- Parameters
CS
Control structure