mom_cvmix_kpp module reference

Provides the K-Profile Parameterization (KPP) of Large et al., 1994, via CVMix.

More…

Data Types

kpp_cs

Control structure for containing KPP parameters/data.

Functions/Subroutines

kpp_init()

Initialize the CVMix KPP module and set up diagnostics Returns True if KPP is to be used, False otherwise.

kpp_calculate()

KPP vertical diffusivity/viscosity and non-local tracer transport.

kpp_compute_bld()

Compute OBL depth.

kpp_smooth_bld()

Apply a 1-1-4-1-1 Laplacian filter one time on BLD to reduce any horizontal two-grid-point noise.

kpp_get_bld()

Copies KPP surface boundary layer depth into BLD, in units of [Z ~> m] unless other units are specified.

kpp_nonlocaltransport_temp()

Apply KPP non-local transport of surface fluxes for temperature.

kpp_nonlocaltransport_saln()

Apply KPP non-local transport of surface fluxes for salinity.

kpp_end()

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_qminussw [integer] :: Diagnostic handles.

  • % id_nets [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_nlt_dsdt [integer] :: Diagnostic handles.

  • % id_nlt_dtdt [integer] :: Diagnostic handles.

  • % id_nlt_temp_budget [integer] :: Diagnostic handles.

  • % id_nlt_saln_budget [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.

  • % ri_crit [real] :: Critical bulk Richardson number (defines OBL depth)

  • % vonkarman [real] :: von Karman constant (dimensionless)

  • % cs [real] :: Parameter for computing velocity scale function (dimensionless)

  • % cs2 [real] :: Parameter for multiplying by non-local term.

  • % enhance_diffusion [logical] :: If True, add enhanced diffusivity at base of boundary layer.

  • % interptype [character (len=10)] :: Type of interpolation to compute bulk Richardson number.

  • % interptype2 [character (len=10)] :: Type of interpolation to compute diff and visc at OBL_depth.

  • % 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 [m].

  • % minobldepth [real] :: If non-zero, is a minimum depth for the OBL [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 [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.

  • % 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 heat and scalars.

  • % 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.

  • % correctsurflayeravg [logical] :: If true, applies a correction to the averaging of surface layer properties.

  • % surflayerdepth [real] :: A guess at the depth of the surface layer (which should 0.1 of OBLdepth) [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_k_enh_fac [real] :: Factor to multiply by K if Method is CONSTANT.

  • % 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.

  • % stokes_mixing [logical] :: Flag if model is mixing down Stokes gradient This is relavent for which current to use in RiB.

  • % kpp_params [type(cvmix_kpp_params_type),pointer] :: CVMix parameters.

  • % diag [type(diag_ctrl),pointer] :: Pointer to diagnostics control structure.

  • % obldepth [real(:,:),allocatable] :: Depth (positive) of OBL [m].

  • % obldepth_original [real(:,:),allocatable] :: Depth (positive) of OBL [m] without smoothing.

  • % kobl [real(:,:),allocatable] :: Level (+fraction) of OBL extent.

  • % obldepthprev [real(:,:),allocatable] :: previous Depth (positive) of OBL [m]

  • % la_sl [real(:,:),allocatable] :: Langmuir number used in KPP.

  • % drho [real(:,:,:),allocatable] :: Bulk difference in density [R ~> kg m-3].

  • % uz2 [real(:,:,:),allocatable] :: Square of bulk difference in resolved velocity [m2 s-2].

  • % bulkri [real(:,:,:),allocatable] :: Bulk Richardson number for each layer (dimensionless)

  • % sigma [real(:,:,:),allocatable] :: Sigma coordinate (dimensionless)

  • % ws [real(:,:,:),allocatable] :: Turbulent velocity scale for scalars [m s-1].

  • % n [real(:,:,:),allocatable] :: Brunt-Vaisala frequency [s-1].

  • % n2 [real(:,:,:),allocatable] :: Squared Brunt-Vaisala frequency [s-2].

  • % vt2 [real(:,:,:),allocatable] :: Unresolved squared turbulence velocity for bulk Ri [m2 s-2].

  • % kt_kpp [real(:,:,:),allocatable] :: Temp diffusivity from KPP [m2 s-1].

  • % ks_kpp [real(:,:,:),allocatable] :: Scalar diffusivity from KPP [m2 s-1].

  • % kv_kpp [real(:,:,:),allocatable] :: Viscosity due to KPP [m2 s-1].

  • % tsurf [real(:,:),allocatable] :: Temperature of surface layer [degC].

  • % ssurf [real(:,:),allocatable] :: Salinity of surface layer [ppt].

  • % usurf [real(:,:),allocatable] :: i-velocity of surface layer [m s-1]

  • % vsurf [real(:,:),allocatable] :: j-velocity of surface layer [m s-1]

  • % enhk [real(:,:,:),allocatable] :: Enhancement for mixing coefficient.

  • % enhvt2 [real(:,:,:),allocatable] :: Enhancement for Vt2.

Function/Subroutine Documentation

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::closeparameterblock id_clock_kpp_calc id_clock_kpp_compute_bld id_clock_kpp_smoothing lt_k_constant lt_k_mode_constant lt_k_mode_rw16 lt_k_mode_vr12 lt_k_scaled lt_vt2_mode_constant lt_vt2_mode_lf17 lt_vt2_mode_rw16 lt_vt2_mode_vr12 mom_error_handler::mom_error nlt_shape_cubic nlt_shape_cubic_lmd nlt_shape_cvmix nlt_shape_linear nlt_shape_parabolic mom_file_parser::openparameterblock mom_diag_mediator::register_diag_field sw_method_all_sw sw_method_lv1_sw sw_method_mxl_sw

subroutine mom_cvmix_kpp/kpp_calculate(CS, G, GV, US, h, 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/level thicknesses [H ~> m or kg m-2]

  • 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 [Z2 T-1 ~> m2 s-1]

  • ks :: [inout] (in) Vertical diffusivity of salt w/o KPP (out) Vertical diffusivity including KPP [Z2 T-1 ~> m2 s-1]

  • kv :: [inout] (in) Vertical viscosity w/o KPP (out) Vertical viscosity including KPP [Z2 T-1 ~> m2 s-1]

  • nonlocaltransheat :: [inout] Temp non-local transport [m s-1]

  • nonlocaltransscalar :: [inout] scalar non-local trans. [m s-1]

  • waves :: Wave CS for Langmuir turbulence

  • lamult :: [in] Langmuir enhancement multiplier

Call to

id_clock_kpp_calc lt_k_constant lt_k_mode_constant lt_k_mode_rw16 lt_k_mode_vr12 lt_k_scaled mom_error_handler::mom_error nlt_shape_cubic nlt_shape_cubic_lmd nlt_shape_linear nlt_shape_parabolic sw_method_all_sw sw_method_lv1_sw sw_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/level thicknesses [H ~> m or kg m-2]

  • temp :: [in] potential/cons temp [degC]

  • salt :: [in] Salinity [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

Call to

mom_wave_interface::get_langmuir_number id_clock_kpp_compute_bld kpp_smooth_bld lt_vt2_mode_constant lt_vt2_mode_vr12 mom_error_handler::mom_error

subroutine mom_cvmix_kpp/kpp_smooth_bld(CS, G, GV, h)

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

  • h :: [in] Layer/level thicknesses [H ~> m or kg m-2]

Call to

id_clock_kpp_smoothing

Called from

kpp_compute_bld

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

Called from

mom_lateral_boundary_diffusion::lateral_boundary_diffusion mom_neutral_diffusion::neutral_diffusion_calc_coeffs

subroutine mom_cvmix_kpp/kpp_nonlocaltransport_temp(CS, G, GV, h, nonLocalTrans, surfFlux, dt, 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 scalar [conc H s-1 ~> conc m s-1 or conc kg m-2 s-1]

  • dt :: [in] Time-step [s]

  • scalar :: [inout] temperature

  • c_p :: [in] Seawater specific heat capacity [J kg-1 degC-1]

Called from

mom_diabatic_driver::diabatic_ale mom_diabatic_driver::diabatic_ale_legacy mom_diabatic_driver::layered_diabatic

subroutine mom_cvmix_kpp/kpp_nonlocaltransport_saln(CS, G, GV, h, nonLocalTrans, surfFlux, dt, scalar)

Apply KPP non-local transport of surface fluxes for salinity. This routine is a useful prototype for other material tracers.

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 s-1 ~> conc m s-1 or conc kg m-2 s-1]

  • dt :: [in] Time-step [s]

  • scalar :: [inout] Scalar (scalar units [conc])

Called from

mom_diabatic_driver::diabatic_ale mom_diabatic_driver::diabatic_ale_legacy mom_diabatic_driver::layered_diabatic

subroutine mom_cvmix_kpp/kpp_end(CS)

Clear pointers, deallocate memory.

Parameters

cs :: Control structure