SimGR {airGRteaching} | R Documentation |
Running one of the GR hydrological models
Description
Function for running the GR hydrological models
Usage
SimGR(PrepGR, CalGR = NULL, Param, EffCrit = c("NSE", "KGE", "KGE2", "RMSE"),
WupPer = NULL, SimPer,
transfo = c("", "sqrt", "log", "inv", "sort"), verbose = TRUE)
Arguments
PrepGR |
[object of class PrepGR] see |
CalGR |
(deprecated) use the |
Param |
[object of class CalGR or numeric] see |
EffCrit |
[character] name of the efficiency criterion (must be one of |
WupPer |
(optional) [character] vector of 2 values to define the beginning and end of the warm-up period [ |
SimPer |
[character] vector of 2 values to define the beginning and end of the simulation period [ |
transfo |
(optional) [character] name of the transformation applied to discharge for calculating the error criterion (must be one of |
verbose |
(optional) [boolean] logical value indicating if the function is run in verbose mode or not |
Details
The user can customize the parameters with the Param
argument.
The user can also use the parameters resulting from a calibration. In this case, it is necessary to use the CalGR
function.
WupPer = NULL
indicates that, if available, a period of one year immediately present before the CalPer period is used. WupPer = 0L
allows to disable the warm up of the model.
Value
[list] object of class SimGR
containing:
OptionsSimul |
[list] object of class |
OptionsCrit |
[list] object of class |
OutputsModel |
[list] object of class |
Qobs |
[numeric] series of observed discharges [mm/time step] |
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 |
EffCrit |
[list] name of the function that computes the error criterion during the simulation step |
PeriodModel |
[list] |
Author(s)
Olivier Delaigue, Guillaume Thirel
See Also
airGRteaching
plot
and dyplot
functions to display static and dynamic plots
airGR
CreateRunOptions
, CreateInputsCrit
, RunModel
, ErrorCrit_RMSE
, ErrorCrit_NSE
, ErrorCrit_KGE
, ErrorCrit_KGE2
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 = FALSE)
## Calibration step
CAL <- CalGR(PrepGR = PREP, CalCrit = "KGE2",
WupPer = NULL, CalPer = c("1990-01-01", "1993-12-31"))
## Simulation step using the result of the automatic calibration method to set the model parameters
SIM <- SimGR(PrepGR = PREP, Param = CAL, EffCrit = "KGE2",
WupPer = NULL, SimPer = c("1994-01-01", "1998-12-31"))
## Simulation step using model parameter set by the user
SIM <- SimGR(PrepGR = PREP, Param = c(270.426, 0.984, 108.853, 2.149), EffCrit = "KGE2",
WupPer = NULL, SimPer = c("1994-01-01", "1998-12-31"))
## Structure of SimGR object
str(SIM)
## Plot diagnostics
plot(SIM)
## Static plot of observed and simulated time series
plot(SIM, which = "ts")
plot(SIM, which = c("Precip", "Flows"))
## Dynamic plot of observed and simulated time series
dyplot(SIM)