CalGR {airGRteaching}R Documentation

Calibration algorithm that optimises the error criterion selected as objective function

Description

Calibration algorithm that optimises the error criterion selected as objective function using the INRAE-HYCAR procedure described by C. Michel

Usage

CalGR(PrepGR, CalCrit = c("NSE", "KGE", "KGE2", "RMSE"),
      WupPer = NULL, CalPer,
      transfo = c("", "sqrt", "log", "inv", "sort"), verbose = TRUE)

Arguments

PrepGR

[object of class PrepGR] see PrepGR for details

CalCrit

[character] name of the objective function (must be one of "NSE", "KGE", "KGE2" or "RMSE")

WupPer

(optional) [character] vector of 2 values to define the beginning and end of the warm-up period ["YYYY-mm-dd" or "YYYY-mm-dd HH:MM:SS"]. See details

CalPer

[character] vector of 2 values to define the beginning and end of the calibration period ["YYYY-mm-dd" or "YYYY-mm-dd HH:MM:SS"]

transfo

(optional) [character] name of the transformation transformation applied to discharge for calculating the objective function (must be one of "", "sqrt", "log", "inv" or "sort")

verbose

(optional) [boolean] logical value indicating if the function is run in verbose mode or not

Details

WupPer = NULL indicates that, if available, a period of one year immediately present before the CalPer period is used. In order to disable the warm up of the model, users have to make sure not to provide data before CalPer when preparing the data with PrepGR.

Value

[list] object of class CalGR containing:

OptionsCalib

[list] object of class RunOptions (see: CreateRunOptions)

Qobs

[numeric] series of observed discharges [mm/time step]

OutputsCalib

[list] object of class OutputsCalib (see: Calibration)

OutputsModel

[list] object of class OutputsModel (see: RunModel)

TypeModel

[character] name of the function of the hydrological model used

CalCrit

[character] name of the function that computes the error criterion during the calibration step

PeriodModel

[list] $WarmUp: vector of 2 POSIXct values defining the beginning and end of the warm-up period, $Run: vector of 2 POSIXct values defining the beginning and end of the calibration period

Author(s)

Olivier Delaigue

See Also

airGRteaching plot and dyplot functions to display static and dynamic plots

airGR CreateRunOptions, CreateInputsCrit, CreateCalibOptions, ErrorCrit_RMSE, ErrorCrit_NSE, ErrorCrit_KGE, ErrorCrit_KGE2, Calibration_Michel functions

Examples

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"))


## Structure of CalGR object
str(CAL)

## Parameter and criterion evolution during
## the steepest descent step of the calibration algorithm
plot(CAL, which = "iter")

## Plot diagnostics
plot(CAL, which = "perf")

## Static plot of observed and simulated time series
plot(CAL)

## Dynamic plot of observed and simulated time series
dyplot(CAL)

[Package airGRteaching version 0.2.11 Index]