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 GRiwrmInputsModel] inputs of the model

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:

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]