SurfaceFluxes.jl
SurfaceFluxes
— ModuleSurfaceFluxes
Interface
surface_conditions
computes- Monin-Obukhov length
- Potential temperature flux (if not given) using Monin-Obukhov theory
- transport fluxes using Monin-Obukhov theory
- friction velocity/temperature scale/tracer scales
- exchange coefficients
References
Core input types
SurfaceFluxes.StateValues
— TypeStateValues
Input container for state variables at either first / interior nodes.
Fields
z
u
ts
Dispatch types
SurfaceFluxes.Fluxes
— TypeFluxes
Input container for state variables, latent and sensible heat fluxes roughness lengths, initial obukhov length and gustiness.
Fields
state_in
state_sfc
shf
lhf
z0m
z0b
gustiness
SurfaceFluxes.FluxesAndFrictionVelocity
— TypeFluxesAndFrictionVelocity
Input container, given surface state variables, latent and sensible heat fluxes, and the friction velocity, roughness lengths, initial obukhov length and gustiness.
Fields
state_in
state_sfc
shf
lhf
ustar
z0m
z0b
gustiness
SurfaceFluxes.Coefficients
— TypeCoefficients
Input container, given surface state variables, and exchange coefficients,roughness lengths, initial obukhov length and gustiness.
Fields
state_in
state_sfc
Cd
Ch
gustiness
beta
SurfaceFluxes.ValuesOnly
— TypeValuesOnly
Input container, given only surface state variables, roughness lengths, initial obukhov length and gustiness.
Fields
state_in
state_sfc
z0m
z0b
gustiness
beta
User-facing methods
SurfaceFluxes.surface_conditions
— Functionsurface_conditions(
param_set::AbstractSurfaceFluxesParameters,
sc::SurfaceFluxes.AbstractSurfaceConditions,
scheme::SurfaceFluxes.SolverScheme = PointValueScheme();
tol_neutral = SFP.cp_d(param_set) / 100,
tol::RS.AbstractTolerance = RS.RelativeSolutionTolerance(FT(0.01)),
maxiter::Int = 10,
soltype::RS.SolutionType = RS.CompactSolution(),
noniterative_stable_sol::Bool=true,
)
The main user facing function of the module. It computes the surface conditions based on the Monin-Obukhov similarity functions. Requires information about thermodynamic parameters (param_set
) the surface state sc
, the universal function type and the discretisation scheme
. Default tolerance for Monin-Obukhov length is absolute (i.e. has units [m]). Returns the RootSolvers CompactSolution
by default.
Result struct of type SurfaceFluxConditions contains:
- L_MO: Monin-Obukhov lengthscale
- shf: Sensible Heat Flux
- lhf: Latent Heat Flux
- ρτxz: Momentum Flux (Eastward component)
- ρτyz: Momentum Flux (Northward component)
- ustar: Friction velocity
- Cd: Momentum Exchange Coefficient
- Ch: Thermal Exchange Coefficient
SurfaceFluxes.recover_profile
— Functionrecover_profile(param_set, sc, L_MO, Z, X_in, X_sfc, transport, scheme)
Recover profiles of variable X given values of Z coordinates. Follows Nishizawa equation (21,22)
Arguments
- param_set: Abstract Parameter Set containing physical, thermodynamic parameters.
- sc: Container for surface conditions based on known combination of the state vector, and {fluxes, friction velocity, exchange coefficients} for a given experiment
- L_MO: Monin-Obukhov length
- Z: Z coordinate(s) (within surface layer) for which variable values are required
- X_star: Scale parameter for variable X
- X_sfc: For variable X, values at surface nodes
- transport: Transport type, (e.g. Momentum or Heat, used to determine physical scale coefficients)
- scheme: Discretization scheme (currently supports FD and FV)
TODO: add tests
Parameters
Convenience constructors are provided for the SurfaceFluxesParameters
and the various UniversalFunctions
parameter structs. To use them, you must first import ClimaParams:
import ClimaParams as CP
import SurfaceFluxes.Parameters as SFP
import SurfaceFluxes.UniversalFunctions as UF
FT = Float64
# SurfaceFluxesParameters requires a float type and a UniversalFunctionsParameters type
SFP.SurfaceFluxesParameters(FT, UF.BusingerParams)
# Or a TOML dict instead of a float type
toml_dict = CP.create_toml_dict(Float64)
SFP.SurfaceFluxesParameters(toml_dict, UF.GrachevParams)
# UniversalFunctionsParameters only require a float type or a TOML dict.
UF.BusingerParams(FT)
UF.GryanikParams(FT)
UF.GrachevParams(FT)
UF.BeljaarsParams(toml_dict)
UF.ChengParams(toml_dict)
UF.HoltslagParams(toml_dict)
Universal Functions
SurfaceFluxes.UniversalFunctions
— ModuleUniversalFunctions
Universal stability and stability correction functions for SurfaceFluxes
module. Supports universal functions:
Businger
Gryanik
Grachev
Beljaars
- 'Cheng'
Holtslag
SurfaceFluxes.UniversalFunctions.Gryanik
— TypeGryanik <: AbstractUniversalFunction{FT}
References
Equations in reference:
`ϕ_m`: Eq. 32
`ϕ_h`: Eq. 33
`ψ_m`: Eq. 34
`ψ_h`: Eq. 35
Gryanik et al. (2020) functions are used in stable conditions
In unstable conditions the functions of Businger (1971) are
assigned by default.
Fields
L
: Monin-Obhukov Lengthparams
SurfaceFluxes.UniversalFunctions.Grachev
— TypeGrachev <: AbstractUniversalFunction{FT}
References
Equations in reference:
`ϕ_m`: Eq. 12
`ϕ_h`: Eq. 12
`ψ_m`: Eq. 13
`ψ_h`: Eq. 13
Grachev (2007) functions are applicable in the
stable b.l. regime (ζ >= 0). Businger (1971) functions
are applied in the unstable b.l. (ζ<0) regime by
default.
Fields
L
: Monin-Obhukov Lengthparams
SurfaceFluxes.UniversalFunctions.Businger
— TypeBusinger
Reference
Original research
Equations in reference:
`ϕ_m`: Eq. A1
`ϕ_h`: Eq. A2
`ψ_m`: Eq. A3
`ψ_h`: Eq. A4
Fields
L
: Monin-Obhukov Lengthparams
SurfaceFluxes.UniversalFunctions.Beljaars
— TypeBeljaars <: AbstractUniversalFunction{FT}
References
Equations in reference:
`ϕ_m`: Derived from Eq. 28
`ϕ_h`: Derived from Eq. 32
`ψ_m`: Eq. 28
`ψ_h`: Eq. 32
Beljaars and Holtslag (1991) functions are used in stable conditions
In unstable conditions the functions of Businger (1971) are
assigned by default.
Fields
L
: Monin-Obhukov Lengthparams
SurfaceFluxes.UniversalFunctions.Cheng
— TypeCheng <: AbstractUniversalFunction{FT}
References
Equations in reference:
`ϕ_m`: Eq. 22
`ϕ_h`: Eq. 24
`ψ_m`: Eq. 21
`ψ_h`: Eq. 23
Cheng qnd Brutsaert (2005) functions are applicable in the
stable b.l. regime (ζ >= 0). Businger (1971) functions
are applied in the unstable b.l. (ζ<0) regime by
default.
Fields
L
: Monin-Obhukov Lengthparams
SurfaceFluxes.UniversalFunctions.Holtslag
— TypeHoltslag <: AbstractUniversalFunction{FT}
References
Equations in reference:
`ϕ_m`: Derived from Eq. 12
`ϕ_h`: Derived from Eq. 12
`ψ_m`: Eq. 12
`ψ_h`: Eq. 12
Holtslag and Bruin 1988 functions are used in stable conditions
In unstable conditions the functions of Businger (1971) are
assigned by default.
Fields
L
: Monin-Obhukov Lengthparams
SurfaceFluxes.UniversalFunctions.phi
— Functionphi
Universal stability function for wind shear (ϕ_m
) and temperature gradient (ϕ_h
)
SurfaceFluxes.UniversalFunctions.psi
— Functionpsi
Universal stability correction function for momentum (ψ_m
) and heat (ψ_h
)
SurfaceFluxes.UniversalFunctions.Psi
— FunctionPsi
Integral of universal stability correction function for momentum (ψ_m
) and heat (ψ_h
)