generateScenario
is the base function used by generateScenarios
.
The function produces time series of hydroclimatic variables using requested climate attributes that correspond to a single target in the exposure space.
The function argument definitions are detailed in the documentation of generateScenarios
; please refer to that documentation using ?generateScenarios
.
generateScenario(
reference,
expTarg,
simLengthNyrs = NULL,
seedID = NULL,
controlFile = NULL
)
data.frame; contains reference daily climate data in a data frame with columns named year month day *variable_name1* *variable_name2*.
Use viewModels()
to view the valid variable names. Note that the first three columns of the data.frame contain the year, month, and day of the reference. The columns have to be named as specified.
Please refer data provided with the package that may be loaded using data(tankDat)
for an example of the expected format of reference
.
a named vector; the attributes at the target location in the exposure space
generateScenario
is intended to be used to adapt the functionality of generateScenarios
for use in a parallel computing environment.
a number; a scalar that specifies the length in years of each generated scenario. This argument is used only with stochastic generation.
If NULL
(the default), the generated simulation will be as long as reference
.
a number; a scalar that specifies the seed to be used for the first replicate. Subsequent replicates will use seeds incremented by one.
If seedID
is NULL
(which is the default), the function will use a random seed for stochastic time series generation.
The seed used will be specified in the output. This argument is intended for use in cases that aim to reproduce an existing simulation.
a string; to specify the model/optimisation options used for simulating time series data. The valid values are:
NULL
: the simulation uses the foreSIGHT default stochastic model settings.
"scaling"
: the simulation uses simple scaling instead of a stochastic model.
path to a JSON file
: the JSON file contains advanced options specify the stochastic model and optimisation inputs.
These options can be used to change stochastic model types, overwrite default model parameter bounds, change default optimisation arguments, and set penalty attributes to be used in optimisation.
Please refer to the function writeControlFile
in order to create an controlFile
JSON file.
generateScenarios