SoilPlantAirContinuum
Types
SoilPlantAirContinuum.SPACContainer1L
— Typemutable struct SPACContainer1L{FT}
Struct that contains 1-layer gas exchange information.
Fields
ag
Mean gross photosynthetic rate
[μmol m⁻² s⁻¹]
an
Mean net photosynthetic rate
[μmol m⁻² s⁻¹]
c
Leaf internal CO₂ partial pressure
[Pa]
e
Flow rate per basal area
[mol s⁻¹ m⁻²]
gh
Leaf diffusive conductance to H₂O
[mol m⁻² s⁻¹]
p
Xylem end pressure
[MPa]
t
Leaf temperature
[K]
SoilPlantAirContinuum.SPACContainer2L
— Typemutable struct SPACContainer2L{FT}
Struct that contains 2-layer gas exchange information.
Fields
cont_sh
cont_sl
frac_sh
Shaded layer fraction
frac_sl
Sunlit layer fraction
la_sh
Shaded layer leaf area
[m²]
la_sl
Sunlit layer leaf area
[m²]
lai_sh
Shaded layer LAI
lai_sl
Sunlit layer LAI
par_sh
Shaded layer PAR
[μmol m⁻² s⁻¹]
par_sl
Sunlit layer PAR
[μmol m⁻² s⁻¹]
rad_sh
Shaded layer absorbed energy
[W m⁻²]
rad_sl
Sunlit layer absorbed energy
[W m⁻²]
SoilPlantAirContinuum.SPACMono
— Typemutable struct SPACMono{FT}
Struct that mono species SoilPlantAirContinuum system.
Fields
soil_bounds
Soil layers bounds
[m]
air_bounds
Air layers bounds
[m]
z_root
Root depth
[m]
z_canopy
Canopy maximal height
[m]
plant_hs
Plant hydraulic system
n_canopy
Number of canopy layers
n_root
Number of root layers
plant_ps
Plant photosynthesis systems
ba
Basal area
[m²]
ga
Ground area
[m²]
la
Leaf area
[m²]
envirs
Air layers
wind_z0
Aerodynamic roughness
[m]
wind_d
Zero plane displacement
[m]
wind_zs
Mean layer height
[m]
winds
Wind speed per layer
[m s⁻¹]
mswc
Maximal soil water content
swc
Current soil water content
p_soil
Array of soil matric potential
[MPa]
h_soil
Maximal soil depth
[m]
latitude
Latitude
[°]
longitude
Longitude
[°]
elevation
Elevation
[m]
photo_set
Photosynthesis parameter set
stomata_model
Stomatal behavior scheme
angles
Solar angle container
canopy_rt
Canopy4RT container
wl_set
Wave length container
rt_dim
RT dimensions
can_rad
CanopyRads container
can_opt
CanopyOpticals container
leaves_rt
Array of LeafBios container
soil_opt
SoilOpticals container
in_rad
Incoming radiation container
rt_con
RT container
SoilPlantAirContinuum.SPACSimple
— Typemutable struct SPACSimple{FT}
Struct that simplest mono species SoilPlantAirContinuum system, with 1 root, stem, and leaf.
Fields
hs
Hydraulic systems
ec
Critical flow rate
ps
Photosynthesis system
vtoj
Ratio between Vcmax25 and Jmax25
envir
Environmental conditions
container1L
Container for gas exchange for a layer
container2L
Container for gas exchange of sunlit and shaded layers
containerKS
Container for default hydraulic conductance
containerOP
Container for optimizer
opt_f_sl
Container for optimal sunlit layer flow rate
opt_f_sh
Container for optimal shaded layer flow rate
opt_laba
Container for optimal leaf area per basal area
opt_vmax
Container for optimal Vcmax25
lai
Leaf area index
laba
Leaf area per basal area
g_max
Maximal stomatal conductance limit at 25 °C
gaba
Ground area per basal area
width
Leaf width
mswc
Maximal soil water content
swc
Current soil water content
p_soil
Soil matrical water potential
h_soil
Soil depth, 2X mean root depth
c_cons
Leaf construction cost per leaf area
c_vmax
Leaf nutrient cost per Vcmax25 per leaf area
latitude
Latitude
[°]
longitude
Longitude
[°]
elevation
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, dt=1.0) 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}, photo_set::AbstractPhotoModelParaSet{FT}) where {FT<:AbstractFloat}
Return the matrix of optimizers at different sunlit and shaded layer flow rates, given
node
[SPACSimple
] type structphoto_set
[AbstractPhotoModelParaSet
] type photosynthesis parameter set
SoilPlantAirContinuum.leaf_gas_exchange_nonopt!
— Functionleaf_gas_exchange_nonopt!(node::SPACSimple{FT}, photo_set::AbstractPhotoModelParaSet{FT}, flow::FT, par::FT, rad::FT, la::FT, container::SPACContainer1L{FT}) where {FT<:AbstractFloat}
leaf_gas_exchange_nonopt!(node::SPACSimple{FT}, photo_set::AbstractPhotoModelParaSet{FT}, flow::FT) where {FT<:AbstractFloat}
leaf_gas_exchange_nonopt!(node::SPACSimple{FT}, photo_set::AbstractPhotoModelParaSet{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 structphoto_set
[AbstractPhotoModelParaSet
] 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}, photo_set::AbstractPhotoModelParaSet{FT}, flow::FT, par::FT, rad::FT, la::FT, container::SPACContainer1L{FT}) where {FT<:AbstractFloat}
leaf_gas_exchange!(node::SPACSimple{FT}, photo_set::AbstractPhotoModelParaSet{FT}, flow::FT) where {FT<:AbstractFloat}
leaf_gas_exchange!(node::SPACSimple{FT}, photo_set::AbstractPhotoModelParaSet{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 structphoto_set
[AbstractPhotoModelParaSet
] 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}, photo_set::AbstractPhotoModelParaSet{FT}) where {FT<:AbstractFloat}
Optimize the flow rates in sunlit and shaded layers, given
node
[SPACSimple
] type structphoto_set
[AbstractPhotoModelParaSet
] 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}, photo_set::AbstractPhotoModelParaSet{FT}, weather::Array{FT,2}) where {FT<:AbstractFloat}
Calculate the profit in the growing season so as to optimize leaf investment, given
node
[SPACSimple
] type structphoto_set
[AbstractPhotoModelParaSet
] type structweather
Weather profile in a growing season
SoilPlantAirContinuum.annual_simulation!
— Functionannual_simulation!(node::SPACSimple{FT}, photo_set::AbstractPhotoModelParaSet{FT}, weather::DataFrame, output::DataFrame) where {FT<:AbstractFloat}
Run annual simulation for a growing season, given
node
[SPACSimple
] type structphoto_set
[AbstractPhotoModelParaSet
] type structweather
Weather profile in a growing seasonoutput
The predefined output result
SoilPlantAirContinuum.create_dataframe
— Functionfunction create_dataframe(FT, weather::DataFrame)
Create a data frame to storesimulation 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}, photo_set::AbstractPhotoModelParaSet{FT}, vmax::FT) where {FT<:AbstractFloat}
leaf_allocation!(node::SPACSimple{FT}, photo_set::AbstractPhotoModelParaSet{FT}, laba::FT, vmax::FT) where {FT<:AbstractFloat}
Update leaf area and maximal carboxylation rate, given
node
[SPACSimple
] type structphoto_set
[AbstractPhotoModelParaSet
] type structlaba
Given leaf area per basal areavmax
Given Vcmax25
SoilPlantAirContinuum.optimize_leaf!
— Functionoptimize_leaf!(node::SPACSimple{FT}, photo_set::AbstractPhotoModelParaSet{FT}, weather::Array{FT,2}, printing::Bool) where {FT<:AbstractFloat}
Optimize leaf area (LAI within 0-20) and photosynthetic capacity (within 5-200), given
node
[SPACSimple
] type structphoto_set
[AbstractPhotoModelParaSet
] type structweather
Weather profile in a growing seasonprinting
Optional. If true, printing progress
SoilPlantAirContinuum.optimize_hs!
— Functionoptimize_hs!(node::SPACSimple{FT}, photo_set::AbstractPhotoModelParaSet{FT}, weather::Array{FT,2}) where {FT<:AbstractFloat}
Optimize hydraulic conductance and leaf investment, given
node
[SPACSimple
] type structphoto_set
[AbstractPhotoModelParaSet
] type structweather
Weather profile in a growing season