MOM_bulk_mixed_layer module reference

Build mixed layer parameterization

Data Types

bulkmixedlayer_CS

The control structure with parameters for the MOM_bulk_mixed_layer module

Functions/Subroutines

bulkmixedlayer

This subroutine partially steps the bulk mixed layer model. See Bulk Surface Mixed Layer for more details.

convective_adjustment

This subroutine does instantaneous convective entrainment into the buffer layers and mixed layers to remove hydrostatic instabilities. Any water that is lighter than currently in the mixed- or buffer- layer is entrained.

mixedlayer_convection

This subroutine causes the mixed layer to entrain to the depth of free convection. The depth of free convection is the shallowest depth at which the fluid is denser than the average of the fluid above.

find_starting_TKE

This subroutine determines the TKE available at the depth of free convection to drive mechanical entrainment.

mechanical_entrainment

This subroutine calculates mechanically driven entrainment.

sort_ML

This subroutine generates an array of indices that are sorted by layer density.

resort_ML

This subroutine actually moves properties between layers to achieve a resorted state, with all of the resorted water either moved into the correct interior layers or in the top nkmb layers.

mixedlayer_detrain_2

This subroutine moves any water left in the former mixed layers into the two buffer layers and may also move buffer layer water into the interior isopycnal layers.

mixedlayer_detrain_1

This subroutine moves any water left in the former mixed layers into the single buffer layers and may also move buffer layer water into the interior isopycnal layers.

bulkmixedlayer_init

This subroutine initializes the MOM bulk mixed layer module.

EF4

This subroutine returns an approximation to the integral R = exp(-L*(H+E)) integral(LH to L(H+E)) L/(1-(1+x)exp(-x)) dx. The approximation to the integrand is good to within -2% at x~.3 and +25% at x~3.5, but the exponential deemphasizes the importance of large x. When L=0, EF4 returns E/((Ht+E)*Ht).

Detailed Description

By Robert Hallberg, 1997 - 2005.

This file contains the subroutine (bulkmixedlayer) that implements a Kraus-Turner-like bulk mixed layer, based on the work of various people, as described in the review paper by [61], with particular attention to the form proposed by [65], with an extension to a refined bulk mixed layer as described in Hallberg ([59]). The physical processes portrayed in this subroutine include convective adjustment and mixed layer entrainment and detrainment. Penetrating shortwave radiation and an exponential decay of TKE fluxes are also supported by this subroutine. Several constants can alternately be set to give a traditional Kraus-Turner mixed layer scheme, although that is not the preferred option. The physical processes and arguments are described in detail in Bulk Surface Mixed Layer.

Type Documentation

type, public :: bulkmixedlayer_CS

The control structure with parameters for the MOM_bulk_mixed_layer module

Parameters
  • initialized

    True if this control structure has been initialized.

  • nkml

    The number of layers in the mixed layer.

  • nkbl

    The number of buffer layers.

  • nsw

    The number of bands of penetrating shortwave radiation.

  • mstar

    The ratio of the friction velocity cubed to the TKE input to the mixed layer [nondim].

  • nstar

    The fraction of the TKE input to the mixed layer available to drive entrainment [nondim].

  • nstar2

    The fraction of potential energy released by convective adjustment that drives entrainment [nondim].

  • absorb_all_SW

    If true, all shortwave radiation is absorbed by the ocean, instead of passing through to the bottom mud.

  • TKE_decay

    The ratio of the natural Ekman depth to the TKE decay scale [nondim].

  • bulk_Ri_ML

    The efficiency with which mean kinetic energy released by mechanically forced entrainment of the mixed layer is converted to TKE, times conversion factors between the natural units of mean kinetic energy and TKE [Z2 L-2 ~> nondim]

  • bulk_Ri_convective

    The efficiency with which convectively released mean kinetic energy becomes TKE, times conversion factors between the natural units of mean kinetic energy and TKE [Z2 L-2 ~> nondim]

  • vonKar

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

  • Hmix_min

    The minimum mixed layer thickness [H ~> m or kg m-2].

  • mech_TKE_floor

    A tiny floor on the amount of turbulent kinetic energy that is used when the mixed layer does not yet contain HMIX_MIN fluid [H Z2 T-2 ~> m3 s-2 or J m-2]. The default is so small that its actual value is irrelevant, but it is detectably greater than 0.

  • H_limit_fluxes

    When the total ocean depth is less than this value [H ~> m or kg m-2], scale away all surface forcing to avoid boiling the ocean.

  • ustar_min

    A minimum value of ustar to avoid numerical problems [Z T-1 ~> m s-1]. If the value is small enough, this should not affect the solution.

  • omega

    The Earth's rotation rate [T-1 ~> s-1].

  • dT_dS_wt

    When forced to extrapolate T & S to match the layer densities, this factor [C S-1 ~> degC ppt-1] is combined with the derivatives of density with T & S to determines what direction is orthogonal to density contours. It should be a typical value of (dR/dS) / (dR/dT) in oceanic profiles. 6 degC ppt-1 might be reasonable.

  • Hbuffer_min

    The minimum buffer layer thickness when the mixed layer is very large [H ~> m or kg m-2].

  • Hbuffer_rel_min

    The minimum buffer layer thickness relative to the combined mixed and buffer layer thicknesses when they are thin [nondim]

  • BL_detrain_time

    A timescale that characterizes buffer layer detrainment events [T ~> s].

  • BL_extrap_lim

    A limit on the density range over which extrapolation can occur when detraining from the buffer layers, relative to the density range within the mixed and buffer layers, when the detrainment is going into the lightest interior layer [nondim].

  • BL_split_rho_tol

    The fractional tolerance for matching layer target densities when splitting layers to deal with massive interior layers that are lighter than one of the mixed or buffer layers [nondim].

  • ML_resort

    If true, resort the layers by density, rather than doing convective adjustment.

  • ML_presort_nz_conv_adj

    If ML_resort is true, do convective adjustment on this many layers (starting from the top) before sorting the remaining layers.

  • omega_frac

    When setting the decay scale for turbulence, use this fraction of the absolute rotation rate blended with the local value of f, as sqrt((1-of)*f^2 + of*4*omega^2) [nondim].

  • correct_absorption

    If true, the depth at which penetrating shortwave radiation is absorbed is corrected by moving some of the heating upward in the water column. The default is false.

  • nonBous_energetics

    If true, use non-Boussinesq expressions for the energetic calculations used in the bulk mixed layer calculations.

  • Resolve_Ekman

    If true, the nkml layers in the mixed layer are chosen to optimally represent the impact of the Ekman transport on the mixed layer TKE budget.

  • Time

    A pointer to the ocean model's clock.

  • TKE_diagnostics

    If true, calculate extensive diagnostics of the TKE budget

  • do_rivermix

    Provide additional TKE to mix river runoff at the river mouths to rivermix_depth

  • rivermix_depth

    The depth of mixing if do_rivermix is true [H ~> m or kg m-2].

  • limit_det

    If true, limit the extent of buffer layer detrainment to be consistent with neighbors.

  • lim_det_dH_sfc

    The fractional limit in the change between grid points of the surface region (mixed & buffer layer) thickness [nondim]. 0.5 by default.

  • lim_det_dH_bathy

    The fraction of the total depth by which the thickness of the surface region (mixed & buffer layers) is allowed to change between grid points [nondim]. 0.2 by default.

  • use_river_heat_content

    If true, use the fluxes%runoff_Hflx field to set the heat carried by runoff, instead of using SST for temperature of liq_runoff

  • use_calving_heat_content

    Use SST for temperature of froz_runoff

  • convect_mom_bug

    If true, use code with a bug that causes a loss of momentum conservation during mixedlayer convection.

  • diag

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

  • Allowed_T_chg

    The amount by which temperature is allowed to exceed previous values during detrainment [C ~> degC]

  • Allowed_S_chg

    The amount by which salinity is allowed to exceed previous values during detrainment [S ~> ppt]

  • ML_depth

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

  • diag_TKE_wind

    The wind source of TKE [H Z2 T-3 ~> m3 s-3 or W m-2].

  • diag_TKE_RiBulk

    The resolved KE source of TKE [H Z2 T-3 ~> m3 s-3 or W m-2].

  • diag_TKE_conv

    The convective source of TKE [H Z2 T-3 ~> m3 s-3 or W m-2].

  • diag_TKE_pen_SW

    The TKE sink required to mix penetrating shortwave heating [H Z2 T-3 ~> m3 s-3 or W m-2].

  • diag_TKE_mech_decay

    The decay of mechanical TKE [H Z2 T-3 ~> m3 s-3 or W m-2].

  • diag_TKE_conv_decay

    The decay of convective TKE [H Z2 T-3 ~> m3 s-3 or W m-2].

  • diag_TKE_mixing

    The work done by TKE to deepen the mixed layer [H Z2 T-3 ~> m3 s-3 or W m-2].

  • diag_TKE_conv_s2

    The convective source of TKE due to to mixing in sigma2 [H Z2 T-3 ~> m3 s-3 or W m-2].

  • diag_PE_detrain

    The spurious source of potential energy due to mixed layer detrainment [R Z3 T-3 ~> W m-2].

  • diag_PE_detrain2

    The spurious source of potential energy due to mixed layer only detrainment [R Z3 T-3 ~> W m-2].

  • id_ML_depth

    Diagnostic IDs

  • id_TKE_wind

    Diagnostic IDs

  • id_TKE_mixing

    Diagnostic IDs

  • id_TKE_RiBulk

    Diagnostic IDs

  • id_TKE_conv

    Diagnostic IDs

  • id_TKE_pen_SW

    Diagnostic IDs

  • id_TKE_mech_decay

    Diagnostic IDs

  • id_TKE_conv_decay

    Diagnostic IDs

  • id_TKE_conv_s2

    Diagnostic IDs

  • id_PE_detrain

    Diagnostic IDs

  • id_PE_detrain2

    Diagnostic IDs

  • id_h_mismatch

    Diagnostic IDs

  • id_Hsfc_used

    Diagnostic IDs

  • id_Hsfc_max

    Diagnostic IDs

  • id_Hsfc_min

    Diagnostic IDs

Functions/Subroutine Documentation

subroutine bulkmixedlayer(h_3d, u_3d, v_3d, tv, fluxes, dt, ea, eb, G, GV, US, CS, optics, BLD, H_ml, aggregate_FW_forcing, dt_diag, last_call)

This subroutine partially steps the bulk mixed layer model. See Bulk Surface Mixed Layer for more details.

Parameters
  • G [inout]

    The ocean's grid structure.

  • GV [in]

    The ocean's vertical grid structure.

  • US [in]

    A dimensional unit scaling type

  • h_3d [inout]

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

  • u_3d [in]

    Zonal velocities interpolated to h points [L T-1 ~> m s-1].

  • v_3d [in]

    Zonal velocities interpolated to h points [L T-1 ~> m s-1].

  • tv [inout]

    A structure containing pointers to any available thermodynamic fields. Absent fields have NULL pointers.

  • fluxes [inout]

    A structure containing pointers to any possible forcing fields. Unused fields have NULL pointers.

  • dt [in]

    Time increment [T ~> s].

  • ea [inout]

    The amount of fluid moved downward into a layer; this should be increased due to mixed layer detrainment [H ~> m or kg m-2].

  • eb [inout]

    The amount of fluid moved upward into a layer; this should be increased due to mixed layer entrainment [H ~> m or kg m-2].

  • CS [inout]

    Bulk mixed layer control structure

  • optics

    The structure that can be queried for the inverse of the vertical absorption decay scale for penetrating shortwave radiation.

  • BLD [inout]

    Active mixed layer depth [Z ~> m]

  • H_ml [inout]

    Active mixed layer thickness [H ~> m or kg m-2].

  • aggregate_FW_forcing [in]

    If true, the net incoming and outgoing surface freshwater fluxes are combined before being applied, instead of being applied separately.

  • dt_diag [in]

    The diagnostic time step, which may be less than dt if there are two calls to mixedlayer [T ~> s].

  • last_call [in]

    if true, this is the last call to mixedlayer in the current time step, so diagnostics will be written. The default is .true.

Callees call graph
Callees of mom_bulk_mixed_layer::bulkmixedlayer calls cluster_mom_bulk_mixed_layer MOM_bulk_mixed_layer cluster_mom_cpu_clock_infra MOM_cpu_clock_infra 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_opacity MOM_opacity mom_bulk_mixed_layer::bulkmixedlayer bulkmixedlayer mom_bulk_mixed_layer::convective_adjustment convective_adjustment [private/internal] mom_bulk_mixed_layer::bulkmixedlayer->mom_bulk_mixed_layer::convective_adjustment mom_bulk_mixed_layer::find_starting_tke find_starting_TKE [private/internal] mom_bulk_mixed_layer::bulkmixedlayer->mom_bulk_mixed_layer::find_starting_tke mom_bulk_mixed_layer::mechanical_entrainment mechanical_entrainment [private/internal] mom_bulk_mixed_layer::bulkmixedlayer->mom_bulk_mixed_layer::mechanical_entrainment mom_bulk_mixed_layer::mixedlayer_convection mixedlayer_convection [private/internal] mom_bulk_mixed_layer::bulkmixedlayer->mom_bulk_mixed_layer::mixedlayer_convection mom_bulk_mixed_layer::mixedlayer_detrain_1 mixedlayer_detrain_1 [private/internal] mom_bulk_mixed_layer::bulkmixedlayer->mom_bulk_mixed_layer::mixedlayer_detrain_1 mom_bulk_mixed_layer::mixedlayer_detrain_2 mixedlayer_detrain_2 [private/internal] mom_bulk_mixed_layer::bulkmixedlayer->mom_bulk_mixed_layer::mixedlayer_detrain_2 mom_bulk_mixed_layer::resort_ml resort_ML [private/internal] mom_bulk_mixed_layer::bulkmixedlayer->mom_bulk_mixed_layer::resort_ml mom_bulk_mixed_layer::sort_ml sort_ML [private/internal] mom_bulk_mixed_layer::bulkmixedlayer->mom_bulk_mixed_layer::sort_ml mom_cpu_clock_infra::cpu_clock_begin cpu_clock_begin mom_bulk_mixed_layer::bulkmixedlayer->mom_cpu_clock_infra::cpu_clock_begin mom_cpu_clock_infra::cpu_clock_end cpu_clock_end mom_bulk_mixed_layer::bulkmixedlayer->mom_cpu_clock_infra::cpu_clock_end mom_diag_mediator::diag_update_remap_grids diag_update_remap_grids mom_bulk_mixed_layer::bulkmixedlayer->mom_diag_mediator::diag_update_remap_grids mom_diag_mediator::interface::post_data post_data (interface) mom_bulk_mixed_layer::bulkmixedlayer->mom_diag_mediator::interface::post_data mom_domain_infra::do_group_pass do_group_pass mom_bulk_mixed_layer::bulkmixedlayer->mom_domain_infra::do_group_pass mom_domain_infra::interface::create_group_pass create_group_pass (interface) mom_bulk_mixed_layer::bulkmixedlayer->mom_domain_infra::interface::create_group_pass mom_eos::average_specific_vol average_specific_vol mom_bulk_mixed_layer::bulkmixedlayer->mom_eos::average_specific_vol mom_eos::eos_domain EOS_domain mom_bulk_mixed_layer::bulkmixedlayer->mom_eos::eos_domain mom_eos::interface::calculate_density calculate_density (interface) mom_bulk_mixed_layer::bulkmixedlayer->mom_eos::interface::calculate_density mom_eos::interface::calculate_density_derivs calculate_density_derivs (interface) mom_bulk_mixed_layer::bulkmixedlayer->mom_eos::interface::calculate_density_derivs mom_eos::interface::calculate_spec_vol calculate_spec_vol (interface) mom_bulk_mixed_layer::bulkmixedlayer->mom_eos::interface::calculate_spec_vol mom_eos::interface::calculate_specific_vol_derivs calculate_specific_vol_derivs (interface) mom_bulk_mixed_layer::bulkmixedlayer->mom_eos::interface::calculate_specific_vol_derivs mom_error_handler::mom_error MOM_error mom_bulk_mixed_layer::bulkmixedlayer->mom_error_handler::mom_error mom_forcing_type::extractfluxes1d extractFluxes1d mom_bulk_mixed_layer::bulkmixedlayer->mom_forcing_type::extractfluxes1d mom_forcing_type::interface::find_ustar find_ustar (interface) mom_bulk_mixed_layer::bulkmixedlayer->mom_forcing_type::interface::find_ustar mom_opacity::absorbremainingsw absorbRemainingSW mom_bulk_mixed_layer::bulkmixedlayer->mom_opacity::absorbremainingsw mom_opacity::extract_optics_slice extract_optics_slice mom_bulk_mixed_layer::bulkmixedlayer->mom_opacity::extract_optics_slice
Text view
Callers call graph
Callers of mom_bulk_mixed_layer::bulkmixedlayer calls cluster_mom_bulk_mixed_layer MOM_bulk_mixed_layer cluster_mom_diabatic_driver MOM_diabatic_driver mom_bulk_mixed_layer::bulkmixedlayer bulkmixedlayer mom_diabatic_driver::layered_diabatic layered_diabatic [private/internal] mom_diabatic_driver::layered_diabatic->mom_bulk_mixed_layer::bulkmixedlayer
Text view
subroutine convective_adjustment(h, u, v, R0, SpV0, Rcv, T, S, eps, d_eb, dKE_CA, cTKE, j, G, GV, US, CS, nz_conv)

This subroutine does instantaneous convective entrainment into the buffer layers and mixed layers to remove hydrostatic instabilities. Any water that is lighter than currently in the mixed- or buffer- layer is entrained.

Parameters
  • G [in]

    The ocean's grid structure.

  • GV [in]

    The ocean's vertical grid structure.

  • h [inout]

    Layer thickness [H ~> m or kg m-2]. The units of h are referred to as H below.

  • u [inout]

    Zonal velocities interpolated to h points [L T-1 ~> m s-1].

  • v [inout]

    Zonal velocities interpolated to h points [L T-1 ~> m s-1].

  • R0 [inout]

    Potential density referenced to surface pressure [R ~> kg m-3].

  • SpV0 [inout]

    Specific volume referenced to surface pressure [R-1 ~> m3 kg-1].

  • Rcv [inout]

    The coordinate defining potential density [R ~> kg m-3].

  • T [inout]

    Layer temperatures [C ~> degC].

  • S [inout]

    Layer salinities [S ~> ppt].

  • eps [in]

    The negligibly small amount of water that will be left in each layer [H ~> m or kg m-2].

  • d_eb [inout]

    The downward increase across a layer in the entrainment from below [H ~> m or kg m-2]. Positive values go with mass gain by a layer.

  • dKE_CA [out]

    The vertically integrated change in kinetic energy due to convective adjustment [H Z2 T-2 ~> m3 s-2 or J m-2].

  • cTKE [out]

    The buoyant turbulent kinetic energy source due to convective adjustment [H Z2 T-2 ~> m3 s-2 or J m-2].

  • j [in]

    The j-index to work on.

  • US [in]

    A dimensional unit scaling type

  • CS [in]

    Bulk mixed layer control structure

  • nz_conv [in]

    If present, the number of layers over which to do convective adjustment (perhaps CS%nkml).

Callers call graph
Callers of mom_bulk_mixed_layer::convective_adjustment calls cluster_mom_bulk_mixed_layer MOM_bulk_mixed_layer mom_bulk_mixed_layer::bulkmixedlayer bulkmixedlayer mom_bulk_mixed_layer::convective_adjustment convective_adjustment [private/internal] mom_bulk_mixed_layer::bulkmixedlayer->mom_bulk_mixed_layer::convective_adjustment
Text view
subroutine mixedlayer_convection(h, d_eb, htot, Ttot, Stot, uhtot, vhtot, R0_tot, SpV0_tot, Rcv_tot, u, v, T, S, R0, SpV0, Rcv, eps, dR0_dT, dSpV0_dT, dRcv_dT, dR0_dS, dSpV0_dS, dRcv_dS, netMassInOut, netMassOut, Net_heat, Net_salt, nsw, Pen_SW_bnd, opacity_band, Conv_En, dKE_FC, j, ksort, G, GV, US, CS, tv, fluxes, dt, aggregate_FW_forcing)

This subroutine causes the mixed layer to entrain to the depth of free convection. The depth of free convection is the shallowest depth at which the fluid is denser than the average of the fluid above.

Parameters
  • G [in]

    The ocean's grid structure.

  • GV [in]

    The ocean's vertical grid structure.

  • h [inout]

    Layer thickness [H ~> m or kg m-2]. The units of h are referred to as H below.

  • d_eb [inout]

    The downward increase across a layer in the layer in the entrainment from below [H ~> m or kg m-2]. Positive values go with mass gain by a layer.

  • htot [out]

    The accumulated mixed layer thickness [H ~> m or kg m-2].

  • Ttot [out]

    The depth integrated mixed layer temperature [C H ~> degC m or degC kg m-2].

  • Stot [out]

    The depth integrated mixed layer salinity [S H ~> ppt m or ppt kg m-2].

  • uhtot [out]

    The depth integrated mixed layer zonal velocity [H L T-1 ~> m2 s-1 or kg m-1 s-1].

  • vhtot [out]

    The integrated mixed layer meridional velocity [H L T-1 ~> m2 s-1 or kg m-1 s-1].

  • R0_tot [out]

    The integrated mixed layer potential density referenced to 0 pressure [H R ~> kg m-2 or kg2 m-5].

  • SpV0_tot [out]

    The integrated mixed layer specific volume referenced to 0 pressure [H R-1 ~> m4 kg-1 or m].

  • Rcv_tot [out]

    The integrated mixed layer coordinate variable potential density [H R ~> kg m-2 or kg2 m-5].

  • u [in]

    Zonal velocities interpolated to h points [L T-1 ~> m s-1].

  • v [in]

    Zonal velocities interpolated to h points [L T-1 ~> m s-1].

  • T [in]

    Layer temperatures [C ~> degC].

  • S [in]

    Layer salinities [S ~> ppt].

  • R0 [in]

    Potential density referenced to surface pressure [R ~> kg m-3].

  • SpV0 [in]

    Specific volume referenced to surface pressure [R-1 ~> m3 kg-1].

  • Rcv [in]

    The coordinate defining potential density [R ~> kg m-3].

  • eps [in]

    The negligibly small amount of water that will be left in each layer [H ~> m or kg m-2].

  • dR0_dT [in]

    The partial derivative of R0 with respect to temperature [R C-1 ~> kg m-3 degC-1].

  • dSpV0_dT [in]

    The partial derivative of SpV0 with respect to temperature [R-1 C-1 ~> m3 kg-1 degC-1].

  • dRcv_dT [in]

    The partial derivative of Rcv with respect to temperature [R C-1 ~> kg m-3 degC-1].

  • dR0_dS [in]

    The partial derivative of R0 with respect to salinity [R S-1 ~> kg m-3 ppt-1].

  • dSpV0_dS [in]

    The partial derivative of SpV0 with respect to salinity [R-1 S-1 ~> m3 kg-1 ppt-1].

  • dRcv_dS [in]

    The partial derivative of Rcv with respect to salinity [R S-1 ~> kg m-3 ppt-1].

  • netMassInOut [in]

    The net mass flux (if non-Boussinesq) or volume flux (if Boussinesq) into the ocean within a time step [H ~> m or kg m-2]. (I.e. P+R-E.)

  • netMassOut [in]

    The mass or volume flux out of the ocean within a time step [H ~> m or kg m-2].

  • Net_heat [in]

    The net heating at the surface over a time step [C H ~> degC m or degC kg m-2]. Any penetrating shortwave radiation is not included in Net_heat.

  • Net_salt [in]

    The net surface salt flux into the ocean over a time step [S H ~> ppt m or ppt kg m-2].

  • nsw [in]

    The number of bands of penetrating shortwave radiation.

  • Pen_SW_bnd [inout]

    The penetrating shortwave heating at the sea surface in each penetrating band [C H ~> degC m or degC kg m-2].

  • opacity_band [in]

    The opacity in each band of penetrating shortwave radiation [H-1 ~> m-1 or m2 kg-1].

  • Conv_En [out]

    The buoyant turbulent kinetic energy source due to free convection [H Z2 T-2 ~> m3 s-2 or J m-2].

  • dKE_FC [out]

    The vertically integrated change in kinetic energy due to free convection [H Z2 T-2 ~> m3 s-2 or J m-2].

  • j [in]

    The j-index to work on.

  • ksort [in]

    The density-sorted k-indices.

  • US [in]

    A dimensional unit scaling type

  • CS [in]

    Bulk mixed layer control structure

  • tv [inout]

    A structure containing pointers to any available thermodynamic fields. Absent fields have NULL pointers.

  • fluxes [inout]

    A structure containing pointers to any possible forcing fields. Unused fields have NULL pointers.

  • dt [in]

    Time increment [T ~> s].

  • aggregate_FW_forcing [in]

    If true, the net incoming and outgoing surface freshwater fluxes are combined before being applied, instead of being applied separately.

Callers call graph
Callers of mom_bulk_mixed_layer::mixedlayer_convection calls cluster_mom_bulk_mixed_layer MOM_bulk_mixed_layer mom_bulk_mixed_layer::bulkmixedlayer bulkmixedlayer mom_bulk_mixed_layer::mixedlayer_convection mixedlayer_convection [private/internal] mom_bulk_mixed_layer::bulkmixedlayer->mom_bulk_mixed_layer::mixedlayer_convection
Text view
subroutine find_starting_TKE(htot, h_CA, fluxes, U_star_2d, Conv_En, cTKE, dKE_FC, dKE_CA, TKE, TKE_river, Idecay_len_TKE, cMKE, tv, dt, Idt_diag, j, ksort, G, GV, US, CS)

This subroutine determines the TKE available at the depth of free convection to drive mechanical entrainment.

Parameters
  • G [in]

    The ocean's grid structure.

  • GV [in]

    The ocean's vertical grid structure.

  • US [in]

    A dimensional unit scaling type

  • htot [in]

    The accumulated mixed layer thickness [H ~> m or kg m-2]

  • h_CA [in]

    The mixed layer depth after convective adjustment [H ~> m or kg m-2].

  • fluxes [in]

    A structure containing pointers to any possible forcing fields. Unused fields have NULL pointers.

  • U_star_2d [in]

    The wind friction velocity, calculated using the Boussinesq reference density or the time-evolving surface density in non-Boussinesq mode [Z T-1 ~> m s-1]

  • Conv_En [inout]

    The buoyant turbulent kinetic energy source due to free convection [H Z2 T-2 ~> m3 s-2 or J m-2].

  • dKE_FC [in]

    The vertically integrated change in kinetic energy due to free convection [H Z2 T-2 ~> m3 s-2 or J m-2].

  • cTKE [in]

    The buoyant turbulent kinetic energy source due to convective adjustment [H Z2 T-2 ~> m3 s-2 or J m-2].

  • dKE_CA [in]

    The vertically integrated change in kinetic energy due to convective adjustment [H Z2 T-2 ~> m3 s-2 or J m-2].

  • TKE [out]

    The turbulent kinetic energy available for mixing over a time step [H Z2 T-2 ~> m3 s-2 or J m-2]

  • Idecay_len_TKE [out]

    The inverse of the vertical decay scale for TKE [H-1 ~> m-1 or m2 kg-1].

  • TKE_river [in]

    The source of turbulent kinetic energy available for driving mixing at river mouths [H Z2 T-3 ~> m3 s-3 or W m-2].

  • cMKE [out]

    Coefficients of HpE and HpE^2 in calculating the denominator of MKE_rate, [H-1 ~> m-1 or m2 kg-1] and [H-2 ~> m-2 or m4 kg-2].

  • tv [inout]

    A structure containing pointers to any available thermodynamic fields.

  • dt [in]

    The time step [T ~> s].

  • Idt_diag [in]

    The inverse of the accumulated diagnostic time interval [T-1 ~> s-1].

  • j [in]

    The j-index to work on.

  • ksort [in]

    The density-sorted k-indices.

  • CS [inout]

    Bulk mixed layer control structure

Callers call graph
Callers of mom_bulk_mixed_layer::find_starting_tke calls cluster_mom_bulk_mixed_layer MOM_bulk_mixed_layer mom_bulk_mixed_layer::bulkmixedlayer bulkmixedlayer mom_bulk_mixed_layer::find_starting_tke find_starting_TKE [private/internal] mom_bulk_mixed_layer::bulkmixedlayer->mom_bulk_mixed_layer::find_starting_tke
Text view
subroutine mechanical_entrainment(h, d_eb, htot, Ttot, Stot, uhtot, vhtot, R0_tot, SpV0_tot, Rcv_tot, u, v, T, S, R0, SpV0, Rcv, eps, dR0_dT, dSpV0_dT, dRcv_dT, cMKE, Idt_diag, nsw, Pen_SW_bnd, opacity_band, TKE, Idecay_len_TKE, j, ksort, G, GV, US, CS)

This subroutine calculates mechanically driven entrainment.

Parameters
  • G [in]

    The ocean's grid structure.

  • GV [in]

    The ocean's vertical grid structure.

  • US [in]

    A dimensional unit scaling type

  • h [inout]

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

  • d_eb [inout]

    The downward increase across a layer in the layer in the entrainment from below [H ~> m or kg m-2]. Positive values go with mass gain by a layer.

  • htot [inout]

    The accumulated mixed layer thickness [H ~> m or kg m-2].

  • Ttot [inout]

    The depth integrated mixed layer temperature [C H ~> degC m or degC kg m-2].

  • Stot [inout]

    The depth integrated mixed layer salinity [S H ~> ppt m or ppt kg m-2].

  • uhtot [inout]

    The depth integrated mixed layer zonal velocity [H L T-1 ~> m2 s-1 or kg m-1 s-1].

  • vhtot [inout]

    The integrated mixed layer meridional velocity [H L T-1 ~> m2 s-1 or kg m-1 s-1].

  • R0_tot [inout]

    The integrated mixed layer potential density referenced to 0 pressure [H R ~> kg m-2 or kg2 m-5].

  • SpV0_tot [inout]

    The integrated mixed layer specific volume referenced to 0 pressure [H R-1 ~> m4 kg-1 or m].

  • Rcv_tot [inout]

    The integrated mixed layer coordinate variable potential density [H R ~> kg m-2 or kg2 m-5].

  • u [in]

    Zonal velocities interpolated to h points [L T-1 ~> m s-1].

  • v [in]

    Zonal velocities interpolated to h points [L T-1 ~> m s-1].

  • T [in]

    Layer temperatures [C ~> degC].

  • S [in]

    Layer salinities [S ~> ppt].

  • R0 [in]

    Potential density referenced to surface pressure [R ~> kg m-3].

  • SpV0 [in]

    Specific volume referenced to surface pressure [R-1 ~> m3 kg-1].

  • Rcv [in]

    The coordinate defining potential density [R ~> kg m-3].

  • eps [in]

    The negligibly small amount of water that will be left in each layer [H ~> m or kg m-2].

  • dR0_dT [in]

    The partial derivative of R0 with respect to temperature [R C-1 ~> kg m-3 degC-1].

  • dSpV0_dT [in]

    The partial derivative of SpV0 with respect to temperature [R-1 C-1 ~> m3 kg-1 degC-1].

  • dRcv_dT [in]

    The partial derivative of Rcv with respect to temperature [R C-1 ~> kg m-3 degC-1].

  • cMKE [in]

    Coefficients of HpE and HpE^2 used in calculating the denominator of MKE_rate; the two elements have differing units of [H-1 ~> m-1 or m2 kg-1] and [H-2 ~> m-2 or m4 kg-2].

  • Idt_diag [in]

    The inverse of the accumulated diagnostic time interval [T-1 ~> s-1].

  • nsw [in]

    The number of bands of penetrating shortwave radiation.

  • Pen_SW_bnd [inout]

    The penetrating shortwave heating at the sea surface in each penetrating band [C H ~> degC m or degC kg m-2].

  • opacity_band [in]

    The opacity in each band of penetrating shortwave radiation [H-1 ~> m-1 or m2 kg-1].

  • TKE [inout]

    The turbulent kinetic energy available for mixing over a time step [H Z2 T-2 ~> m3 s-2 or J m-2].

  • Idecay_len_TKE [inout]

    The vertical TKE decay rate [H-1 ~> m-1 or m2 kg-1].

  • j [in]

    The j-index to work on.

  • ksort [in]

    The density-sorted k-indices.

  • CS [inout]

    Bulk mixed layer control structure

Callees call graph
Callees of mom_bulk_mixed_layer::mechanical_entrainment calls cluster_mom_bulk_mixed_layer MOM_bulk_mixed_layer mom_bulk_mixed_layer::ef4 EF4 [private/internal] mom_bulk_mixed_layer::mechanical_entrainment mechanical_entrainment [private/internal] mom_bulk_mixed_layer::mechanical_entrainment->mom_bulk_mixed_layer::ef4
Text view
Callers call graph
Callers of mom_bulk_mixed_layer::mechanical_entrainment calls cluster_mom_bulk_mixed_layer MOM_bulk_mixed_layer mom_bulk_mixed_layer::bulkmixedlayer bulkmixedlayer mom_bulk_mixed_layer::mechanical_entrainment mechanical_entrainment [private/internal] mom_bulk_mixed_layer::bulkmixedlayer->mom_bulk_mixed_layer::mechanical_entrainment
Text view
subroutine sort_ML(h, R0, SpV0, eps, G, GV, CS, ksort)

This subroutine generates an array of indices that are sorted by layer density.

Parameters
  • G [in]

    The ocean's grid structure.

  • GV [in]

    The ocean's vertical grid structure.

  • h [in]

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

  • R0 [in]

    The potential density used to sort the layers [R ~> kg m-3].

  • SpV0 [in]

    Specific volume referenced to surface pressure [R-1 ~> m3 kg-1]

  • eps [in]

    The (small) thickness that must remain in each layer [H ~> m or kg m-2].

  • CS [in]

    Bulk mixed layer control structure

  • ksort [out]

    The k-index to use in the sort.

Callers call graph
Callers of mom_bulk_mixed_layer::sort_ml calls cluster_mom_bulk_mixed_layer MOM_bulk_mixed_layer mom_bulk_mixed_layer::bulkmixedlayer bulkmixedlayer mom_bulk_mixed_layer::sort_ml sort_ML [private/internal] mom_bulk_mixed_layer::bulkmixedlayer->mom_bulk_mixed_layer::sort_ml
Text view
subroutine resort_ML(h, T, S, R0, SpV0, Rcv, RcvTgt, eps, d_ea, d_eb, ksort, G, GV, CS, dR0_dT, dR0_dS, dSpV0_dT, dSpV0_dS, dRcv_dT, dRcv_dS)

This subroutine actually moves properties between layers to achieve a resorted state, with all of the resorted water either moved into the correct interior layers or in the top nkmb layers.

Parameters
  • G [in]

    The ocean's grid structure.

  • GV [in]

    The ocean's vertical grid structure.

  • h [inout]

    Layer thickness [H ~> m or kg m-2]. Layer 0 is the new mixed layer.

  • T [inout]

    Layer temperatures [C ~> degC].

  • S [inout]

    Layer salinities [S ~> ppt].

  • R0 [inout]

    Potential density referenced to surface pressure [R ~> kg m-3].

  • SpV0 [inout]

    Specific volume referenced to surface pressure [R-1 ~> m3 kg-1]

  • Rcv [inout]

    The coordinate defining potential density [R ~> kg m-3].

  • RcvTgt [in]

    The target value of Rcv for each layer [R ~> kg m-3].

  • eps [inout]

    The (small) thickness that must remain in each layer [H ~> m or kg m-2].

  • d_ea [inout]

    The upward increase across a layer in the entrainment from above [H ~> m or kg m-2]. Positive d_ea goes with layer thickness increases.

  • d_eb [inout]

    The downward increase across a layer in the entrainment from below [H ~> m or kg m-2]. Positive values go with mass gain by a layer.

  • ksort [in]

    The density-sorted k-indices.

  • CS [in]

    Bulk mixed layer control structure

  • dR0_dT [in]

    The partial derivative of potential density referenced to the surface with potential temperature [R C-1 ~> kg m-3 degC-1].

  • dR0_dS [in]

    The partial derivative of potential density referenced to the surface with salinity, [R S-1 ~> kg m-3 ppt-1].

  • dSpV0_dT [in]

    The partial derivative of SpV0 with respect to temperature [R-1 C-1 ~> m3 kg-1 degC-1]

  • dSpV0_dS [in]

    The partial derivative of SpV0 with respect to salinity [R-1 S-1 ~> m3 kg-1 ppt-1]

  • dRcv_dT [in]

    The partial derivative of coordinate defining potential density with potential temperature [R C-1 ~> kg m-3 degC-1].

  • dRcv_dS [in]

    The partial derivative of coordinate defining potential density with salinity, [R S-1 ~> kg m-3 ppt-1].

Callers call graph
Callers of mom_bulk_mixed_layer::resort_ml calls cluster_mom_bulk_mixed_layer MOM_bulk_mixed_layer mom_bulk_mixed_layer::bulkmixedlayer bulkmixedlayer mom_bulk_mixed_layer::resort_ml resort_ML [private/internal] mom_bulk_mixed_layer::bulkmixedlayer->mom_bulk_mixed_layer::resort_ml
Text view
subroutine mixedlayer_detrain_2(h, T, S, R0, Spv0, Rcv, RcvTgt, dt, dt_diag, d_ea, j, G, GV, US, CS, dR0_dT, dR0_dS, dSpV0_dT, dSpV0_dS, dRcv_dT, dRcv_dS, max_BL_det)

This subroutine moves any water left in the former mixed layers into the two buffer layers and may also move buffer layer water into the interior isopycnal layers.

Parameters
  • G [in]

    The ocean's grid structure.

  • GV [in]

    The ocean's vertical grid structure.

  • h [inout]

    Layer thickness [H ~> m or kg m-2]. Layer 0 is the new mixed layer.

  • T [inout]

    Potential temperature [C ~> degC].

  • S [inout]

    Salinity [S ~> ppt].

  • R0 [inout]

    Potential density referenced to surface pressure [R ~> kg m-3].

  • SpV0 [inout]

    Specific volume referenced to surface pressure [R-1 ~> m3 kg-1]

  • Rcv [inout]

    The coordinate defining potential density [R ~> kg m-3].

  • RcvTgt [in]

    The target value of Rcv for each layer [R ~> kg m-3].

  • dt [in]

    Time increment [T ~> s].

  • dt_diag [in]

    The diagnostic time step [T ~> s].

  • d_ea [inout]

    The upward increase across a layer in the entrainment from above [H ~> m or kg m-2]. Positive d_ea goes with layer thickness increases.

  • j [in]

    The meridional row to work on.

  • US [in]

    A dimensional unit scaling type

  • CS [inout]

    Bulk mixed layer control structure

  • dR0_dT [in]

    The partial derivative of potential density referenced to the surface with potential temperature, [R C-1 ~> kg m-3 degC-1].

  • dR0_dS [in]

    The partial derivative of potential density referenced to the surface with salinity [R S-1 ~> kg m-3 ppt-1].

  • dSpV0_dT [in]

    The partial derivative of specific volume with respect to temeprature [R-1 C-1 ~> m3 kg-1 degC-1]

  • dSpV0_dS [in]

    The partial derivative of specific volume with respect to salinity [R-1 S-1 ~> m3 kg-1 ppt-1]

  • dRcv_dT [in]

    The partial derivative of coordinate defining potential density with potential temperature, [R C-1 ~> kg m-3 degC-1].

  • dRcv_dS [in]

    The partial derivative of coordinate defining potential density with salinity [R S-1 ~> kg m-3 ppt-1].

  • max_BL_det [in]

    If non-negative, the maximum detrainment permitted from the buffer layers [H ~> m or kg m-2].

Callees call graph
Callees of mom_bulk_mixed_layer::mixedlayer_detrain_2 calls cluster_mom_bulk_mixed_layer MOM_bulk_mixed_layer cluster_mom_error_handler MOM_error_handler mom_bulk_mixed_layer::mixedlayer_detrain_2 mixedlayer_detrain_2 [private/internal] mom_error_handler::mom_error MOM_error mom_bulk_mixed_layer::mixedlayer_detrain_2->mom_error_handler::mom_error
Text view
Callers call graph
Callers of mom_bulk_mixed_layer::mixedlayer_detrain_2 calls cluster_mom_bulk_mixed_layer MOM_bulk_mixed_layer mom_bulk_mixed_layer::bulkmixedlayer bulkmixedlayer mom_bulk_mixed_layer::mixedlayer_detrain_2 mixedlayer_detrain_2 [private/internal] mom_bulk_mixed_layer::bulkmixedlayer->mom_bulk_mixed_layer::mixedlayer_detrain_2
Text view
subroutine mixedlayer_detrain_1(h, T, S, R0, SpV0, Rcv, RcvTgt, dt, dt_diag, d_ea, d_eb, j, G, GV, US, CS, dRcv_dT, dRcv_dS, max_BL_det)

This subroutine moves any water left in the former mixed layers into the single buffer layers and may also move buffer layer water into the interior isopycnal layers.

Parameters
  • G [in]

    The ocean's grid structure.

  • GV [in]

    The ocean's vertical grid structure.

  • h [inout]

    Layer thickness [H ~> m or kg m-2]. Layer 0 is the new mixed layer.

  • T [inout]

    Potential temperature [C ~> degC].

  • S [inout]

    Salinity [S ~> ppt].

  • R0 [inout]

    Potential density referenced to surface pressure [R ~> kg m-3].

  • SpV0 [inout]

    Specific volume referenced to surface pressure [R-1 ~> m3 kg-1]

  • Rcv [inout]

    The coordinate defining potential density [R ~> kg m-3].

  • RcvTgt [in]

    The target value of Rcv for each layer [R ~> kg m-3].

  • dt [in]

    Time increment [T ~> s].

  • dt_diag [in]

    The accumulated time interval for diagnostics [T ~> s].

  • d_ea [inout]

    The upward increase across a layer in the entrainment from above [H ~> m or kg m-2]. Positive d_ea goes with layer thickness increases.

  • d_eb [inout]

    The downward increase across a layer in the entrainment from below [H ~> m or kg m-2]. Positive values go with mass gain by a layer.

  • j [in]

    The meridional row to work on.

  • US [in]

    A dimensional unit scaling type

  • CS [inout]

    Bulk mixed layer control structure

  • dRcv_dT [in]

    The partial derivative of coordinate defining potential density with potential temperature [R C-1 ~> kg m-3 degC-1].

  • dRcv_dS [in]

    The partial derivative of coordinate defining potential density with salinity [R S-1 ~> kg m-3 ppt-1].

  • max_BL_det [in]

    If non-negative, the maximum detrainment permitted from the buffer layers [H ~> m or kg m-2].

Callees call graph
Callees of mom_bulk_mixed_layer::mixedlayer_detrain_1 calls cluster_mom_bulk_mixed_layer MOM_bulk_mixed_layer cluster_mom_error_handler MOM_error_handler mom_bulk_mixed_layer::mixedlayer_detrain_1 mixedlayer_detrain_1 [private/internal] mom_error_handler::mom_error MOM_error mom_bulk_mixed_layer::mixedlayer_detrain_1->mom_error_handler::mom_error
Text view
Callers call graph
Callers of mom_bulk_mixed_layer::mixedlayer_detrain_1 calls cluster_mom_bulk_mixed_layer MOM_bulk_mixed_layer mom_bulk_mixed_layer::bulkmixedlayer bulkmixedlayer mom_bulk_mixed_layer::mixedlayer_detrain_1 mixedlayer_detrain_1 [private/internal] mom_bulk_mixed_layer::bulkmixedlayer->mom_bulk_mixed_layer::mixedlayer_detrain_1
Text view
subroutine bulkmixedlayer_init(Time, G, GV, US, param_file, diag, CS)

This subroutine initializes the MOM bulk mixed layer module.

Parameters
  • Time [in]

    The model's clock with the current time.

  • G [in]

    The ocean's grid structure.

  • GV [in]

    The ocean's vertical grid structure.

  • US [in]

    A dimensional unit scaling type

  • param_file [in]

    A structure to parse for run-time parameters.

  • diag [inout]

    A structure that is used to regulate diagnostic output.

  • CS [inout]

    Bulk mixed layer control structure

Callees call graph
Callees of mom_bulk_mixed_layer::bulkmixedlayer_init calls cluster_mom_bulk_mixed_layer MOM_bulk_mixed_layer cluster_mom_cpu_clock_infra MOM_cpu_clock_infra cluster_mom_diag_mediator MOM_diag_mediator cluster_mom_error_handler MOM_error_handler cluster_mom_file_parser MOM_file_parser cluster_mom_safe_alloc MOM_safe_alloc mom_bulk_mixed_layer::bulkmixedlayer_init bulkmixedlayer_init mom_cpu_clock_infra::cpu_clock_id cpu_clock_id mom_bulk_mixed_layer::bulkmixedlayer_init->mom_cpu_clock_infra::cpu_clock_id mom_diag_mediator::register_diag_field register_diag_field mom_bulk_mixed_layer::bulkmixedlayer_init->mom_diag_mediator::register_diag_field mom_error_handler::mom_error MOM_error mom_bulk_mixed_layer::bulkmixedlayer_init->mom_error_handler::mom_error mom_file_parser::interface::get_param get_param (interface) mom_bulk_mixed_layer::bulkmixedlayer_init->mom_file_parser::interface::get_param mom_file_parser::interface::log_param log_param (interface) mom_bulk_mixed_layer::bulkmixedlayer_init->mom_file_parser::interface::log_param mom_file_parser::interface::log_version log_version (interface) mom_bulk_mixed_layer::bulkmixedlayer_init->mom_file_parser::interface::log_version mom_safe_alloc::interface::safe_alloc_alloc safe_alloc_alloc (interface) mom_bulk_mixed_layer::bulkmixedlayer_init->mom_safe_alloc::interface::safe_alloc_alloc
Text view
Callers call graph
Callers of mom_bulk_mixed_layer::bulkmixedlayer_init calls cluster_mom_bulk_mixed_layer MOM_bulk_mixed_layer cluster_mom_diabatic_driver MOM_diabatic_driver mom_bulk_mixed_layer::bulkmixedlayer_init bulkmixedlayer_init mom_diabatic_driver::diabatic_driver_init diabatic_driver_init mom_diabatic_driver::diabatic_driver_init->mom_bulk_mixed_layer::bulkmixedlayer_init
Text view
function EF4(Ht, En, I_L, dR_de)

This subroutine returns an approximation to the integral R = exp(-L*(H+E)) integral(LH to L(H+E)) L/(1-(1+x)exp(-x)) dx. The approximation to the integrand is good to within -2% at x~.3 and +25% at x~3.5, but the exponential deemphasizes the importance of large x. When L=0, EF4 returns E/((Ht+E)*Ht).

Parameters
  • Ht [in]

    Total thickness [H ~> m or kg m-2].

  • En [in]

    Entrainment [H ~> m or kg m-2].

  • I_L [in]

    The e-folding scale [H-1 ~> m-1 or m2 kg-1]

  • dR_de [inout]

    The partial derivative of the result R with E [H-2 ~> m-2 or m4 kg-2].

  • EF4

    The integral [H-1 ~> m-1 or m2 kg-1].

Callers call graph
Callers of mom_bulk_mixed_layer::ef4 calls cluster_mom_bulk_mixed_layer MOM_bulk_mixed_layer mom_bulk_mixed_layer::ef4 EF4 [private/internal] mom_bulk_mixed_layer::mechanical_entrainment mechanical_entrainment [private/internal] mom_bulk_mixed_layer::mechanical_entrainment->mom_bulk_mixed_layer::ef4
Text view
API generated with Flint · Rendered from reStructuredText