ShinyGR.Rd 3.67 KB
Newer Older
1
\encoding{UTF-8}
2
3
\name{ShinyGR}
\alias{ShinyGR}
4
\title{Interactive Web application to run manually the GR4J, GR5 and GR6J hydrological models with or without CemaNeige}
5
6
7


\usage{
8
ShinyGR(ObsDF = NULL,
9
10
  DatesR = NULL, Precip = NULL, PotEvap = NULL, Qobs = NULL, TempMean = NULL,
  ZInputs = NULL, HypsoData = NULL, NLayers = 5,
11
  SimPer, NamesObsBV = NULL, theme = "RStudio")
12
13
14
15
}


\arguments{
16
  \item{ObsDF}{(optional) [data.frame or list of data.frame] \code{data.frame} of dates, total precipitation, potential evapotranspiration, observed discharge and mean air temperature (only if CemaNeige is used) (variables must be in this order; see below for the units)}
17
  
18
  \item{DatesR}{(optional) [POSIXt] vector of dates required to create the GR and CemaNeige models inputs. Time zone must be defined as "UTC"}
19
  
20
  \item{Precip}{(optional) [numeric] time series of total precipitation (catchment average) [mm], required to create the GR and CemaNeige models inputs}
21
  
22
  \item{PotEvap}{(optional) [numeric] time series of potential evapotranspiration (catchment average) [mm], required to create the GR model inputs}
23
  
24
  \item{Qobs}{(optional) [numeric] time series of observed discharge [mm/time step]}
25
  
26
  \item{TempMean}{(optional) [numeric] time series of mean air temperature [°C], required to create the CemaNeige model inputs (if used)}
27
  
28
  \item{ZInputs}{(optional) [numeric or list of numerics] real giving the mean elevation of the Precip and TempMean series (before extrapolation) [m], used to create the CemaNeige model inputs (if used)}
29
  
30
  \item{HypsoData}{(optional) [numeric or list of numerics] 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)}
31
  
32
  \item{NLayers}{(optional) [numeric or list of numerics] integer giving the number of elevation layers requested [-], required to create CemaNeige model inputs (if used)}
33
  
34
  \item{SimPer}{[character or list of characters] vector of 2 values to define the beginning and the end of the simulation period [\code{"YYYY-mm-dd"} or \code{"YYYY-mm-dd HH:MM:SS"}], see below for details}
35
  
36
    \item{NamesObsBV}{(optional) [character] vector of values to define the data inputs name(s) (if the ObsDF list is not already named)}
37
  
38
  \item{theme}{(optional) [character] alternative stylesheet [\code{"RStudio"} (default), \code{"Cerulean"}, \code{"Cyborg"}, \code{"Flatly"}, \code{"United"} or \code{"Yeti"}]}
39
40
41
42
}


\seealso{
unknown's avatar
unknown committed
43
\code{\link{CalGR}, \link{SimGR}, \link{plot.CalGR}, \link{plot.SimGR}}
44
45
46
}


47
\description{Shiny application to understand and to display in a interactive way the impact of each parameter of the GR models on the simulated flows}
48

unknown's avatar
unknown committed
49
\details{
50
The warm-up period always starts from the first date of the dataset to the time step just before the beginning of the simulation period (\code{SimPer}).
unknown's avatar
unknown committed
51
}
52

53
54
55
56
\author{
Olivier Delaigue,
Laurent Coron,
Pierre Brigode}
57
58
59
60

\examples{
library(airGR)

61
## data.frame of observed data of a low-land basin
62
data(L0123001)
63
64
BV_L0123001 <- BasinObs[0001:6000, c("DatesR", "P", "E", "Qmm", "T")]
BI_L0123001 <- BasinInfo
65
66
67

## data.frame of observed data of a mountainous basin
data(L0123002)
68
69
BV_L0123002 <- BasinObs[5000:9999, c("DatesR", "P", "E", "Qmm", "T")]
BI_L0123002 <- BasinInfo
70
71
72

## Interactive simulation step using default parameters
if (interactive()) {
73
  ShinyGR(ObsDF = list("Low-land basin" = BV_L0123001, "Mountainous basin" = BV_L0123002),
74
75
76
77
          ZInputs = list(NULL, median(BI_L0123002$HypsoData)),
          HypsoData = list(NULL, BI_L0123002$HypsoData),
          NLayers = list(5, 5),
          SimPer = list(c("1994-01-01", "1998-12-31"), c("2004-01-01", "2006-12-31")),
unknown's avatar
unknown committed
78
          theme = "United")
79
80
81
82
}
              
}