cavity_buoyancy_flux Function

public pure function cavity_buoyancy_flux(const, T_w, S_w, T_b, S_b, gamma_t, gamma_s) result(b_flux)

Interfacial buoyancy flux B_b (m^2/s^3), NEGATIVE = stabilising — Yung et al. (2025) eq. (6) p. 5831,

B_b = -g*( beta*(S_w - S_b)*gamma_s - alpha*(T_w - T_b)*gamma_t )

(their form carries gamma = Gamma*u* explicitly). Equivalent to the McPhee, Maykut & Morison (1987) p. 7029 expression once their dimensional expansion coefficients are written as rho_0*beta, rho_0*alpha and the kinematic fluxes as gamma*(far - interface).

SIGN CHECK: melting FRESHENS the interface (S_b < S_w), which is stabilising, and COOLS it (T_b < T_w), which is destabilising; the salt term wins by about an order of magnitude at seawater salinities, so melting gives B_b < 0 and therefore a POSITIVE Obukhov length.

Arguments

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

Constants bundle — g, alpha_T, beta_S.

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

Far-field temperature (degC).

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

Far-field salinity (g/kg).

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

Interface temperature (degC).

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

Interface salinity (g/kg).

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

Heat exchange velocity (m/s).

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

Salt exchange velocity (m/s).

Return Value real(kind=wp)


Called by

proc~~cavity_buoyancy_flux~~CalledByGraph proc~cavity_buoyancy_flux cavity_buoyancy_flux proc~cavity_state_at_x cavity_state_at_x proc~cavity_state_at_x->proc~cavity_buoyancy_flux 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_buoyancy_flux(const, T_w, S_w, T_b, S_b, gamma_t, gamma_s) &
      result(b_flux)
      !! Interfacial buoyancy flux `B_b` (m^2/s^3), NEGATIVE = stabilising
      !! — Yung et al. (2025) eq. (6) p. 5831,
      !!
      !!   `B_b = -g*( beta*(S_w - S_b)*gamma_s - alpha*(T_w - T_b)*gamma_t )`
      !!
      !! (their form carries `gamma = Gamma*u*` explicitly).  Equivalent to
      !! the McPhee, Maykut & Morison (1987) p. 7029 expression once their
      !! dimensional expansion coefficients are written as `rho_0*beta`,
      !! `rho_0*alpha` and the kinematic fluxes as `gamma*(far - interface)`.
      !!
      !! SIGN CHECK: melting FRESHENS the interface (`S_b < S_w`), which is
      !! stabilising, and COOLS it (`T_b < T_w`), which is destabilising;
      !! the salt term wins by about an order of magnitude at seawater
      !! salinities, so melting gives `B_b < 0` and therefore a POSITIVE
      !! Obukhov length.
      !$acc routine seq
      type(ocean_cavity_const_t), intent(in) :: const
         !! Constants bundle — `g`, `alpha_T`, `beta_S`.
      real(wp), intent(in) :: T_w
         !! Far-field temperature (degC).
      real(wp), intent(in) :: S_w
         !! Far-field salinity (g/kg).
      real(wp), intent(in) :: T_b
         !! Interface temperature (degC).
      real(wp), intent(in) :: S_b
         !! Interface salinity (g/kg).
      real(wp), intent(in) :: gamma_t
         !! Heat exchange velocity (m/s).
      real(wp), intent(in) :: gamma_s
         !! Salt exchange velocity (m/s).
      real(wp) :: b_flux
      b_flux = -const%g*(const%beta_S*(S_w - S_b)*gamma_s &
                         - const%alpha_T*(T_w - T_b)*gamma_t)
   end function cavity_buoyancy_flux