API
Vulnerability curve
SoilHydraulics.relative_hydraulic_conductance — Functionrelative_hydraulic_conductance(vc::ComplexVC{FT}, p_25::FT) where {FT<:AbstractFloat}
relative_hydraulic_conductance(vc::LogisticVC{FT}, p_25::FT) where {FT<:AbstractFloat}Return the hydraulic conductance ralative to maximum at reference temperature, given
vcComplexVC,LogisticVC,PowerVC, orWeibullVCtype vulnerability curvep_25Equivalent xylem water pressure at 298.15 K in[MPa](surface tension correction made)
PlantHydraulics.critical_pressure — Functioncritical_pressure(vc::ComplexVC{FT}, kr::FT = FT(0.001)) where {FT<:AbstractFloat}
critical_pressure(vc::LogisticVC{FT}, kr::FT = FT(0.001)) where {FT<:AbstractFloat}
critical_pressure(vc::PowerVC{FT}, kr::FT = FT(0.001)) where {FT<:AbstractFloat}
critical_pressure(vc::WeibullVC{FT}, kr::FT = FT(0.001)) where {FT<:AbstractFloat}Return the critical xylem water pressure at 25 °C that triggers a given amount of loss of conductance, given
vcComplexVC,LogisticVC,PowerVC, orWeibullVCtype structkrReference conductance, default is 0.001
Pressure volume curve
PlantHydraulics.xylem_pressure — Functionxylem_pressure(pv::LinearPVCurve{FT}, rvol::FT, T::FT) where {FT<:AbstractFloat}
xylem_pressure(pv::SegmentedPVCurve{FT}, rvol::FT, T::FT) where {FT<:AbstractFloat}Return the xylem water pressure in MPa, given
pvLinearPVCurveorSegmentedPVCurvetype pressure volume curvervolRelative volume (relative to maximum)TTemperature
PlantHydraulics.capacitance_buffer — Functioncapacitance_buffer(pvc::LinearPVCurve{FT}) where {FT<:AbstractFloat}
capacitance_buffer(pvc::SegmentedPVCurve{FT}) where {FT<:AbstractFloat}Return the relative capacictance buffer rate, given
pvLinearPVCurveorSegmentedPVCurvetype pressure volume curve
Cavitation legacy
PlantHydraulics.clear_legacy! — Functionclear_legacy!(spac::MonoElementSPAC{FT}) where {FT<:AbstractFloat}
clear_legacy!(spac::MonoMLGrassSPAC{FT}) where {FT<:AbstractFloat}
clear_legacy!(spac::MonoMLPalmSPAC{FT}) where {FT<:AbstractFloat}
clear_legacy!(spac::MonoMLTreeSPAC{FT}) where {FT<:AbstractFloat}
clear_legacy!(organ::Union{Leaf{FT}, Leaves2D{FT}, Root{FT}, Stem{FT}}) where {FT<:AbstractFloat}
clear_legacy!(organ::Leaves1D{FT}) where {FT<:AbstractFloat}Clear the legacy for hydraulic organ or system, given
spacMonoElementSPAC,MonoMLGrassSPAC,MonoMLPalmSPAC, orMonoMLTreeSPACtype structureorganLeaf,Leaves1D,Leaves2D,Root, orStemtype structure
FLow profile
PlantHydraulics.flow_in — Functionflow_in(organ::Union{Leaf{FT}, Leaves2D{FT}, Root{FT}, Stem{FT}}) where {FT<:AbstractFloat}
flow_in(organ::Leaves1D{FT}) where {FT<:AbstractFloat}
flow_in(organs::Vector{Leaves2D{FT}}) where {FT<:AbstractFloat}
flow_in(organs::Vector{Stem{FT}}) where {FT<:AbstractFloat}Return the flow rate, given
organLeaf,Leaves1D,Leaves2D,Root, orStemtype structorgansVector ofLeaves2DorStemtype struct
PlantHydraulics.flow_out — Functionflow_out(lf::Union{Leaf{FT}, Leaves2D{FT}}) where {FT<:AbstractFloat}Return the net flow that escape from the leaf, given
lfLeaf,Leaves2D,Root, orStemtype organ
PlantHydraulics.root_pk — Functionroot_pk(root::Root{FT}) where {FT<:AbstractFloat}Return the root end pressure and total hydraulic conductance to find solution of flow rates in all roots, given
rootRoottype struct
PlantHydraulics.xylem_flow_profile! — FunctionThis function is designed to serve the following functionalities:
- Update flow profile in different organs
- Partition root flow rates at different layers
- Update flow profile for entire SPAC
PlantHydraulics.xylem_flow_profile! — Methodxylem_flow_profile!(organ::Union{Leaf{FT}, Leaves2D{FT}, Root{FT}, Stem{FT}}, Δt::FT) where {FT<:AbstractFloat}
xylem_flow_profile!(organ::Leaves1D{FT}, Δt::FT) where {FT<:AbstractFloat}Update organ flow rate profile after setting up the flow rate out, given
organLeaf,Leaves1D,Leaves2D,Root, orStemtype structΔtTime step length
PlantHydraulics.xylem_flow_profile! — Methodxylem_flow_profile!(roots::Vector{Root{FT}}, cache_f::Vector{FT}, cache_k::Vector{FT}, cache_p::Vector{FT}, f_sum::FT, Δt::FT) where {FT<:AbstractFloat}Partition root flow rates at different layers for known total flow rate out, given
rootsVector ofRootin a multiple roots systemcache_fFlow rate cache into each rootcache_kTotal conductance cache of each rootcache_pRoot xylem end pressure cache of each rootf_sumTotal flow rate out of the rootsΔtTime step length
PlantHydraulics.xylem_flow_profile! — Methodxylem_flow_profile!(spac::MonoElementSPAC{FT}, Δt::FT) where {FT<:AbstractFloat}
xylem_flow_profile!(spac::MonoMLGrassSPAC{FT}, Δt::FT) where {FT<:AbstractFloat}
xylem_flow_profile!(spac::MonoMLPalmSPAC{FT}, Δt::FT) where {FT<:AbstractFloat}
xylem_flow_profile!(spac::MonoMLTreeSPAC{FT}, Δt::FT) where {FT<:AbstractFloat}Update flow profiles for the soil-plant-air continuum (set up leaf flow rate from stomatal conductance first), given
spacMonoElementSPAC,MonoMLGrassSPAC,MonoMLPalmSPAC, orMonoMLTreeSPACtype SPAC systemΔtTime step length
Pressure profile
PlantHydraulics.xylem_end_pressure — Functionxylem_end_pressure(organ::Union{Leaf{FT}, Root{FT}, Stem{FT}}, flow::FT) where {FT<:AbstractFloat}
xylem_end_pressure(spac::MonoElementSPAC{FT}, flow::FT) where {FT<:AbstractFloat}Return the xylem end water pressure in MPa, given
organLeaf,Root, orStemtype structflowFlow rate (per leaf area for Leaf)[mol (m⁻²) s⁻¹]spacMonoElementSPACtype struct
PlantHydraulics.xylem_pressure_profile! — FunctionThis function is designed for the following purposes:
- Update organ pressure profile
- Update pressure profile for the entire SPAC
PlantHydraulics.xylem_pressure_profile! — Methodxylem_pressure_profile!(organ::Union{Leaf{FT}, Leaves2D{FT}, Root{FT}, Stem{FT}}; update::Bool = true) where {FT<:AbstractFloat}
xylem_pressure_profile!(organ::Leaves1D{FT}; update::Bool = true) where {FT<:AbstractFloat}Update xylem pressure profile (flow profile needs to be updated a priori), given
organLeaf,Leaves1D,Leaves2D,Root, orStemtype organupdateIf true, update xylem cavitation legacy and leaf critical flow (e_crit)
PlantHydraulics.xylem_pressure_profile! — Methodxylem_pressure_profile!(spac::MonoElementSPAC{FT}; update::Bool = true) where {FT<:AbstractFloat}
xylem_pressure_profile!(spac::MonoMLGrassSPAC{FT}; update::Bool = true) where {FT<:AbstractFloat}
xylem_pressure_profile!(spac::MonoMLPalmSPAC{FT}; update::Bool = true) where {FT<:AbstractFloat}
xylem_pressure_profile!(spac::MonoMLTreeSPAC{FT}; update::Bool = true) where {FT<:AbstractFloat}Update xylem pressure profile (flow profile needs to be updated a priori), given
spacMonoElementSPAC,MonoMLGrassSPAC,MonoMLPalmSPAC, orMonoMLTreeSPACtype spacupdateIf true, update xylem cavitation legacy
PlantHydraulics.∂E∂P — Function∂E∂P(lf::Union{Leaf{FT}, Leaves2D{FT}}, flow::FT; δe::FT = FT(1e-7)) where {FT<:AbstractFloat}
∂E∂P(lf::Leaves1D{FT}, flow::FT, ind::Int; δe::FT = FT(1e-7)) where {FT<:AbstractFloat}Return the marginal hydraulic conductance, given
lfLeaf,Leaves1D, orLeaves2Dtype structflowFlow rate through the leaf xylem[mol m⁻² s⁻¹]δeIncremental flow rate, default is 1e-7indWhich leaf inLeaves1D(1 for sunlit and 2 for shaded)
Critical flow
PlantHydraulics.critical_flow — FunctionThis function returns the critical flow rate that triggers a given amount of loss of hydraulic conductance for
- Leaf hydraulic system
- Mono element SPAC system
PlantHydraulics.critical_flow — Methodcritical_flow(hs::LeafHydraulics{FT}, T::FT, ini::FT = FT(0.5); kr::FT = FT(0.001)) where {FT<:AbstractFloat}Return the critical flow rate that triggers a given amount of loss of conductance, given
hsLeafHydraulicstype structTLiquid temperatureiniInitial guesskrReference conductance, default is 0.001
PlantHydraulics.critical_flow — Methodcritical_flow(spac::MonoElementSPAC{FT}, ini::FT = FT(0.5); kr::FT = FT(0.001)) where {FT<:AbstractFloat}Return the critical flow rate that triggers a given amount of loss of conductance, given
spacMonoElementSPACtype structiniInitial guesskrReference conductance, default is 0.001
Tuning factor
PlantHydraulics.β_factor — Functionβ_factor(f::Function, vc::AbstractXylemVC{FT}, x_25::FT) where {FT<:AbstractFloat}
β_factor(f::Function, vc::AbstractSoilVC{FT}, x_25::FT) where {FT<:AbstractFloat}
β_factor(f::Function, x_25::FT) where {FT<:AbstractFloat}Return the β factor based on relative conductance or soil potential/pressure, given
fFunction to translate relative k to β, for example f(x) = x, f(x) = x², and f(x) = sqrt(x) for x in [0,1]vcLeaf vulnerability curve or soil vulnerability curve (moisture retention curve)x_25Leaf xylem pressure corrected to 25 °C, soil water potential corrected to 25 °C (forcing on roots, note that this function may not be useful for plants with salt stress), or soil water content
PlantHydraulics.β_factor! — FunctionThis function updates the beta factor for SPAC if empirical models are used. The method is meant to support all SPAC defined in ClimaCache.jl:
MonoElementSPACMonoMLGrassSPACMonoMLPalmSPACMonoMLTreeSPAC
PlantHydraulics.β_factor! — Methodβ_factor!(spac::MonoElementSPAC{FT}) where {FT<:AbstractFloat}Update the beta factor for the LEAF component in SPAC, given
spacMonoElementSPACtype SPAC
PlantHydraulics.β_factor! — Methodβ_factor!(spac::Union{MonoMLGrassSPAC{FT}, MonoMLPalmSPAC{FT}, MonoMLTreeSPAC{FT}}) where {FT<:AbstractFloat}Update the β factor for the LEAVES component in SPAC, given
spacMonoMLGrassSPAC,MonoMLPalmSPAC, orMonoMLTreeSPACtype SPAC
Note that if the β function is based on Kleaf or Pleaf, β factor is taken as that of leaf; if the β function is based on Ksoil, Psoil, or Θ, β is taken as the average weighted by flow rate in each root.
Energy budget
PlantHydraulics.plant_energy! — FunctionThis function has two major functionalities:
- Compute marginal energy increase in each organ
- Update the temperature in each organ when time step provided
PlantHydraulics.plant_energy! — Methodplant_energy!(spac::MonoMLGrassSPAC{FT}) where {FT<:AbstractFloat}
plant_energy!(spac::MonoMLPalmSPAC{FT}) where {FT<:AbstractFloat}
plant_energy!(spac::MonoMLTreeSPAC{FT}) where {FT<:AbstractFloat}Compute the marginal energy increase in spac, given
spacMonoMLGrassSPAC,MonoMLPalmSPAC, orMonoMLTreeSPACtype SPAC
PlantHydraulics.plant_energy! — Methodplant_energy!(spac::MonoMLGrassSPAC{FT}, δt::FT) where {FT<:AbstractFloat}
plant_energy!(spac::MonoMLPalmSPAC{FT}, δt::FT) where {FT<:AbstractFloat}
plant_energy!(spac::MonoMLTreeSPAC{FT}, δt::FT) where {FT<:AbstractFloat}Compute the marginal energy increase in spac, given
spacMonoMLGrassSPAC,MonoMLPalmSPAC, orMonoMLTreeSPACtype SPACδtTime step