XPalm core functions
Documentation for the main functions of the XPalm package.
XPalm.Palm — Type
Palm(;
initiation_age=0,
parameters=default_parameters()
)Create a new scene with one Palm plant.
Arguments
initiation_age: date of the first phytomer initiation (default: 0)parameters: a dictionary of parameters (default:default_parameters())
XPalm.Palm — Method
Palm(; initiation_age=0, parameters=default_parameters())Create a new scene with one Palm plant. The scene contains a soil, a plant, a root system, a stem, a phytomer, an internode, and a leaf.
Arguments
initiation_age: days elapsed since the first phytomer initiation (default: 0)parameters: a dictionary of parameters (default:default_parameters())
Returns
- a
Palmobject
XPalm._ensure_meteo_duration — Method
_ensure_meteo_duration(meteo)Ensure each meteo row defines duration (required by recent PlantSimEngine versions). When missing, default to a daily timestep (Dates.Day(1)).
XPalm.age_relative_value — Method
age_relative_value(age, age_min_value, age_max_value, min_value, max_value)Value that depends on the plant age.
Arguments
age: the current age of the plantage_min_value: the age at which minimum value is reached (ages below this age will hagemin_value)age_max_value: the age at which the value is at the maximum value (ages above this age will hagemax_value)min_value: the value below or atage_min_valuemax_value: the value at or aboveage_max_value
Examples
julia> XPalm.age_relative_value(0, 1, 10, 0.1, 0.8)
0.1julia> XPalm.age_relative_value(5, 1, 10, 0.1, 0.8)
0.4111111111111111julia> XPalm.age_relative_value(15, 1, 10, 0.1, 0.8)
0.8XPalm.model_applications — Method
model_applications(p; architecture=false)Define the model applications used by XPalm.
Applications are listed in their intended daily execution order. Each entry shows the model, the scale where it runs, and any cross-scale inputs or hard calls. PlantSimEngine may add dependency-order edges, but otherwise preserves this order.
Arguments
p: aPalmcontaining the MTG and model parameters.architecture: also compute the 3D palm architecture whentrue.
Returns
A tuple of PlantSimEngine.ModelSpec applications.
XPalm.notebook — Function
notebook(copyto::String; force::Bool)Open an XPalm notebook or create one from a template at path, and run the notebook.
Arguments
path::String: The path to the notebook file. If it exists, it will be opened (unlessforce=true), otherwise it will be created.force::Bool=false: Iftrue, overwrite the file atpath.
Example
using XPalm, Pluto
XPalm.notebook()XPalm.xpalm — Method
xpalm(meteo; vars=Dict(:Scene => (:lai,)), architecture=false, palm=Palm(initiation_age=0, parameters=default_parameters()))
xpalm(meteo, sink; vars=Dict(:Scene => (:lai,)), architecture=false, palm=Palm(initiation_age=0, parameters=default_parameters()))Run the XPalm model with the given meteo data and return the results in a DataFrame.
Arguments
meteo: DataFrame with the meteo datasink: aTables.jlcompatible sink function to format the results, for exemple aDataFramevars: A dictionary with the outputs to be returned for each scale of simulationarchitecture: A boolean indicating whether to compute the 3D architecture of the palm (default is false)palm: the Palm object with the parameters of the model
Returns
A PlantSimEngine.Simulation, or collected output rows when sink is supplied.
Example
using XPalm, CSV, DataFrames
meteo = CSV.read(joinpath(dirname(dirname(pathof(XPalm))), "0-data/meteo.csv"), DataFrame)
df = xpalm(meteo, DataFrame; vars=Dict(:Scene => (:lai,)))XPalm Models
Documentation for the models available in XPalm.
XPalm.Models.AbortionRate — Type
AbortionRate(TT_flowering, duration_abortion, abortion_rate_max=1.0, abortion_rate_ref=0.2; random_seed::Int=0)
AbortionRate(TT_flowering, duration_abortion, abortion_rate_max, abortion_rate_ref, random_generator<:AbstractRNG)Determines if the inflorescence will abort based on the trophic state of the plant during a given period in thermal time.
Arguments
TT_flowering: thermal time for flowering since phytomer appearence (degree days).duration_abortion: duration used for computing abortion rate before flowering (degree days).
Inputs
carbon_offer_plant: daily plant assimilate offer after maintenance respiration (g CH2O-equivalent plant⁻¹ d⁻¹).carbon_demand_plant: daily total plant assimilate demand (g CH2O-equivalent plant⁻¹ d⁻¹).
Outputs
carbon_demand_abortion: assimilate demand accumulated over the abortion period (g CH2O-equivalent plant⁻¹).carbon_offer_abortion: assimilate offer accumulated over the abortion period (g CH2O-equivalent plant⁻¹).state: phytomer state (undetermined,Aborted,...)
Note
The abortion is determined at TT_flowering based on the trophic_status of the plant during a period of time before this date. The hypothesis is that a trophic stress can trigger more abortion in the plant.
XPalm.Models.AbstractAbortionModel — Type
abortion process abstract model.
All models implemented to simulate the abortion process must be a subtype of this type, e.g. struct MyAbortionModel <: AbstractAbortionModel end.
You can list all models implementing this process using subtypes:
Examples
subtypes(AbstractAbortionModel)XPalm.Models.AbstractBiomassModel — Type
biomass process abstract model.
All models implemented to simulate the biomass process must be a subtype of this type, e.g. struct MyBiomassModel <: AbstractBiomassModel end.
You can list all models implementing this process using subtypes:
Examples
subtypes(AbstractBiomassModel)XPalm.Models.AbstractBiomass_From_AreaModel — Type
biomass_from_area process abstract model.
All models implemented to simulate the biomass_from_area process must be a subtype of this type, e.g. struct MyBiomass_From_AreaModel <: AbstractBiomass_From_AreaModel end.
You can list all models implementing this process using subtypes:
Examples
subtypes(AbstractBiomass_From_AreaModel)XPalm.Models.AbstractBiomass_To_AreaModel — Type
biomass_to_area process abstract model.
All models implemented to simulate the biomass_to_area process must be a subtype of this type, e.g. struct MyBiomass_To_AreaModel <: AbstractBiomass_To_AreaModel end.
You can list all models implementing this process using subtypes:
Examples
subtypes(AbstractBiomass_To_AreaModel)XPalm.Models.AbstractCarbon_AllocationModel — Type
carbon_allocation process abstract model.
All models implemented to simulate the carbon_allocation process must be a subtype of this type, e.g. struct MyCarbon_AllocationModel <: AbstractCarbon_AllocationModel end.
You can list all models implementing this process using subtypes:
Examples
subtypes(AbstractCarbon_AllocationModel)XPalm.Models.AbstractCarbon_AssimilationModel — Type
carbon_assimilation process abstract model.
All models implemented to simulate the carbon_assimilation process must be a subtype of this type, e.g. struct MyCarbon_AssimilationModel <: AbstractCarbon_AssimilationModel end.
You can list all models implementing this process using subtypes:
Examples
subtypes(AbstractCarbon_AssimilationModel)XPalm.Models.AbstractCarbon_DemandModel — Type
carbon_demand process abstract model.
All models implemented to simulate the carbon_demand process must be a subtype of this type, e.g. struct MyCarbon_DemandModel <: AbstractCarbon_DemandModel end.
You can list all models implementing this process using subtypes:
Examples
subtypes(AbstractCarbon_DemandModel)XPalm.Models.AbstractCarbon_OfferModel — Type
carbon_offer process abstract model.
All models implemented to simulate the carbon_offer process must be a subtype of this type, e.g. struct MyCarbon_OfferModel <: AbstractCarbon_OfferModel end.
You can list all models implementing this process using subtypes:
Examples
subtypes(AbstractCarbon_OfferModel)XPalm.Models.AbstractFTSWModel — Type
AbstractFTSWModel <: AbstractSoil_WaterModelDefines a structure for soil water model that computes ftsw as an output.
XPalm.Models.AbstractFinal_Potential_BiomassModel — Type
final_potential_biomass process abstract model.
All models implemented to simulate the final_potential_biomass process must be a subtype of this type, e.g. struct MyFinal_Potential_BiomassModel <: AbstractFinal_Potential_BiomassModel end.
You can list all models implementing this process using subtypes:
Examples
subtypes(AbstractFinal_Potential_BiomassModel)XPalm.Models.AbstractHarvestModel — Type
harvest process abstract model.
All models implemented to simulate the harvest process must be a subtype of this type, e.g. struct MyHarvestModel <: AbstractHarvestModel end.
You can list all models implementing this process using subtypes:
Examples
subtypes(AbstractHarvestModel)XPalm.Models.AbstractInitiation_AgeModel — Type
initiation_age process abstract model.
All models implemented to simulate the initiation_age process must be a subtype of this type, e.g. struct MyInitiation_AgeModel <: AbstractInitiation_AgeModel end.
You can list all models implementing this process using subtypes:
Examples
subtypes(AbstractInitiation_AgeModel)XPalm.Models.AbstractInternode_DimensionsModel — Type
internode_dimensions process abstract model.
All models implemented to simulate the internode_dimensions process must be a subtype of this type, e.g. struct MyInternode_DimensionsModel <: AbstractInternode_DimensionsModel end.
You can list all models implementing this process using subtypes:
Examples
subtypes(AbstractInternode_DimensionsModel)XPalm.Models.AbstractInternode_Final_Potential_DimensionsModel — Type
internode_final_potential_dimensions process abstract model.
All models implemented to simulate the internode_final_potential_dimensions process must be a subtype of this type, e.g. struct MyInternode_Final_Potential_DimensionsModel <: AbstractInternode_Final_Potential_DimensionsModel end.
You can list all models implementing this process using subtypes:
Examples
subtypes(AbstractInternode_Final_Potential_DimensionsModel)XPalm.Models.AbstractInternode_Potential_DimensionsModel — Type
internode_potential_dimensions process abstract model.
All models implemented to simulate the internode_potential_dimensions process must be a subtype of this type, e.g. struct MyInternode_Potential_DimensionsModel <: AbstractInternode_Potential_DimensionsModel end.
You can list all models implementing this process using subtypes:
Examples
subtypes(AbstractInternode_Potential_DimensionsModel)XPalm.Models.AbstractLai_DynamicModel — Type
lai_dynamic process abstract model.
All models implemented to simulate the lai_dynamic process must be a subtype of this type, e.g. struct MyLai_DynamicModel <: AbstractLai_DynamicModel end.
You can list all models implementing this process using subtypes:
Examples
subtypes(AbstractLai_DynamicModel)XPalm.Models.AbstractLeaf_AreaModel — Type
leaf_area process abstract model.
All models implemented to simulate the leaf_area process must be a subtype of this type, e.g. struct MyLeaf_AreaModel <: AbstractLeaf_AreaModel end.
You can list all models implementing this process using subtypes:
Examples
subtypes(AbstractLeaf_AreaModel)XPalm.Models.AbstractLeaf_Final_Potential_AreaModel — Type
leaf_final_potential_area process abstract model.
All models implemented to simulate the leaf_final_potential_area process must be a subtype of this type, e.g. struct MyLeaf_Final_Potential_AreaModel <: AbstractLeaf_Final_Potential_AreaModel end.
You can list all models implementing this process using subtypes:
Examples
subtypes(AbstractLeaf_Final_Potential_AreaModel)XPalm.Models.AbstractLeaf_Potential_AreaModel — Type
leaf_potential_area process abstract model.
All models implemented to simulate the leaf_potential_area process must be a subtype of this type, e.g. struct MyLeaf_Potential_AreaModel <: AbstractLeaf_Potential_AreaModel end.
You can list all models implementing this process using subtypes:
Examples
subtypes(AbstractLeaf_Potential_AreaModel)XPalm.Models.AbstractLeaf_PruningModel — Type
leaf_pruning process abstract model.
All models implemented to simulate the leaf_pruning process must be a subtype of this type, e.g. struct MyLeaf_PruningModel <: AbstractLeaf_PruningModel end.
You can list all models implementing this process using subtypes:
Examples
subtypes(AbstractLeaf_PruningModel)XPalm.Models.AbstractLeaf_RankModel — Type
leaf_rank process abstract model.
All models implemented to simulate the leaf_rank process must be a subtype of this type, e.g. struct MyLeaf_RankModel <: AbstractLeaf_RankModel end.
You can list all models implementing this process using subtypes:
Examples
subtypes(AbstractLeaf_RankModel)XPalm.Models.AbstractLight_InterceptionModel — Type
light_interception process abstract model.
All models implemented to simulate the light_interception process must be a subtype of this type, e.g. struct MyLight_InterceptionModel <: AbstractLight_InterceptionModel end.
You can list all models implementing this process using subtypes:
Examples
subtypes(AbstractLight_InterceptionModel)XPalm.Models.AbstractMaintenance_RespirationModel — Type
maintenance_respiration process abstract model.
All models implemented to simulate the maintenance_respiration process must be a subtype of this type, e.g. struct MyMaintenance_RespirationModel <: AbstractMaintenance_RespirationModel end.
You can list all models implementing this process using subtypes:
Examples
subtypes(AbstractMaintenance_RespirationModel)Generic maintenance repspiration model.
The selected maintenance-respiration model is configured as a scene ModelSpec application on the relevant plant objects.
XPalm.Models.AbstractNumber_FruitsModel — Type
number_fruits process abstract model.
All models implemented to simulate the number_fruits process must be a subtype of this type, e.g. struct MyNumber_FruitsModel <: AbstractNumber_FruitsModel end.
You can list all models implementing this process using subtypes:
Examples
subtypes(AbstractNumber_FruitsModel)XPalm.Models.AbstractNumber_SpikeletsModel — Type
number_spikelets process abstract model.
All models implemented to simulate the number_spikelets process must be a subtype of this type, e.g. struct MyNumber_SpikeletsModel <: AbstractNumber_SpikeletsModel end.
You can list all models implementing this process using subtypes:
Examples
subtypes(AbstractNumber_SpikeletsModel)XPalm.Models.AbstractPhyllochronModel — Type
phyllochron process abstract model.
All models implemented to simulate the phyllochron process must be a subtype of this type, e.g. struct MyPhyllochronModel <: AbstractPhyllochronModel end.
You can list all models implementing this process using subtypes:
Examples
subtypes(AbstractPhyllochronModel)XPalm.Models.AbstractPhytomer_CountModel — Type
phytomer_count process abstract model.
All models implemented to simulate the phytomer_count process must be a subtype of this type, e.g. struct MyPhytomer_CountModel <: AbstractPhytomer_CountModel end.
You can list all models implementing this process using subtypes:
Examples
subtypes(AbstractPhytomer_CountModel)XPalm.Models.AbstractPhytomer_EmissionModel — Type
phytomer_emission process abstract model.
All models implemented to simulate the phytomer_emission process must be a subtype of this type, e.g. struct MyPhytomer_EmissionModel <: AbstractPhytomer_EmissionModel end.
You can list all models implementing this process using subtypes:
Examples
subtypes(AbstractPhytomer_EmissionModel)XPalm.Models.AbstractPlant_AgeModel — Type
plant_age process abstract model.
All models implemented to simulate the plant_age process must be a subtype of this type, e.g. struct MyPlant_AgeModel <: AbstractPlant_AgeModel end.
You can list all models implementing this process using subtypes:
Examples
subtypes(AbstractPlant_AgeModel)XPalm.Models.AbstractPotential_EvapotranspirationModel — Type
potential_evapotranspiration process abstract model.
All models implemented to simulate the potential_evapotranspiration process must be a subtype of this type, e.g. struct MyPotential_EvapotranspirationModel <: AbstractPotential_EvapotranspirationModel end.
You can list all models implementing this process using subtypes:
Examples
subtypes(AbstractPotential_EvapotranspirationModel)XPalm.Models.AbstractReproductive_Organ_EmissionModel — Type
reproductive_organ_emission process abstract model.
All models implemented to simulate the reproductive_organ_emission process must be a subtype of this type, e.g. struct MyReproductive_Organ_EmissionModel <: AbstractReproductive_Organ_EmissionModel end.
You can list all models implementing this process using subtypes:
Examples
subtypes(AbstractReproductive_Organ_EmissionModel)XPalm.Models.AbstractReserve_FillingModel — Type
reserve_filling process abstract model.
All models implemented to simulate the reserve_filling process must be a subtype of this type, e.g. struct MyReserve_FillingModel <: AbstractReserve_FillingModel end.
You can list all models implementing this process using subtypes:
Examples
subtypes(AbstractReserve_FillingModel)XPalm.Models.AbstractRoot_GrowthModel — Type
root_growth process abstract model.
All models implemented to simulate the root_growth process must be a subtype of this type, e.g. struct MyRoot_GrowthModel <: AbstractRoot_GrowthModel end.
You can list all models implementing this process using subtypes:
Examples
subtypes(AbstractRoot_GrowthModel)XPalm.Models.AbstractSex_DeterminationModel — Type
sex_determination process abstract model.
All models implemented to simulate the sex_determination process must be a subtype of this type, e.g. struct MySex_DeterminationModel <: AbstractSex_DeterminationModel end.
You can list all models implementing this process using subtypes:
Examples
subtypes(AbstractSex_DeterminationModel)XPalm.Models.AbstractSoil_WaterModel — Type
soil_water process abstract model.
All models implemented to simulate the soil_water process must be a subtype of this type, e.g. struct MySoil_WaterModel <: AbstractSoil_WaterModel end.
You can list all models implementing this process using subtypes:
Examples
subtypes(AbstractSoil_WaterModel)XPalm.Models.AbstractStateModel — Type
state process abstract model.
All models implemented to simulate the state process must be a subtype of this type, e.g. struct MyStateModel <: AbstractStateModel end.
You can list all models implementing this process using subtypes:
Examples
subtypes(AbstractStateModel)XPalm.Models.AbstractThermal_TimeModel — Type
thermal_time process abstract model.
All models implemented to simulate the thermal_time process must be a subtype of this type, e.g. struct MyThermal_TimeModel <: AbstractThermal_TimeModel end.
You can list all models implementing this process using subtypes:
Examples
subtypes(AbstractThermal_TimeModel)XPalm.Models.Beer — Type
Beer(k)Beer-Lambert law for light interception.
Arguments
k: extinction coefficient of light
Inputs
laiin m² m⁻².
Environment inputs
Ri_PAR_f: incident daily PAR energy, in MJ m[ground]⁻² d⁻¹.
Outputs
aPPFD: absorbed daily PAR in mol[photon] m[ground]⁻² d⁻¹.
XPalm.Models.BunchHarvest — Type
BunchHarvest()Transfer a harvested bunch, or an aborted female inflorescence, out of the standing biomass pools. All biomass* and litter variables are dry mass (gDM); fruit counts are dimensionless.
XPalm.Models.CarbonOfferRm — Type
CarbonOfferRm()A model that computes carbon offer as the carbon assimilation minus the maintenance respiration.
All three fluxes are daily g CH2O-equivalent values. Alternative photosynthesis models must convert their output to this currency before this model boundary.
XPalm.Models.ConstantRUEModel — Type
ConstantRUEModel(rue)Computes the carbon_assimilation using a constant radiation use efficiency (rue).
Arguments
rue: gross radiation use efficiency (g CH2O-equivalent MJ⁻¹)
Inputs
aPPFD: absorbed PAR in mol[photon] plant⁻¹ d⁻¹.
Outputs
carbon_assimilation: gross assimilate production (g CH2O-equivalent plant⁻¹ d⁻¹)
XPalm.Models.DailyDegreeDays — Type
DailyDegreeDays(TOpt1, TOpt2, TBase, TLim)
DailyDegreeDays(TOpt1=25, TOpt2=30, TBase=15, TLim=40)Compute thermal time from daily environment data
Arguments
TOpt1: starting optimal temperature for thermal time calculation (degree Celsius)TOpt2: ending optimal temperature for thermal time calculation (degree Celsius)TBase: Tbase temperature for thermal time calculation (degree Celsius)TLim: limit temperature for thermal time calculation (degree Celsius)
Environment inputs
Tmin,Tmax: daily minimum and maximum air temperatures (degree Celsius).
Outputs
TEff: daily efficient temperature for plant growth (degree C days)
XPalm.Models.DailyDegreeDaysSinceInit — Type
DailyDegreeDaysSinceInit()Compute thermal time since organ initiation using :TEff.
Outputs
TT_since_init: daily efficient temperature for organ growth (degree C days)
XPalm.Models.DailyPlantAgeModel — Type
DailyPlantAgeModel(initiation_age)Plant age model, simply tracks the age of the plant in days.
Arguments
initiation_age: age of the plant at the start of the simulation (days)
Returns
age: age of the plant (days)
XPalm.Models.DegreeDaysFTSW — Type
DegreeDaysFTSW(TOpt1, TOpt2, TBase, TLim, threshold_ftsw_stress)
DegreeDaysFTSW(TOpt1=25, TOpt2=30, TBase=15, TLim=40, threshold_ftsw_stress=0.3)Compute thermal time from daily environment data, corrected by FTSW
Arguments
TOpt1: starting optimal temperature for thermal time calculation (degree Celsius)TOpt2: ending optimal temperature for thermal time calculation (degree Celsius)TBase: Tbase temperature for thermal time calculation (degree Celsius)TLim: limit temperature for thermal time calculation (degree Celsius)threshold_ftsw_stress: threshold value under which we apply an FTSW stress
Inputs
ftsw: fraction of transpirable soil water (unitless)
Environment inputs
Tmin,Tmax: daily minimum and maximum air temperatures (degree Celsius).
Ouputs
TEff: daily efficient temperature for plant growth (degree C days)TT_since_init: cumulated thermal time from the first day (degree C days)
XPalm.Models.ET0_BP — Type
ET0_BP(LATITUDE,ALTITUDE)
ET0_BP(LATITUDE=0.97,ALTITUDE=50)Compute potential evapotranspiration
Arguments
LATITUDE: latitude (radian)ALTITUDE: altitude (m)
Environment inputs
Tmin,Tmax: daily minimum and maximum air temperatures.Rh_min,Rh_max: daily minimum and maximum relative humidities.Rg: daily global radiation.Wind: wind speed.date: date of the meteorological record.
Outputs
ET0: potential evapotranpiration (mm)
XPalm.Models.FTSW — Type
FTSW(;
ini_root_depth,
H_FC=0.23,
H_WP_Z1=0.05,
Z1=200.0,
H_WP_Z2=0.05,
Z2=2000.0,
H_0=0.15,
KC=1.0,
TRESH_EVAP=0.5,
TRESH_FTSW_TRANSPI=0.5,
)Fraction of Transpirable Soil Water model.
Note that there is also a method for FTSW that takes an organ type as type, e.g. FTSW{Leaf}(ini_root_depth = 200.0).
Arguments
ini_root_depth: root depth at initialization (mm)H_FC: Humidity at field capacity (g[H20] g[Soil])H_WP_Z1: Humidity at wilting point (g[H20] g[Soil]) for the first layerZ1: Thickness of the first layer (mm)H_WP_Z2: Humidity at wilting point (g[H20] g[Soil]) for the second layerZ2: Thickness of the second layer (mm)H_0: Initial soil humidity (g[H20] g[Soil])KC: crop coefficient (unitless)TRESH_EVAP: fraction of water content in the evaporative layer below which evaporation is reduced (g[H20] g[Soil])TRESH_FTSW_TRANSPI: FTSW treshold below which transpiration is reduced (g[H20] g[Soil])
Environment inputs
Precipitations: daily precipitation.Ri_PAR_f: daily incident PAR energy in MJ m[ground]⁻² d⁻¹, used to estimate transpiration.
Inputs
ET0: daily reference evapotranspiration.aPPFD: absorbed daily PAR in mol[photon] m[ground]⁻² d⁻¹.
XPalm.Models.FTSW_BP — Type
FTSW_BP(;
ini_root_depth,
H_FC=0.23,
H_WP_Z1=0.05,
Z1=200.0,
H_WP_Z2=0.05,
Z2=2000.0,
H_0=0.15,
KC=1.0,
TRESH_EVAP=0.5,
TRESH_FTSW_TRANSPI=0.5,
)Fraction of Transpirable Soil Water model.
Arguments
ini_root_depth: root depth at initialization (mm)H_FC: Humidity at field capacity (g[H20] g[Soil])H_WP_Z1: Humidity at wilting point (g[H20] g[Soil]) for the first layerZ1: Thickness of the first layer (mm)H_WP_Z2: Humidity at wilting point (g[H20] g[Soil]) for the second layerZ2: Thickness of the second layer (mm)H_0: Initial soil humidity (g[H20] g[Soil])KC: cultural coefficient (unitless)TRESH_EVAP: fraction of water content in the evaporative layer below which evaporation is reduced (g[H20] g[Soil])TRESH_FTSW_TRANSPI: FTSW treshold below which transpiration is reduced (g[H20] g[Soil])
Environment inputs
Precipitations: daily precipitation.Ri_PAR_f: daily incident PAR energy in MJ m[ground]⁻² d⁻¹, used to estimate transpiration.
Inputs
ET0: daily reference evapotranspiration.aPPFD: absorbed daily PAR in mol[photon] m[ground]⁻² d⁻¹.
XPalm.Models.FemaleBiomass — Type
FemaleBiomass(respirationcost,respirationcostoleosynthesis) FemaleBiomass(respirationcost=1.44,respirationcostoleosynthesis=3.2)
Compute female-inflorescence dry mass from daily CH2O-equivalent allocation. Allocation to the different bunch components (stalk and fruit) is proportional to their carbon demand.
Arguments
respiration_cost: construction cost of non-oil tissues (g CH2O-equivalent allocated gDM⁻¹ produced)respiration_cost_oleosynthesis: oil construction cost (g CH2O-equivalent allocated gDM⁻¹ produced)
inputs
carbon_allocation: assimilate allocated to the female inflorescence (g CH2O-equivalent)carbon_demand_stalk: carbon demand of the stalkcarbon_demand_non_oil: carbon demand of non oil components of fruitscarbon_demand_oil: carbon demand of fruits oilstate: state of the inflorescence
outputs
biomass: total inflorescence/bunch dry mass (gDM)biomass_stalk: stalk dry mass (gDM)biomass_fruits: fruit dry mass (gDM)biomass_oil: oil dry mass (gDM)biomass_non_oil: non-oil fruit dry mass (gDM)
XPalm.Models.FemaleCarbonDemandModel — Type
FemaleCarbonDemandModel(
respiration_cost,
respiration_cost_oleosynthesis,
TT_flowering,
TT_fruiting,
duration_bunch_development,
duration_oleosynthesis,
duration_dev_stalk,
)
FemaleCarbonDemandModel(;
respiration_cost=1.44,
respiration_cost_oleosynthesis=3.2,
TT_flowering=10530.0,
duration_bunch_development=1215.0,
duration_fruit_setting=405.0,
fraction_period_oleosynthesis=0.8,
fraction_period_stalk=0.2
)Carbon demand of the female inflorescence based on the potential fruit biomass
Arguments
respiration_cost: construction cost of non-oil tissues (g CH2O-equivalent allocated gDM⁻¹ produced)respiration_cost_oleosynthesis: oil construction cost (g CH2O-equivalent allocated gDM⁻¹ produced)TT_flowering: thermal time for flowering since phytomer appearance (degree days).TT_fruiting: thermal time for fruit setting since phytomer appearance (degree days).duration_bunch_development: duration between fruit set and bunch maturity (ready for harvest) (degree days).duration_oleosynthesis: duration of oleosynthesis (degree days).duration_dev_stalk: duration of stalk development (degree days).duration_fruit_setting: period of thermal time after flowering that determines the number of flowers in the bunch that become fruits, i.e. fruit set (degree days).fraction_period_oleosynthesis: fraction of the duration between flowering and harvesting when oleosynthesis occursfraction_period_stalk: fraction of the duration between flowering and harvesting when stalk development occurs
Inputs
final_potential_biomass_non_oil_fruit: potential non-oil fruit dry mass (gDM fruit⁻¹)final_potential_biomass_oil_fruit: potential oil dry mass (gDM fruit⁻¹)final_potential_biomass_stalk: potential stalk dry mass (gDM)TEff: daily effective temperature (°C)TT_since_init: thermal time since the first day of the phytomer (degree days)state: state of the leaf
Outputs
carbon_demand: total assimilate demand (g CH2O-equivalent d⁻¹)carbon_demand_oil: assimilate demand for oil production (g CH2O-equivalent d⁻¹)carbon_demand_non_oil: assimilate demand for non-oil production (g CH2O-equivalent d⁻¹)carbon_demand_stalk: assimilate demand for stalk development (g CH2O-equivalent d⁻¹)
XPalm.Models.FemaleFinalPotentialFruits — Type
FemaleFinalPotentialFruits(;
days_increase_number_fruits=2379,
days_maximum_number_fruits=6500,
fraction_first_female=0.3,
potential_fruit_number_at_maturity=2000,
potential_fruit_weight_at_maturity=6.5,
stalk_max_biomass=2100.0,
oil_content=0.25
)Arguments
days_increase_number_fruits: age at which the number of fruits starts to increase (days)days_maximum_number_fruits: age at which the palm makes bunch of mature size with the highest number of fruits (days).fraction_first_female: size of the first bunches on a young palm relative to the size
at maturity (dimensionless)
potential_fruit_number_at_maturity: potential number of fruits at maturity (number of fruits)potential_fruit_weight_at_maturity: potential dry mass of one fruit at maturity (gDM)stalk_max_biomass: maximum dry mass of the stalk (gDM)oil_content: oil dry-mass fraction of the fruit (gDM oil gDM⁻¹ fruit)
Inputs
initiation_age: age at which the palm starts to make bunches (days)
Outputs
potential_fruits_number: potential number of fruits (number of fruits)final_potential_fruit_biomass: potential dry mass per fruit (gDM)final_potential_biomass_stalk: potential stalk dry mass (gDM)final_potential_biomass_oil_fruit: potential oil dry mass per fruit (gDM)final_potential_biomass_non_oil_fruit: potential non-oil dry mass per fruit (gDM)
Examples
using PlantSimEngine
using XPalm
using XPalm.Models
model = FemaleFinalPotentialFruits()
scene = CompositeModel(
model;
scale=:Female,
status=(initiation_age=5000.0,),
)
run!(scene)
only(model_objects(scene; scale=:Female)).status.potential_fruits_numberXPalm.Models.GraphNodeCount — Type
GraphNodeCount(graph_node_count_ini=0)Stores the number of nodes in the graph.
Arguments
graph_node_count_ini: the initial number of nodes in the graph.
Outputs
graph_node_count: the number of nodes in the graph.
Details
This model does nothing. It is just used to define the value of the graph's node count so it exists in the status of the organ.
The node cound should be updated by the models that create new organs at the time-step of organ emission.
XPalm.Models.InternodeBiomass — Type
InternodeBiomass(respirationcost) InternodeBiomass(respirationcost=1.44)
Compute internode biomass from daily carbon allocation
Arguments
initial_biomass: initial structural dry mass of the internode (gDM)respiration_cost: construction cost (g CH2O-equivalent allocated gDM⁻¹ produced)
Inputs
carbon_allocation: assimilate allocated to the internode (g CH2O-equivalent)
Outputs
biomass: internode structural dry mass (gDM)
XPalm.Models.InternodeCarbonDemandModel — Type
InternodeCarbonDemandModel(; apparentdensity=300000.0, respirationcost=1.44)
Compute internode carbon demand from potential dimensions
Arguments
apparent_density: stem apparent density of dry matter (gDM m⁻³)respiration_cost: construction cost (g CH2O-equivalent allocated gDM⁻¹ produced)
Inputs
potential_height: potential height of the internode (m)potential_radius: potential radius of the internode (m)
Outputs
potential_volume: potential volume of the internode (m³)carbon_demand: daily assimilate demand of the internode (g CH2O-equivalent)
XPalm.Models.LAIModel — Type
LAIModel()
Compute the leaf area index (LAI) using all leaves in the scene and the scene surface area.
Arguments
area: the surface area of the scene.
Inputs
leaf_areas: a vector of all leaf area values in the scene (from each leaf, or each plant)
Outputs
leaf_area: the total leaf area of the scene (m²)lai: the leaf area index (m² m⁻²)
XPalm.Models.LeafAreaModel — Type
LeafAreaModel(lma_min, leaflets_biomass_contribution, leaf_area_ini)Leaf area from its biomass.
Arguments
lma_min: minimal leaflet dry mass per unit leaflet area (gDM m⁻², when there is no reserve in the leaf)leaflets_biomass_contribution: ratio of leaflets biomass to total leaf biomass including rachis and petiole (0-1)
Inputs
biomass: structural leaf dry mass, including leaflets, rachis and petiole (gDM)
Outputs
leaf_area: leaf area (m2)
XPalm.Models.LeafCarbonDemandModelArea — Type
LeafCarbonDemandModelArea(lma_min, respiration_cost, leaflets_biomass_contribution)Carbon demand of the leaf based on the difference between the current leaf area and the potential leaf area.
This model assumes that the leaf is always trying to catch its potential growth, so leaf demand can increase more than the daily potential to alleviate any previous stress effect.
See also LeafCarbonDemandModelPotentialArea.
Arguments
lma_min: minimum leaflet dry mass per unit leaflet area (gDM m⁻²)respiration_cost: construction cost (g CH2O-equivalent allocated gDM⁻¹ produced)leaflets_biomass_contribution: contribution of leaflet biomass to total leaf biomass, including rachis and petiole
XPalm.Models.LeafStateModel — Type
LeafStateModel()Give the state of the leaf
Arguments
None
Inputs
maturity: a leaf is mature when it reaches its final lengthstate_phytomers: state of the phytomers (multiscale variable)
Outputs
state: leaf state (:undetermined, :Opened, :Pruned)rank_leaves: rank of all leaves
XPalm.Models.MaleBiomass — Type
MaleBiomass(respirationcost) MaleBiomass(respirationcost=1.44)
Compute male biomass from daily carbon allocation
Arguments
respiration_cost: construction cost (g CH2O-equivalent allocated gDM⁻¹ produced)
inputs
carbon_allocation: assimilate allocated to the male inflorescence (g CH2O-equivalent)state: state of the inflorescence
outputs
biomass: male-inflorescence dry mass (gDM)litter_male: senescent male-inflorescence dry mass transferred to litter (gDM)
XPalm.Models.MaleCarbonDemandModel — Type
MaleCarbonDemandModel(; respiration_cost=1.44, duration_flowering_male=1800.0)Compute the daily CH2O-equivalent construction demand of a male inflorescence.
Arguments
respiration_cost: construction cost (g CH2O-equivalent allocated gDM⁻¹ produced)duration_flowering_male: male-inflorescence growth duration (degree days)
Inputs
final_potential_biomass: final potential dry mass (gDM)TEff: daily effective temperature (degree days d⁻¹)state: phytomer state
Outputs
carbon_demand: daily assimilate demand (g CH2O-equivalent d⁻¹)
XPalm.Models.MaleFinalPotentialBiomass — Type
MaleFinalPotentialBiomass(male_max_biomass, age_mature_male, fraction_biomass_first_male)Arguments
male_max_biomass: maximum dry mass of a male inflorescence (gDM)age_mature_male: age at which the palm plant reaches a mature state for producing male inflorescences (days)fraction_biomass_first_male: fraction of the maximal biomass that first males can reach (dimensionless)
Inputs
initiation_age: age of the plant when the organ was initiated (days)
Outputs
final_potential_biomass: final potential dry mass of the male inflorescence (gDM)
XPalm.Models.NumberFruits — Type
NumberFruits(TT_flowering, duration_dev_fruits)Determines the number of fruits on the bunch.
Arguments
TT_flowering: thermal time for flowering since phytomer appearence (degree days).duration_fruit_setting: period of thermal time after flowering that determines the number of flowers in the bunch that become fruits, i.e. fruit set (degree days).computed:
Inputs
carbon_offer_plant: daily plant assimilate offer after maintenance respiration (g CH2O-equivalent plant⁻¹ d⁻¹).potential_fruits_number: potential number of fruits (number/bunch).carbon_demand_plant: daily plant assimilate demand (g CH2O-equivalent plant⁻¹ d⁻¹), used to compute trophic status.
Outputs
fruits_number: number of fruits (number/bunch).
XPalm.Models.NumberSpikelets — Type
NumberSpikelets(TT_flowering=6300.0, duration_dev_spikelets=675.0)Determines the number of spikelets on the fruit bunch.
Arguments
TT_flowering: thermal time for flowering since phytomer appearence (degree days).duration_dev_spikelets: period of thermal time before flowering that determines the number of spikelets on the fruit bunch (degree days).
XPalm.Models.OrgansCarbonAllocationModel — Type
OrgansCarbonAllocationModel()
Compute the carbon to allocate to organs from photosysthesis and reserve mobilization (after maintenance respiration)
Arguments
cost_reserve_mobilization: carbon cost to mobilize carbon reserve from stem or leaves
XPalm.Models.PhyllochronModel — Type
PhyllochronModel(agepalmmaturity,productionspeedinitial,productionspeedmature)
Compute the phyllochron and initiate a new phytomer at every new emergence. The phyllochron may be reduced by TEff if it is itself modulated by e.g. the available water in the soil.
Arguments
age_palm_maturity: age of the plant when maturity is establiched (days)production_speed_initial: initial phyllochron (for seedlings) (leaf.degreeC days-1)production_speed_mature: phyllochron at plant maturity (leaf.degreeC days-1)
Inputs
plant_age= plant age (days)TEff: daily efficient temperature for plant growth (degree C days)
Outputs
newPhytomerEmergence: fraction of time during two successive phytomer (at 1 the new phytomer emerge)production_speed= phyllochron at the current plant age (leaf.degreeC days-1)emit_phytomer: one-timestep pulse requesting one phytomer emission.
XPalm.Models.PhytomerEmission — Type
PhytomerEmission(mtg; phytomer_symbol=:Phytomer, internode_symbol=:Internode, leaf_symbol=:Leaf) <: AbstractPhytomer_EmissionModelA PhytomerEmission model, which emits a new phytomer when called. The new phytomer is composed of an internode and a leaf, and is added as a child of the last phytomer.
Arguments
mtg::MultiScaleTreeGraph.Node: The multiscale tree graph of the plant.phytomer_symbol::Symbol: The symbol of the phytomer, default to:Phytomer.internode_symbol::Symbol: The symbol of the internode, default to:Internode.leaf_symbol::Symbol: The symbol of the leaf, default to:Leaf.
Inputs
graph_node_count::Int: The number of nodes in the graph.plant_age::Real: Current plant age, copied to newborn organs.emit_phytomer::Bool: One-timestep emission pulse.
Outputs
last_phytomer::PlantSimEngine.ObjectId: Stable identity of the last phytomer of the palm.phytomer_count::Int: The number of phytomers in the palm.
The application is scheduled every timestep but mutates the graph only when emit_phytomer is true. Consequently, phytomer_count is published at the regular application cadence, including timesteps without an emission.
XPalm.Models.PlantLeafAreaModel — Type
PlantLeafAreaModel()Sum of the leaf area at plant scale.
Inputs
leaf_area_leaves: a vector of leaf area (m²)leaf_states: a vector of leaf states. Only leaves with state :opened are considered.
Outputs
leaf_area: total leaf area of the plant (m²)
XPalm.Models.PlantRm — Type
PlantRm()Total plant maintenance respiration based on the sum of Rm.
Inputs
Rm_organs: maintenance respiration of the plant organs (g CH2O-equivalent d⁻¹ per organ)
Outputs
Rm: total plant maintenance respiration (g CH2O-equivalent d⁻¹)
XPalm.Models.PotentialAreaModel — Type
PotentialAreaModel(inflexion_index, slope)
PotentialAreaModel(inflexion_index= 560.0, slope=100.0)Computes the instantaneous potential area at a given cumulative thermal time using a logistic function. In other words, it defines the development of the leaf area at the potential, i.e. without any stress. It starts around 0.0 and goes to a maximum of final_potential_area.
Arguments
inflexion_index: a parameter that defines the relationship between the final potential
leaf area and the inflexion point of the logistic function. The higher the final area, the longer the time to reach the inflexion point.
slope: the slope of the relationship at the inflexion point.
Inputs
final_potential_area: the final potential area when the leaf is fully developedTT_since_init: the cumulated thermal time since leaf initiation
Outputs
potential_area: potential area of the leaf (m2)maturity: maturity is true when the leaf reaches its final length
XPalm.Models.PotentialReserveInternode — Type
PotentialReserveInternode(nsc_max)Compute the remaining internode reserve capacity in XPalm's assimilate currency (g CH2O-equivalent).
Arguments
nsc_max: maximum non-structural carbohydrate reserve relative to internode structural dry mass (g CH2O-equivalent gDM⁻¹)
Inputs
biomass: internode structural dry mass (gDM)reserve: current reserve (g CH2O-equivalent)
Outputs
potential_reserve: remaining reserve capacity (g CH2O-equivalent)
XPalm.Models.PotentialReserveLeaf — Type
PotentialReserveLeaf(lma_min, lma_max, leaflets_biomass_contribution)Compute the remaining leaf reserve capacity in XPalm's assimilate currency.
lma_max - lma_min represents the additional dry mass that can be stored per unit leaflet area. That non-structural carbohydrate capacity is represented as g CH2O-equivalent; no elemental-carbon fraction is applied.
Inputs
leaf_area: leaflet area (m²)reserve: current leaf reserve (g CH2O-equivalent)
Outputs
potential_reserve: remaining reserve capacity (g CH2O-equivalent)
XPalm.Models.RUE_FTSW — Type
RUE_FTSW(rue, threshold_ftsw)Computes the carbon_assimilation using a constant radiation use efficiency (rue).
Arguments
rue: gross radiation use efficiency (g CH2O-equivalent MJ⁻¹)threshold_ftsw: unitless FTSW threshold below which RUE is reduced.
Inputs
aPPFD: absorbed PAR in mol[photon] plant⁻¹ d⁻¹.
Outputs
carbon_assimilation: gross assimilate production (g CH2O-equivalent plant⁻¹ d⁻¹)
XPalm.Models.RankLeafPruning — Type
RankLeafPruning(rank)Function to remove leaf biomass and area when the phytomer has a harvested bunch or when the leaf reaches a threshold rank (below the rank of harvested bunches).
Arguments
rank: leaf-rank threshold below which the leaf is cut
Inputs
state: phytomer state
Outputs
litter_leaf: structural leaf dry mass removed from the plant and transferred to the litter (gDM)
XPalm.Models.ReproductiveOrganEmission — Type
add_reproductive_organ!(...)Add a new reproductive organ to a phytomer.
XPalm.Models.RmQ10FixedN — Type
RmQ10FixedN(Q10, Mr, T_ref, P_alive)
RmQ10FixedN(Q10, Turn, Prot, N, Gi, Mx, T_ref, P_alive)Maintenance respiration based on a Q10 computation with fixed nitrogen values and proportion of living cells in the organs.
See those three references for more details:
Dufrene, Ochs, et Saugier, « Photosynthèse et productivité du palmier à huile en liaison avec les facteurs climatiques ». Wit, Simulation of Assimilation, Respiration and Transpiration of Crops; DE VRIES, « The Cost of Maintenance Processes in Plant Cells ». DE VRIES, « The Cost of Maintenance Processes in Plant Cells ».
Arguments
Q10: Q10 factor (values should usually range between: 1.5 - 2.5, with 2.1 being the most common value)Mr: maintenance respiration coefficient (g CH2O-equivalent gDM⁻¹ d⁻¹)T_ref: Reference temperature at which Q10 was measured (usually around 25.0°C)P_alive: proportion of living cells in the organTurn: maintenance cost coefficient of the turnover of free proteins and membranesProt= 6.25: nitrogen to protein conversion coefficientN: nitrogen content of the organ (gN gDM⁻¹)Gi: maintenance cost coefficient of the ionic gradientMx:mineral content of the organ (g gDM⁻¹)
Environment inputs
Tmin,Tmax: daily minimum and maximum air temperatures (°C).
Inputs
biomass: organ structural dry mass (gDM); reserve carbon is a separate pool
Outputs
Rm: maintenance respiration (g CH2O-equivalent d⁻¹)
XPalm.Models.RootGrowthFTSW — Type
RootGrowthFTSW(TRESHFTSWSLOWROOTS, ROOTSGROWTHDEPTH, Z1, Z2) RootGrowthFTSW(TRESHFTSWSLOWROOTS=0.2, ROOTSGROWTHDEPTH=0.3, Z1=200, Z2=2000)
Compute root growth depending on thermal time and water stress (ftsw)
Arguments
ini_root_depth: initial root depth (mm)ROOTS_GROWTH_DEPTH: root growth in depth (mm.degreeC days-1)TRESH_FTSW_SLOW_ROOTS: ftsw treshold below which roots growth is reduced (unitless [0:1])
The model as a dependency on an AbstractFTSWModel that must return a value for ftsw, and soil_depth.
XPalm.Models.SceneToPlantLightPartitioning — Type
SceneToPlantLightPartitioning(scene_area)Partitioning from aPPFD at the scene scale to the plant scale based on the relative leaf area of the plant.
Arguments
scene_area: represented ground area of the scene (m²). In XPalm's default one-palm scene this is10000 / planting_densityfor a density in palm ha⁻¹.
Inputs
aPPFD_scene: absorbed PAR in mol[photon] m[ground]⁻² d⁻¹.leaf_area: the target plant leaf area in m².scene_leaf_area: the total scene leaf area in m².
Outputs
aPPFD: absorbed PAR in mol[photon] plant⁻¹ d⁻¹.
The local input name aPPFD_scene distinguishes the ground-area value from the plant-total aPPFD output because both coexist inside this conversion model. The ordinary published variable remains aPPFD at both object scales.
XPalm.Models.SexDetermination — Type
SexDetermination(TT_flowering, duration_abortion, duration_sex_determination, sex_ratio_min, sex_ratio_ref, rng)
SexDetermination(TT_flowering, duration_abortion, duration_sex_determination, sex_ratio_min, sex_ratio_ref; random_seed=1)Determines the sex of a phytomer -or rather, its bunch- based on the trophic state of the plant during a given period in thermal time.
Arguments
TT_flowering: thermal time for flowering since phytomer appearence (degree days).duration_abortion: duration used for computing abortion rate before flowering (degree days).duration_sex_determination: duration used for sex determination before the abortion period(degree days).sex_ratio_min: minimum allowed threshold of the sex ratio.sex_ratio_ref: reference threshold of the sex ratio, i.e. the value when the trophic status is 1 (offer=demand).rng: random number generator,Random.MersenneTwisterby default.random_seed: random seed for the random number generator, 1 by default.
Inputs
carbon_offer_plant: daily plant assimilate offer after maintenance respiration (g CH2O-equivalent plant⁻¹ d⁻¹).carbon_demand_plant: daily total plant assimilate demand (g CH2O-equivalent plant⁻¹ d⁻¹).
Outputs
sex: the sex of the phytomer (or bunch) (:undetermined, :Female or :Male).carbon_demand_sex_determination: assimilate demand accumulated over the sex-determination period (g CH2O-equivalent plant⁻¹)carbon_offer_sex_determination: assimilate offer accumulated over the sex-determination period (g CH2O-equivalent plant⁻¹)emit_reproductive_organ: one-timestep pulse requesting emission of the determined reproductive organ.
Note
The sex of the organ is determined at TT_flowering-duration_abortion based on the trophic_status of the plant during a period of time before this date. The hypothesis is that a trophic stress can trigger more males in the plant.
XPalm.Models.StemBiomass — Type
StemBiomass()Aggregate internode structural dry masses without creating an additional carbon demand.
Inputs
biomass_internodes: internode structural dry masses (gDM)
Outputs
biomass: total stem structural dry mass (gDM)
PlantSimEngine.run! — Function
Compute root growth
Arguments
m: root growth model- ftsw: fraction of transpirable soil water (unitless [0:1])
- TEff: daily efficient temperature for plant growth (degree C days)
Outputs
root_depth: root depth (cm)
PlantSimEngine.run! — Function
run!(object, environment, constants = Constants())Computes the light interception of an object using the Beer-Lambert law.
Arguments
::Beer: a Beer light-interception model.status: object state withlaiinitialized in m² m⁻².environment: meteorology structure, seeAtmosphereconstants = PlantMeteo.Constants(): physical constants. SeePlantMeteo.Constantsfor more details
Examples
using XPalm, PlantSimEngine, PlantMeteo, Dates
environment = (
Ri_PAR_f=8.0, # daily PAR energy in MJ m[ground]^-2 d^-1
duration=Day(1),
)
scene = CompositeModel(
Object(:scene; scale=:Scene, kind=:scene, status=Status(lai=2.0));
applications=(
ModelSpec(Beer(0.5); on=One(scale=:Scene)),
),
environment=environment,
)
run!(scene)
only(model_objects(scene; scale=:Scene)).status.aPPFDPlantSimEngine.run! — Method
add_phytomer!(palm, initiation_age)Add a new phytomer to the palm
Arguments
palm: a Palminitiation_age::Dates.Date: date of initiation of the phytomer
PlantSimEngine.run! — Method
add_reproductive_organ!(...)Add a new reproductive organ to a phytomer.
XPalm.Models.KS — Method
KS(fillRate, tresh)Coefficient of stress.
Arguments
fillRate: fill level of the compartmenttresh: filling treshold of the compartment below which there is a reduction in the flow
XPalm.Models.KS_bp — Method
KS_bp(fillRate, tresh)Coefficient of stress.
Arguments
fillRate: fill level of the compartmenttresh: filling treshold of the compartment below which there is a reduction in the flow
XPalm.Models.compute_compartment_size — Method
compute_compartment_size(m, root_depth)Compute the size of the layers of the FTSW model.
Arguments
m: FTSW modelroot_depth: depth of the root system
Returns
SizeC1: size of the evapotranspirable water layer in the first soil layer (mm)SizeVap: size of the evaporative layer within the first layer (mm)SizeC1minusVap: size of the transpirable layer within the first layer (SizeC1-SizeVap)SizeC2: size of the transpirable water layer in the first soil layer (mm)SizeC: size of transpirable soil water (mm) (SizeC2 + SizeC1minusVap)
XPalm.Models.compute_compartment_size — Method
compute_compartment_size(m, root_depth)Compute the size of the layers of the FTSW model.
Arguments
m: FTSW modelroot_depth: depth of the root system
Returns
SizeC1: size of the evapotranspirable water layer in the first soil layer (mm)SizeVap: size of the evaporative layer within the first layer (mm)SizeC1minusVap: size of the transpirable layer within the first layer (SizeC1-SizeVap)SizeC2: size of the transpirable water layer in the first soil layer (mm)SizeC: size of transpirable soil water (mm) (SizeC2 + SizeC1minusVap)