Skip to contents

This function simplifies the run of an airGRiwrm model by chaining all the steps (airGRiwrm::CreateInputsModel.GRiwrm, airGRiwrm::CreateRunOptions.GRiwrmInputsModel and airGRiwrm::RunModel.GRiwrmInputsModel) into one single step.

Usage

# S3 method for BasinsObs
RunModel(
  x,
  paramFile,
  nodes = selectSubNetwork(x$griwrm),
  InputsModel = suppressMessages(CreateInputsModel(x, nodes, cfg)),
  IndPeriod_WarmUp = seq(1, 365),
  IndPeriod_Run = seq(366, length(x$DatesR)),
  cfg = loadConfig(),
  ...
)

Arguments

x

an object of class BasinsObs, see loadBasinsObs and createBasinsObs

paramFile

character the path of the file containing the model parameters (use to call loadCalibrationParams)

nodes

a vectors containing subs-network (see selectSubNetwork())

InputsModel

an object of class GRiwrmInputsModel, see CreateInputsModel.BasinsObs

IndPeriod_WarmUp

(optional) numeric index of period to be used for the model warm-up -. See airGR::CreateRunOptions for details

IndPeriod_Run

(optional) numeric index of period to be used for the model run -. See airGR::CreateRunOptions for details

cfg

a config object. Configuration to use. See loadConfig for details

...

not used (compatibility with others S3 methods)

Value

An object of class GriwrmOutputsModel produced by airGRiwrm::RunModel.GRiwrmInputsModel