API Reference

Main Solver Interface

SurfaceFluxes.surface_fluxesFunction
surface_fluxes(param_set, T_int, q_tot_int, q_liq_int, q_ice_int, ρ_int, T_sfc_guess, q_vap_sfc_guess, Φ_sfc, Δz, d, u_int, u_sfc, roughness_inputs=nothing, config=default, scheme=PointValueScheme, solver_opts=nothing, flux_specs=nothing)

Core entry point for calculating surface fluxes using Monin-Obukhov Similarity Theory (MOST).

Functionality

Calculates sensible heat flux, latent heat flux, momentum flux (stress), and friction velocity.

Can operate in four modes depending on inputs:

  1. Prescribed Coefficients: If Cd and Ch are provided in flux_specs, fluxes are computed directly.
  2. Fully Prescribed Fluxes: If shf, lhf, and ustar are provided, they are validated and the fluxes are returned.
  3. Prescribed Heat and Drag: If shf, lhf, and Cd are provided, ustar is derived from Cd and wind speed.
  4. Iterative Solver: Otherwise, iterates to find the Obukhov stability parameter ζ. Optional functions can be provided to calculate the skin temperature and skin humidity during the iteration.

Arguments

  • param_set: SurfaceFluxes parameters (containing thermodynamics and universal function params).
  • T_int: Interior (air) temperature [K] at height z.
  • q_tot_int: Interior total specific humidity [kg/kg].
  • q_liq_int, q_ice_int: Interior liquid/ice specific humidity [kg/kg].
  • ρ_int: Interior air density [kg/m^3].
  • T_sfc_guess: Initial guess for surface temperature [K], updated via callback if provided.
  • q_vap_sfc_guess: Initial guess for surface vapor specific humidity [kg/kg], updated via callback if provided.
  • Φ_sfc: Surface geopotential [m^2/s^2].
  • Δz: Geometric height difference between the surface and the interior level [m], used for geopotential.
  • d: Displacement height [m]. Aerodynamic calculations (MOST) use effective height Δz - d.
  • u_int: Tuple of interior wind components (u, v) [m/s].
  • u_sfc: Tuple of surface wind components (u, v) [m/s]. (Usually (0, 0)).
  • roughness_inputs: Optional container of parameters (e.g., LAI, canopy height) that are passed directly to the specific roughness model (e.g., RaupachRoughnessParams).
  • config: SurfaceFluxConfig struct containing:
    • roughness: Model for roughness lengths (e.g., ConstantRoughnessParams, COARE3RoughnessSpec). Note: This package currently assumes the roughness length for heat (z0h) is equal to the roughness length for scalars (z0s).
    • gustiness: Model for gustiness (e.g., ConstantGustinessSpec).
    • moisture_model: DryModel or WetModel.
  • scheme: Discretization scheme (PointValueScheme or LayerAverageScheme).
  • solver_opts: Options for the root solver (maxiter, tol, rtol, forced_fixed_iters).
  • flux_specs: Optional FluxSpecs to prescribe specific constraints (e.g., ustar, shf, Cd).
  • update_T_sfc: Optional callback f(T_sfc) to update surface temperature during iteration.
  • update_q_vap_sfc: Optional callback f(q_vap) to update surface humidity during iteration.

Returns

A SurfaceFluxConditions struct containing:

  • shf: Sensible Heat Flux [W/m^2].
  • lhf: Latent Heat Flux [W/m^2].
  • evaporation: Evaporation rate [kg/m^2/s].
  • ustar: Friction velocity [m/s].
  • ρτxz, ρτyz: Momentum flux components (stress) [N/m^2].
  • ζ: Stability parameter ((z-d)/L).
  • Cd: Drag coefficient
  • g_h: Heat conductance [m/s]
  • T_sfc, q_vap_sfc: Surface temperature [K] and vapor specific humidity kg/kg.
  • L_MO: Monin-Obukhov length [m].
  • converged: Convergence status.
source
surface_fluxes(param_set, inputs, scheme=PointValueScheme(), solver_opts=nothing)

Dispatch to the appropriate solver mode based on the availability of inputs (coefficients, fluxes, or state).

source
SurfaceFluxes.SurfaceFluxConditionsType
SurfaceFluxConditions

Surface flux conditions, returned from surface_fluxes.

  • shf::FT: Sensible heat flux [W/m²]
  • lhf::FT: Latent heat flux [W/m²]
  • evaporation::FT: Evaporation rate [kg/(m²·s)]
  • ρτxz::FT: Momentum flux, eastward component [kg/(m·s²)]
  • ρτyz::FT: Momentum flux, northward component [kg/(m·s²)]
  • ustar::FT: Friction velocity [m/s]
  • ζ::FT: Monin-Obukhov stability parameter (z/L)
  • Cd::FT: Momentum exchange coefficient
  • g_h::FT: Heat conductance [m/s]
  • T_sfc::FT: Surface temperature [K]
  • q_vap_sfc::FT: Surface air vapor specific humidity [kg/kg]
  • L_MO::FT: Monin-Obukhov lengthscale [m]
  • converged::Bool: Solver convergence status
source
SurfaceFluxes.FluxSpecsType
FluxSpecs{FT}

Container for prescribed surface flux boundary conditions.

Fields

  • shf: Sensible Heat Flux [W/m^2].
  • lhf: Latent Heat Flux [W/m^2].
  • ustar: Friction velocity [m/s].
  • Cd: Momentum exchange coefficient.
  • Ch: Heat exchange coefficient.
source
SurfaceFluxes.SolverOptionsType
SolverOptions{FT}

Options for the Monin-Obukhov similarity theory solver.

Fields

  • tol: Absolute tolerance on the change in the stability parameter for determining convergence.
  • rtol: Relative tolerance on the change in the stability parameter for determining convergence.
  • maxiter: Maximum number of iterations.
  • forced_fixed_iters: If true, disables the tolerance check and forces the solver to run for exactly maxiter iterations (or until machine precision is reached/bypassed). Default is true.
source
SurfaceFluxes.compute_profile_valueFunction
compute_profile_value(param_set, L_MO, z0, Δz_eff, scale, val_sfc, transport, scheme)

Compute the (nondimensional) value of a variable (momentum or scalar) at effective aerodynamic height Δz_eff (height above surface minus displacement height).

Arguments

  • param_set: Parameter set.
  • L_MO: Monin-Obukhov length [m].
  • z0: Roughness length [m].
  • Δz_eff: Effective aerodynamic height z - d [m].
  • scale: Similarity scale (ustar, thetastar, etc.).
  • val_sfc: Surface value of the variable.
  • transport: Transport type (MomentumTransport or HeatTransport).
  • scheme: Discretization scheme (default: PointValueScheme()).

Formula:

X(Δz_eff) = (scale / κ) * F_z + val_sfc

where F_z is the dimensionless profile at height Δz_eff.

source

Flux Calculations

Functions for computing specific fluxes.

SurfaceFluxes.sensible_heat_fluxFunction
shf = sensible_heat_flux(param_set, inputs, g_h, T_int, T_sfc, ρ_sfc, E)

Computes the sensible heat flux at the surface.

The sensible heat flux is given by

SHF = -ρ_sfc * g_h * ΔDSE + VSE_sfc * E

where ΔDSE = DSE_int - DSE_sfc is the difference in dry static energy between the interior and surface, g_h is the heat/moisture conductance, VSE_sfc is the dry static energy of water vapor at the surface temperature, and E is the evaporation rate. The second term, VSE_sfc * E, accounts for the vapor static energy VSE_sfc = cp_v * (T_sfc - T_0) + Φ_sfc (i.e., dry enthalpy cp_v * (T_sfc - T_0), or sensible heat, plus potential energy Φ_sfc) carried by evaporating water.

If inputs.shf is provided (not nothing), the function returns that value directly, allowing for prescribed sensible heat flux conditions. See the inputs container.

Arguments

  • param_set: Parameter set.
  • inputs: The inputs container. See build_surface_flux_inputs.
  • g_h: Heat/moisture conductance [m/s].
  • T_int: Interior temperature [K].
  • T_sfc: Surface temperature [K].
  • ρ_sfc: Surface air density [kg/m^3].
  • E: Evaporation rate [kg/m^2/s]. Optional, default 0.
source
sensible_heat_flux(param_set, ζ, ustar, inputs, z0m, z0h, T_sfc, q_vap_sfc, ρ_sfc, scheme)

Computes the sensible heat flux given the Monin-Obukhov stability parameter ζ, friction velocity ustar, roughness lengths, and surface state. Useful for computing fluxes from variables available inside the solver loop.

Arguments

  • param_set: Parameter set.
  • ζ: Monin-Obukhov stability parameter.
  • ustar: Friction velocity [m/s].
  • inputs: The inputs container. See build_surface_flux_inputs.
  • z0m: Momentum roughness length [m].
  • z0h: Thermal roughness length [m].
  • T_sfc: Surface temperature [K].
  • q_vap_sfc: Surface vapor specific humidity [kg/kg].
  • ρ_sfc: Surface air density [kg/m^3].
  • scheme: Discretization scheme.
source
SurfaceFluxes.latent_heat_fluxFunction
latent_heat_flux(param_set, inputs, E, model)

Computes the latent heat flux at the surface.

The latent heat flux is given by

LHF = LH_v0 * E

where LH_v0 is the latent heat of vaporization at the reference temperature and E is the evaporation rate.

If inputs.lhf is provided (not nothing), the function returns that value directly, allowing for prescribed latent heat flux conditions.

Arguments:

source
latent_heat_flux(param_set, ζ, ustar, inputs, z0m, z0h, q_vap_sfc, ρ_sfc, scheme)

Computes the latent heat flux given the Monin-Obukhov stability parameter ζ, friction velocity ustar, roughness lengths, and surface state. Calculates conductance and evaporation internally.

Arguments

  • param_set: Parameter set.
  • ζ: Monin-Obukhov stability parameter.
  • ustar: Friction velocity [m/s].
  • inputs: The inputs container. See build_surface_flux_inputs.
  • z0m: Momentum roughness length [m].
  • z0h: Thermal roughness length [m].
  • q_vap_sfc: Surface vapor specific humidity [kg/kg].
  • ρ_sfc: Surface air density [kg/m^3].
  • scheme: Discretization scheme.
source
SurfaceFluxes.buoyancy_fluxFunction
buoyancy_flux(param_set, shf, lhf, T_sfc, ρ_sfc, q_vap_sfc, q_liq_sfc, q_ice_sfc, model)

Computes the buoyancy flux at the surface, accounting for the presence of liquid and ice condensate.

The buoyancy flux B is defined as the vertical flux of virtual potential temperature θ_v. It is approximated by linearizing the density perturbations with respect to temperature and total water content:

B ≈ (g / ρ_sfc) * ( SHF / (cp_m * T_sfc) + (ε_vd - 1) * LHF / LH_v0 )

Where:

  • cp_m is the specific heat of moist air, calculated using q_tot_sfc, q_liq_sfc, and q_ice_sfc.
  • ε_vd is the ratio of gas constants for water vapor and dry air.
  • The term (ε_vd - 1) (approximately 0.61) represents the density effect of water vapor relative to dry air (the virtual temperature correction factor), ensuring the buoyancy flux accounts for the fact that moist air is lighter than dry air.

Arguments:

  • ρ_sfc: Surface air density [kg/m³].
  • q_vap_sfc: Specific humidity of water vapor at the surface (default: 0).
  • q_liq_sfc: Specific humidity of liquid water at the surface (default: 0).
  • q_ice_sfc: Specific humidity of ice at the surface (default: 0).
  • model: Moisture model (MoistModel or DryModel).
source
buoyancy_flux(param_set, ζ, ustar, inputs)

Computes the buoyancy flux given the Monin-Obukhov stability parameter ζ, friction velocity ustar, and geometric inputs via the inputs container.

The relationship is derived from the definition of the Obukhov length:

L = -u_*^3 / (κ * B)
ζ = Δz / L
=> B = -(u_*^3 * ζ) / (κ * Δz)

Arguments

  • param_set: Parameter set.
  • ζ: Monin-Obukhov stability parameter.
  • ustar: Friction velocity [m/s].
  • inputs: The inputs container. See build_surface_flux_inputs.
source
SurfaceFluxes.evaporationFunction
E = evaporation(param_set, inputs, g_h, q_vap_int, q_vap_sfc, ρ_sfc, model)

Computes the evaporation rate at the surface.

The evaporation rate is given by

E = -ρ_sfc * g_h * Δq_vap

where Δq_vap = q_vap_int - q_vap_sfc is the difference in vapor specific humidity between the interior and surface, g_h is the heat/moisture conductance (heat and moisture conductances must be equal for energetic consistency), and ρ_sfc is the surface air density. Here q_vap_int and q_vap_sfc are the vapor specific humidities (not total specific humidity) at the interior and surface, respectively.

If inputs.lhf is provided (not nothing), the function returns the evaporation rate computed from the prescribed latent heat flux: E = LHF / LH_v0, where LH_v0 is the latent heat of vaporization at the reference temperature.

Arguments:

  • param_set: Parameter set.
  • inputs: The inputs container. See build_surface_flux_inputs.
  • g_h: Heat conductance [m/s].
  • q_vap_int: Interior vapor specific humidity [kg/kg].
  • q_vap_sfc: Surface vapor specific humidity [kg/kg].
  • ρ_sfc: Surface density [kg/m^3].
  • model: Moisture model (MoistModel or DryModel).
source
evaporation(param_set, ζ, ustar, inputs, z0m, z0h, q_vap_sfc, ρ_sfc, scheme)

Computes the evaporation rate given the Monin-Obukhov stability parameter ζ, friction velocity ustar, roughness lengths, and surface state.

Arguments

  • param_set: Parameter set.
  • ζ: Monin-Obukhov stability parameter.
  • ustar: Friction velocity [m/s].
  • inputs: The inputs container. See build_surface_flux_inputs.
  • z0m: Momentum roughness length [m].
  • z0h: Thermal roughness length [m].
  • q_vap_sfc: Surface vapor specific humidity [kg/kg].
  • ρ_sfc: Surface air density [kg/m^3].
  • scheme: Discretization scheme.
source
SurfaceFluxes.momentum_fluxesFunction
momentum_fluxes(Cd, inputs, ρ_sfc, gustiness)

Computes the momentum fluxes at the surface.

The momentum fluxes are calculated using the bulk aerodynamic formula:

ρτxz = -ρ_sfc * Cd * ΔU * Δu_x
ρτyz = -ρ_sfc * Cd * ΔU * Δu_y

where:

  • Cd: Momentum exchange coefficient (drag coefficient)
  • ΔU: Magnitude of the wind speed difference (including gustiness)
  • Δu_x, Δu_y: Components of the wind speed difference
  • ρ_sfc: Surface air density

Returns a tuple (ρτxz, ρτyz).

See the inputs container.

Arguments

  • Cd: Drag coefficient.
  • inputs: The inputs container. See build_surface_flux_inputs.
  • ρ_sfc: Surface air density [kg/m^3].
  • gustiness: Gustiness velocity scale [m/s].
source
SurfaceFluxes.state_bulk_richardson_numberFunction
state_bulk_richardson_number(param_set, inputs, T_sfc, ρ_sfc, ΔU, q_vap_sfc)

Computes the bulk Richardson number from the given state.

Arguments

  • param_set: Parameter set.
  • inputs: The inputs container. See build_surface_flux_inputs.
  • T_sfc: Surface temperature [K].
  • ρ_sfc: Surface air density [kg/m³].
  • ΔU: Wind speed difference [m/s].
  • q_vap_sfc: Surface vapor specific humidity [kg/kg]. Default: 0.

Returns the bulk Richardson number.

source

Exchange Coefficients

Non-dimensional exchange coefficients and conductances.

SurfaceFluxes.drag_coefficientFunction
drag_coefficient(param_set, ζ, z0m, Δz_eff, scheme)

Compute the drag coefficient Cd for momentum exchange.

Arguments

  • param_set: Parameter set
  • ζ: Stability parameter ζ = Δz_eff / L_MO
  • z0m: Roughness length for momentum [m]
  • Δz_eff: Effective aerodynamic height Δz - d [m]
  • scheme: Surface flux solver scheme (default: PointValueScheme())

Formula:

Cd = (κ / F_m)^2

where F_m is the dimensionless velocity profile.

source
drag_coefficient(inputs, speed)

Compute the drag coefficient Cd from friction velocity (presumed to be in inputs.ustar) and effective wind speed (including any gustiness factors).

See the inputs container.

Arguments

source
SurfaceFluxes.heat_exchange_coefficientFunction
heat_exchange_coefficient(param_set, ζ, z0m, z0h, Δz_eff, scheme)

Compute the heat exchange coefficient Ch for scalar exchange.

Formula:

Ch = κ^2 / (F_m * F_h),

where F_m and F_h are the dimensionless profiles for momentum and scalars. For the finite-volume case, this corresponds to the formulation in Nishizawa & Kitamura (2018), Eqs. 21 & 22 (with Pr0 absorbed into Fh).

Arguments

  • param_set: Parameter set
  • ζ: Stability parameter ζ = Δz_eff / L_MO
  • z0m: Roughness length for momentum [m]
  • z0h: Roughness length for scalars (heat/moisture) [m]
  • Δz_eff: Effective aerodynamic height Δz - d [m]
  • scheme: Surface flux solver scheme (default: PointValueScheme())
source
SurfaceFluxes.heat_conductanceFunction
heat_conductance(param_set, ζ, ustar, inputs, z0m, z0h, scheme)

Compute the heat conductance g_h (speed * Ch), including any gustiness factor in the wind speed. Calculates windspeed and exchange coefficient internally from Monin-Obukhov variables.

Arguments

  • param_set: Parameter set.
  • ζ: Monin-Obukhov stability parameter.
  • ustar: Friction velocity [m/s].
  • inputs: The inputs container. See build_surface_flux_inputs.
  • z0m: Momentum roughness length [m].
  • z0h: Thermal roughness length [m].
  • scheme: Discretization scheme.
source

Physical Scales & Variances

Functions for computing Monin-Obukhov similarity scales and variances.

SurfaceFluxes.compute_physical_scale_coeffFunction
compute_physical_scale_coeff(
    param_set::APS,
    Δz_eff,
    ζ,
    z0,
    transport,
    scheme::SolverScheme,
)

Computes the coefficient for the physical scale of a variable. Returns ϕ such that scale = Δvalue * ϕ. For example, u★ = ΔU * ϕ_m.

Arguments

  • Δz_eff: Effective aerodynamic height Δz - d [m]

This is computed as:

\[ϕ = \frac{κ}{F(Δz_eff, ζ, z_0)}\]

where F is the dimensionless profile function from UniversalFunctions.

source
SurfaceFluxes.compute_ustarFunction
compute_ustar(param_set, ζ, z0, inputs, scheme, gustiness)

Return the friction velocity implied by the Monin-Obukhov solution.

If a friction velocity is prescribed via inputs.ustar (in the inputs container), it is returned directly; otherwise it is recomputed from the similarity coefficients.

Arguments

  • param_set: Parameter set.
  • ζ: Monin-Obukhov stability parameter.
  • z0: Momentum roughness length [m].
  • inputs: The inputs container. See build_surface_flux_inputs.
  • scheme: Discretization scheme.
  • gustiness: Gustiness velocity scale [m/s].
source
SurfaceFluxes.compute_theta_starFunction
compute_theta_star(param_set, ζ, z0h, inputs, scheme, T_sfc)

Return the potential temperature scale implied by the Monin-Obukhov solution, where z0h is the roughness length for heat.

Arguments

  • param_set: Parameter set.
  • ζ: Monin-Obukhov stability parameter.
  • z0h: Thermal roughness length [m].
  • inputs: The inputs container. See build_surface_flux_inputs.
  • scheme: Discretization scheme.
  • T_sfc: Surface temperature [K]. Optional, defaults to inputs.T_sfc_guess.
source
SurfaceFluxes.compute_q_starFunction
compute_q_star(param_set, ζ, z0h, inputs, scheme, q_vap_sfc)

Return the specific humidity scale implied by the current Monin-Obukhov solution, where z0h is the roughness length for scalars (assumed equal to heat).

Arguments

  • param_set: Parameter set.
  • ζ: Monin-Obukhov stability parameter.
  • z0h: Thermal/scalar roughness length [m].
  • inputs: The inputs container. See build_surface_flux_inputs.
  • scheme: Discretization scheme.
  • q_vap_sfc: Surface vapor specific humidity [kg/kg]. Optional, defaults to inputs.q_vap_sfc_guess.
source
SurfaceFluxes.u_varianceFunction
u_variance(param_set, Δz_eff, ustar, ζ)

Compute the velocity variance σ_u^2 = (u_star * ϕ_σu)^2.

For unstable conditions, the convective (Deardorff) velocity scale w_* is calculated using the mixed-layer height zi from parameters, and passed to the universal function. Δz_eff is the effective aerodynamic height.

Arguments

  • param_set: Parameter set.
  • Δz_eff: Effective aerodynamic height [m].
  • ustar: Friction velocity [m/s].
  • ζ: Monin-Obukhov stability parameter.
source
SurfaceFluxes.scalar_varianceFunction
scalar_variance(param_set, scale, ζ)

Compute the scalar variance σ_s^2 = (c_s * ϕ_σs)^2.

Arguments

  • param_set: Parameter set.
  • scale: Similarity scale of the scalar (e.g., theta_star, q_star).
  • ζ: Monin-Obukhov stability parameter.
source
SurfaceFluxes.theta_varianceFunction
theta_variance(param_set, inputs, shf, ustar, ζ, rho_sfc)

Computes potential temperature variance from sensible heat flux shf. Calculates θ_* = -shf / (ρ * c_p * u_*) and calls scalar_variance.

Arguments

  • param_set: Parameter set.
  • inputs: The inputs container. See build_surface_flux_inputs.
  • shf: Sensible heat flux [W/m^2].
  • ustar: Friction velocity [m/s].
  • ζ: Monin-Obukhov stability parameter.
  • rho_sfc: Surface density [kg/m^3].
source
SurfaceFluxes.obukhov_lengthFunction
obukhov_length(param_set, ustar, buoy_flux)

Computes the Monin-Obukhov length [m].

Returns zero if ustar is zero.

Arguments

  • param_set: Parameter set.
  • ustar: Friction velocity [m/s].
  • buoy_flux: Surace buoyancy flux [m^2/s^3].
source
SurfaceFluxes.obukhov_stability_parameterFunction
obukhov_stability_parameter(param_set, Δz_eff, ustar, buoy_flux)

Computes the Monin-Obukhov stability parameter ζ = Δz_eff / L_MO, where Δz_eff is the effective aerodynamic height ($z-d$).

Returns zero if ustar and hence L_MO are zero.

Arguments

  • param_set: Parameter set.
  • Δz_eff: Effective aerodynamic height [m].
  • ustar: Friction velocity [m/s].
  • buoy_flux: Surace buoyancy flux [m^2/s^3].
source

Roughness & Gustiness

SurfaceFluxes.ConstantRoughnessParamsType
ConstantRoughnessParams{FT} <: AbstractRoughnessParams

Roughness lengths fixed to constant values.

Fields

  • z0m: Momentum roughness length [m]
  • z0s: Scalar roughness length [m]. Used for both heat (z0h) and humidity (z0q).

The default values specified here are used when constructing the struct manually. When loading via ClimaParams, these values are overwritten by the parameters in the ClimaParams TOML file.

source
SurfaceFluxes.COARE3RoughnessParamsType
COARE3RoughnessParams{FT} <: AbstractRoughnessParams

COARE 3.0 roughness parameterization (Fairall et al. 2003).

References

  • Fairall, C. W., Bradley, E. F., Hare, J. E., Grachev, A. A., & Edson, J. B. (2003). Bulk parameterization of air–sea fluxes: Updates and verification for the COARE algorithm. Journal of Climate, 16, 571–591. DOI: 10.1175/1520-0442(2003)016<0571:BPOASF>2.0.CO;2

The default values specified here are used when constructing the struct manually. When loading via ClimaParams, these values are overwritten by the parameters in the TOML file.

source
SurfaceFluxes.RaupachRoughnessParamsType
RaupachRoughnessParams <: AbstractRoughnessParams

Raupach (1994) canopy roughness model.

References

  • Raupach, M. R. (1994). Simplified expressions for vegetation roughness length and zero-plane displacement as functions of canopy height and area index. Boundary-Layer Meteorology, 71, 211–216. DOI: 10.1007/BF00709229

The default values specified here are used when constructing the struct manually. When loading via ClimaParams, stanton_number is overwritten by the parameter in the TOML file, while other parameters (C_R, C_S, c_d1) retain their default values.

source
SurfaceFluxes.DeardorffGustinessSpecType
DeardorffGustinessSpec

A gustiness model based on Deardorff (1970) scaling with convective velocity scale $w_*$. The gustiness velocity is computed as: $U_{gust} = \beta w_*^{1/3}$

source
SurfaceFluxes.MoistModelType
MoistModel

Indicates that moisture effects (latent heat, virtual temperature) should be included in the flux calculations.

source

Universal Functions

The UniversalFunctions sub-module defines the stability functions $\phi(\zeta)$ and $\psi(\zeta)$.

SurfaceFluxes.UniversalFunctionsModule
UniversalFunctions

Universal stability and stability correction functions for SurfaceFluxes module. Supports the following universal functions:

  • Businger: Businger et al. (1971), Dyer (1974)
  • Gryanik: Gryanik et al. (2020)
  • Grachev: Grachev et al. (2007)

It supports standard finite-difference (point-value) and finite-volume (layer-averaged) schemes. The finite-volume scheme is based on the Nishizawa & Kitamura (2018) formulation.

References:

source
SurfaceFluxes.UniversalFunctions.psiFunction
psi(p, ζ, transport_type)

The standard integrated stability correction function ψ(ζ). Defined as: ψ(ζ) = ∫[0 to ζ] (ϕ(0) - ϕ(x)) / x dx

This is the standard correction used in point-based Monin-Obukhov similarity theory.

source
SurfaceFluxes.UniversalFunctions.PsiFunction
Psi(p, ζ, transport_type)

The volume-averaged stability correction function Ψ(ζ). Mathematically, this is defined as: Ψ(ζ) = (1/ζ) ∫[0 to ζ] ψ(x) dx

This function is required for finite-volume models where fluxes are calculated using cell-averaged values rather than point values at the cell center.

See Nishizawa & Kitamura (2018), Eqs. 14 & 15.

source

Parameter Types

SurfaceFluxes.UniversalFunctions.BusingerParamsType
BusingerParams{FT}

Parameter bundle for the Businger (1971) similarity relations. Mappings to Nishizawa & Kitamura (2018) coefficients:

  • a_m, a_h: The linear coefficients for stable conditions (β in some texts).
  • b_m, b_h: The coefficients γ inside the unstable sqrt/cbrt terms (e.g., (1 - γζ)).
  • Pr_0: The neutral Prandtl number.

See Businger et al. (1971) and Nishizawa & Kitamura (2018).

source
SurfaceFluxes.UniversalFunctions.GryanikParamsType
GryanikParams{FT}

Parameter bundle for the Gryanik et al. (2020) similarity relations. These functions are designed to be valid across the entire stability range, including very stable conditions.

  • a_m, b_m: Coefficients for momentum stability function (Eq. 32).
  • a_h, b_h: Coefficients for heat stability function (Eq. 33).
  • Pr_0: Neutral Prandtl number. (The paper recommends Pr_0 ≈ 0.98.)

Reference: Gryanik et al. (2020).

source
SurfaceFluxes.UniversalFunctions.GrachevParamsType
GrachevParams{FT}

Parameter bundle for the Grachev et al. (2007) similarity relations, based on SHEBA data.

  • a_h, b_h, c_h: Coefficients for heat/scalar stability function (Eq. 9b). Note: c_h is the coefficient for the linear ζ term in the denominator.
  • Pr_0: Neutral Prandtl number. In the original Grachev et al. (2007) derivation, this is 1.0. It is included here for structural consistency with other parameterizations.

Reference: Grachev et al. (2007).

source

Transport Types