mom_bulk_mixed_layer module reference

Build mixed layer parameterization.

More…

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.

convective_adjustment()

This subroutine does instantaneous convective entrainment into the buffer layers and mixed layers to remove hydrostatic instabilities.

mixedlayer_convection()

This subroutine causes the mixed layer to entrain to the depth of free convection.

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.

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 [], with particular attention to the form proposed by [], with an extension to a refined bulk mixed layer as described in Hallberg ([47]). 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 mom_bulk_mixed_layer/bulkmixedlayer_cs

The control structure with parameters for the MOM_bulk_mixed_layer module.

Type fields:
  • % id_ml_depth [integer] :: Diagnostic IDs.

  • % id_tke_wind [integer] :: Diagnostic IDs.

  • % id_tke_mixing [integer] :: Diagnostic IDs.

  • % id_tke_ribulk [integer] :: Diagnostic IDs.

  • % id_tke_conv [integer] :: Diagnostic IDs.

  • % id_tke_pen_sw [integer] :: Diagnostic IDs.

  • % id_tke_mech_decay [integer] :: Diagnostic IDs.

  • % id_tke_conv_decay [integer] :: Diagnostic IDs.

  • % id_tke_conv_s2 [integer] :: Diagnostic IDs.

  • % id_pe_detrain [integer] :: Diagnostic IDs.

  • % id_pe_detrain2 [integer] :: Diagnostic IDs.

  • % id_h_mismatch [integer] :: Diagnostic IDs.

  • % id_hsfc_used [integer] :: Diagnostic IDs.

  • % id_hsfc_max [integer] :: Diagnostic IDs.

  • % id_hsfc_min [integer] :: Diagnostic IDs.

  • % initialized [logical] :: True if this control structure has been initialized.

  • % nkml [integer] :: The number of layers in the mixed layer.

  • % nkbl [integer] :: The number of buffer layers.

  • % nsw [integer] :: The number of bands of penetrating shortwave radiation.

  • % mstar [real] :: The ratio of the friction velocity cubed to the TKE input to the mixed layer [nondim].

  • % nstar [real] :: The fraction of the TKE input to the mixed layer available to drive entrainment [nondim].

  • % nstar2 [real] :: The fraction of potential energy released by convective adjustment that drives entrainment [nondim].

  • % absorb_all_sw [logical] :: If true, all shortwave radiation is absorbed by the ocean, instead of passing through to the bottom mud.

  • % tke_decay [real] :: The ratio of the natural Ekman depth to the TKE decay scale [nondim].

  • % bulk_ri_ml [real] :: The efficiency with which mean kinetic energy released by mechanically forced entrainment of the mixed layer is converted to TKE [nondim].

  • % bulk_ri_convective [real] :: The efficiency with which convectively released mean kinetic energy becomes TKE [nondim].

  • % vonkar [real] :: The von Karman constant as used for mixed layer viscosity [nondim].

  • % hmix_min [real] :: The minimum mixed layer thickness [H ~> m or kg m-2].

  • % mech_tke_floor [real] :: 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 L2 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 [real] :: 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 [real] :: 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 [real] :: The Earth’s rotation rate [T-1 ~> s-1].

  • % dt_ds_wt [real] :: 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 [real] :: The minimum buffer layer thickness when the mixed layer is very large [H ~> m or kg m-2].

  • % hbuffer_rel_min [real] :: The minimum buffer layer thickness relative to the combined mixed and buffer layer thicknesses when they are thin [nondim].

  • % bl_detrain_time [real] :: A timescale that characterizes buffer layer detrainment events [T ~> s].

  • % bl_extrap_lim [real] :: 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 [real] :: 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 [logical] :: If true, resort the layers by density, rather than doing convective adjustment.

  • % ml_presort_nz_conv_adj [integer] :: If ML_resort is true, do convective adjustment on this many layers (starting from the top) before sorting the remaining layers.

  • % omega_frac [real] :: 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 [logical] :: 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 [logical] :: If true, use non-Boussinesq expressions for the energetic calculations used in the bulk mixed layer calculations.

  • % resolve_ekman [logical] :: 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 [type(time_type),pointer] :: A pointer to the ocean model’s clock.

  • % tke_diagnostics [logical] :: If true, calculate extensive diagnostics of the TKE budget.

  • % do_rivermix [logical] :: Provide additional TKE to mix river runoff at the river mouths to rivermix_depth.

  • % rivermix_depth [real] :: The depth of mixing if do_rivermix is true [H ~> m or kg m-2].

  • % limit_det [logical] :: If true, limit the extent of buffer layer detrainment to be consistent with neighbors.

  • % lim_det_dh_sfc [real] :: 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 [real] :: 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 [logical] :: If true, use the fluxesrunoff_Hflx field to set the heat carried by runoff, instead of using SST for temperature of liq_runoff.

  • % use_calving_heat_content [logical] :: Use SST for temperature of froz_runoff.

  • % convect_mom_bug [logical] :: If true, use code with a bug that causes a loss of momentum conservation during mixedlayer convection.

  • % diag [type( diag_ctrl ),pointer] :: A structure that is used to regulate the timing of diagnostic output.

  • % allowed_t_chg [real] :: The amount by which temperature is allowed to exceed previous values during detrainment [C ~> degC].

  • % allowed_s_chg [real] :: The amount by which salinity is allowed to exceed previous values during detrainment [S ~> ppt].

  • % ml_depth [real(:,:),allocatable] :: The mixed layer depth [H ~> m or kg m-2].

  • % diag_tke_wind [real(:,:),allocatable] :: The wind source of TKE [H L2 T-3 ~> m3 s-3 or W m-2].

  • % diag_tke_ribulk [real(:,:),allocatable] :: The resolved KE source of TKE [H L2 T-3 ~> m3 s-3 or W m-2].

  • % diag_tke_conv [real(:,:),allocatable] :: The convective source of TKE [H L2 T-3 ~> m3 s-3 or W m-2].

  • % diag_tke_pen_sw [real(:,:),allocatable] :: The TKE sink required to mix penetrating shortwave heating [H L2 T-3 ~> m3 s-3 or W m-2].

  • % diag_tke_mech_decay [real(:,:),allocatable] :: The decay of mechanical TKE [H L2 T-3 ~> m3 s-3 or W m-2].

  • % diag_tke_conv_decay [real(:,:),allocatable] :: The decay of convective TKE [H L2 T-3 ~> m3 s-3 or W m-2].

  • % diag_tke_mixing [real(:,:),allocatable] :: The work done by TKE to deepen the mixed layer [H L2 T-3 ~> m3 s-3 or W m-2].

  • % diag_tke_conv_s2 [real(:,:),allocatable] :: The convective source of TKE due to to mixing in sigma2 [H L2 T-3 ~> m3 s-3 or W m-2].

  • % diag_pe_detrain [real(:,:),allocatable] :: The spurious source of potential energy due to mixed layer.

  • % diag_pe_detrain2 [real(:,:),allocatable] :: The spurious source of potential energy due to mixed layer only.

  • % pass_h_sum_hmbl_prev [type(group_pass_type)] :: For group halo pass.

Function/Subroutine Documentation

subroutine mom_bulk_mixed_layer/bulkmixedlayer(h_3d, u_3d, v_3d, tv, fluxes, dt, ea, eb, G, GV, US, CS, optics, Hml, 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

  • v_3d :: [in] Zonal velocities interpolated to h points

  • 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

  • eb :: [inout] The amount of fluid moved upward into a

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

  • hml :: Active mixed layer depth [Z ~> m]

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

Call to:

mom_opacity::absorbremainingsw convective_adjustment mom_diag_mediator::diag_update_remap_grids mom_opacity::extract_optics_slice mom_forcing_type::extractfluxes1d find_starting_tke id_clock_pass mechanical_entrainment mixedlayer_convection mixedlayer_detrain_1 mixedlayer_detrain_2 mom_error_handler::mom_error resort_ml sort_ml

Called from:

mom_diabatic_driver::layered_diabatic

subroutine mom_bulk_mixed_layer/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 L2 T-2 ~> m3 s-2 or J m-2].

  • ctke :: [out] The buoyant turbulent kinetic energy source due to convective adjustment [H L2 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 CSnkml).

Called from:

bulkmixedlayer

subroutine mom_bulk_mixed_layer/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].

  • d_eb :: [inout] The downward increase across a layer in the

  • 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

  • spv0 :: [in] Specific volume referenced to

  • rcv :: [in] The coordinate defining potential

  • eps :: [in] The negligibly small amount of water

  • 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 L2 T-2 ~> m3 s-2 or J m-2].

  • dke_fc :: [out] The vertically integrated change in kinetic energy due to free convection [H L2 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.

Called from:

bulkmixedlayer

subroutine mom_bulk_mixed_layer/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 L2 T-2 ~> m3 s-2 or J m-2].

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

  • ctke :: [in] The buoyant turbulent kinetic energy

  • dke_ca :: [in] The vertically integrated change in

  • tke :: [out] The turbulent kinetic energy available for mixing over a time step [H L2 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 L2 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

Called from:

bulkmixedlayer

subroutine mom_bulk_mixed_layer/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

  • 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

  • spv0 :: [in] Specific volume referenced to

  • rcv :: [in] The coordinate defining potential

  • eps :: [in] The negligibly small amount of water

  • 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 L2 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

Call to:

ef4

Called from:

bulkmixedlayer

subroutine mom_bulk_mixed_layer/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.

Called from:

bulkmixedlayer

subroutine mom_bulk_mixed_layer/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].

Called from:

bulkmixedlayer

subroutine mom_bulk_mixed_layer/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].

Call to:

mom_error_handler::mom_error

Called from:

bulkmixedlayer

subroutine mom_bulk_mixed_layer/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]

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

Call to:

mom_error_handler::mom_error

Called from:

bulkmixedlayer

subroutine mom_bulk_mixed_layer/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

Call to:

id_clock_pass mom_error_handler::mom_error

Called from:

mom_diabatic_driver::diabatic_driver_init

function mom_bulk_mixed_layer/ef4(Ht, En, I_L, dR_de) [real]

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].

Return:

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

Called from:

mechanical_entrainment