CalGR.Rd 2.89 KB
Newer Older
unknown's avatar
unknown committed
1
2
3
\encoding{UTF-8}
\name{CalGR}
\alias{CalGR}
4
\title{Calibration algorithm that optimises the error criterion selected as objective function}
unknown's avatar
unknown committed
5
6
7


\usage{
8
CalGR(PrepGR, CalCrit = c("NSE", "KGE", "KGE2", "RMSE"),
unknown's avatar
unknown committed
9
10
11
12
13
14
  WupPer = NULL, CalPer,
  transfo = c("", "sqrt", "log", "inv", "sort"), verbose = TRUE)
}


\arguments{
15
  \item{PrepGR}{[object of class \code{PrepGR}] see \code{\link{PrepGR}} for details}
unknown's avatar
unknown committed
16
  
17
  \item{CalCrit}{[character] name of the objective function (must be one of \code{"NSE"}, \code{"KGE"}, \code{"KGE2"} or \code{"RMSE"})}
unknown's avatar
unknown committed
18
  
19
  \item{WupPer}{(optional) [character] vector of 2 values to define the beginning and end of the  warm-up period [\code{"YYYY-mm-dd"} or \code{"YYYY-mm-dd HH:MM:SS"}]}
unknown's avatar
unknown committed
20
  
21
  \item{CalPer}{[character] vector of 2 values to define the beginning and end of the  calibration period [\code{"YYYY-mm-dd"} or \code{"YYYY-mm-dd HH:MM:SS"}]}
unknown's avatar
unknown committed
22
  
23
  \item{transfo}{(optional) [character] name of the transformation transformation applied to discharge for calculating the objective function (must be one of \code{""}, \code{"sqrt"}, \code{"log"}, \code{"inv"} or \code{"sort"})}
unknown's avatar
unknown committed
24
25
26
27
28
  
  \item{verbose}{(optional) [boolean] logical value indicating if the function is run in verbose mode or not}
}


29
30
31
32
\value{
  [list] object of class \code{CalGR} containing:
  \item{OptionsCalib}{[list] object of class \code{RunOptions} (see: \code{\link{CreateRunOptions}})}
  \item{Qobs}{[numeric]  series of observed discharges [mm/time step]}
33
34
  \item{OutputsCalib}{[list] object of class \code{OutputsCalib} (see: \code{\link{Calibration}})}
  \item{OutputsModel}{[list] object of class \code{OutputsModel} (see: \code{\link{RunModel}})}
35
  \item{TypeModel}{[character] name of the function of the hydrological model used}
36
  \item{CalCrit}{[character] name of the function that computes the error criterion during the calibration step}
37
  \item{PeriodModel}{[list] \code{$WarmUp}: vector of 2 \code{POSIXct} values defining the beginning and end of the warm-up period, \code{$Run}: vector of 2 \code{POSIXct} values defining the beginning and end of the calibration period}
38
39
40
}


unknown's avatar
unknown committed
41
42
43
44
45
\seealso{
\code{\link{CreateRunOptions}}, \code{\link{CreateInputsCrit}}, \code{\link{CreateCalibOptions}}, \code{\link{ErrorCrit_RMSE}}, \code{\link{ErrorCrit_NSE}}, \code{\link{ErrorCrit_KGE}}, \code{\link{ErrorCrit_KGE2}}, \code{\link{Calibration_Michel}}
}


46
\description{Calibration algorithm that optimises the error criterion selected as objective function using the Irstea-HBAN procedure described by C. Michel}
unknown's avatar
unknown committed
47
48
49
50
51
52
53
54
55
56
57
58
59


\author{Olivier Delaigue}


\examples{
library(airGR)

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

## Preparation of observed data for modelling
60
PREP <- PrepGR(ObsBV = BasinObs2, HydroModel = "GR4J", CemaNeige = TRUE)
unknown's avatar
unknown committed
61
62

## Calibration step
63
CAL <- CalGR(PrepGR = PREP, CalCrit = c("NSE", "KGE", "KGE2", "RMSE"),
64
             WupPer = NULL, CalPer = c("1990-01-01", "1993-12-31"))
65
str(CAL)
unknown's avatar
unknown committed
66
67
68
}