SoilPlantAirContinuum

Core function

SoilPlantAirContinuum.initialize!Function
initialize!(spac::Union{MonoMLGrassSPAC{FT}, MonoMLPalmSPAC{FT}, MonoMLTreeSPAC{FT}}) where {FT<:AbstractFloat}

Initialize the SPAC, given

  • spac MonoMLGrassSPAC, MonoMLPalmSPAC, or MonoMLTreeSPAC SPAC
source
SoilPlantAirContinuum.soil_plant_air_continuum!Function

This function runs the model using the following steps:

  • Run canopy RT model
  • Run hydraulic model
  • Run photosynthesis model
  • Run canopy fluorescence model
  • Run soil water and energy budget (calculate ∂Θ∂t and ∂e∂t only)
  • Run leaf stomatal conductances (calculate ∂g∂t only)
  • Run leaf energy budget (calculate ∂T∂t only)
  • Run time stepper (using ∂X∂t * δt, and make sure δt is not too high)

This function is supposed to have the highest hierarchy, and should support all SPAC types defined in ClimaCache.jl. Note to update the water flow profile when initializing the SPAC.

source
SoilPlantAirContinuum.soil_plant_air_continuum!Method
soil_plant_air_continuum!(spac::Union{MonoMLGrassSPAC, MonoMLPalmSPAC, MonoMLTreeSPAC{FT}}, δt::FT; update::Bool = false, θ_on::Bool = true) where {FT<:AbstractFloat}
soil_plant_air_continuum!(spac::Union{MonoMLGrassSPAC, MonoMLPalmSPAC, MonoMLTreeSPAC{FT}}; update::Bool = false) where {FT<:AbstractFloat}

Run SPAC model and move forward in time with time stepper controller, given

  • spac MonoMLGrassSPAC, MonoMLPalmSPAC, or MonoMLTreeSPAC SPAC
  • δt Time step (if not given, solve for steady state solution)
  • update If true, update leaf xylem legacy effect
  • θ_on If true, soil water budget is on (set false to run sensitivity analysis)
source
SoilPlantAirContinuum.adjusted_timeFunction
adjusted_time(spac::Union{MonoMLGrassSPAC{FT}, MonoMLPalmSPAC{FT}, MonoMLTreeSPAC{FT}}, δt::FT; θ_on::Bool = true) where {FT<:AbstractFloat}

Return adjusted time that soil does not over saturate or drain, given

  • spac MonoMLGrassSPAC, MonoMLPalmSPAC, or MonoMLTreeSPAC SPAC
  • δt Time step
  • θ_on If true, soil water budget is on (set false to run sensitivity analysis)
source
SoilPlantAirContinuum.time_stepper!Function
time_stepper!(spac::Union{MonoMLGrassSPAC{FT}, MonoMLPalmSPAC{FT}, MonoMLTreeSPAC{FT}}, δt::FT; update::Bool = false, θ_on::Bool = true) where {FT<:AbstractFloat}
time_stepper!(spac::Union{MonoMLGrassSPAC{FT}, MonoMLPalmSPAC{FT}, MonoMLTreeSPAC{FT}}; update::Bool = false) where {FT<:AbstractFloat}

Move forward in time for SPAC with time stepper controller, given

  • spac MonoMLGrassSPAC, MonoMLPalmSPAC, or MonoMLTreeSPAC SPAC
  • δt Time step (if not given, solve for steady state solution)
  • update If true, update leaf xylem legacy effect
  • θ_on If true, soil water budget is on (set false to run sensitivity analysis)
source

Update SPAC

SoilPlantAirContinuum.update!Function

This function updates the environmental conditions and the soil-plant-air-continuum. Supported functionalities are for

  • AirLayer
  • SoilPlantAirContinuum
source
SoilPlantAirContinuum.update!Method
update!(air::AirLayer{FT};
        p_CO₂::Union{Number,Nothing} = nothing,
        p_H₂O::Union{Number,Nothing} = nothing,
        rh::Union{Number,Nothing} = nothing,
        t::Union{Number,Nothing} = nothing,
        vpd::Union{Number,Nothing} = nothing,
        wind::Union{Number,Nothing} = nothing
) where {FT<:AbstractFloat}

Update the environmental conditions (such as saturated vapor pressure and relative humidity) of the air surrounding the leaf, given

  • air AirLayer type structure
  • p_CO₂ CO₂ partial pressure in Pa. Optional, default is nothing
  • p_H₂O Vapor pressure in Pa. Optional, default is nothing
  • rh Relatibe humidity (fraction). Optional, default is nothing
  • t Air temperature in K. Optional, default is nothing
  • vpd Vapor pressure deficit Pa. Optional, default is nothing
  • wind Wind speed in m s⁻¹. Optional, default is nothing
source