kpp_surface_buoyancy_flux Function

public pure function kpp_surface_buoyancy_flux(alpha_T, beta_S, rho0, q_T_kin, q_S_kin) result(b0)

Surface buoyancy flux for the KPP overlay’s convective scale:

B_0 = (g/ρ_0)·(α_T·F_T − β_S·F_S) [m^2/s^3]

Units convention. alpha_T / beta_S are the LINEAR-EOS DIMENSIONAL sensitivities of the density ANOMALY form used throughout this tree (rdb_eos):

rho = rho_0 + beta_S·(S − S_ref) − alpha_T·(T − T_ref)

so alpha_T = -∂ρ/∂T [kg m^-3 K^-1] and beta_S = ∂ρ/∂S [kg m^-3 psu^-1] — NOT the fractional (1/ρ)·∂ρ/∂T coefficients (~2e-4 K^-1) that many texts write as α. Buoyancy is b = −g·ρ'/ρ_0, so converting a dimensional α_T into a buoyancy flux costs a 1/ρ_0 — dropping it makes B_0 a factor ρ_0 (~1035) too large. Fed a FRACTIONAL coefficient α_frac = α_T/ρ_0 the caller must therefore pass rho0 = 1, and the two spellings agree exactly.

q_T_kin / q_S_kin are the KINEMATIC surface fluxes Q_heat/(ρ_0·cp) [K m/s] and Q_salt/ρ_0 [psu m/s] (the caller charges q_T_kin for penetrating shortwave first, so this stays a pure algebraic kernel). b0 > 0 is stabilizing (heating / freshening), b0 < 0 destabilizing.

Same quantity as EPBL’s b0 = g·ρ_0·(dSV/dT·q_T + dSV/dS·q_S): the linear EOS has dSV/dT = +α_T/ρ_0², dSV/dS = −β_S/ρ_0², so the two reduce to the identical expression (they agree to round-off, not bitwise — the FP op orders differ).

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: alpha_T

Dimensional linear-EOS sensitivities (kg/m^3 per degC / psu).

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

Dimensional linear-EOS sensitivities (kg/m^3 per degC / psu).

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

Boussinesq reference density (kg/m^3).

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

Kinematic surface heat / salt fluxes (K m/s, psu m/s).

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

Kinematic surface heat / salt fluxes (K m/s, psu m/s).

Return Value real(kind=wp)


Called by

proc~~kpp_surface_buoyancy_flux~~CalledByGraph proc~kpp_surface_buoyancy_flux kpp_surface_buoyancy_flux proc~vmix_kpp_overlay_impl vmix_kpp_overlay_impl proc~vmix_kpp_overlay_impl->proc~kpp_surface_buoyancy_flux proc~vmix_apply_kpp_overlay vmix_apply_kpp_overlay proc~vmix_apply_kpp_overlay->proc~vmix_kpp_overlay_impl proc~vmix_apply_in_stage vmix_apply_in_stage proc~vmix_apply_in_stage->proc~vmix_apply_kpp_overlay proc~run_stage run_stage proc~run_stage->proc~vmix_apply_in_stage proc~run_stage_split run_stage_split proc~run_stage_split->proc~vmix_apply_in_stage proc~ocean_dyn_step ocean_dyn_step proc~ocean_dyn_step->proc~run_stage proc~ocean_dyn_step_split ocean_dyn_step_split proc~ocean_dyn_step_split->proc~run_stage_split

Source Code

   pure function kpp_surface_buoyancy_flux(alpha_T, beta_S, rho0, q_T_kin, q_S_kin) &
      result(b0)
      !! Surface buoyancy flux for the KPP overlay's convective scale:
      !!
      !!   `B_0 = (g/ρ_0)·(α_T·F_T − β_S·F_S)`   [m^2/s^3]
      !!
      !! **Units convention.** `alpha_T` / `beta_S` are the LINEAR-EOS
      !! DIMENSIONAL sensitivities of the density ANOMALY form used
      !! throughout this tree (`rdb_eos`):
      !!
      !!   `rho = rho_0 + beta_S·(S − S_ref) − alpha_T·(T − T_ref)`
      !!
      !! so `alpha_T = -∂ρ/∂T` [kg m^-3 K^-1] and
      !! `beta_S = ∂ρ/∂S` [kg m^-3 psu^-1] — NOT the fractional
      !! `(1/ρ)·∂ρ/∂T` coefficients (~2e-4 K^-1) that many texts write
      !! as α.  Buoyancy is `b = −g·ρ'/ρ_0`, so converting a dimensional
      !! `α_T` into a buoyancy flux costs a `1/ρ_0` — dropping it makes
      !! `B_0` a factor `ρ_0` (~1035) too large.  Fed a FRACTIONAL
      !! coefficient `α_frac = α_T/ρ_0` the caller must therefore pass
      !! `rho0 = 1`, and the two spellings agree exactly.
      !!
      !! `q_T_kin` / `q_S_kin` are the KINEMATIC surface fluxes
      !! `Q_heat/(ρ_0·cp)` [K m/s] and `Q_salt/ρ_0` [psu m/s] (the
      !! caller charges `q_T_kin` for penetrating shortwave first, so
      !! this stays a pure algebraic kernel).  `b0 > 0` is stabilizing
      !! (heating / freshening), `b0 < 0` destabilizing.
      !!
      !! Same quantity as EPBL's `b0 = g·ρ_0·(dSV/dT·q_T + dSV/dS·q_S)`:
      !! the linear EOS has `dSV/dT = +α_T/ρ_0²`, `dSV/dS = −β_S/ρ_0²`,
      !! so the two reduce to the identical expression (they agree to
      !! round-off, not bitwise — the FP op orders differ).
      !$acc routine seq
      real(wp), intent(in) :: alpha_T, beta_S
         !! Dimensional linear-EOS sensitivities (kg/m^3 per degC / psu).
      real(wp), intent(in) :: rho0
         !! Boussinesq reference density (kg/m^3).
      real(wp), intent(in) :: q_T_kin, q_S_kin
         !! Kinematic surface heat / salt fluxes (K m/s, psu m/s).
      real(wp) :: b0

      b0 = (GRAVITY/rho0)*(alpha_T*q_T_kin - beta_S*q_S_kin)
   end function kpp_surface_buoyancy_flux