Learn R Programming

airGRteaching (version 0.3.3)

GetModelConfig: Get model configuration

Description

Get the error criterion value or the model parameter set from CalGR and SimGR objects.

Usage

# S3 method for CalGR
GetCrit(x, ...)

# S3 method for SimGR GetCrit(x, ...)

# S3 method for CalGR GetParam(x, ...)

# S3 method for SimGR GetParam(x, ...)

Arguments

x

[CalGR] or [SimGR] objects

...

additional arguments to be passed to or from methods

Author

Olivier Delaigue

See Also

CalGR, SimGR

Examples

Run this code
library(airGRteaching)

## data.frame of observed data
data(L0123001, package = "airGR")
BasinObs2 <- BasinObs[, c("DatesR", "P", "E", "Qmm", "T")]

## Preparation of observed data for modelling
PREP <- PrepGR(ObsDF = BasinObs2, HydroModel = "GR4J", CemaNeige = TRUE)

## Calibration step
CAL <- CalGR(PrepGR = PREP, CalCrit = "KGE2",
             WupPer = NULL, CalPer = c("1990-01-01", "1993-12-31"))

## Get the error criterion selected as objective function obtained at the end of the calibration
GetCrit(CAL)

## Get the parameter set obtained at the end of the calibration
GetParam(CAL)

## Simulation step using the result of the automatic calibration method to set the model parameters
SIM <- SimGR(PrepGR = PREP, Param = CAL, EffCrit = "KGE2",
             WupPer = NULL, SimPer = c("1994-01-01", "1998-12-31"))

## Get the error criterion computed during the simulation step
GetCrit(SIM)

## Get the parameter set used during the simulation step
GetParam(SIM)

Run the code above in your browser using DataLab