modSimulator | R Documentation |
Simulates using weather generator models specified using modelTag.
modSimulator(
datStart = NULL,
datFinish = NULL,
modelTag = NULL,
parS = NULL,
seed = NULL,
file = NULL,
IOmode = "suppress"
)
datStart |
A date string in an accepted date format e.g. "01-10-1990". |
datFinish |
A date string in an accepted date format e.g. "01-10-1990". Must occur after datStart. |
modelTag |
A character vector of which stochastic models to use to create each climate variable. Supported tags are shown in details below. |
parS |
A list (names must match supplied modelTags) containing numeric vectors of model parameters. |
seed |
Numeric. Seed value supplied to weather generator. |
file |
Character. Specifies filename for simulation output. |
IOmode |
A string that specifies the input-output mode for the time series = "verbose", "dev" or "suppress". |
modelTag provides the main function with requested models. modelTag is vector of any of the following supported models:
"P-ann-wgen"
a four parameter annual rainfall model
"P-seas-wgen"
a 16 parameter seasonal rainfall model
(phase angles must be specified via modelInfoMod=list("P-har12-wgen-FS"=fixedPars=c(x,x,x,x))
"P-har-wgen"
a harmonic rainfall model
"Temp-har-wgen"
a harmonic temperature model not conditional on rainfall
"Temp-har-wgen-wd"
a harmonic temperature model dependent on wet or
dry day
"Temp-har-wgen-wdsd"
a harmonic temperature model
where standard deviation parameters are dependent on wet or dry day
"PET-har-wgen"
a harmonic potential evapotranspiration model
"PET-har-wgen-wd"
a harmonic potential evapotranspiration model
dependent on wet or dry day
"Radn-har-wgen"
a harmonic solar radiation model (MJ/m2)
## Not run:
data(tankDat); obs=tank_obs #Get observed data
modelTag=c("P-har-wgen","Temp-har-wgen") #Select models
pars=modCalibrator(obs=obs,modelTag=modelTag) #Calibrate models
sim=modSimulator(datStart="1970-01-01", #Simulate!
datFinish="1999-12-31",
modelTag=modelTag,
parS=pars,
seed=123,
file=paste0("tester.csv"),
IOmode="verbose")
plot(sim$P[1:365]) #Plot first year of rainfall
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.