MOM_mixed_layer_restrat module reference

Parameterization of mixed layer restratification by unresolved mixed-layer eddies.

Data Types

mixedlayer_restrat_CS

Control structure for mom_mixed_layer_restrat

Functions/Subroutines

mixedlayer_restrat

Driver for the mixed-layer restratification parameterization. The code branches between two different implementations depending on whether the bulk-mixed layer or a general coordinate are in use.

mixedlayer_restrat_OM4

Calculates a restratifying flow in the mixed layer, following the formulation used in OM4

mu

Stream function shape as a function of non-dimensional position within mixed-layer [nondim]

mixedlayer_restrat_Bodner

Calculates a restratifying flow in the mixed layer, following the formulation used in Bodner et al., 2023 (B22)

rmean2ts

Two time-scale running mean in the same arbitrary units as "signal" and "filtered"

mixedlayer_restrat_BML

Calculates a restratifying flow assuming a 2-layer bulk mixed layer.

detect_mld

Detects the mixed layer depth using a density difference criterion (MLE_DENSITY_DIFF)

growth_time

Return the growth timescale for the submesoscale mixed layer eddies in [T ~> s]

mixedlayer_restrat_init

Initialize the mixed layer restratification module

mixedlayer_restrat_register_restarts

Allocate and register fields in the mixed layer restratification structure for restarts

mixedlayer_restrat_unit_tests

Returns true if a unit test of functions in MOM_mixedlayer_restrat fail. Returns false otherwise.

test_answer

Returns true if any cell of u and u_true are not identical. Returns false otherwise.

Detailed Description

Mixed-layer eddy parameterization module

The subroutines in this module implement a parameterization of unresolved viscous mixed layer restratification of the mixed layer as described in [26], and whose impacts are described in [24]. This is derived in part from the older parameterization that is described in [37], which this new parameterization surpasses, which in turn is based on the sub-inertial mixed layer theory of [94]. There is no net horizontal volume transport due to this parameterization, and no direct effect below the mixed layer. A revised version of the parameterization by [14] is also available as an option.

This parameterization sets the restratification timescale to agree with high-resolution studies of mixed layer restratification.

The run-time parameter FOX_KEMPER_ML_RESTRAT_COEF is a non-dimensional number of order a few tens, proportional to the ratio of the deformation radius or the grid scale (whichever is smaller) to the dominant horizontal length-scale of the sub-meso-scale mixed layer instabilities.

"Sub-meso" in a nutshell

The parameterization is colloquially referred to as "sub-meso".

The original [25] paper proposed a quasi-Stokes advection described by the stream function (eq. 5 of [24]):

\begin{equation*} {\bf \Psi}_o = C_e \frac{ H^2 \nabla \bar{b} \times \hat{\bf z} }{ |f| } \mu(z) \end{equation*}

where the vertical profile function is

\begin{equation*} \mu(z) = \max \left\{ 0, \left[ 1 - \left(\frac{2z}{H}+1\right)^2 \right] \left[ 1 + \frac{5}{21} \left(\frac{2z}{H}+1\right)^2 \right] \right\} \end{equation*}

and \(H\) is the mixed-layer depth, \(f\) is the local Coriolis parameter, \(C_e \sim 0.06-0.08\) and \(\nabla \bar{b}\) is a depth mean buoyancy gradient averaged over the mixed layer.

For use in coarse-resolution models, an upscaling of the buoyancy gradients and adaption for the equator leads to the following parameterization (eq. 6 of [24]):

\begin{equation*} {\bf \Psi} = C_e \Gamma_\Delta \frac{\Delta s}{l_f} \frac{ H^2 \nabla \bar{b} \times \hat{\bf z} } { \sqrt{ f^2 + \tau^{-2}} } \mu(z) \end{equation*}

where \(\Delta s\) is the minimum of grid-scale and deformation radius, \(l_f\) is the width of the mixed-layer fronts, and \(\Gamma_\Delta=1\). \(\tau\) is a time-scale for mixing momentum across the mixed layer. \(l_f\) is thought to be of order hundreds of meters.

The upscaling factor \(\frac{\Delta s}{l_f}\) can be a global constant, model parameter FOX_KEMPER_ML_RESTRAT, so that in practice the parameterization is:

\begin{equation*} {\bf \Psi} = C_e \Gamma_\Delta \frac{ H^2 \nabla \bar{b} \times \hat{\bf z} }{ \sqrt{ f^2 + \tau^{-2}} } \mu(z) \end{equation*}

with non-unity \(\Gamma_\Delta\).

\(C_e\) is hard-coded as 0.0625. \(\tau\) is calculated from the surface friction velocity \(u^*\).

Todo: Explain expression for momentum mixing time-scale.

Symbol

Module parameter

\(\Gamma_\Delta\)

FOX_KEMPER_ML_RESTRAT

\(l_f\)

MLE_FRONT_LENGTH

\(\Delta \rho\)

MLE_DENSITY_DIFF

Time-filtering of mixed-layer depth

Using the instantaneous mixed-layer depth is inconsistent with the finite life-time of mixed-layer instabilities. We provide a one-sided running-mean filter of mixed-layer depth, \(H\), of the form:

\begin{equation*} \bar{H} \leftarrow \max \left( H, \frac{ \Delta t H + \tau_h \bar{H} }{ \Delta t + \tau_h } \right) \end{equation*}

which allows the effective mixed-layer depth seen by the parameterization, \(\bar{H}\), to instantaneously deepen but to decay with time-scale \(\tau_h\). \(\bar{H}\) is substituted for \(H\) in the above equations.

Symbol

Module parameter

\(\tau_h\)

MLE_MLD_DECAY_TIME

Defining the mixed-layer-depth

If the parameter MLE_USE_PBL_MLD=True then the mixed-layer depth is defined/diagnosed by the boundary-layer parameterization (e.g. ePBL, KPP, etc.).

If the parameter MLE_USE_PBL_MLD=False then the mixed-layer depth is diagnosed in this module as the depth of a given density difference, \(\Delta \rho\), with the surface where the density difference is the parameter MLE_DENSITY_DIFF.

Bodner (2023) modification

To use this variant of the parameterization, set MLE\%USE_BODNER23=True which then changes the available parameters. MLE_USE_PBL_MLD must be True to use the B23 modification.

[14], (B23) use an expression for the frontal width which changes the scaling from \(H^2\) to \(h H^2\):

\begin{equation*} {\bf \Psi} = C_r \frac{\Delta s |f| \bar{h} \bar{H}^2 \nabla \bar{b} \times \hat{\bf z} } { \left( m_*u_*^3 + n_* w_*^3 \right)^{2/3} } \mu(z) \end{equation*}

(see eq. 27 of B23). Here, the \(h\) is the activate boundary layer depth, and \(H\) is the mixed layer depth. The denominator is an approximation of the vertical turbulent momentum flux \(\overline{w'u'}\) (see eq. 18 of B23) calculated from the surface friction velocity \(u_*\), and from the surface buoyancy flux, \(B\), using the relation \(w_*^3 \sim -B h\). An advantage of this form of "sub-meso" is the denominator is well behaved at the equator but we apply a lower bound of \(w_{min}^2\) to avoid division by zero under zero forcing. As for the original Fox-Kemper parameterization, \(\nabla \bar{b}\) is the buoyancy gradient averaged over the mixed-layer.

The instantaneous boundary layer depth, \(h\), is time filtered primarily to remove the diurnal cycle:

\begin{equation*} \bar{h} \leftarrow \max \left( \min \left( h, \frac{ \Delta t h + \tau_{h+} \bar{h} }{ \Delta t + \tau_{h+} } \right), \frac{ \Delta t h + \tau_{h-} \bar{h} }{ \Delta t + \tau_{h-} } \right) \end{equation*}

Setting \(\tau_{h+}=0\) means that when \(h>\bar{h}\) then \(\bar{h}\leftarrow h\), i.e. the effective (filtered) depth, \(\bar{h}\), is instantly deepened. When \(h<\bar{h}\) then the effective depth shoals with time-scale \(\tau_{h-}\).

A second filter is applied to \(\bar{h}\) to yield and effective "mixed layer depth", \(\bar{H}\), defined as the deepest the boundary layer over some time-scale \(\tau_{H-}\):

\begin{equation*} \bar{H} \leftarrow \max \left( \min \left( \bar{h}, \frac{ \Delta t \bar{h} + \tau_{H+} \bar{H} }{ \Delta t + \tau_{H+} } \right), \frac{ \Delta t \bar{h} + \tau_{h-} \bar{H} }{ \Delta t + \tau_{H-} } \right) \end{equation*}

Again, setting \(\tau_{H+}=0\) allows the effective mixed layer to instantly deepend to \(\bar{h}\).

Symbol

Module parameter

\(C_r\)

MLE\%CR

\(n_*\)

MLE\%BODNER_NSTAR

\(m_*\)

MLE\%BODNER_MSTAR

\(w_*\)

MLE\%BODNER_MSTAR

\(w_{min}^2\)

MLE\%MIN_WSTAR2

\(\tau_{h+}\)

MLE\%BLD_GROWING_TFILTER

\(\tau_{h-}\)

MLE\%BLD_DECAYING_TFILTER

\(\tau_{H+}\)

MLE\%MLD_GROWING_TFILTER

\(\tau_{H-}\)

MLE\%MLD_DECAYING_TFILTER

References

Fox-Kemper, B., Ferrari, R. and Hallberg, R., 2008: Parameterization of Mixed Layer Eddies. Part I: Theory and Diagnosis J. Phys. Oceangraphy, 38 (6), p1145-1165. https://doi.org/10.1175/2007JPO3792.1

Fox-Kemper, B. and Ferrari, R. 2008: Parameterization of Mixed Layer Eddies. Part II: Prognosis and Impact J. Phys. Oceangraphy, 38 (6), p1166-1179. https://doi.org/10.1175/2007JPO3788.1

B. Fox-Kemper, G. Danabasoglu, R. Ferrari, S.M. Griffies, R.W. Hallberg, M.M. Holland, M.E. Maltrud, S. Peacock, and B.L. Samuels, 2011: Parameterization of mixed layer eddies. III: Implementation and impact in global ocean climate simulations. Ocean Modell., 39(1), p61-78. https://doi.org/10.1016/j.ocemod.2010.09.002

A.S. Bodner, B. Fox-Kemper, L. Johnson, L. P. Van Roekel, J. C. McWilliams, P. P. Sullivan, P. S. Hall, and J. Dong, 2023: Modifying the Mixed Layer Eddy Parameterization to Include Frontogenesis Arrest by Boundary Layer Turbulence. J. Phys. Oceanogr., 53(1), p323-339. https://doi.org/10.1175/JPO-D-21-0297.1

Type Documentation

type, public :: mixedlayer_restrat_CS

Control structure for mom_mixed_layer_restrat

Parameters
  • initialized

    True if this control structure has been initialized.

  • ml_restrat_coef

    A non-dimensional factor by which the instability is enhanced over what would be predicted based on the resolved gradients [nondim]. This increases with grid spacing^2, up to something of order 500.

  • ml_restrat_coef2

    As for ml_restrat_coef but using the slow filtered MLD [nondim].

  • front_length

    If non-zero, is the frontal-length scale [L ~> m] used to calculate the upscaling of buoyancy gradients that is otherwise represented by the parameter FOX_KEMPER_ML_RESTRAT_COEF. If MLE_FRONT_LENGTH is non-zero, it is recommended to set FOX_KEMPER_ML_RESTRAT_COEF=1.0.

  • fl_from_file

    If true, read the MLE front-length scale from a netCDF file.

  • MLE_use_PBL_MLD

    If true, use the MLD provided by the PBL parameterization. if false, MLE will calculate a MLD based on a density difference based on the parameter MLE_DENSITY_DIFF.

  • Bodner_detect_MLD

    If true, detect the MLD based on given density difference criterion (MLE_DENSITY_DIFF) in the Bodner et al. parameterization.

  • vonKar

    The von Karman constant as used for mixed layer viscosity [nondim]

  • MLE_MLD_decay_time

    Time-scale to use in a running-mean when MLD is retreating [T ~> s].

  • MLE_MLD_decay_time2

    Time-scale to use in a running-mean when filtered MLD is retreating [T ~> s].

  • MLE_density_diff

    Density difference used in detecting mixed-layer depth [R ~> kg m-3].

  • MLE_tail_dh

    Fraction by which to extend the mixed-layer restratification depth used for a smoother stream function at the base of the mixed-layer [nondim].

  • MLE_MLD_stretch

    A scaling coefficient for stretching/shrinking the MLD used in the MLE scheme [nondim]. This simply multiplies MLD wherever used.

  • use_Bodner

    If true, use the Bodner et al., 2023, parameterization.

  • Cr

    Efficiency coefficient from Bodner et al., 2023 [nondim]

  • mstar

    The m* value used to estimate the turbulent vertical momentum flux [nondim]

  • nstar

    The n* value used to estimate the turbulent vertical momentum flux [nondim]

  • min_wstar2

    The minimum lower bound to apply to the vertical momentum flux, w'u', in the Bodner et al., restratification parameterization [Z2 T-2 ~> m2 s-2]. This avoids a division-by-zero in the limit when u* and the buoyancy flux are zero.

  • BLD_growing_Tfilt

    The time-scale for a running-mean filter applied to the boundary layer depth (BLD) when the BLD is deeper than the running mean [T ~> s]. A value of 0 instantaneously sets the running mean to the current value of BLD.

  • BLD_decaying_Tfilt

    The time-scale for a running-mean filter applied to the boundary layer depth (BLD) when the BLD is shallower than the running mean [T ~> s]. A value of 0 instantaneously sets the running mean to the current value of BLD.

  • MLD_decaying_Tfilt

    The time-scale for a running-mean filter applied to the time-filtered MLD, when the latter is shallower than the running mean [T ~> s]. A value of 0 instantaneously sets the running mean to the current value of MLD.

  • MLD_growing_Tfilt

    The time-scale for a running-mean filter applied to the time-filtered MLD, when the latter is deeper than the running mean [T ~> s]. A value of 0 instantaneously sets the running mean to the current value of MLD.

  • answer_date

    The vintage of the order of arithmetic and expressions in the mixed layer restrat calculations. Values below 20240201 recover the answers from the end of 2023, while higher values use the new cuberoot function in the Bodner code to avoid needing to undo dimensional rescaling.

  • debug

    If true, calculate checksums of fields for debugging.

  • diag

    A structure that is used to regulate the timing of diagnostic output.

  • sbc_fl

    A handle used in time interpolation of front-length scales read from a file.

  • Time

    A pointer to the ocean model's clock.

  • use_Stanley_ML

    If true, use the Stanley parameterization of SGS T variance

  • wave_enhanced_ustar

    If true, enhance ustar using surface waves, following Eq. 28 in Bodner23. Use a Langmuir number if provided. Otherwise, assumes equilibrium surface waves (La-2=11.).

  • ustar_min

    A minimum value of ustar in thickness units to avoid numerical problems [H T-1 ~> m s-1 or kg m-2 s-1]

  • Kv_restrat

    A viscosity that sets a floor on the momentum mixing rate during restratification, rescaled into thickness-based units [H2 T-1 ~> m2 s-1 or kg2 m-4 s-1]

  • MLD_grid

    If true, read a spacially varying field for MLD_decaying_Tfilt

  • Cr_grid

    If true, read a spacially varying field for Cr

  • MLD_filtered

    Time-filtered MLD [H ~> m or kg m-2]

  • MLD_filtered_slow

    Slower time-filtered MLD [H ~> m or kg m-2]

  • wpup_filtered

    Time-filtered vertical momentum flux [H L T-2 ~> m2 s-2 or kg m-1 s-2]

  • MLD_Tfilt_space

    Spatially varying time scale for MLD filter [T ~> s]

  • id_urestrat_time

    Diagnostic identifier

  • id_vrestrat_time

    Diagnostic identifier

  • id_uhml

    Diagnostic identifier

  • id_vhml

    Diagnostic identifier

  • id_MLD

    Diagnostic identifier

  • id_BLD

    Diagnostic identifier

  • id_Rml

    Diagnostic identifier

  • id_uDml

    Diagnostic identifier

  • id_vDml

    Diagnostic identifier

  • id_uml

    Diagnostic identifier

  • id_vml

    Diagnostic identifier

  • id_wpup

    Diagnostic identifier

  • id_ustar

    Diagnostic identifier

  • id_bflux

    Diagnostic identifier

  • id_lfbod

    Diagnostic identifier

  • id_mle_fl

    Diagnostic identifier

Functions/Subroutine Documentation

subroutine mixedlayer_restrat(h, uhtr, vhtr, tv, forces, dt, MLD, h_MLD, bflux, VarMix, G, GV, US, CS, Lam2)

Driver for the mixed-layer restratification parameterization. The code branches between two different implementations depending on whether the bulk-mixed layer or a general coordinate are in use.

Parameters
  • G [inout]

    Ocean grid structure

  • GV [in]

    Ocean vertical grid structure

  • US [in]

    A dimensional unit scaling type

  • h [inout]

    Layer thickness [H ~> m or kg m-2]

  • uhtr [inout]

    Accumulated zonal mass flux [H L2 ~> m3 or kg]

  • vhtr [inout]

    Accumulated meridional mass flux [H L2 ~> m3 or kg]

  • tv [in]

    Thermodynamic variables structure

  • forces [in]

    A structure with the driving mechanical forces

  • dt [in]

    Time increment [T ~> s]

  • MLD

    Mixed layer depth provided by the planetary boundary layer scheme [Z ~> m]

  • h_MLD

    Mixed layer thickness provided by the planetary boundary layer scheme [H ~> m or kg m-2]

  • bflux

    Surface buoyancy flux provided by the PBL scheme [Z2 T-3 ~> m2 s-3]

  • VarMix [in]

    Variable mixing control structure

  • CS [inout]

    Module control structure

  • Lam2

    (Langmuir Number)^-2 [nondim]

  • haveLam2

    True if optional Lam2 argument is both present and associated

Callees call graph
Callees of mom_mixed_layer_restrat::mixedlayer_restrat calls cluster_mom_error_handler MOM_error_handler cluster_mom_mixed_layer_restrat MOM_mixed_layer_restrat mom_error_handler::mom_error MOM_error mom_mixed_layer_restrat::mixedlayer_restrat mixedlayer_restrat mom_mixed_layer_restrat::mixedlayer_restrat->mom_error_handler::mom_error mom_mixed_layer_restrat::mixedlayer_restrat_bml mixedlayer_restrat_BML [private/internal] mom_mixed_layer_restrat::mixedlayer_restrat->mom_mixed_layer_restrat::mixedlayer_restrat_bml mom_mixed_layer_restrat::mixedlayer_restrat_bodner mixedlayer_restrat_Bodner [private/internal] mom_mixed_layer_restrat::mixedlayer_restrat->mom_mixed_layer_restrat::mixedlayer_restrat_bodner mom_mixed_layer_restrat::mixedlayer_restrat_om4 mixedlayer_restrat_OM4 [private/internal] mom_mixed_layer_restrat::mixedlayer_restrat->mom_mixed_layer_restrat::mixedlayer_restrat_om4
Text view
Callers call graph
Callers of mom_mixed_layer_restrat::mixedlayer_restrat calls cluster_mom MOM cluster_mom_mixed_layer_restrat MOM_mixed_layer_restrat mom::step_mom_dynamics step_MOM_dynamics [private/internal] mom_mixed_layer_restrat::mixedlayer_restrat mixedlayer_restrat mom::step_mom_dynamics->mom_mixed_layer_restrat::mixedlayer_restrat
Text view
subroutine mixedlayer_restrat_OM4(h, uhtr, vhtr, tv, forces, dt, h_MLD, VarMix, G, GV, US, CS)

Calculates a restratifying flow in the mixed layer, following the formulation used in OM4

Parameters
  • G [inout]

    Ocean grid structure

  • GV [in]

    Ocean vertical grid structure

  • US [in]

    A dimensional unit scaling type

  • h [inout]

    Layer thickness [H ~> m or kg m-2]

  • uhtr [inout]

    Accumulated zonal mass flux [H L2 ~> m3 or kg]

  • vhtr [inout]

    Accumulated meridional mass flux [H L2 ~> m3 or kg]

  • tv [in]

    Thermodynamic variables structure

  • forces [in]

    A structure with the driving mechanical forces

  • dt [in]

    Time increment [T ~> s]

  • h_MLD

    Thickness of water within the mixed layer depth provided by the PBL scheme [H ~> m or kg m-2]

  • VarMix [in]

    Variable mixing control structure

  • CS [inout]

    Module control structure

Callees call graph
Callees of mom_mixed_layer_restrat::mixedlayer_restrat_om4 calls cluster_mom_checksums MOM_checksums cluster_mom_diag_mediator MOM_diag_mediator cluster_mom_domain_infra MOM_domain_infra cluster_mom_eos MOM_EOS cluster_mom_error_handler MOM_error_handler cluster_mom_forcing_type MOM_forcing_type cluster_mom_interpolate MOM_interpolate cluster_mom_mixed_layer_restrat MOM_mixed_layer_restrat mom_checksums::interface::hchksum hchksum (interface) mom_diag_mediator::diag_update_remap_grids diag_update_remap_grids mom_diag_mediator::interface::post_data post_data (interface) mom_diag_mediator::query_averaging_enabled query_averaging_enabled mom_domain_infra::interface::pass_var pass_var (interface) mom_eos::eos_domain EOS_domain mom_eos::interface::calculate_density calculate_density (interface) mom_eos::interface::calculate_spec_vol calculate_spec_vol (interface) mom_error_handler::mom_error MOM_error mom_forcing_type::interface::find_ustar find_ustar (interface) mom_interpolate::interface::time_interp_external time_interp_external (interface) mom_mixed_layer_restrat::detect_mld detect_mld [private/internal] mom_mixed_layer_restrat::mixedlayer_restrat_om4 mixedlayer_restrat_OM4 [private/internal] mom_mixed_layer_restrat::mixedlayer_restrat_om4->mom_checksums::interface::hchksum mom_mixed_layer_restrat::mixedlayer_restrat_om4->mom_diag_mediator::diag_update_remap_grids mom_mixed_layer_restrat::mixedlayer_restrat_om4->mom_diag_mediator::interface::post_data mom_mixed_layer_restrat::mixedlayer_restrat_om4->mom_diag_mediator::query_averaging_enabled mom_mixed_layer_restrat::mixedlayer_restrat_om4->mom_domain_infra::interface::pass_var mom_mixed_layer_restrat::mixedlayer_restrat_om4->mom_eos::eos_domain mom_mixed_layer_restrat::mixedlayer_restrat_om4->mom_eos::interface::calculate_density mom_mixed_layer_restrat::mixedlayer_restrat_om4->mom_eos::interface::calculate_spec_vol mom_mixed_layer_restrat::mixedlayer_restrat_om4->mom_error_handler::mom_error mom_mixed_layer_restrat::mixedlayer_restrat_om4->mom_forcing_type::interface::find_ustar mom_mixed_layer_restrat::mixedlayer_restrat_om4->mom_interpolate::interface::time_interp_external mom_mixed_layer_restrat::mixedlayer_restrat_om4->mom_mixed_layer_restrat::detect_mld mom_mixed_layer_restrat::mu mu [private/internal] mom_mixed_layer_restrat::mixedlayer_restrat_om4->mom_mixed_layer_restrat::mu
Text view
Callers call graph
Callers of mom_mixed_layer_restrat::mixedlayer_restrat_om4 calls cluster_mom_mixed_layer_restrat MOM_mixed_layer_restrat mom_mixed_layer_restrat::mixedlayer_restrat mixedlayer_restrat mom_mixed_layer_restrat::mixedlayer_restrat_om4 mixedlayer_restrat_OM4 [private/internal] mom_mixed_layer_restrat::mixedlayer_restrat->mom_mixed_layer_restrat::mixedlayer_restrat_om4
Text view
real function mu(sigma, dh)

Stream function shape as a function of non-dimensional position within mixed-layer [nondim]

Parameters
  • sigma [in]

    Fractional position within mixed layer [nondim] z=0 is surface, z=-1 is the bottom of the mixed layer

  • dh [in]

    Non-dimensional distance over which to extend stream function to smooth transport at base [nondim]

  • xp

    A linear function from mid-point of the mixed-layer to the extended mixed-layer bottom [nondim]

  • bottop

    A mask, 0 in upper half of mixed layer, 1 otherwise [nondim]

  • dd

    A cubic(-ish) profile in lower half of extended mixed layer to smooth out the parameterized transport [nondim]

Callers call graph
Callers of mom_mixed_layer_restrat::mu calls cluster_mom_mixed_layer_restrat MOM_mixed_layer_restrat mom_mixed_layer_restrat::mixedlayer_restrat_bodner mixedlayer_restrat_Bodner [private/internal] mom_mixed_layer_restrat::mu mu [private/internal] mom_mixed_layer_restrat::mixedlayer_restrat_bodner->mom_mixed_layer_restrat::mu mom_mixed_layer_restrat::mixedlayer_restrat_om4 mixedlayer_restrat_OM4 [private/internal] mom_mixed_layer_restrat::mixedlayer_restrat_om4->mom_mixed_layer_restrat::mu mom_mixed_layer_restrat::mixedlayer_restrat_unit_tests mixedlayer_restrat_unit_tests mom_mixed_layer_restrat::mixedlayer_restrat_unit_tests->mom_mixed_layer_restrat::mu
Text view
subroutine mixedlayer_restrat_Bodner(CS, G, GV, US, h, uhtr, vhtr, tv, forces, dt, BLD, h_MLD, bflux, Lam2)

Calculates a restratifying flow in the mixed layer, following the formulation used in Bodner et al., 2023 (B22)

Parameters
  • CS [inout]

    Module control structure

  • G [inout]

    Ocean grid structure

  • GV [in]

    Ocean vertical grid structure

  • US [in]

    A dimensional unit scaling type

  • h [inout]

    Layer thickness [H ~> m or kg m-2]

  • uhtr [inout]

    Accumulated zonal mass flux [H L2 ~> m3 or kg]

  • vhtr [inout]

    Accumulated meridional mass flux [H L2 ~> m3 or kg]

  • tv [in]

    Thermodynamic variables structure

  • forces [in]

    A structure with the driving mechanical forces

  • dt [in]

    Time increment [T ~> s]

  • BLD

    Active boundary layer depth provided by the PBL scheme [Z ~> m] (not H)

  • h_MLD

    Thickness of water within the active boundary layer depth provided by the PBL scheme [H ~> m or kg m-2]

  • bflux

    Surface buoyancy flux provided by the PBL scheme [Z2 T-3 ~> m2 s-3]

  • Lam2

    (Langmuir Number)^-2, which is defined as Surface Stokes/ustar [nondim]

Callees call graph
Callees of mom_mixed_layer_restrat::mixedlayer_restrat_bodner calls cluster_mom_checksums MOM_checksums cluster_mom_diag_mediator MOM_diag_mediator cluster_mom_domain_infra MOM_domain_infra cluster_mom_eos MOM_EOS cluster_mom_error_handler MOM_error_handler cluster_mom_forcing_type MOM_forcing_type cluster_mom_intrinsic_functions MOM_intrinsic_functions cluster_mom_mixed_layer_restrat MOM_mixed_layer_restrat mom_checksums::interface::hchksum hchksum (interface) mom_diag_mediator::diag_update_remap_grids diag_update_remap_grids mom_diag_mediator::interface::post_data post_data (interface) mom_diag_mediator::query_averaging_enabled query_averaging_enabled mom_domain_infra::interface::pass_var pass_var (interface) mom_eos::eos_domain EOS_domain mom_eos::interface::calculate_density calculate_density (interface) mom_eos::interface::calculate_spec_vol calculate_spec_vol (interface) mom_error_handler::mom_error MOM_error mom_forcing_type::interface::find_ustar find_ustar (interface) mom_intrinsic_functions::cuberoot cuberoot mom_mixed_layer_restrat::detect_mld detect_mld [private/internal] mom_mixed_layer_restrat::mixedlayer_restrat_bodner mixedlayer_restrat_Bodner [private/internal] mom_mixed_layer_restrat::mixedlayer_restrat_bodner->mom_checksums::interface::hchksum mom_mixed_layer_restrat::mixedlayer_restrat_bodner->mom_diag_mediator::diag_update_remap_grids mom_mixed_layer_restrat::mixedlayer_restrat_bodner->mom_diag_mediator::interface::post_data mom_mixed_layer_restrat::mixedlayer_restrat_bodner->mom_diag_mediator::query_averaging_enabled mom_mixed_layer_restrat::mixedlayer_restrat_bodner->mom_domain_infra::interface::pass_var mom_mixed_layer_restrat::mixedlayer_restrat_bodner->mom_eos::eos_domain mom_mixed_layer_restrat::mixedlayer_restrat_bodner->mom_eos::interface::calculate_density mom_mixed_layer_restrat::mixedlayer_restrat_bodner->mom_eos::interface::calculate_spec_vol mom_mixed_layer_restrat::mixedlayer_restrat_bodner->mom_error_handler::mom_error mom_mixed_layer_restrat::mixedlayer_restrat_bodner->mom_forcing_type::interface::find_ustar mom_mixed_layer_restrat::mixedlayer_restrat_bodner->mom_intrinsic_functions::cuberoot mom_mixed_layer_restrat::mixedlayer_restrat_bodner->mom_mixed_layer_restrat::detect_mld mom_mixed_layer_restrat::mu mu [private/internal] mom_mixed_layer_restrat::mixedlayer_restrat_bodner->mom_mixed_layer_restrat::mu mom_mixed_layer_restrat::rmean2ts rmean2ts [private/internal] mom_mixed_layer_restrat::mixedlayer_restrat_bodner->mom_mixed_layer_restrat::rmean2ts
Text view
Callers call graph
Callers of mom_mixed_layer_restrat::mixedlayer_restrat_bodner calls cluster_mom_mixed_layer_restrat MOM_mixed_layer_restrat mom_mixed_layer_restrat::mixedlayer_restrat mixedlayer_restrat mom_mixed_layer_restrat::mixedlayer_restrat_bodner mixedlayer_restrat_Bodner [private/internal] mom_mixed_layer_restrat::mixedlayer_restrat->mom_mixed_layer_restrat::mixedlayer_restrat_bodner
Text view
real elemental function rmean2ts(signal, filtered, tau_growing, tau_decaying, dt)

Two time-scale running mean in the same arbitrary units as "signal" and "filtered"

If signal > filtered, returns running-mean with time scale "tau_growing". If signal <= filtered, returns running-mean with time scale "tau_decaying".

The running mean of \(s\) with time scale "of \(\tau\) is:

\begin{equation*} \bar{s} <- ( \Delta t * s + \tau * \bar{s} ) / ( \Delta t + \tau ) \end{equation*}

Note that if \(tau=0\), then the running mean equals the signal. Thus, rmean2ts with tau_growing=0 recovers the "resetting running mean" used in OM4.

Callers call graph
Callers of mom_mixed_layer_restrat::rmean2ts calls cluster_mom_mixed_layer_restrat MOM_mixed_layer_restrat mom_mixed_layer_restrat::mixedlayer_restrat_bodner mixedlayer_restrat_Bodner [private/internal] mom_mixed_layer_restrat::rmean2ts rmean2ts [private/internal] mom_mixed_layer_restrat::mixedlayer_restrat_bodner->mom_mixed_layer_restrat::rmean2ts mom_mixed_layer_restrat::mixedlayer_restrat_unit_tests mixedlayer_restrat_unit_tests mom_mixed_layer_restrat::mixedlayer_restrat_unit_tests->mom_mixed_layer_restrat::rmean2ts
Text view
subroutine mixedlayer_restrat_BML(h, uhtr, vhtr, tv, forces, dt, G, GV, US, CS)

Calculates a restratifying flow assuming a 2-layer bulk mixed layer.

Parameters
  • G [in]

    Ocean grid structure

  • GV [in]

    Ocean vertical grid structure

  • US [in]

    A dimensional unit scaling type

  • h [inout]

    Layer thickness [H ~> m or kg m-2]

  • uhtr [inout]

    Accumulated zonal mass flux [H L2 ~> m3 or kg]

  • vhtr [inout]

    Accumulated meridional mass flux [H L2 ~> m3 or kg]

  • tv [in]

    Thermodynamic variables structure

  • forces [in]

    A structure with the driving mechanical forces

  • dt [in]

    Time increment [T ~> s]

  • CS [inout]

    Module control structure

Callees call graph
Callees of mom_mixed_layer_restrat::mixedlayer_restrat_bml calls cluster_mom_diag_mediator MOM_diag_mediator cluster_mom_domain_infra MOM_domain_infra cluster_mom_eos MOM_EOS cluster_mom_error_handler MOM_error_handler cluster_mom_forcing_type MOM_forcing_type cluster_mom_mixed_layer_restrat MOM_mixed_layer_restrat mom_diag_mediator::diag_update_remap_grids diag_update_remap_grids mom_diag_mediator::interface::post_data post_data (interface) mom_diag_mediator::query_averaging_enabled query_averaging_enabled mom_domain_infra::interface::pass_var pass_var (interface) mom_eos::eos_domain EOS_domain mom_eos::interface::calculate_density calculate_density (interface) mom_eos::interface::calculate_spec_vol calculate_spec_vol (interface) mom_error_handler::mom_error MOM_error mom_forcing_type::interface::find_ustar find_ustar (interface) mom_mixed_layer_restrat::mixedlayer_restrat_bml mixedlayer_restrat_BML [private/internal] mom_mixed_layer_restrat::mixedlayer_restrat_bml->mom_diag_mediator::diag_update_remap_grids mom_mixed_layer_restrat::mixedlayer_restrat_bml->mom_diag_mediator::interface::post_data mom_mixed_layer_restrat::mixedlayer_restrat_bml->mom_diag_mediator::query_averaging_enabled mom_mixed_layer_restrat::mixedlayer_restrat_bml->mom_domain_infra::interface::pass_var mom_mixed_layer_restrat::mixedlayer_restrat_bml->mom_eos::eos_domain mom_mixed_layer_restrat::mixedlayer_restrat_bml->mom_eos::interface::calculate_density mom_mixed_layer_restrat::mixedlayer_restrat_bml->mom_eos::interface::calculate_spec_vol mom_mixed_layer_restrat::mixedlayer_restrat_bml->mom_error_handler::mom_error mom_mixed_layer_restrat::mixedlayer_restrat_bml->mom_forcing_type::interface::find_ustar
Text view
Callers call graph
Callers of mom_mixed_layer_restrat::mixedlayer_restrat_bml calls cluster_mom_mixed_layer_restrat MOM_mixed_layer_restrat mom_mixed_layer_restrat::mixedlayer_restrat mixedlayer_restrat mom_mixed_layer_restrat::mixedlayer_restrat_bml mixedlayer_restrat_BML [private/internal] mom_mixed_layer_restrat::mixedlayer_restrat->mom_mixed_layer_restrat::mixedlayer_restrat_bml
Text view
subroutine detect_mld(h, tv, MLD_fast, G, GV, CS)

Detects the mixed layer depth using a density difference criterion (MLE_DENSITY_DIFF)

Parameters
  • CS [inout]

    Module control structure

  • G [inout]

    Ocean grid structure

  • GV [in]

    Ocean vertical grid structure

  • h [inout]

    Layer thickness [H ~> m or kg m-2]

  • MLD_fast [out]

    detected mixed layer depth [H ~> m or kg m-2]

  • tv [in]

    Thermodynamic variables structure

Callees call graph
Callees of mom_mixed_layer_restrat::detect_mld calls cluster_mom_eos MOM_EOS cluster_mom_mixed_layer_restrat MOM_mixed_layer_restrat mom_eos::eos_domain EOS_domain mom_eos::interface::calculate_density calculate_density (interface) mom_mixed_layer_restrat::detect_mld detect_mld [private/internal] mom_mixed_layer_restrat::detect_mld->mom_eos::eos_domain mom_mixed_layer_restrat::detect_mld->mom_eos::interface::calculate_density
Text view
Callers call graph
Callers of mom_mixed_layer_restrat::detect_mld calls cluster_mom_mixed_layer_restrat MOM_mixed_layer_restrat mom_mixed_layer_restrat::detect_mld detect_mld [private/internal] mom_mixed_layer_restrat::mixedlayer_restrat_bodner mixedlayer_restrat_Bodner [private/internal] mom_mixed_layer_restrat::mixedlayer_restrat_bodner->mom_mixed_layer_restrat::detect_mld mom_mixed_layer_restrat::mixedlayer_restrat_om4 mixedlayer_restrat_OM4 [private/internal] mom_mixed_layer_restrat::mixedlayer_restrat_om4->mom_mixed_layer_restrat::detect_mld
Text view
real function growth_time(u_star, hBL, absf, h_neg, vonKar, Kv_rest, restrat_coef)

Return the growth timescale for the submesoscale mixed layer eddies in [T ~> s]

Parameters
  • u_star [in]

    Surface friction velocity in thickness-based units [H T-1 ~> m s-1 or kg m-2 s-1]

  • hBL [in]

    Boundary layer thickness including at least a negligible value to keep it positive definite [H ~> m or kg m-2]

  • absf [in]

    Absolute value of the Coriolis parameter [T-1 ~> s-1]

  • h_neg [in]

    A tiny thickness that is usually lost in roundoff so can be neglected [H ~> m or kg m-2]

  • Kv_rest [in]

    The background laminar vertical viscosity used for restratification, rescaled into thickness-based units [H2 T-1 ~> m2 s-1 or kg2 m-4 s-1]

  • vonKar [in]

    The von Karman constant, used to scale the turbulent limits on the restratification timescales [nondim]

  • restrat_coef [in]

    An overall scaling factor for the restratification timescale [nondim]

logical function mixedlayer_restrat_init(Time, G, GV, US, param_file, diag, CS, restart_CS)

Initialize the mixed layer restratification module

Parameters
  • Time [in]

    Current model time

  • G [inout]

    Ocean grid structure

  • GV [in]

    Ocean vertical grid structure

  • US [in]

    A dimensional unit scaling type

  • param_file [in]

    Parameter file to parse

  • diag [inout]

    Regulate diagnostics

  • CS [inout]

    Module control structure

  • restart_CS [in]

    MOM restart control structure

Callees call graph
Callees of mom_mixed_layer_restrat::mixedlayer_restrat_init calls cluster_mom_diag_mediator MOM_diag_mediator cluster_mom_domain_infra MOM_domain_infra cluster_mom_error_handler MOM_error_handler cluster_mom_file_parser MOM_file_parser cluster_mom_interp_infra MOM_interp_infra cluster_mom_io MOM_io cluster_mom_mixed_layer_restrat MOM_mixed_layer_restrat cluster_mom_string_functions MOM_string_functions mom_diag_mediator::register_diag_field register_diag_field mom_domain_infra::interface::pass_var pass_var (interface) mom_error_handler::mom_error MOM_error mom_file_parser::closeparameterblock closeParameterBlock mom_file_parser::interface::get_param get_param (interface) mom_file_parser::interface::log_param log_param (interface) mom_file_parser::interface::log_version log_version (interface) mom_file_parser::openparameterblock openParameterBlock mom_interp_infra::init_extern_field init_extern_field mom_interp_infra::time_interp_extern_init time_interp_extern_init mom_io::interface::mom_read_data MOM_read_data (interface) mom_mixed_layer_restrat::mixedlayer_restrat_init mixedlayer_restrat_init mom_mixed_layer_restrat::mixedlayer_restrat_init->mom_diag_mediator::register_diag_field mom_mixed_layer_restrat::mixedlayer_restrat_init->mom_domain_infra::interface::pass_var mom_mixed_layer_restrat::mixedlayer_restrat_init->mom_error_handler::mom_error mom_mixed_layer_restrat::mixedlayer_restrat_init->mom_file_parser::closeparameterblock mom_mixed_layer_restrat::mixedlayer_restrat_init->mom_file_parser::interface::get_param mom_mixed_layer_restrat::mixedlayer_restrat_init->mom_file_parser::interface::log_param mom_mixed_layer_restrat::mixedlayer_restrat_init->mom_file_parser::interface::log_version mom_mixed_layer_restrat::mixedlayer_restrat_init->mom_file_parser::openparameterblock mom_mixed_layer_restrat::mixedlayer_restrat_init->mom_interp_infra::init_extern_field mom_mixed_layer_restrat::mixedlayer_restrat_init->mom_interp_infra::time_interp_extern_init mom_mixed_layer_restrat::mixedlayer_restrat_init->mom_io::interface::mom_read_data mom_string_functions::slasher slasher mom_mixed_layer_restrat::mixedlayer_restrat_init->mom_string_functions::slasher
Text view
Callers call graph
Callers of mom_mixed_layer_restrat::mixedlayer_restrat_init calls cluster_mom MOM cluster_mom_mixed_layer_restrat MOM_mixed_layer_restrat mom::initialize_mom initialize_MOM mom_mixed_layer_restrat::mixedlayer_restrat_init mixedlayer_restrat_init mom::initialize_mom->mom_mixed_layer_restrat::mixedlayer_restrat_init
Text view
subroutine mixedlayer_restrat_register_restarts(HI, GV, US, param_file, CS, restart_CS)

Allocate and register fields in the mixed layer restratification structure for restarts

Parameters
  • HI [in]

    Horizontal index structure

  • GV [in]

    Ocean vertical grid structure

  • US [in]

    A dimensional unit scaling type

  • param_file [in]

    Parameter file to parse

  • CS [inout]

    Module control structure

  • restart_CS [inout]

    MOM restart control structure

Callees call graph
Callees of mom_mixed_layer_restrat::mixedlayer_restrat_register_restarts calls cluster_mom_file_parser MOM_file_parser cluster_mom_mixed_layer_restrat MOM_mixed_layer_restrat cluster_mom_restart MOM_restart cluster_mom_verticalgrid MOM_verticalGrid mom_file_parser::closeparameterblock closeParameterBlock mom_file_parser::interface::get_param get_param (interface) mom_file_parser::openparameterblock openParameterBlock mom_mixed_layer_restrat::mixedlayer_restrat_register_restarts mixedlayer_restrat_register_restarts mom_mixed_layer_restrat::mixedlayer_restrat_register_restarts->mom_file_parser::closeparameterblock mom_mixed_layer_restrat::mixedlayer_restrat_register_restarts->mom_file_parser::interface::get_param mom_mixed_layer_restrat::mixedlayer_restrat_register_restarts->mom_file_parser::openparameterblock mom_restart::interface::register_restart_field register_restart_field (interface) mom_mixed_layer_restrat::mixedlayer_restrat_register_restarts->mom_restart::interface::register_restart_field mom_verticalgrid::get_thickness_units get_thickness_units mom_mixed_layer_restrat::mixedlayer_restrat_register_restarts->mom_verticalgrid::get_thickness_units
Text view
Callers call graph
Callers of mom_mixed_layer_restrat::mixedlayer_restrat_register_restarts calls cluster_mom MOM cluster_mom_mixed_layer_restrat MOM_mixed_layer_restrat mom::initialize_mom initialize_MOM mom_mixed_layer_restrat::mixedlayer_restrat_register_restarts mixedlayer_restrat_register_restarts mom::initialize_mom->mom_mixed_layer_restrat::mixedlayer_restrat_register_restarts
Text view
logical function mixedlayer_restrat_unit_tests(verbose)

Returns true if a unit test of functions in MOM_mixedlayer_restrat fail. Returns false otherwise.

Parameters
  • verbose [in]

    If true, write results to stdout

Callees call graph
Callees of mom_mixed_layer_restrat::mixedlayer_restrat_unit_tests calls cluster_mom_mixed_layer_restrat MOM_mixed_layer_restrat mom_mixed_layer_restrat::mixedlayer_restrat_unit_tests mixedlayer_restrat_unit_tests mom_mixed_layer_restrat::mu mu [private/internal] mom_mixed_layer_restrat::mixedlayer_restrat_unit_tests->mom_mixed_layer_restrat::mu mom_mixed_layer_restrat::rmean2ts rmean2ts [private/internal] mom_mixed_layer_restrat::mixedlayer_restrat_unit_tests->mom_mixed_layer_restrat::rmean2ts mom_mixed_layer_restrat::test_answer test_answer [private/internal] mom_mixed_layer_restrat::mixedlayer_restrat_unit_tests->mom_mixed_layer_restrat::test_answer
Text view
Callers call graph
Callers of mom_mixed_layer_restrat::mixedlayer_restrat_unit_tests calls cluster_mom_mixed_layer_restrat MOM_mixed_layer_restrat cluster_mom_unit_tests MOM_unit_tests mom_mixed_layer_restrat::mixedlayer_restrat_unit_tests mixedlayer_restrat_unit_tests mom_unit_tests::unit_tests unit_tests mom_unit_tests::unit_tests->mom_mixed_layer_restrat::mixedlayer_restrat_unit_tests
Text view
logical function test_answer(verbose, u, u_true, label, tol)

Returns true if any cell of u and u_true are not identical. Returns false otherwise.

Parameters
  • verbose [in]

    If true, write results to stdout

  • u [in]

    Values to test in arbitrary units [A]

  • u_true [in]

    Values to test against (correct answer) [A]

  • label [in]

    Message

  • tol [in]

    The tolerance for differences between u and u_true [A]

Callers call graph
Callers of mom_mixed_layer_restrat::test_answer calls cluster_mom_mixed_layer_restrat MOM_mixed_layer_restrat mom_mixed_layer_restrat::mixedlayer_restrat_unit_tests mixedlayer_restrat_unit_tests mom_mixed_layer_restrat::test_answer test_answer [private/internal] mom_mixed_layer_restrat::mixedlayer_restrat_unit_tests->mom_mixed_layer_restrat::test_answer
Text view
API generated with Flint · Rendered from reStructuredText