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 ::
integerDiagnostic handles.% id_bulkri ::
integerDiagnostic handles.% id_n ::
integerDiagnostic handles.% id_n2 ::
integerDiagnostic handles.% id_ws ::
integerDiagnostic handles.% id_vt2 ::
integerDiagnostic handles.% id_bulkuz2 ::
integerDiagnostic handles.% id_bulkdrho ::
integerDiagnostic handles.% id_ustar ::
integerDiagnostic handles.% id_buoyflux ::
integerDiagnostic handles.% id_sigma ::
integerDiagnostic handles.% id_kv_kpp ::
integerDiagnostic handles.% id_kt_kpp ::
integerDiagnostic handles.% id_ks_kpp ::
integerDiagnostic handles.% id_tsurf ::
integerDiagnostic handles.% id_ssurf ::
integerDiagnostic handles.% id_usurf ::
integerDiagnostic handles.% id_vsurf ::
integerDiagnostic handles.% id_kd_in ::
integerDiagnostic handles.% id_nltt ::
integerDiagnostic handles.% id_nlts ::
integerDiagnostic handles.% id_enhk ::
integerDiagnostic handles.% id_enhvt2 ::
integerDiagnostic handles.% id_enhw ::
integerDiagnostic handles.% id_la_sl ::
integerDiagnostic handles.% id_obldepth_original ::
integerDiagnostic handles.% id_stokesxi ::
integerDiagnostic handles.% id_lam2 ::
integerDiagnostic handles.% ri_crit ::
realCritical bulk Richardson number (defines OBL depth) [nondim].% vonkarman ::
realvon Karman constant (dimensionless) [nondim]% cs ::
realParameter for computing velocity scale function (dimensionless) [nondim].% cs2 ::
realParameter for multiplying by non-local term [nondim].% enhance_diffusion ::
logicalIf 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 ::
logicalIf True, use Stokes similarity package.% computeekman ::
logicalIf True, compute Ekman depth limit for OBLdepth.% computemoninobukhov ::
logicalIf True, compute Monin-Obukhov limit for OBLdepth.% passivemode ::
logicalIf True, makes KPP passive meaning it does NOT alter the diffusivity.% deepobloffset ::
realIf non-zero, is a distance from the bottom that the OBL can not penetrate through [Z ~> m].% minobldepth ::
realIf non-zero, is a minimum depth for the OBL [Z ~> m].% surf_layer_ext ::
realFraction of OBL depth considered in the surface layer [nondim].% minvtsqr ::
realMin for the squared unresolved velocity used in Rib CVMix calculation [L2 T-2 ~> m2 s-2].% fixedobldepth ::
logicalIf True, will fix the OBL depth at fixedOBLdepth_value.% fixedobldepth_value ::
realvalue for the fixed OBL depth when fixedOBLdepth==True [Z ~> m]% debug ::
logicalIf True, calculate checksums and write debugging information.% matchtechnique ::
character(len=30)Method used in CVMix for setting diffusivity and NLT profile functions.% nlt_shape ::
integerMOM6 over-ride of CVMix NLT shape function.% applynonlocaltrans ::
logicalIf True, apply non-local transport to all tracers.% n_smooth ::
integerNumber of times smoothing operator is applied on OBLdepth.% deepen_only ::
logicalIf true, apply OBLdepth smoothing at a cell only if the OBLdepth gets deeper.% kppzerodiffusivity ::
logicalIf True, will set diffusivity and viscosity from KPP to zero for testing purposes.% kppisadditive ::
logicalIf True, will add KPP diffusivity to initial diffusivity. If False, will replace initial diffusivity wherever KPP diffusivity is non-zero.% min_thickness ::
realA minimum thickness used to avoid division by small numbers in the vicinity of vanished layers [Z ~> m].% sw_method ::
integerSets method for using shortwave radiation in surface buoyancy flux.% lt_k_enhancement ::
logicalFlags if enhancing mixing coefficients due to LT.% lt_k_shape ::
integerInteger for constant or shape function enhancement.% lt_k_method ::
integerInteger for mixing coefficients LT method.% kpp_cvt2 ::
realParameter for Stokes MOST convection entrainment [nondim].% kpp_k_enh_fac ::
realFactor to multiply by K if Method is CONSTANT [nondim].% lt_vt2_enhancement ::
logicalFlags if enhancing Vt2 due to LT.% lt_vt2_method ::
integerInteger for Vt2 LT method.% kpp_vt2_enh_fac ::
realFactor to multiply by VT2 if Method is CONSTANT [nondim].% mld_guess_min ::
realThe minimum estimate of the mixed layer depth used to calculate the Langmuir number for Langmuir turbulence enhancement with KPP [Z ~> m].% stokes_mixing ::
logicalFlag if model is mixing down Stokes gradient This is relevant for which current to use in RiB.% answer_date ::
integerThe 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), pointerCVMix parameters.% diag ::
type(diag_ctrl), pointerPointer to diagnostics control structure.% obldepth ::
real, dimension(:,:), pointerDepth (positive) of ocean boundary layer (OBL) [Z ~> m].% obldepth_original ::
real, dimension(:,:), allocatableDepth (positive) of OBL without smoothing [Z ~> m].% stokesparxi ::
real, dimension(:,:), allocatableStokes similarity parameter [nondim].% lam2 ::
real, dimension(:,:), allocatableLa^(-2) = Ustk0/u* [nondim].% kobl ::
real, dimension(:,:), allocatableLevel (+fraction) of OBL extent [nondim].% obldepthprev ::
real, dimension(:,:), allocatableprevious Depth (positive) of OBL [Z ~> m]% la_sl ::
real, dimension(:,:), allocatableLangmuir number used in KPP [nondim].% drho ::
real, dimension(:,:,:), allocatableBulk difference in density [R ~> kg m-3].% uz2 ::
real, dimension(:,:,:), allocatableSquare of bulk difference in resolved velocity [L2 T-2 ~> m2 s-2].% bulkri ::
real, dimension(:,:,:), allocatableBulk Richardson number for each layer [nondim].% sigma ::
real, dimension(:,:,:), allocatableSigma coordinate (dimensionless) [nondim].% ws ::
real, dimension(:,:,:), allocatableTurbulent velocity scale for scalars [Z T-1 ~> m s-1].% n ::
real, dimension(:,:,:), allocatableBrunt-Vaisala frequency [T-1 ~> s-1].% n2 ::
real, dimension(:,:,:), allocatableSquared Brunt-Vaisala frequency [T-2 ~> s-2].% vt2 ::
real, dimension(:,:,:), allocatableUnresolved squared turbulence velocity for bulk Ri [Z2 T-2 ~> m2 s-2].% kt_kpp ::
real, dimension(:,:,:), allocatableTemp diffusivity from KPP [Z2 T-1 ~> m2 s-1].% ks_kpp ::
real, dimension(:,:,:), allocatableScalar diffusivity from KPP [Z2 T-1 ~> m2 s-1].% kv_kpp ::
real, dimension(:,:,:), allocatableViscosity due to KPP [Z2 T-1 ~> m2 s-1].% tsurf ::
real, dimension(:,:), allocatableTemperature of surface layer [C ~> degC].% ssurf ::
real, dimension(:,:), allocatableSalinity of surface layer [S ~> ppt].% usurf ::
real, dimension(:,:), allocatablei-velocity of surface layer [L T-1 ~> m s-1]% vsurf ::
real, dimension(:,:), allocatablej-velocity of surface layer [L T-1 ~> m s-1]% enhk ::
real, dimension(:,:,:), allocatableEnhancement for mixing coefficient [nondim].% enhvt2 ::
real, dimension(:,:,:), allocatableEnhancement 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 ::
param_file[in] A structure to parse for run-time parametersrestart_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)
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 ::
diag[in] Diagnosticstime :: [in] Model time
cs :: Control structure
passive ::
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 ::
h[in] Layer thicknesses [H ~> m or kg m-2]tv ::
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 ::
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 ::
h[in] Layer thicknesses [H ~> m or kg m-2]temp :: [in] potential/cons temp [C ~> degC]
salt :: [in] Salinity [S ~> ppt]
u ::
u[in] Velocity i-component [L T-1 ~> m s-1]v ::
v[in] Velocity j-component [L T-1 ~> m s-1]tv ::
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 ::
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 ::
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 ::
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 ::
dt[in] Time-step [T ~> s]diag ::
diag[in] Diagnosticstr_ptr ::
tr_ptr[in] tracer_type has diagnostic ids on itscalar ::
scalar[inout] Scalar (scalar units [conc])flux_scale ::
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 ::
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 ::
dt[in] Time-step [T ~> s]tr_ptr ::
tr_ptr[in] tracer_type has diagnostic ids on itscalar ::
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 ::
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 ::
dt[in] Time-step [T ~> s]scalar ::
scalar[inout] Salinity [S ~> ppt]tr_ptr ::
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 ::
wavesWave CS for Langmuir turbulenceztop ::
ztop[in] cell topzbot ::
zbot[in] cell bottomus_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 ::
i[in] Meridional index of H-pointj ::
j[in] Zonal index of H-point
- Called from:
- subroutine mom_cvmix_kpp/kpp_end(CS)
Clear pointers, deallocate memory.
- Parameters:
cs :: Control structure