Description Usage Arguments Value Fields Examples
View source: R/4-dynacof_julia.R
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.
1 | 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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | ## Not run:
# 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)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.