Model description overview
Click on the links to view detailed documentation:
On this site you can find a rather technical overview of the procedure.
Solve the difference equation
The main function to solve the difference equations and get the solution is solve_prob
.
API
GrasslandTraitSim.solve_prob Function
solve_prob(
;
input_obj,
p,
prealloc,
trait_input,
θ_type,
callback
)
Solve the model for one site.
All input variables are explained in a tutorial: How to prepare the input data to start a simulation
There is also a tutorial on the model output: How to analyse the model output
Initialization
The initial conditions of the state variables are set. Each plant species gets an equal share of the initial biomass. The height is set to half of the maximum height of the species. The above- and belowground biomass are calculated based on the aboveground biomass proportion
Traits can be either specified manually, or they will be generated with a bivariate Gaussian mixture model with full covariance matrices. For each species either the first or the second Gaussian distribution is used to generate the log/logit-transformed traits. The traits are then backtransformed to the original scale and the units are added. If the proportion of the leaf mass of the total plant mass BayesianGaussianMixture
of Pedregosa et al. (2011) to a set of grassland species that was found in Germany in the Biodiversity Exploratories. Here, you can get an overview of the transformation of the traits:
trait | description | transformation |
---|---|---|
specific leaf area [m² g⁻¹] | log | |
potential plant height [m] | log | |
leaf nitrogen content per leaf dry mass [mg g⁻¹] | log | |
root surface area per belowground biomass [m² g⁻¹] | log | |
arbuscular mycorrhizal colonisation rate [-] | logit | |
aboveground dry mass per plant dry mass [-] | logit | |
leaf dry mass per plant dry mass [-] | logit |
API
GrasslandTraitSim.initialization Function
initialization(
;
input_obj,
p,
prealloc,
trait_input,
callback
)
Initialize the simulation object. The function is called once at the beginning of the simulation within solve_prob
.
GrasslandTraitSim.set_initialconditions! Function
set_initialconditions!(; container)
Set the initial conditions for the state variables.
GrasslandTraitSim.random_traits! Function
random_traits!(; container)
Generate random traits for the simulation.
Main loop
For each time step the function one_day!
is executed and called from main_loop!
.
API
GrasslandTraitSim.main_loop! Function
main_loop!(; container)
Run the main loop for all days. Calls the function one_day!
for each day and set the calculated density differences to the output variables.
GrasslandTraitSim.one_day! Function
one_day!(; t, container)
Calculate differences of all state variables for one time step (one day).