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)
i | Either an integer, or a range giving the day of simulation needed. Match the row index, so |
---|---|
S | The simulation list, output of |
The modified simulation list S
Careful
Always call dynacof.jl_setup()
before runnning dynacof_i.jl
. See example.
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) }