RunModel_GR2M {airGR} | R Documentation

## Run with the GR2M hydrological model

### Description

Function which performs a single run for the GR2M monthly lumped model over the test period.

### Usage

    RunModel_GR2M(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 2 parameters

GR2M X1 | production store capacity [mm]
GR2M X2 | groundwater exchange coefficient [-]

### 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] list containing the function outputs organised as follows:

$DatesR | [POSIXlt] series of dates
$PotEvap | [numeric] series of input potential evapotranspiration [mm/month]
$Precip | [numeric] series of input total precipitation [mm/month]
$AE | [numeric] series of actual evapotranspiration [mm/month]
$Pn | [numeric] series of net rainfall (P1) [mm/month]
$Perc | [numeric] series of percolation (P2) [mm/month]
$PR | [numeric] series of PR=Pn+Perc (P3) [mm/month]
$Exch | [numeric] series of potential exchange between catchments [mm/month]
$Prod | [numeric] series of production store level [mm]
$Rout | [numeric] series of routing store level [mm]
$Qsim | [numeric] series of simulated discharge [mm/month]
$StateEnd | [numeric] states at the end of the run (production store level and routing store level) [mm],
| see `CreateIniStates` for more details

(refer to the provided references or to the package source code for further details on these model outputs)

### Author(s)

Laurent Coron, Claude Michel, Safouane Mouelhi

### 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.
Mouelhi, S., C. Michel, C. Perrin and V. Andréassian (2006). Stepwise development of a two-parameter monthly water balance model. Journal of Hydrology, 318(1-4), 200-214. doi:10.1016/j.jhydrol.2005.06.014.

### See Also

`CreateInputsModel`, `CreateRunOptions`, `CreateIniStates`.

### Examples

    library(airGR)

    ## loading catchment data
    data(L0123001)

    ## conversion of example data from daily to monthly time step
    TabSeries       <- data.frame(BasinObs$DatesR, BasinObs$P, BasinObs$E, BasinObs$T, BasinObs$Qmm)
    TimeFormat      <- "daily"
    NewTimeFormat   <- "monthly"
    ConvertFun      <- c("sum", "sum", "mean", "sum")
    NewTabSeries    <- SeriesAggreg(TabSeries = TabSeries, TimeFormat = TimeFormat,
                                    NewTimeFormat = NewTimeFormat, ConvertFun = ConvertFun)
    BasinObs        <- NewTabSeries
    names(BasinObs) <- c("DatesR", "P", "E", "T", "Qmm")

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

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

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

    ## simulation
    Param <- c(X1 = 265.072, X2 = 1.040)
    OutputsModel <- RunModel_GR2M(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.3.2.23 Index]