SoilPlantAirContinuum
Types
SoilPlantAirContinuum.SPACContainer1L
— Typemutable struct SPACContainer1L{FT}
Struct that contains 1-layer gas exchange information.
Fields
ag::AbstractFloat
Mean gross photosynthetic rate
[μmol m⁻² s⁻¹]
an::AbstractFloat
Mean net photosynthetic rate
[μmol m⁻² s⁻¹]
c::AbstractFloat
Leaf internal CO₂ partial pressure
[Pa]
e::AbstractFloat
Flow rate per basal area
[mol s⁻¹ m⁻²]
gh::AbstractFloat
Leaf diffusive conductance to H₂O
[mol m⁻² s⁻¹]
p::AbstractFloat
Xylem end pressure
[MPa]
t::AbstractFloat
Leaf temperature
[K]
SoilPlantAirContinuum.SPACContainer2L
— Typemutable struct SPACContainer2L{FT}
Struct that contains 2-layer gas exchange information.
Fields
cont_sh::SoilPlantAirContinuum.SPACContainer1L
cont_sl::SoilPlantAirContinuum.SPACContainer1L
frac_sh::AbstractFloat
Shaded layer fraction
frac_sl::AbstractFloat
Sunlit layer fraction
la_sh::AbstractFloat
Shaded layer leaf area
[m²]
la_sl::AbstractFloat
Sunlit layer leaf area
[m²]
lai_sh::AbstractFloat
Shaded layer LAI
lai_sl::AbstractFloat
Sunlit layer LAI
par_sh::AbstractFloat
Shaded layer PAR
[μmol m⁻² s⁻¹]
par_sl::AbstractFloat
Sunlit layer PAR
[μmol m⁻² s⁻¹]
rad_sh::AbstractFloat
Shaded layer absorbed energy
[W m⁻²]
rad_sl::AbstractFloat
Sunlit layer absorbed energy
[W m⁻²]
SoilPlantAirContinuum.SPACMono
— Typemutable struct SPACMono{FT}
Struct that mono species SoilPlantAirContinuum system.
Fields
soil_bounds::Vector{FT} where FT<:AbstractFloat
Soil layers bounds
[m]
air_bounds::Vector{FT} where FT<:AbstractFloat
Air layers bounds
[m]
z_root::AbstractFloat
Root depth
[m]
z_canopy::AbstractFloat
Canopy maximal height
[m]
plant_hs::PlantHydraulics.AbstractPlantOrganism
Plant hydraulic system
n_canopy::Int64
Number of canopy layers
n_root::Int64
Number of root layers
plant_ps::Array{StomataModels.CanopyLayer{FT}, 1} where FT<:AbstractFloat
Plant photosynthesis systems
ba::AbstractFloat
Basal area
[m²]
ga::AbstractFloat
Ground area
[m²]
la::AbstractFloat
Leaf area
[m²]
envirs::Array{ClimaCache.AirLayer{FT}, 1} where FT<:AbstractFloat
Air layers
wind_z0::AbstractFloat
Aerodynamic roughness
[m]
wind_d::AbstractFloat
Zero plane displacement
[m]
wind_zs::Vector{FT} where FT<:AbstractFloat
Mean layer height
[m]
winds::Vector{FT} where FT<:AbstractFloat
Wind speed per layer
[m s⁻¹]
mswc::Vector{FT} where FT<:AbstractFloat
Maximal soil water content
swc::Vector{FT} where FT<:AbstractFloat
Current soil water content
p_soil::Vector{FT} where FT<:AbstractFloat
Array of soil matric potential
[MPa]
h_soil::AbstractFloat
Maximal soil depth
[m]
latitude::AbstractFloat
Latitude
[°]
longitude::AbstractFloat
Longitude
[°]
elevation::AbstractFloat
Elevation
[m]
stomata_model::StomataModels.AbstractStomatalModel
Stomatal behavior scheme
angles::CanopyLayers.SolarAngles{FT} where FT<:AbstractFloat
Solar angle container
canopy_rt::CanopyLayers.Canopy4RT
Canopy4RT container
wl_set::CanopyLayers.WaveLengths{FT} where FT<:AbstractFloat
Wave length container
rt_dim::CanopyLayers.RTDimensions
RT dimensions
can_rad::CanopyLayers.CanopyRads{FT} where FT<:AbstractFloat
CanopyRads container
can_opt::CanopyLayers.CanopyOpticals{FT} where FT<:AbstractFloat
CanopyOpticals container
leaves_rt::Array{CanopyLayers.LeafBios{FT}, 1} where FT<:AbstractFloat
Array of LeafBios container
soil_opt::CanopyLayers.SoilOpticals{FT} where FT<:AbstractFloat
SoilOpticals container
in_rad::CanopyLayers.IncomingRadiation{FT} where FT<:AbstractFloat
Incoming radiation container
rt_con::CanopyLayers.RTCache{FT} where FT<:AbstractFloat
RT container
f_SL::Vector{FT} where FT<:AbstractFloat
Container for sunlit leaf area fraction in each layer
f_gpp::AbstractFloat
Canopy GPP per ground area
f_npp::AbstractFloat
Canopy GPP per ground area
f_H₂O::AbstractFloat
Canopy water flux per ground area
SoilPlantAirContinuum.SPACSimple
— Typemutable struct SPACSimple{FT}
Struct that simplest mono species SoilPlantAirContinuum system, with 1 root, stem, and leaf.
Fields
hs::PlantHydraulics.TreeSimple{FT} where FT<:AbstractFloat
Hydraulic systems
ec::AbstractFloat
Critical flow rate
ps::ClimaCache.Leaf
Photosynthesis system
vtoj::AbstractFloat
Ratio between Vcmax25 and Jmax25
envir::ClimaCache.AirLayer
Environmental conditions
container1L::SoilPlantAirContinuum.SPACContainer1L
Container for gas exchange for a layer
container2L::SoilPlantAirContinuum.SPACContainer2L
Container for gas exchange of sunlit and shaded layers
containerKS::Vector{FT} where FT<:AbstractFloat
Container for default hydraulic conductance
containerOP::AbstractFloat
Container for optimizer
opt_f_sl::AbstractFloat
Container for optimal sunlit layer flow rate
opt_f_sh::AbstractFloat
Container for optimal shaded layer flow rate
opt_laba::AbstractFloat
Container for optimal leaf area per basal area
opt_vmax::AbstractFloat
Container for optimal Vcmax25
lai::AbstractFloat
Leaf area index
laba::AbstractFloat
Leaf area per basal area
g_max::AbstractFloat
Maximal stomatal conductance limit at 25 °C
gaba::AbstractFloat
Ground area per basal area
width::AbstractFloat
Leaf width
mswc::AbstractFloat
Maximal soil water content
swc::AbstractFloat
Current soil water content
p_soil::AbstractFloat
Soil matrical water potential
h_soil::AbstractFloat
Soil depth, 2X mean root depth
c_cons::AbstractFloat
Leaf construction cost per leaf area
c_vmax::AbstractFloat
Leaf nutrient cost per Vcmax25 per leaf area
latitude::AbstractFloat
Latitude
[°]
longitude::AbstractFloat
Longitude
[°]
elevation::AbstractFloat
Elevation
[m]
Soil
SoilPlantAirContinuum.soil_moisture_swc!
— Functionsoil_moisture_swc!(node::SPACSimple{FT}, swc::FT) where {FT<:AbstractFloat}
Update soil moisture and soil matrix potential, given
node
SPACSimple
type structswc
Given soil water content
SoilPlantAirContinuum.soil_moisture_p!
— Functionsoil_moisture_p!(node::SPACSimple{FT}, p::FT) where {FT<:AbstractFloat}
Update soil moisture and soil matrix potential, given
node
SPACSimple
type structp
Given soil maxtrix potential
SoilPlantAirContinuum.soil_moisture_p25!
— Functionsoil_moisture_p25!(
node::SPACSimple{FT},
p_25::FT
) where {FT<:AbstractFloat}
Update soil moisture and soil matrix potential, given
node
SPACSimple
type structp_25
Given soil maxtrix potential at 25 Celcius
SoilPlantAirContinuum.soil_moisture!
— Functionsoil_moisture!(
node::SPACSimple{FT},
flow::FT,
Δt::FT = FT(1)
) where {FT<:AbstractFloat}
Update soil moisture and soil matrix potential, given
node
SPACSimple
type structflow
Mean outlet flow rate in[Kg h⁻¹]
Δt
Time period in[h]
Planet
SoilPlantAirContinuum.atmospheric_pressure_ratio
— Functionatmospheric_pressure(h::FT)
Calculate the atmospheric pressure, given
h
elevation in[m]
SoilPlantAirContinuum.atmospheric_pressure
— Functionatmospheric_pressure(h::FT)
Calculate the atmospheric pressure, given
h
elevation in[m]
SoilPlantAirContinuum.ppm_to_Pa
— Functionppm_to_Pa(h::FT)
Convert ppm to Pa, given
h
elevation in[m]
SoilPlantAirContinuum.zenith_angle
— Functionzenith_angle(
latd::FT,
decd::FT,
lhad::FT
) where {FT<:AbstractFloat}
zenith_angle(
latd::FT,
day::FT,
hour::FT,
minute::FT
) where {FT<:AbstractFloat}
Calculate the zenith angle, given
latd
Latitude in degreedecd
Declination of the Sun in degreelhad
Local hour angle in degreeday
Day of yearhour
Hour of dayminute
Minute of hour
Big-leaf model
SoilPlantAirContinuum.gain_risk_map
— Functiongain_risk_map(
node::SPACSimple{FT}
) where {FT<:AbstractFloat}
Return the matrix of optimizers at different sunlit and shaded layer flow rates, given
node
[SPACSimple
] type struct
SoilPlantAirContinuum.leaf_gas_exchange_nonopt!
— Functionleaf_gas_exchange_nonopt!(
node::SPACSimple{FT},
flow::FT,
par::FT,
rad::FT,
la::FT,
container::SPACContainer1L{FT}
) where {FT<:AbstractFloat}
leaf_gas_exchange_nonopt!(
node::SPACSimple{FT},
flow::FT
) where {FT<:AbstractFloat}
leaf_gas_exchange_nonopt!(
node::SPACSimple{FT},
f_sl::FT,
f_sh::FT
) where {FT<:AbstractFloat}
Simulate leaf level gas exchange and fill it into the container
for 1-layer or 2-layer canopy, given
node
[SPACSimple
] type structflow
Flow rate per basal area into the leaves (e.g., for sunlit leaves)f_sl
Flow rate per basal area into the sunlit leavesf_sh
Flow rate per basal area into the shaded leavespar
Leaf-level photosynthetic active radiationrad
Leaf-level absorbed radiative energyla
Leaf area of the leaves (total or each layer)container
[SPACContainer1L
] type container
SoilPlantAirContinuum.leaf_gas_exchange!
— Functionleaf_gas_exchange!(
node::SPACSimple{FT},
flow::FT,
par::FT,
rad::FT,
la::FT,
container::SPACContainer1L{FT}
) where {FT<:AbstractFloat}
leaf_gas_exchange!(
node::SPACSimple{FT},
flow::FT
) where {FT<:AbstractFloat}
leaf_gas_exchange!(
node::SPACSimple{FT},
f_sl::FT,
f_sh::FT
) where {FT<:AbstractFloat}
Simulate leaf level gas exchange and fill it into the container
for 1-layer or 2-layer canopy, given
node
[SPACSimple
] type structflow
Flow rate per basal area into the leaves (e.g., for sunlit leaves)f_sl
Flow rate per basal area into the sunlit leavesf_sh
Flow rate per basal area into the shaded leavespar
Leaf-level photosynthetic active radiationrad
Leaf-level absorbed radiative energyla
Leaf area of the leaves (total or each layer)container
[SPACContainer1L
] type container
SoilPlantAirContinuum.optimize_flows!
— Functionoptimize_flows!(
node::SPACSimple{FT}
) where {FT<:AbstractFloat}
Optimize the flow rates in sunlit and shaded layers, given
node
[SPACSimple
] type struct
SoilPlantAirContinuum.big_leaf_partition!
— Functionbig_leaf_partition!(
node::SPACSimple{FT},
zenith::FT,
r_all::FT
) where {FT <:AbstractFloat}
Partition the big-leaf canopy into sunlit and shaded layers, given
partition
Container for partitionzenith
Zenith angle in degreer_all
Total radiation in[W m⁻²]
SoilPlantAirContinuum.radiative_conductance
— Functionradiative_conductance(T::FT) where {FT<:AbstractFloat}
Return the radiative conductance of leaf, given
T
leaf temperature
SoilPlantAirContinuum.black_body_emittance
— Functionblack_body_emittance(T::FT) where {FT<:AbstractFloat}
Return the energy been radiated out, given
T
leaf temperature
SoilPlantAirContinuum.boundary_layer_conductance
— Functionboundary_layer_conductance(wind::FT, width::FT) where {FT<:AbstractFloat}
Return the boundary layer conductance, given
wind
Wind speedwidth
Leaf width
SoilPlantAirContinuum.leaf_temperature
— Functionleaf_temperature(
node::SPACSimple{FT},
rad::FT,
e_rad::FT,
epla::FT
) where {FT<:AbstractFloat}
leaf_temperature(
node::SPACSimple{FT},
rad::FT,
flow::FT
) where {FT<:AbstractFloat}
Return leaf temperature, given
node
SPACSimple
type structrad
Absorbed solar radiation per leaf areae_rad
Emitted absorbed radiation per leaf areaepla
Flow rate per leaf areaflow
Total flow rate per basal area
SoilPlantAirContinuum.leaf_temperature_sunlit
— Functionleaf_temperature_sunlit(
node::SPACSimple{FT},
rad::FT,
f_sl::FT
) where {FT<:AbstractFloat}
Return leaf temperature, given
node
SPACSimple
type structrad
Absorbed solar radiation per leaf areaf_sl
Total flow rate per basal area into sunlit leaves
SoilPlantAirContinuum.leaf_temperature_shaded
— Functionleaf_temperature_shaded(
node::SPACSimple{FT},
rad::FT,
f_sh::FT
) where {FT<:AbstractFloat}
Return leaf temperature, given
node
SPACSimple
type structrad
Absorbed solar radiation per leaf areaf_sh
Total flow rate per basal area into shaded leaves
SoilPlantAirContinuum.annual_profit
— Functionannual_profit(
node::SPACSimple{FT},
weather::Array{FT,2},
Δt::FT = FT(1)
) where {FT<:AbstractFloat}
Calculate the profit in the growing season so as to optimize leaf investment, given
node
[SPACSimple
] type structweather
Weather profile in a growing seasonΔt
Time period in[h]
SoilPlantAirContinuum.annual_simulation!
— Functionannual_simulation!(
node::SPACSimple{FT},
weather::DataFrame,
output::DataFrame,
Δt::FT = FT(1)
) where {FT<:AbstractFloat}
Run annual simulation for a growing season, given
node
[SPACSimple
] type structweather
Weather profile in a growing seasonoutput
The predefined output resultΔt
Time period in[h]
SoilPlantAirContinuum.create_dataframe
— Functionfunction create_dataframe(FT, weather::DataFrame)
Create a data frame to store simulation output, given
FT
Floating number typeweather
Weather profile in a growing season
SoilPlantAirContinuum.initialize_spac_canopy!
— Functioninitialize_spac_canopy!(node::SPACMono{FT}) where {FT<:AbstractFloat}
Initialize the RT parameters for a given
node
SPACMono
type struct
Optimal investment
SoilPlantAirContinuum.leaf_allocation!
— Functionleaf_allocation!(
node::SPACSimple{FT},
laba::FT
) where {FT<:AbstractFloat}
leaf_allocation!(
node::SPACSimple{FT},
isvmax::Bool,
vmax::FT,
v2r::FT = FT(0.015)
) where {FT<:AbstractFloat}
leaf_allocation!(
node::SPACSimple{FT},
laba::FT,
vmax::FT
) where {FT<:AbstractFloat}
Update leaf area and maximal carboxylation rate, given
node
[SPACSimple
] type structlaba
Given leaf area per basal areavmax
Given Vcmax25
SoilPlantAirContinuum.optimize_leaf!
— Functionoptimize_leaf!(
node::SPACSimple{FT},
weather::Array{FT,2},
printing::Bool,
Δt::FT = FT(1)
) where {FT<:AbstractFloat}
Optimize leaf area (LAI within 0-20) and photosynthetic capacity (within 5-200), given
node
[SPACSimple
] type structweather
Weather profile in a growing seasonprinting
Optional. If true, printing progressΔt
Time period in[h]
SoilPlantAirContinuum.optimize_hs!
— Functionoptimize_hs!(
node::SPACSimple{FT},
weather::Array{FT,2},
Δt::FT = FT(1)
) where {FT<:AbstractFloat}
Optimize hydraulic conductance and leaf investment, given
node
[SPACSimple
] type structweather
Weather profile in a growing seasonΔt
Time period in[h]