cavity_obukhov_length Function

public pure function cavity_obukhov_length(const, u_star, b_flux) result(l_obukhov)

Dimensional Obukhov length L = -u*^3/(kappa*B_b) (m), POSITIVE for a stabilising (melting) buoyancy flux. McPhee, Maykut & Morison (1987) p. 7029; the same scale appears as Yung et al. (2025) eq. (5) p. 5831. (Holland & Jenkins (1999) uses L_O in their eq. (18) but never defines it.)

Returns CAVITY_L_PLUS_NEUTRAL for a vanishing buoyancy flux — the L -> +infinity neutral limit, carried as a finite sentinel so no downstream arithmetic has to handle an actual infinity.

Arguments

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

Constants bundle — 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_obukhov_length~~CalledByGraph proc~cavity_obukhov_length cavity_obukhov_length proc~cavity_solve_melt_f cavity_solve_melt_f proc~cavity_solve_melt_f->proc~cavity_obukhov_length 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 proc~engine_step_finalize engine_step_finalize proc~engine_step_finalize->proc~ocean_cavity_flux_step

Source Code

   pure function cavity_obukhov_length(const, u_star, b_flux) result(l_obukhov)
      !! Dimensional Obukhov length `L = -u*^3/(kappa*B_b)` (m), POSITIVE
      !! for a stabilising (melting) buoyancy flux.  McPhee, Maykut &
      !! Morison (1987) p. 7029; the same scale appears as Yung et al.
      !! (2025) eq. (5) p. 5831.  (Holland & Jenkins (1999) uses `L_O` in
      !! their eq. (18) but never defines it.)
      !!
      !! Returns `CAVITY_L_PLUS_NEUTRAL` for a vanishing buoyancy flux —
      !! the `L -> +infinity` neutral limit, carried as a finite sentinel
      !! so no downstream arithmetic has to handle an actual infinity.
      !$acc routine seq
      type(ocean_cavity_const_t), intent(in) :: const
         !! Constants bundle — `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_obukhov
      if (b_flux == 0.0_wp) then
         l_obukhov = CAVITY_L_PLUS_NEUTRAL
      else
         l_obukhov = -(u_star*u_star*u_star)/(const%kappa_vk*b_flux)
      end if
   end function cavity_obukhov_length