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, 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
sourceInitialization
The initial conditions of the state variables are set.
API
GrasslandTraitSim.initialization Function
initialization(; input_obj, p, prealloc, 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.
sourceMain 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).
source