CreateSupervisor {airGRiwrm} | R Documentation |
Creation of a Supervisor for handling regulation in a model
Description
Creation of a Supervisor for handling regulation in a model
Usage
CreateSupervisor(InputsModel, TimeStep = 1L)
Arguments
InputsModel |
[object of type |
TimeStep |
numeric number of time steps between each supervision |
Value
A Supervisor
object which is an environment containing all the necessary variables to run a supervised simulation, such as:
-
DatesR
POSIXct: vector of date fromInputsModel
-
InputsModel
: a copy ofInputsModel
provided by CreateInputsModel.GRiwrm -
griwrm
: a copy ofgriwrm
provided by CreateGRiwrm -
Controllers
list: list of the controllers used in the supervised simulation (See CreateController) some internal state variables updated during simulation (
ts.index
,ts.previous
,ts.date
,ts.index0
,controller.id
)
Examples
data(Severn)
nodes <- Severn$BasinsInfo[, c("gauge_id", "downstream_id", "distance_downstream", "area")]
nodes$model <- "RunModel_GR4J"
griwrm <- CreateGRiwrm(nodes,
list(id = "gauge_id",
down = "downstream_id",
length = "distance_downstream"))
BasinsObs <- Severn$BasinsObs
DatesR <- BasinsObs[[1]]$DatesR
PrecipTot <- cbind(sapply(BasinsObs, function(x) {x$precipitation}))
PotEvapTot <- cbind(sapply(BasinsObs, function(x) {x$peti}))
Qobs <- cbind(sapply(BasinsObs, function(x) {x$discharge_spec}))
Precip <- ConvertMeteoSD(griwrm, PrecipTot)
PotEvap <- ConvertMeteoSD(griwrm, PotEvapTot)
InputsModel <- CreateInputsModel(griwrm, DatesR, Precip, PotEvap, Qobs)
sv <- CreateSupervisor(InputsModel)
[Package airGRiwrm version 0.6.2 Index]