RunModel_GR1A {airGR}R Documentation

Run with the GR1A hydrological model

Description

Function which performs a single run for the GR1A annual lumped model over the test period.

Usage

RunModel_GR1A(InputsModel, RunOptions, Param)

Arguments

InputsModel

[object of class InputsModel] see CreateInputsModel for details

RunOptions

[object of class RunOptions] see CreateRunOptions for details

Param

[numeric] vector of 1 parameter

GR1A X1 model parameter [-]

Details

For further details on the model, see the references section.
For further details on the argument structures and initialisation options, see CreateRunOptions.

Value

[list] containing the function outputs organised as follows:

$DatesR [POSIXlt] series of dates
$PotEvap [numeric] series of input potential evapotranspiration [mm/y]
$Precip [numeric] series of input total precipitation [mm/y]
$Qsim [numeric] series of simulated discharge [mm/y]
RunOptions$WarmUpQsim [numeric] series of simulated discharge (Q) on the warm-up period [mm/y]
RunOptions$Param [numeric] parameter set parameter set used by the model
$StateEnd [numeric] states at the end of the run (NULL) [-]

Refer to the provided references or to the package source code for further details on these model outputs.

Author(s)

Laurent Coron, Claude Michel, Olivier Delaigue, Guillaume Thirel

References

Mouelhi S. (2003). Vers une chaîne cohérente de modèles pluie-débit conceptuels globaux aux pas de temps pluriannuel, annuel, mensuel et journalier. PhD thesis (in French), ENGREF - Cemagref Antony, France.

See Also

CreateInputsModel, CreateRunOptions.

Examples

library(airGR)

## loading catchment data
data(L0123001)

## conversion of example data from daily to yearly time step
TabSeries <- data.frame(DatesR = BasinObs$DatesR,
                        P = BasinObs$P,
                        E = BasinObs$E,
                        Qmm = BasinObs$Qmm)
TabSeries <- TabSeries[TabSeries$DatesR < as.POSIXct("2012-09-01", tz = "UTC"), ]
BasinObs <- SeriesAggreg(TabSeries, Format = "%Y",
                         YearFirstMonth = 09,
                         ConvertFun = c("sum", "sum", "sum"))

## preparation of the InputsModel object
InputsModel <- CreateInputsModel(FUN_MOD = RunModel_GR1A, DatesR = BasinObs$DatesR,
                                 Precip = BasinObs$P, PotEvap = BasinObs$E)

## run period selection
Ind_Run <- seq(which(format(BasinObs$DatesR, format = "%Y")=="1990"),
               which(format(BasinObs$DatesR, format = "%Y")=="1999"))

## preparation of the RunOptions object
RunOptions <- CreateRunOptions(FUN_MOD = RunModel_GR1A,
                               InputsModel = InputsModel, IndPeriod_Run = Ind_Run)

## simulation
Param <- c(X1 = 0.840)
OutputsModel <- RunModel_GR1A(InputsModel = InputsModel, RunOptions = RunOptions, Param = Param)

## results preview
plot(OutputsModel, Qobs = BasinObs$Qmm[Ind_Run])

## efficiency criterion: Nash-Sutcliffe Efficiency
InputsCrit  <- CreateInputsCrit(FUN_CRIT = ErrorCrit_NSE, InputsModel = InputsModel,
                                RunOptions = RunOptions, Obs = BasinObs$Qmm[Ind_Run])
OutputsCrit <- ErrorCrit_NSE(InputsCrit = InputsCrit, OutputsModel = OutputsModel)

[Package airGR version 1.7.6 Index]