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

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

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

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

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

  • % 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 (in degC / ppt) 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).

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

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

  • % 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 layer) is allowed to change between grid points. Nondimensional, 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, K.

  • % allowed_s_chg [real] :: The amount by which salinity is allowed to exceed previous values during detrainment, 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.

  • % diag_tke_ribulk [real(:,:),allocatable] :: The resolved KE source of TKE.

  • % diag_tke_conv [real(:,:),allocatable] :: The convective source of TKE.

  • % diag_tke_pen_sw [real(:,:),allocatable] :: The TKE sink required to mix penetrating shortwave heating.

  • % diag_tke_mech_decay [real(:,:),allocatable] :: The decay of mechanical TKE.

  • % diag_tke_conv_decay [real(:,:),allocatable] :: The decay of convective TKE.

  • % diag_tke_mixing [real(:,:),allocatable] :: The work done by TKE to deepen the mixed layer.

  • % diag_tke_conv_s2 [real(:,:),allocatable] :: The convective source of TKE due to to mixing in sigma2.

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

  • % allow_clocks_in_omp_loops [logical] :: If true, clocks can be called from inside loops that can be threaded. To run with multiple threads, set to False.

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

  • fluxes :: [inout] A structure containing pointers to any possible forcing fields. Unused fields have NULL ptrs.

  • 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 :: The control structure returned by a previous call to mixedlayer_init.

  • optics :: The structure containing the inverse of the vertical absorption decay scale for penetrating shortwave radiation [m-1].

  • 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 callse 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_eos::eos_domain mom_opacity::extract_optics_slice mom_forcing_type::extractfluxes1d find_starting_tke id_clock_adjustment id_clock_conv id_clock_detrain id_clock_eos id_clock_mech id_clock_pass id_clock_resort 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, 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].

  • rcv :: [inout] The coordinate defining potential density [R ~> kg m-3].

  • t :: [inout] Layer temperatures [degC].

  • s :: [inout] Layer salinities [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 [Z L2 T-2 ~> m3 s-2].

  • ctke :: [out] The buoyant turbulent kinetic energy source due to convective adjustment [Z L2 T-2 ~> m3 s-2].

  • j :: [in] The j-index to work on.

  • us :: [in] A dimensional unit scaling type

  • cs :: The control structure for this module.

  • 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, Rcv_tot, u, v, T, S, R0, Rcv, eps, dR0_dT, dRcv_dT, dR0_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 [degC H ~> degC m or degC kg m-2].

  • stot :: [out] The depth integrated mixed layer salinity [ppt 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].

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

  • s :: [in] Layer salinities [ppt].

  • r0 :: [in] Potential density 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 degC-1 ~> kg m-3 degC-1].

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

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

  • drcv_ds :: [in] The partial derivative of Rcv with respect to salinity [R ppt-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 [degC 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 [ppt 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 [degC 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 [Z L2 T-2 ~> m3 s-2].

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

  • j :: [in] The j-index to work on.

  • ksort :: [in] The density-sorted k-indices.

  • us :: [in] A dimensional unit scaling type

  • cs :: The control structure for this module.

  • tv :: [inout] A structure containing pointers to any available thermodynamic fields. Absent fields have NULL ptrs.

  • fluxes :: [inout] A structure containing pointers to any possible forcing fields. Unused fields have NULL ptrs.

  • 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, Conv_En, cTKE, dKE_FC, dKE_CA, TKE, TKE_river, Idecay_len_TKE, cMKE, 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 ptrs.

  • conv_en :: [inout] The buoyant turbulent kinetic energy source due to free convection [Z L2 T-2 ~> m3 s-2].

  • dke_fc :: [in] The vertically integrated change in kinetic energy due to free convection [Z L2 T-2 ~> m3 s-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 [Z m2 T-2 ~> m3 s-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 [Z L2 T-3 ~> m3 s-3].

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

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

  • cs :: The control structure for this module.

Called from

bulkmixedlayer

subroutine mom_bulk_mixed_layer/mechanical_entrainment(h, d_eb, htot, Ttot, Stot, uhtot, vhtot, R0_tot, Rcv_tot, u, v, T, S, R0, Rcv, eps, dR0_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 accumlated mixed layer thickness [H ~> m or kg m-2].

  • ttot :: [inout] The depth integrated mixed layer temperature [degC H ~> degC m or degC kg m-2].

  • stot :: [inout] The depth integrated mixed layer salinity [ppt 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].

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

  • s :: [in] Layer salinities [ppt].

  • r0 :: [in] Potential density 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 degC-1 ~> kg m-3 degC-1].

  • drcv_dt :: [in] The partial derivative of Rcv with respect to temperature [R degC-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 [degC 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 [Z m2 T-2 ~> m3 s-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-indicies.

  • cs :: The control structure for this module.

Call to

ef4

Called from

bulkmixedlayer

subroutine mom_bulk_mixed_layer/sort_ml(h, R0, 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].

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

  • cs :: The control structure returned by a previous call to mixedlayer_init.

  • ksort :: [out] The k-index to use in the sort.

Called from

bulkmixedlayer

subroutine mom_bulk_mixed_layer/resort_ml(h, T, S, R0, Rcv, RcvTgt, eps, d_ea, d_eb, ksort, G, GV, CS, dR0_dT, dR0_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 [degC].

  • s :: [inout] Layer salinities [ppt].

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

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

  • cs :: The control structure for this module.

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

  • dr0_ds :: [in] The partial derivative of cpotential density referenced to the surface with salinity, [R ppt-1 ~> kg m-3 ppt-1].

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

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

Called from

bulkmixedlayer

subroutine mom_bulk_mixed_layer/mixedlayer_detrain_2(h, T, S, R0, Rcv, RcvTgt, dt, dt_diag, d_ea, j, G, GV, US, CS, dR0_dT, dR0_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 [degC].

  • s :: [inout] Salinity [ppt].

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

  • 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 :: The control structure returned by a previous call to mixedlayer_init.

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

  • dr0_ds :: [in] The partial derivative of cpotential density referenced to the surface with salinity [R ppt-1 ~> kg m-3 ppt-1].

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

  • drcv_ds :: [in] The partial derivative of coordinate defining potential density with salinity [R ppt-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, 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 [degC].

  • s :: [inout] Salinity [ppt].

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

  • 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 :: The control structure returned by a previous call to mixedlayer_init.

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

  • drcv_ds :: [in] The partial derivative of coordinate defining potential density with salinity [R ppt-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 :: A pointer that is set to point to the control structure for this module.

Call to

id_clock_adjustment id_clock_conv id_clock_detrain id_clock_eos id_clock_mech id_clock_pass id_clock_resort 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