SimGR.Rd 3.32 KB
Newer Older
unknown's avatar
unknown committed
1
2
3
\encoding{UTF-8}
\name{SimGR}
\alias{SimGR}
4
\title{Perform a run for the GR hydrological models}
unknown's avatar
unknown committed
5
6
7
8
9
10
11
12
13
14


\usage{
SimGR(ObsGR, CalGR = NULL, Param = NULL, EffCrit = c("NSE", "KGE", "KGE2", "RMSE"),
  WupPer = NULL, SimPer,
  transfo = c("", "sqrt", "log", "inv", "sort"), verbose = TRUE)
}


\arguments{
15
  \item{ObsGR}{[object of class \emph{ObsGR}] (see \code{\link{ObsGR}} for details)}
unknown's avatar
unknown committed
16
  
17
  \item{CalGR}{(optional) [object of class \emph{CalGR}] (see \code{\link{CalGR}} for details)}
unknown's avatar
unknown committed
18
  
19
  \item{Param}{(optional) [numeric] vector of parameters (the number depends on the model used)}
unknown's avatar
unknown committed
20
  
21
  \item{EffCrit}{[character] name of the efficiency criterion (must be one of \code{"NSE"}, \code{"KGE"}, \code{"KGE2"}, \code{"RMSE"})}
unknown's avatar
unknown committed
22
  
23
  \item{WupPer}{(optional) [character] vector of 2 values to define the warm-up period [\code{"YYYY-mm-dd"} or \code{"YYYY-mm-dd HH:MM:SS"}]}
unknown's avatar
unknown committed
24
25
26
27
28
29
30
31
32
  
  \item{SimPer}{[character] vector of 2 values to define the simulation period  [\code{"YYYY-mm-dd"} or \code{"YYYY-mm-dd HH:MM:SS"}]}
  
  \item{transfo}{(optional) [character] name of the transformation (must be one of \code{""}, \code{"sqrt"}, \code{"log"}, \code{"inv"} or \code{"sort"})}
  
  \item{verbose}{(optional) [boolean] logical value indicating if the function is run in verbose mode or not}
}


33
34
35
36
37
38
39
\value{
  [list] object of class \code{SimGR} containing:
  \item{OptionsSimul}{[list] object of class \code{RunOptions} (see: \code{\link{CreateRunOptions}})}
  \item{OptionsCrit}{[list] object of class \code{InputsCrit} (see: \code{\link{CreateInputsCrit}})}
  \item{OutputsModel}{[list] object of class \code{OutputsModel} (see: \code{\link{RunModel}})}
  \item{Qobs}{[numeric]  series of observed discharges [mm/time step]}
  \item{TypeModel}{[character] name of the function of the hydrological model used}
40
41
  \item{CalCrit}{[character] name of the function that computes the error criterion during the calibration step}
  \item{EffCrit}{[list] name of the function that computes the error criterion during the simulation step}
42
43
44
45
46
  \item{PeriodModel}{[list] \code{$WarmUp}: vector of 2 \code{POSIXct} values defining the warm-up period, \code{$Run}: vector of 2 \code{POSIXct} values defining the calibration period}
}



unknown's avatar
unknown committed
47
48
49
50
51
\seealso{
\code{\link{CreateRunOptions}}, \code{\link{CreateInputsCrit}}, \code{\link{RunModel}}, \code{\link{ErrorCrit_RMSE}}, \code{\link{ErrorCrit_NSE}}, \code{\link{ErrorCrit_KGE}}, \code{\link{ErrorCrit_KGE2}}
}


52
\description{Function for running the GR hydrological models}
unknown's avatar
unknown committed
53
54
55
56
57
58
59
60
61
62
63
64
65


\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
66
OBS <- ObsGR(ObsBV = BasinObs2, TypeModel = "GR4J", CemaNeige = FALSE)
unknown's avatar
unknown committed
67
68

## Calibration step
69
70
CAL <- CalGR(ObsGR = OBS, CalCrit = "KGE2",
             WupPer = NULL, CalPer = c("1990-01-01", "1993-12-31"))
unknown's avatar
unknown committed
71
72
       
## Simulation step using the result of the automatic calibration method to set the model parameters
73
SIM <- SimGR(ObsGR = OBS, CalGR = CAL, EffCrit = "KGE2",
74
             WupPer = NULL, SimPer = c("1994-01-01", "1998-12-31"))
unknown's avatar
unknown committed
75
76
                        
## Simulation step using model parameters set by the user
77
SIM <- SimGR(ObsGR = OBS, Param = c(270.426, 0.984, 108.853, 2.149), EffCrit = "KGE2",
78
             WupPer = NULL, SimPer = c("1994-01-01", "1998-12-31"))
79
str(SIM)                   
unknown's avatar
unknown committed
80
81
}