SurfaceFluxes.jl

SurfaceFluxesModule
SurfaceFluxes

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

source

Core input types

Dispatch types

SurfaceFluxes.FluxesType
Fluxes

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

source
SurfaceFluxes.FluxesAndFrictionVelocityType
FluxesAndFrictionVelocity

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

source
SurfaceFluxes.CoefficientsType
Coefficients

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

source
SurfaceFluxes.ValuesOnlyType
ValuesOnly

Input container, given only surface state variables, roughness lengths, initial obukhov length and gustiness.

Fields

  • state_in

  • state_sfc

  • z0m

  • z0b

  • gustiness

  • beta

source

User-facing methods

SurfaceFluxes.surface_conditionsFunction
surface_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
source
SurfaceFluxes.recover_profileFunction
recover_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

source

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.UniversalFunctionsModule
UniversalFunctions

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

  • Businger
  • Gryanik
  • Grachev
  • Beljaars
  • 'Cheng'
  • Holtslag
source
SurfaceFluxes.UniversalFunctions.GryanikType
Gryanik <: 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 Length

  • params

source
SurfaceFluxes.UniversalFunctions.GrachevType
Grachev <: 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 Length

  • params

source
SurfaceFluxes.UniversalFunctions.BeljaarsType
Beljaars <: 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 Length

  • params

source
SurfaceFluxes.UniversalFunctions.ChengType
Cheng <: 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 Length

  • params

source
SurfaceFluxes.UniversalFunctions.HoltslagType
Holtslag <: 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 Length

  • params

source