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] 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]
$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

### 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(BasinObs$DatesR, BasinObs$P, BasinObs$E, BasinObs$T, BasinObs$Qmm)
    TimeFormat      <- "daily"
    NewTimeFormat   <- "yearly"
    ConvertFun      <- c("sum", "sum", "mean", "sum")
    YearFirstMonth  <- 09;
    NewTabSeries    <- SeriesAggreg(TabSeries = TabSeries, TimeFormat = TimeFormat,
                                    NewTimeFormat = NewTimeFormat, ConvertFun = ConvertFun,
                                    YearFirstMonth = YearFirstMonth)
    BasinObs        <- NewTabSeries
    names(BasinObs) <- c("DatesR", "P", "E", "T", "Qmm")

    ## 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.3.2.23 Index]