Using DynACof one iteration after another using the julia version of DynACof, DynACof.jl. Allows to run a DynACof simulation with starting at age > 0 with initializations.

dynacof_i.jl(i, S)

Arguments

i

Either an integer, or a range giving the day of simulation needed. Match the row index, so i=1 make a simulation for the first row of Sim and Met.

S

The simulation list, output of dynacof.jl(). It is mandatory that S come from a dynacof.jl() simulation because the parameters linked to a simulation have either R or Julia code affiliated to the simulation.

Value

The modified simulation list S

Fields

Careful

Always call dynacof.jl_setup() before runnning dynacof_i.jl. See example.

Examples

if (FALSE) { # Setting up julia + DynACof.jl: dynacof.jl_setup() # Making a regular simulation using example data: # First, downloading an example meteorology file: met_file= tempfile() m= "https://raw.githubusercontent.com/VEZY/DynACof.jl_inputs/master/meteorology.txt" download.file(m,met_file) S= dynacof.jl(Inpath= dirname(met_file), FileName=list(Site="package",Meteo=basename(met_file), Soil="package",Coffee="package",Tree=NULL)) unlink(met_file) # Value of the maintenance respiration for coffee on day i=100: i= 100 S$Sim$Rm[i] # Changing the value of Tair in the meteorology for day 100: S$Meteo$Tair[i]= S$Meteo$Tair[i]+10.0 S= dynacof_i(i,S) # New value of the maintenance respiration for coffee: S$Sim$Rm[i] # To re-run DynACof for several days, use a range for i: S= dynacof_i(i:(i+10),S) }