StomtaModels API

Empirical models

StomataModels.empirical_equationFunction

This function returns the stomatal conductance computed from empirical stomatal models. This is not the solution! Supported methods are for

  • Leaf
  • Leaves1D (ind=1 for sunlit, ind=2 for shaded leaves)
  • Leaves2D (ind=NA for shaded, ind>1 for sunlit leaves)
source
StomataModels.empirical_equationMethod
empirical_equation(sm::BallBerrySM{FT}, leaf::Leaf{FT}, air::AirLayer{FT}; β::FT = FT(1)) where {FT<:AbstractFloat}
empirical_equation(sm::GentineSM{FT}, leaf::Leaf{FT}, air::AirLayer{FT}; β::FT = FT(1)) where {FT<:AbstractFloat}
empirical_equation(sm::LeuningSM{FT}, leaf::Leaf{FT}, air::AirLayer{FT}; β::FT = FT(1)) where {FT<:AbstractFloat}
empirical_equation(sm::MedlynSM{FT}, leaf::Leaf{FT}, air::AirLayer{FT}; β::FT = FT(1)) where {FT<:AbstractFloat}

Return the stomatal conductance computed from empirical model formulation, given

  • sm BallBerrySM, GentineSM, LeuningSM, or MedlynSM type model
  • leaf Leaf type struct
  • air AirLayer type environmental conditions
  • β Tuning factor for G1 (must be 1 if tuning factor is not based on G1)
source
StomataModels.empirical_equationMethod
empirical_equation(sm::BallBerrySM{FT}, leaves::Leaves1D{FT}, air::AirLayer{FT}, ind::Int; β::FT = FT(1)) where {FT<:AbstractFloat}
empirical_equation(sm::GentineSM{FT}, leaves::Leaves1D{FT}, air::AirLayer{FT}, ind::Int; β::FT = FT(1)) where {FT<:AbstractFloat}
empirical_equation(sm::LeuningSM{FT}, leaves::Leaves1D{FT}, air::AirLayer{FT}, ind::Int; β::FT = FT(1)) where {FT<:AbstractFloat}
empirical_equation(sm::MedlynSM{FT}, leaves::Leaves1D{FT}, air::AirLayer{FT}, ind::Int; β::FT = FT(1)) where {FT<:AbstractFloat}

Return the stomatal conductance computed from empirical model formulation, given

  • sm BallBerrySM, GentineSM, LeuningSM, or MedlynSM type model
  • leaves Leaves1D type struct
  • air AirLayer type environmental conditions
  • ind Leaf index (1 for sunlit and 2 for shaded)
  • β Tuning factor for G1 (must be 1 if tuning factor is not based on G1)
source
StomataModels.empirical_equationMethod
empirical_equation(sm::BallBerrySM{FT}, leaves::Leaves2D{FT}, air::AirLayer{FT}; β::FT = FT(1)) where {FT<:AbstractFloat}
empirical_equation(sm::GentineSM{FT}, leaves::Leaves2D{FT}, air::AirLayer{FT}; β::FT = FT(1)) where {FT<:AbstractFloat}
empirical_equation(sm::LeuningSM{FT}, leaves::Leaves2D{FT}, air::AirLayer{FT}; β::FT = FT(1)) where {FT<:AbstractFloat}
empirical_equation(sm::MedlynSM{FT}, leaves::Leaves2D{FT}, air::AirLayer{FT}; β::FT = FT(1)) where {FT<:AbstractFloat}

Return the stomatal conductance computed from empirical model formulation for the shaded leaves of Leaves2D, given

  • sm BallBerrySM, GentineSM, LeuningSM, or MedlynSM type model
  • leaves Leaves2D type struct
  • air AirLayer type environmental conditions
  • β Tuning factor for G1 (must be 1 if tuning factor is not based on G1)
source
StomataModels.empirical_equationMethod
empirical_equation(sm::BallBerrySM{FT}, leaves::Leaves2D{FT}, air::AirLayer{FT}, ind::Int; β::FT = FT(1)) where {FT<:AbstractFloat}
empirical_equation(sm::GentineSM{FT}, leaves::Leaves2D{FT}, air::AirLayer{FT}, ind::Int; β::FT = FT(1)) where {FT<:AbstractFloat}
empirical_equation(sm::LeuningSM{FT}, leaves::Leaves2D{FT}, air::AirLayer{FT}, ind::Int; β::FT = FT(1)) where {FT<:AbstractFloat}
empirical_equation(sm::MedlynSM{FT}, leaves::Leaves2D{FT}, air::AirLayer{FT}, ind::Int; β::FT = FT(1)) where {FT<:AbstractFloat}

Return the stomatal conductance computed from empirical model formulation for the sunlit leaves of Leaves2D, given

  • sm BallBerrySM, GentineSM, LeuningSM, or MedlynSM type model
  • leaves Leaves2D type struct
  • air AirLayer type environmental conditions
  • ind Sunlit leaf index within the leaf angular distribution
  • β Tuning factor for G1 (must be 1 if tuning factor is not based on G1)
source

Optimality models

StomataModels.∂A∂EFunction
∂A∂E(leaf::Leaf{FT}, air::AirLayer{FT}) where {FT<:AbstractFloat}
∂A∂E(leaves::Leaves1D{FT}, air::AirLayer{FT}, ind::Int) where {FT<:AbstractFloat}
∂A∂E(leaves::Leaves2D{FT}, air::AirLayer{FT}) where {FT<:AbstractFloat}
∂A∂E(leaves::Leaves2D{FT}, air::AirLayer{FT}, ind::Int) where {FT<:AbstractFloat}

Return the partial derivative of A per E, given

  • leaf Leaf type leaf
  • air AirLayer type environmental conditions
  • leaves Leaves1D, and Leaves2D type leaf
  • ind Index of the leaves (1 for sunlit and 2 for shaded for Leaves1D, all sunlit for Leaves2D)
source
StomataModels.∂R∂EFunction
∂R∂E(lf::Union{Leaf{FT}, Leaves1D{FT}, Leaves2D{FT}}, air::AirLayer{FT}) where {FT<:AbstractFloat}

Returns the marginal increase in leaf respiration rate per transpiration rate, given

  • lf Leaf, Leaves1D, or Leaves2D type leaf
  • air AirLayer type environmental conditions
source
StomataModels.∂T∂EFunction
∂T∂E(lf::Union{Leaf{FT}, Leaves1D{FT}, Leaves2D{FT}}, air::AirLayer{FT}, f_view::FT) where {FT<:AbstractFloat}

Returns the marginal increase in leaf temperature per transpiration rate, given

  • lf Leaf, Leaves1D, or Leaves2D type leaf
  • air AirLayer type environmental conditions
  • f_view Ratio that leaf area is exposed to external sources/sinks (not other leaves, e.g., 2/LAI for canopy on average)
source
StomataModels.∂Θ∂EFunction

This function returns the marginal risk for stomatal opening. This function supports a variety of optimality models for

  • Leaf
  • Leaves1D (ind=1 for sunlit leaves, ind=2 for shaded leaves)
  • Leaves2D (ind=NA for shaded leaves, ind>1 for sunlit leaves)
source
StomataModels.∂Θ∂EMethod
∂Θ∂E(sm::AndereggSM{FT}, leaf::Leaf{FT}, air::AirLayer{FT}; δe::FT = FT(1e-7)) where {FT<:AbstractFloat}
∂Θ∂E(sm::EllerSM{FT}, leaf::Leaf{FT}, air::AirLayer{FT}; δe::FT = FT(1e-7)) where {FT<:AbstractFloat}
∂Θ∂E(sm::SperrySM{FT}, leaf::Leaf{FT}, air::AirLayer{FT}; δe::FT = FT(1e-7)) where {FT<:AbstractFloat}
∂Θ∂E(sm::WangSM{FT}, leaf::Leaf{FT}, air::AirLayer{FT}; δe::FT = FT(1e-7)) where {FT<:AbstractFloat}
∂Θ∂E(sm::Wang2SM{FT}, leaf::Leaf{FT}, air::AirLayer{FT}; δe::FT = FT(1e-7)) where {FT<:AbstractFloat}

Return the marginal risk for stomatal opening, given

  • sm AndereggSM, EllerSM, SperrySM, WangSM, or Wang2SM type optimality model
  • leaf Leaf type struct
  • air AirLayer for environmental conditions
  • δe Incremental flow rate to compute ∂E∂P
source
StomataModels.∂Θ∂EMethod
∂Θ∂E(sm::AndereggSM{FT}, leaves::Leaves1D{FT}, air::AirLayer{FT}, ind::Int; δe::FT = FT(1e-7)) where {FT<:AbstractFloat}
∂Θ∂E(sm::EllerSM{FT}, leaves::Leaves1D{FT}, air::AirLayer{FT}, ind::Int; δe::FT = FT(1e-7)) where {FT<:AbstractFloat}
∂Θ∂E(sm::SperrySM{FT}, leaf::Leaves1D{FT}, air::AirLayer{FT}, ind::Int; δe::FT = FT(1e-7)) where {FT<:AbstractFloat}
∂Θ∂E(sm::WangSM{FT}, leaves::Leaves1D{FT}, air::AirLayer{FT}, ind::Int; δe::FT = FT(1e-7)) where {FT<:AbstractFloat}
∂Θ∂E(sm::Wang2SM{FT}, leaves::Leaves1D{FT}, air::AirLayer{FT}, ind::Int; δe::FT = FT(1e-7)) where {FT<:AbstractFloat}

Return the marginal risk for stomatal opening, given

  • sm AndereggSM, EllerSM, SperrySM, WangSM, or Wang2SM type optimality model
  • leaves Leaves1D type struct
  • air AirLayer for environmental conditions
  • ind Leaf index (1 for sunlit and 2 for shaded)
  • δe Incremental flow rate to compute ∂E∂P
source
StomataModels.∂Θ∂EMethod
∂Θ∂E(sm::AndereggSM{FT}, leaves::Leaves2D{FT}, air::AirLayer{FT}; δe::FT = FT(1e-7)) where {FT<:AbstractFloat}
∂Θ∂E(sm::EllerSM{FT}, leaves::Leaves2D{FT}, air::AirLayer{FT}; δe::FT = FT(1e-7)) where {FT<:AbstractFloat}
∂Θ∂E(sm::SperrySM{FT}, leaves::Leaves2D{FT}, air::AirLayer{FT}; δe::FT = FT(1e-7)) where {FT<:AbstractFloat}
∂Θ∂E(sm::WangSM{FT}, leaves::Leaves2D{FT}, air::AirLayer{FT}; δe::FT = FT(1e-7)) where {FT<:AbstractFloat}
∂Θ∂E(sm::Wang2SM{FT}, leaves::Leaves2D{FT}, air::AirLayer{FT}; δe::FT = FT(1e-7)) where {FT<:AbstractFloat}

Return the marginal risk for stomatal opening, given

  • sm AndereggSM, EllerSM, SperrySM, WangSM, or Wang2SM type optimality model
  • leaves Leaves2D type struct
  • air AirLayer for environmental conditions
  • δe Incremental flow rate to compute ∂E∂P
source
StomataModels.∂Θ∂EMethod
∂Θ∂E(sm::AndereggSM{FT}, leaves::Leaves2D{FT}, air::AirLayer{FT}, ind::Int; δe::FT = FT(1e-7)) where {FT<:AbstractFloat}
∂Θ∂E(sm::EllerSM{FT}, leaves::Leaves2D{FT}, air::AirLayer{FT}, ind::Int; δe::FT = FT(1e-7)) where {FT<:AbstractFloat}
∂Θ∂E(sm::SperrySM{FT}, leaves::Leaves2D{FT}, air::AirLayer{FT}, ind::Int; δe::FT = FT(1e-7)) where {FT<:AbstractFloat}
∂Θ∂E(sm::WangSM{FT}, leaves::Leaves2D{FT}, air::AirLayer{FT}, ind::Int; δe::FT = FT(1e-7)) where {FT<:AbstractFloat}
∂Θ∂E(sm::Wang2SM{FT}, leaves::Leaves2D{FT}, air::AirLayer{FT}, ind::Int; δe::FT = FT(1e-7)) where {FT<:AbstractFloat}

Return the marginal risk for stomatal opening, given

  • sm AndereggSM, EllerSM, SperrySM, WangSM, or Wang2SM type optimality model
  • leaf Leaf type struct
  • air AirLayer for environmental conditions
  • δe Incremental flow rate to compute ∂E∂P
source
StomataModels.∂Θₙ∂EFunction

This function returns the ∂Θₙ∂E for nocturnal stomatal opening. Currently this function only supports WangSM which has been published for the purpose of computing nocturnal stomatal conductance. Supports to other optimality models will be added later when I am ready to test those.

source

Stomtal conductance limits

StomataModels.limit_stomatal_conductance!Function
limit_stomatal_conductance!(leaf::Leaf{FT}) where {FT<:AbstractFloat}
limit_stomatal_conductance!(leaves::Leaves1D{FT}) where {FT<:AbstractFloat}
limit_stomatal_conductance!(leaves::Leaves2D{FT}) where {FT<:AbstractFloat}

Limit stomatal conductance for H₂O for

  • leaf Leaf type struct
  • leaves Leaves1D type struct
source

Prognostic conductance

StomataModels.∂g∂tFunction

This function returns the stomatal conductance change slope. Supported functionalities are

  • Leaf
  • Leaves1D (ind=1 for sunlit, ind=2 for shaded leaves)
  • Leaves2D (ind=NA for shaded, ind>1 for sunlit leaves)
source
StomataModels.∂g∂tMethod
∂g∂t(leaf::Leaf{FT}, air::AirLayer{FT}; β::FT = FT(1), δe::FT = FT(1e-7)) where {FT<:AbstractFloat}

Return the marginal increase of stomatal conductance, given

  • leaf Leaf type struct
  • air AirLayer type environmental conditions
  • β Tuning factor (only used for empirical models)
  • δe Incremental flow rate to compute ∂E∂P (only used for optimality models)
source
StomataModels.∂g∂tMethod
∂g∂t(leaves::Leaves1D{FT}, air::AirLayer{FT}, ind::Int; β::FT = FT(1), δe::FT = FT(1e-7)) where {FT<:AbstractFloat}

Return the marginal increase of stomatal conductance, given

  • leaves Leaves1D type struct
  • air AirLayer type environmental conditions
  • ind Leaf index (1 for sunlit and 2 for shaded)
  • β Tuning factor (only used for empirical models)
  • δe Incremental flow rate to compute ∂E∂P (only used for optimality models)
source
StomataModels.∂g∂tMethod
∂g∂t(leaves::Leaves2D{FT}, air::AirLayer{FT}; β::FT = FT(1), δe::FT = FT(1e-7)) where {FT<:AbstractFloat}

Return the marginal increase of stomatal conductance, given

  • leaves Leaves2D type struct
  • air AirLayer type environmental conditions
  • β Tuning factor (only used for empirical models)
  • δe Incremental flow rate to compute ∂E∂P (only used for optimality models)
source
StomataModels.∂g∂tMethod
∂g∂t(leaves::Leaves2D{FT}, air::AirLayer{FT}, ind::Int; β::FT = FT(1), δe::FT = FT(1e-7)) where {FT<:AbstractFloat}

Return the marginal increase of stomatal conductance, given

  • leaves Leaves2D type struct
  • air AirLayer type environmental conditions
  • ind Sunlit leaf index within the leaf angular distribution
  • β Tuning factor (only used for empirical models)
  • δe Incremental flow rate to compute ∂E∂P (only used for optimality models)
source
StomataModels.∂gₙ∂tFunction
∂gₙ∂t(lf::Union{Leaf{FT}, Leaves1D{FT}, Leaves2D{FT}}, air::AirLayer{FT}) where {FT<:AbstractFloat}

Return the marginal increase of stomatal conductance, given

  • lf Leaf, Leaves1D, or Leaves2D type struct
  • air AirLayer type environmental conditions
source
StomataModels.stomatal_conductance!Function

This function updates stomatal conductance for H₂O and CO₂. Supported functionalities are

  • Update conductance for H₂O prognostically
  • Update conductance for CO₂ based on that for H₂O
source
StomataModels.stomatal_conductance!Method
stomatal_conductance!(spac::MonoElementSPAC{FT}; β::FT = FT(1)) where {FT<:AbstractFloat}
stomatal_conductance!(spac::Union{MonoMLGrassSPAC{FT}, MonoMLPalmSPAC{FT}, MonoMLTreeSPAC{FT}}; β::FT = FT(1)) where {FT<:AbstractFloat}

Update marginal stomatal conductance, given

  • spac MonoElementSPAC, MonoMLGrassSPAC, MonoMLPalmSPAC, or MonoMLTreeSPAC type struct
  • β Tuning factor
source
StomataModels.stomatal_conductance!Method
stomatal_conductance!(spac::MonoElementSPAC{FT}, Δt::FT) where {FT<:AbstractFloat}
stomatal_conductance!(spac::Union{MonoMLGrassSPAC{FT}, MonoMLPalmSPAC{FT}, MonoMLTreeSPAC{FT}}, Δt::FT) where {FT<:AbstractFloat}

Update marginal stomatal conductance, given

  • spac MonoElementSPAC, MonoMLGrassSPAC, MonoMLPalmSPAC, or MonoMLTreeSPAC type struct
  • Δt Time step length [s]
source