mom_cvmix_kpp module reference¶
Provides the K-Profile Parameterization (KPP) of Large et al., 1994, via CVMix.
Data Types¶
Control structure for containing KPP parameters/data. |
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. |
|
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 at zbot < ztop <= 0 and at k=0.5*(ztop+zbot) and average components from ztop to zbot <= 0. |
|
Clear pointers, deallocate memory. |
Detailed Description¶
Provides the K-Profile Parameterization (KPP) of Large et al., 1994, via CVMix.
Type Documentation¶
-
type
mom_cvmix_kpp/kpp_cs¶ Control structure for containing KPP parameters/data.
- Type fields:
%id_obldepth[integer] :: Diagnostic handles.%id_bulkri[integer] :: Diagnostic handles.%id_n[integer] :: Diagnostic handles.%id_n2[integer] :: Diagnostic handles.%id_ws[integer] :: Diagnostic handles.%id_vt2[integer] :: Diagnostic handles.%id_bulkuz2[integer] :: Diagnostic handles.%id_bulkdrho[integer] :: Diagnostic handles.%id_ustar[integer] :: Diagnostic handles.%id_buoyflux[integer] :: Diagnostic handles.%id_sigma[integer] :: Diagnostic handles.%id_kv_kpp[integer] :: Diagnostic handles.%id_kt_kpp[integer] :: Diagnostic handles.%id_ks_kpp[integer] :: Diagnostic handles.%id_tsurf[integer] :: Diagnostic handles.%id_ssurf[integer] :: Diagnostic handles.%id_usurf[integer] :: Diagnostic handles.%id_vsurf[integer] :: Diagnostic handles.%id_kd_in[integer] :: Diagnostic handles.%id_nltt[integer] :: Diagnostic handles.%id_nlts[integer] :: Diagnostic handles.%id_enhk[integer] :: Diagnostic handles.%id_enhvt2[integer] :: Diagnostic handles.%id_enhw[integer] :: Diagnostic handles.%id_la_sl[integer] :: Diagnostic handles.%id_obldepth_original[integer] :: Diagnostic handles.%id_stokesxi[integer] :: Diagnostic handles.%id_lam2[integer] :: Diagnostic handles.%ri_crit[real] :: Critical bulk Richardson number (defines OBL depth) [nondim].%vonkarman[real] :: von Karman constant (dimensionless) [nondim]%cs[real] :: Parameter for computing velocity scale function (dimensionless) [nondim].%cs2[real] :: Parameter for multiplying by non-local term [nondim].%enhance_diffusion[logical] :: If True, add enhanced diffusivity at base of boundary layer.%interptype[character (len=32)] :: Type of interpolation to compute bulk Richardson number.%interptype2[character (len=32)] :: Type of interpolation to compute diff and visc at OBL_depth.%stokesmost[logical] :: If True, use Stokes similarity package.%computeekman[logical] :: If True, compute Ekman depth limit for OBLdepth.%computemoninobukhov[logical] :: If True, compute Monin-Obukhov limit for OBLdepth.%passivemode[logical] :: If True, makes KPP passive meaning it does NOT alter the diffusivity.%deepobloffset[real] :: If non-zero, is a distance from the bottom that the OBL can not penetrate through [Z ~> m].%minobldepth[real] :: If non-zero, is a minimum depth for the OBL [Z ~> m].%surf_layer_ext[real] :: Fraction of OBL depth considered in the surface layer [nondim].%minvtsqr[real] :: Min for the squared unresolved velocity used in Rib CVMix calculation [L2 T-2 ~> m2 s-2].%fixedobldepth[logical] :: If True, will fix the OBL depth at fixedOBLdepth_value.%fixedobldepth_value[real] :: value for the fixed OBL depth when fixedOBLdepth==True [Z ~> m]%debug[logical] :: If True, calculate checksums and write debugging information.%matchtechnique[character (len=30)] :: Method used in CVMix for setting diffusivity and NLT profile functions.%nlt_shape[integer] :: MOM6 over-ride of CVMix NLT shape function.%applynonlocaltrans[logical] :: If True, apply non-local transport to all tracers.%n_smooth[integer] :: Number of times smoothing operator is applied on OBLdepth.%deepen_only[logical] :: If true, apply OBLdepth smoothing at a cell only if the OBLdepth gets deeper.%kppzerodiffusivity[logical] :: If True, will set diffusivity and viscosity from KPP to zero for testing purposes.%kppisadditive[logical] :: If True, will add KPP diffusivity to initial diffusivity. If False, will replace initial diffusivity wherever KPP diffusivity is non-zero.%min_thickness[real] :: A minimum thickness used to avoid division by small numbers in the vicinity of vanished layers [Z ~> m].%sw_method[integer] :: Sets method for using shortwave radiation in surface buoyancy flux.%lt_k_enhancement[logical] :: Flags if enhancing mixing coefficients due to LT.%lt_k_shape[integer] :: Integer for constant or shape function enhancement.%lt_k_method[integer] :: Integer for mixing coefficients LT method.%kpp_cvt2[real] :: Parameter for Stokes MOST convection entrainment [nondim].%kpp_k_enh_fac[real] :: Factor to multiply by K if Method is CONSTANT [nondim].%lt_vt2_enhancement[logical] :: Flags if enhancing Vt2 due to LT.%lt_vt2_method[integer] :: Integer for Vt2 LT method.%kpp_vt2_enh_fac[real] :: Factor to multiply by VT2 if Method is CONSTANT [nondim].%mld_guess_min[real] :: The minimum estimate of the mixed layer depth used to calculate the Langmuir number for Langmuir turbulence enhancement with KPP [Z ~> m].%stokes_mixing[logical] :: Flag if model is mixing down Stokes gradient This is relevant for which current to use in RiB.%answer_date[integer] :: 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.%kpp_params[type(cvmix_kpp_params_type),pointer] :: CVMix parameters.%diag[type( diag_ctrl ),pointer] :: Pointer to diagnostics control structure.%obldepth[real(:,:),pointer] :: Depth (positive) of ocean boundary layer (OBL) [Z ~> m].%obldepth_original[real(:,:),allocatable] :: Depth (positive) of OBL without smoothing [Z ~> m].%stokesparxi[real(:,:),allocatable] :: Stokes similarity parameter [nondim].%lam2[real(:,:),allocatable] :: La^(-2) = Ustk0/u* [nondim].%kobl[real(:,:),allocatable] :: Level (+fraction) of OBL extent [nondim].%obldepthprev[real(:,:),allocatable] :: previous Depth (positive) of OBL [Z ~> m]%la_sl[real(:,:),allocatable] :: Langmuir number used in KPP [nondim].%drho[real(:,:,:),allocatable] :: Bulk difference in density [R ~> kg m-3].%uz2[real(:,:,:),allocatable] :: Square of bulk difference in resolved velocity [L2 T-2 ~> m2 s-2].%bulkri[real(:,:,:),allocatable] :: Bulk Richardson number for each layer [nondim].%sigma[real(:,:,:),allocatable] :: Sigma coordinate (dimensionless) [nondim].%ws[real(:,:,:),allocatable] :: Turbulent velocity scale for scalars [Z T-1 ~> m s-1].%n[real(:,:,:),allocatable] :: Brunt-Vaisala frequency [T-1 ~> s-1].%n2[real(:,:,:),allocatable] :: Squared Brunt-Vaisala frequency [T-2 ~> s-2].%vt2[real(:,:,:),allocatable] :: Unresolved squared turbulence velocity for bulk Ri [Z2 T-2 ~> m2 s-2].%kt_kpp[real(:,:,:),allocatable] :: Temp diffusivity from KPP [Z2 T-1 ~> m2 s-1].%ks_kpp[real(:,:,:),allocatable] :: Scalar diffusivity from KPP [Z2 T-1 ~> m2 s-1].%kv_kpp[real(:,:,:),allocatable] :: Viscosity due to KPP [Z2 T-1 ~> m2 s-1].%tsurf[real(:,:),allocatable] :: Temperature of surface layer [C ~> degC].%ssurf[real(:,:),allocatable] :: Salinity of surface layer [S ~> ppt].%usurf[real(:,:),allocatable] :: i-velocity of surface layer [L T-1 ~> m s-1]%vsurf[real(:,:),allocatable] :: j-velocity of surface layer [L T-1 ~> m s-1]%enhk[real(:,:,:),allocatable] :: Enhancement for mixing coefficient [nondim].%enhvt2[real(:,:,:),allocatable] :: Enhancement for Vt2 [nondim].
Function/Subroutine Documentation¶
-
subroutine
mom_cvmix_kpp/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
- Call to:
-
function
mom_cvmix_kpp/kpp_init(paramFile, G, GV, US, diag, Time, CS, passive) [logical]¶ 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
- Call to:
mom_file_parser::closeparameterblockid_clock_kpp_calcid_clock_kpp_compute_bldid_clock_kpp_smoothinglt_k_constantlt_k_mode_constantlt_k_mode_rw16lt_k_mode_vr12lt_k_scaledlt_vt2_mode_constantlt_vt2_mode_lf17lt_vt2_mode_rw16lt_vt2_mode_vr12mom_error_handler::mom_errornlt_shape_cubicnlt_shape_cubic_lmdnlt_shape_cvmixnlt_shape_linearnlt_shape_parabolicmom_file_parser::openparameterblockmom_diag_mediator::register_diag_fieldsw_method_all_swsw_method_lv1_swsw_method_mxl_sw
-
subroutine
mom_cvmix_kpp/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]
- Call to:
id_clock_kpp_calclt_k_constantlt_k_mode_constantlt_k_mode_rw16lt_k_mode_vr12lt_k_scaledmom_error_handler::mom_errornlt_shape_cubicnlt_shape_cubic_lmdnlt_shape_linearnlt_shape_parabolicsw_method_all_swsw_method_lv1_swsw_method_mxl_sw
-
subroutine
mom_cvmix_kpp/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]
- Call to:
compute_stokesdriftmom_wave_interface::get_langmuir_numberid_clock_kpp_compute_bldkpp_smooth_bldlt_vt2_mode_constantlt_vt2_mode_vr12mom_error_handler::mom_error
-
subroutine
mom_cvmix_kpp/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]
- Call to:
id_clock_kpp_smoothing- Called from:
-
subroutine
mom_cvmix_kpp/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]
- Called from:
-
subroutine
mom_cvmix_kpp/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]
- Called from:
mom_cfc_cap::cfc_cap_column_physicskpp_nonlocaltransport_salnkpp_nonlocaltransport_tempmarbl_tracers::marbl_tracers_column_physicspseudo_salt_tracer::pseudo_salt_tracer_column_physics
-
subroutine
mom_cvmix_kpp/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]
- Call to:
- Called from:
mom_diabatic_driver::diabatic_alemom_diabatic_driver::diabatic_ale_legacymom_diabatic_driver::layered_diabatic
-
subroutine
mom_cvmix_kpp/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
- Call to:
- Called from:
mom_diabatic_driver::diabatic_alemom_diabatic_driver::diabatic_ale_legacymom_diabatic_driver::layered_diabatic
-
subroutine
mom_cvmix_kpp/compute_stokesdrift(i, j, ztop, zbot, uS_i, vS_i, uS_k, vS_k, uSbar, vSbar, waves)¶ Compute Stokes Drift components at zbot < ztop <= 0 and at k=0.5*(ztop+zbot) and average components from ztop to zbot <= 0.
- Parameters:
waves :: Wave CS for Langmuir turbulence
ztop :: [in] cell top
zbot :: [in] cell bottom
us_i :: [inout] Stokes u velocity at zbot interface
vs_i :: [inout] Stokes v velocity at zbot interface
us_k :: [inout] Stokes u velocity at zk center
vs_k :: [inout] Stokes v at zk =0.5(ztop+zbot)
usbar :: [inout] mean Stokes u (ztop to zbot)
vsbar :: [inout] mean Stokes v (ztop to zbot)
i :: [in] Meridional index of H-point
j :: [in] Zonal index of H-point
- Called from:
-
subroutine
mom_cvmix_kpp/kpp_end(CS)¶ Clear pointers, deallocate memory.
- Parameters:
cs :: Control structure