PrepGR.Rd 3.28 KB
Newer Older
unknown's avatar
unknown committed
1
\encoding{UTF-8}
2
3
\name{PrepGR}
\alias{PrepGR}
4
\title{Creation of the inputs required to run the CalGR and SimGR functions}
unknown's avatar
unknown committed
5
6
7


\usage{
8
9
10
11
PrepGR(ObsBV = NULL, DatesR = NULL, Precip = NULL, PotEvap = NULL,
       Qobs = NULL, TempMean = NULL,
       ZInputs = NULL, HypsoData = NULL, NLayers = 5,
       HydroModel, CemaNeige = FALSE)
unknown's avatar
unknown committed
12
13
14
15
}


\arguments{
16
  \item{ObsBV}{(optional) [data.frame] data.frame of dates, total precipitation, potential evapotranspiration, observed discharges and mean air temperature (only if CemaNeige is used) (variables must be in this order; see below for the units)}
unknown's avatar
unknown committed
17
  
18
  \item{DatesR}{(optional) [POSIXt] vector of dates required to create the GR and CemaNeige (if used) models inputs. Time zone must be defined as "UTC"}
unknown's avatar
unknown committed
19
  
20
  \item{Precip}{(optional) [numeric] time series of total precipitation (catchment average) [mm], required to create the GR and CemaNeige (if used) models inputs}
unknown's avatar
unknown committed
21
  
22
  \item{PotEvap}{(optional) [numeric] time series of potential evapotranspiration (catchment average) [mm], required to create the GR model inputs}
unknown's avatar
unknown committed
23
  
24
  \item{Qobs}{(optional) [numeric] time series of observed discharges [mm/time step]}
unknown's avatar
unknown committed
25
  
26
  \item{TempMean}{(optional) [numeric] time series of mean air temperature [°C], required to create the CemaNeige model inputs}
unknown's avatar
unknown committed
27
  
28
  \item{ZInputs}{(optional) [numeric] real giving the mean elevation of the Precip and TempMean series (before extrapolation) [m], possibly used to create the CemaNeige (if used) model inputs}
unknown's avatar
unknown committed
29
  
30
  \item{HypsoData}{(optional) [numeric] vector of 101 reals: min, q01 to q99 and max of catchment elevation distribution [m]; if not defined a single elevation is used for CemaNeige (if used)}
unknown's avatar
unknown committed
31
  
32
  \item{NLayers}{(optional) [numeric] integer giving the number of elevation layers requested [-], required to create CemaNeige (if used) model inputs}
unknown's avatar
unknown committed
33
  
34
  \item{HydroModel}{[character] name of the hydrological model (must be one of \code{"GR1A"}, \code{"GR2M"}, \code{"GR4J"}, \code{"GR5J"}, \code{"GR6J"} or \code{"GR4H"})}
unknown's avatar
unknown committed
35
  
36
  \item{CemaNeige}{[boolean] option indicating whether CemaNeige should be activated (only available when \code{HydroModel} is equal to any of \code{"GR4J"}, \code{"GR5J"} or \code{"GR6J"})}
unknown's avatar
unknown committed
37
38
39
}


40
\value{
41
  [list] object of class \code{PrepGR} containing the data required to evaluate the model outputs:
42
  \item{InputsModel}{[list] object of class \emph{InputsModel} containing the data required to evaluate the model outputs (see: \code{\link{CreateInputsModel}} outputs)}
43
  \item{Qobs}{[numeric] time series of observed discharges [mm/time step]}
44
  \item{HydroModel}{[character] name of the function of the hydrological model used}
45
46
47
}


unknown's avatar
unknown committed
48
49
50
51
52
\seealso{
\code{\link{CreateInputsModel}}
}


53
\description{Creation of the inputs required to run the CalGR and SimGR functions}
unknown's avatar
unknown committed
54

55
56
57
\details{
If the \code{ObsBV} argument is provided, \code{DatesR}, \code{Precip}, \code{PotEvap}, \code{Qobs} and \code{TempMean} are not necessary, and vice-versa. If one variable is provided in \code{ObsBV} and also separately, then only the data included in \code{ObsBV} are used. 
}
unknown's avatar
unknown committed
58
59
60

\author{Olivier Delaigue}

61

unknown's avatar
unknown committed
62
63
64
65
66
67
68
69
\examples{
library(airGR)

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

## Preparation of observed data for modelling
70
71
PREP <- PrepGR(ObsBV = BasinObs2, HydroModel = "GR4J", CemaNeige = FALSE)
str(PREP)
unknown's avatar
unknown committed
72
73
}