cavity_l_plus_from_state Function

public pure function cavity_l_plus_from_state(const, u_star, b_flux) result(l_plus)

Viscous Obukhov scale L+ = L/delta_nu with delta_nu = nu/u*, i.e. L+ = -u*^4/(nu*kappa*B_b) — Yung et al. (2025) eq. (5) p. 5831; the same definition in Vreugdenhil & Taylor (2019) eq. (27) and Rosevear et al. (2022) eqs. (6)+(8) p. 2592. POSITIVE for melting. Returns CAVITY_L_PLUS_NEUTRAL for a vanishing buoyancy flux.

Arguments

Type IntentOptional Attributes Name
type(ocean_cavity_const_t), intent(in) :: const

Constants bundle — nu, kappa_vk.

real(kind=wp), intent(in) :: u_star

Friction velocity (m/s), > 0.

real(kind=wp), intent(in) :: b_flux

Interfacial buoyancy flux (m^2/s^3).

Return Value real(kind=wp)


Called by

proc~~cavity_l_plus_from_state~~CalledByGraph proc~cavity_l_plus_from_state cavity_l_plus_from_state proc~cavity_state_at_x cavity_state_at_x proc~cavity_state_at_x->proc~cavity_l_plus_from_state proc~cavity_solve_melt_f cavity_solve_melt_f proc~cavity_solve_melt_f->proc~cavity_state_at_x proc~cavity_melt_point_gamma_f cavity_melt_point_gamma_f proc~cavity_melt_point_gamma_f->proc~cavity_solve_melt_f proc~cavity_solve_melt cavity_solve_melt proc~cavity_solve_melt->proc~cavity_solve_melt_f proc~cavity_melt_columns_2d cavity_melt_columns_2d proc~cavity_melt_columns_2d->proc~cavity_melt_point_gamma_f proc~cavity_melt_point cavity_melt_point proc~cavity_melt_point->proc~cavity_solve_melt proc~cavity_melt_point_gamma cavity_melt_point_gamma proc~cavity_melt_point_gamma->proc~cavity_melt_point_gamma_f proc~cavity_melt_columns cavity_melt_columns proc~cavity_melt_columns->proc~cavity_melt_point proc~ocean_cavity_flux_step ocean_cavity_flux_step proc~ocean_cavity_flux_step->proc~cavity_melt_columns_2d

Source Code

   pure function cavity_l_plus_from_state(const, u_star, b_flux) result(l_plus)
      !! Viscous Obukhov scale `L+ = L/delta_nu` with `delta_nu = nu/u*`,
      !! i.e. `L+ = -u*^4/(nu*kappa*B_b)` — Yung et al. (2025) eq. (5)
      !! p. 5831; the same definition in Vreugdenhil & Taylor (2019)
      !! eq. (27) and Rosevear et al. (2022) eqs. (6)+(8) p. 2592.
      !! POSITIVE for melting.  Returns `CAVITY_L_PLUS_NEUTRAL` for a
      !! vanishing buoyancy flux.
      !$acc routine seq
      type(ocean_cavity_const_t), intent(in) :: const
         !! Constants bundle — `nu`, `kappa_vk`.
      real(wp), intent(in) :: u_star
         !! Friction velocity (m/s), > 0.
      real(wp), intent(in) :: b_flux
         !! Interfacial buoyancy flux (m^2/s^3).
      real(wp) :: l_plus
      if (b_flux == 0.0_wp) then
         l_plus = CAVITY_L_PLUS_NEUTRAL
      else
         l_plus = -(u_star**4)/(const%nu*const%kappa_vk*b_flux)
      end if
   end function cavity_l_plus_from_state