Description Usage Arguments Details Value Examples
Using DynACof one iteration after another. Allows to run a DynACof simulation step by step to e.g. modify a variable simulated by DynACof using another model for model coupling
1 2 3 4 5 6 7 8 9 |
i |
Either an integer, or a range giving the day(s) of simulation needed. Match the row index, so |
S |
The simulation list (see |
verbose |
Boolean. Prints progress bar if |
Period |
(Initalization) The maximum period that will be simulated (given at initialization) |
Inpath |
(Initalization) Path to the input parameter list folder, Default: |
FileName |
(Initalization) A list of input file names :
Default input files are provided with the package as an example parameterization. |
The simulation needs to be initialized first (for one year minimum), and then the model can be called day after day (see examples).
Either an initialized simulation list (if S is null) or the modified simulation list S
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 32 | ## Not run:
Sys.setenv(TZ="UTC")
# First, initialize a simulation:
S= dynacof_i(1:365,Period= as.POSIXct(c("1979-01-01", "1980-12-31")))
# Then, compute the simulation for the next day:
S= dynacof_i(366,S)
# We can modifiy the value of some variables before computing the next day and compare with
# unmodified value:
# Make a copy of the simulation list:
S2= S
# Changing the value of Tair in the meteorology for day 367 for S2:
S2$Meteo$Tair[367]= S2$Meteo$Tair[367]+10.0
# Make a computation for each:
S= dynacof_i(367,S)
S2= dynacof_i(367,S2)
# Compare the values of e.g. the maitenance respiration:
S$Sim$Rm[367]
S2$Sim$Rm[367]
# To run DynACof for several days, use a range for i:
S= dynacof_i(368:nrow(S$Meteo),S)
# NB: nrow(S$Meteo) is the maximum length we can simulate. To increase a simulation,
# initialize it with a wider range for the "Period" argument.
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.