Source

Target

Showing with 1028 additions and 502 deletions
+1028 -502
......@@ -8,13 +8,20 @@
\title{Creation of the IniStates object possibly required by the CreateRunOptions functions}
\description{
Creation of the \emph{IniStates} object possibly required by the \code{\link{CreateRunOptions}} function.
}
\usage{
CreateIniStates(FUN_MOD, InputsModel, IsHyst = FALSE,
ProdStore = 350, RoutStore = 90, ExpStore = NULL,
UH1 = NULL, UH2 = NULL,
GCemaNeigeLayers = NULL, eTGCemaNeigeLayers = NULL,
GthrCemaNeigeLayers = NULL, GlocmaxCemaNeigeLayers = NULL,
verbose = TRUE)
CreateIniStates(FUN_MOD, InputsModel,
IsHyst = FALSE, IsIntStore = FALSE,
ProdStore = 350, RoutStore = 90,
ExpStore = NULL, IntStore = NULL,
UH1 = NULL, UH2 = NULL,
GCemaNeigeLayers = NULL, eTGCemaNeigeLayers = NULL,
GthrCemaNeigeLayers = NULL, GlocmaxCemaNeigeLayers = NULL,
SD = NULL, verbose = TRUE)
}
......@@ -25,12 +32,16 @@ CreateIniStates(FUN_MOD, InputsModel, IsHyst = FALSE,
\item{IsHyst}{[boolean] boolean indicating if the hysteresis version of CemaNeige is used. See details}
\item{ProdStore}{[numeric] production store level [mm]}
\item{IsIntStore}{[boolean] boolean indicating if the interception store is used in GR5H. See details}
\item{ProdStore}{[numeric] production store level [mm] for all GR models except GR1A}
\item{RoutStore}{[numeric] routing store level [mm]}
\item{RoutStore}{[numeric] routing store level [mm] for all GR models except GR1A}
\item{ExpStore}{(optional) [numeric] series of exponential store level (negative) [mm] for the GR6J model}
\item{IntStore}{(optional) [numeric] series of rainfall neutralisation or interception store level [mm] for the GR5H model}
\item{UH1}{(optional) [numeric] unit hydrograph 1 levels [mm]}
\item{UH2}{(optional) [numeric] unit hydrograph 2 levels [mm]}
......@@ -43,6 +54,8 @@ CreateIniStates(FUN_MOD, InputsModel, IsHyst = FALSE,
\item{GlocmaxCemaNeigeLayers}{(optional) [numeric] local melt threshold for hysteresis [mm], possibly used to create the CemaNeige model initial state in case the Linear Hysteresis version is used}
\item{SD}{(optional) [list] of [numeric] states of delayed upstream flows for semi-distributed models, the nature of the state and the unit depend on the model and the unit of the upstream flow}
\item{verbose}{(optional) [boolean] boolean indicating if the function is run in verbose mode or not, default = \code{TRUE}}
}
......@@ -53,22 +66,18 @@ CreateIniStates(FUN_MOD, InputsModel, IsHyst = FALSE,
\tabular{ll}{
\emph{$Store } \tab [numeric] list of store levels (\emph{$Prod}, \emph{$Rout} and \emph{$Exp}) \cr
\emph{$UH } \tab [numeric] list of unit hydrographs levels (\emph{$UH1} and \emph{$UH2}) \cr
\emph{$CemaNeigeLayers} \tab [numeric] list of CemaNeige variables (\emph{$G} and \emph{$eTG})
\emph{$CemaNeigeLayers} \tab [numeric] list of CemaNeige variables (\emph{$G}, \emph{$eTG}, \emph{$GthrCemaNeigeLayers} and \emph{$GlocmaxCemaNeigeLayers})
}
}
\description{
Creation of the \emph{IniStates} object possibly required by the \code{\link{CreateRunOptions}} function.
}
\details{
20 numeric values are required for UH1 and 40 numeric values are required for UH2 if GR4J, GR5J or GR6J are used (respectively 20*24 and 40*24 for the hourly model GR4H).Please note that depending on the X4 parameter value that will be provided when running the model, not all the values may be used (only the first int(X4)+1 values are used for UH1 and the first 2*int(X4)+1 for UH2). \cr
\code{GCemaNeigeLayers} and \code{eTGCemaNeigeLayers} require each numeric values as many as given in \code{\link{CreateInputsModel}} with the \code{NLayersargument}. \code{eTGCemaNeigeLayers} values can be negatives.\cr
The structure of the object of class \code{IniStates} returned is always exactly the same for all models (except for the unit hydrographs levels that contain more values with GR4H), even if some states do nt exist (e.g. \emph{$UH$UH1} for GR2M). \cr
If CemaNeige is not used, \emph{$CemaNeigeLayers$G} and \emph{$CemaNeigeLayers$eTG} are set to \code{NA}. \cr
20 numeric values are required for UH1 and 40 numeric values are required for UH2 if GR4J, GR5J or GR6J are used (respectively 20*24 and 40*24 for the hourly models GR4H and GR5H). Please note that depending on the X4 parameter value that will be provided when running the model, not all the values may be used (only the first int(X4)+1 values are used for UH1 and the first 2*int(X4)+1 for UH2). \cr
\code{GCemaNeigeLayers} and \code{eTGCemaNeigeLayers} require each numeric values as many as given in \code{\link{CreateInputsModel}} with the \code{NLayers} argument. \code{eTGCemaNeigeLayers} values can be negative.\cr
The structure of the object of class \code{IniStates} returned is always exactly the same for all models (except for the unit hydrographs levels that contain more values with GR4H and GR5H), even if some states do not exist (e.g. \emph{$UH$UH1} for GR2M). \cr
If CemaNeige is not used, \emph{$CemaNeigeLayers$G}, \emph{$CemaNeigeLayers$eTG} \emph{$CemaNeigeLayers$GthrCemaNeigeLayers} and \emph{$CemaNeigeLayers$GlocmaxCemaNeigeLayers} are set to \code{NA}. \cr
Nota: the \code{StateEnd} objects from the outputs of \code{RunModel*} functions already respect the format given by the \code{CreateIniStates} function.
Nota: the \code{StateEnd} objects from the outputs of \code{RunModel*} functions already respect the format given by the \code{CreateIniStates} function.
}
......@@ -79,11 +88,11 @@ library(airGR)
data(L0123001)
## preparation of the InputsModel object
InputsModel <- CreateInputsModel(FUN_MOD = RunModel_GR4J, DatesR = BasinObs$DatesR,
InputsModel <- CreateInputsModel(FUN_MOD = RunModel_GR4J, DatesR = BasinObs$DatesR,
Precip = BasinObs$P, PotEvap = BasinObs$E)
## run period selection
Ind_Run <- seq(which(format(BasinObs$DatesR, format = "\%Y-\%m-\%d")=="1990-01-01"),
Ind_Run <- seq(which(format(BasinObs$DatesR, format = "\%Y-\%m-\%d")=="1990-01-01"),
which(format(BasinObs$DatesR, format = "\%Y-\%m-\%d")=="1999-12-31"))
......@@ -94,22 +103,22 @@ IniStates <- CreateIniStates(FUN_MOD = RunModel_GR4J, InputsModel = InputsModel,
UH2 = c(0.057, 0.042, 0.015, 0.005, rep(0, 36)),
GCemaNeigeLayers = NULL, eTGCemaNeigeLayers = NULL,
GthrCemaNeigeLayers = NULL, GlocmaxCemaNeigeLayers = NULL)
str(IniStates)
str(IniStates)
## preparation of the RunOptions object
RunOptions <- CreateRunOptions(FUN_MOD = RunModel_GR4J, InputsModel = InputsModel,
IndPeriod_WarmUp = 0L,
IndPeriod_Run = Ind_Run, IniStates = IniStates)
## simulation
Param <- c(X1 = 257.238, X2 = 1.012, X3 = 88.235, X4 = 2.208)
OutputsModel <- RunModel_GR4J(InputsModel = InputsModel,
RunOptions = RunOptions, Param = Param)
## results preview
plot(OutputsModel, Qobs = BasinObs$Qmm[Ind_Run])
plot(OutputsModel, Qobs = BasinObs$Qmm[Ind_Run])
### preparation of the IniStates object with high values of ProdStore and RoutStore
IniStates <- CreateIniStates(FUN_MOD = RunModel_GR4J, InputsModel = InputsModel,
ProdStore = 450, RoutStore = 100, ExpStore = NULL,
......@@ -117,20 +126,20 @@ IniStates <- CreateIniStates(FUN_MOD = RunModel_GR4J, InputsModel = InputsModel,
UH2 = c(0.057, 0.042, 0.015, 0.005, rep(0, 36)),
GCemaNeigeLayers = NULL, eTGCemaNeigeLayers = NULL,
GthrCemaNeigeLayers = NULL, GlocmaxCemaNeigeLayers = NULL)
str(IniStates)
str(IniStates)
## preparation of the RunOptions object
RunOptions <- CreateRunOptions(FUN_MOD = RunModel_GR4J, InputsModel = InputsModel,
IndPeriod_WarmUp = 0L,
IndPeriod_Run = Ind_Run, IniStates = IniStates)
## simulation
Param <- c(X1 = 257.238, X2 = 1.012, X3 = 88.235, X4 = 2.208)
OutputsModel <- RunModel_GR4J(InputsModel = InputsModel,
RunOptions = RunOptions, Param = Param)
## results preview
plot(OutputsModel, Qobs = BasinObs$Qmm[Ind_Run])
plot(OutputsModel, Qobs = BasinObs$Qmm[Ind_Run])
}
......
......@@ -8,12 +8,17 @@
\title{Creation of the InputsCrit object required to the ErrorCrit functions}
\description{
Creation of the \code{InputsCrit} object required to the \code{ErrorCrit_*} functions. This function is used to define whether the user wants to calculate a single criterion, multiple criteria in the same time, or a composite criterion, which averages several criteria.
}
\usage{
CreateInputsCrit(FUN_CRIT, InputsModel, RunOptions,
Qobs, Obs, VarObs = "Q", BoolCrit = NULL,
transfo = "", Weights = NULL,
Ind_zeroes = NULL, epsilon = NULL,
warnings = TRUE, verbose = TRUE)
Obs, VarObs = "Q", BoolCrit = NULL,
transfo = "", Weights = NULL,
epsilon = NULL,
warnings = TRUE)
}
......@@ -24,25 +29,19 @@ CreateInputsCrit(FUN_CRIT, InputsModel, RunOptions,
\item{RunOptions}{[object of class \emph{RunOptions}] see \code{\link{CreateRunOptions}} for details}
\item{Qobs}{(deprecated) [numeric (atomic or list)] series of observed discharges [mm/time step]}
\item{Obs}{[numeric (atomic or list)] series of observed variable ([mm/time step] for discharge or SWE, [-] for SCA)}
\item{VarObs}{(optional) [character (atomic or list)] names of the observed variable (\code{"Q"} by default, or one of \code{"SCA"}, \code{"SWE"}])}
\item{BoolCrit}{(optional) [boolean (atomic or list)] boolean (the same length as \code{Obs}) giving the time steps to consider in the computation (all time steps are considered by default)}
\item{BoolCrit}{(optional) [boolean (atomic or list)] boolean (the same length as \code{Obs}) giving the time steps to consider in the computation (all time steps are considered by default. See details)}
\item{transfo}{(optional) [character (atomic or list)] name of the transformation (e.g. \code{""}, \code{"sqrt"}, \code{"log"}, \code{"inv"}, \code{"sort"}, \code{"boxcox"} or a numeric value for power transformation (see details))}
\item{transfo}{(optional) [character (atomic or list)] name of the transformation applied to the variables (e.g. \code{""}, \code{"sqrt"}, \code{"log"}, \code{"inv"}, \code{"sort"}, \code{"boxcox"} or a numeric value for power transformation . See details)}
\item{Weights}{(optional) [numeric (atomic or list)] vector of weights necessary to calculate a composite criterion (the same length as \code{FUN_CRIT}) giving the weights to use for elements of \code{FUN_CRIT} [-]. See details}
\item{Ind_zeroes}{(deprecated) [numeric] indices of the time steps where zeroes are observed}
\item{epsilon}{(optional) [numeric (atomic or list)] small value to add to all observations and simulations when \code{"log"} or \code{"inv"} transformations are used [same unit as \code{Obs}]. See details}
\item{warnings}{(optional) [boolean] boolean indicating if the warning messages are shown, default = \code{TRUE}}
\item{verbose}{(deprecated) [boolean] boolean indicating if the function is run in verbose mode or not, default = \code{TRUE}}
}
......@@ -57,27 +56,43 @@ CreateInputsCrit(FUN_CRIT, InputsModel, RunOptions,
\emph{$epsilon } \tab [numeric] small value to add to all observations and simulations when \code{"log"} or \code{"inv"} transformations are used [same unit as \code{Obs}] \cr
\emph{$Weights } \tab [numeric] vector (same length as \code{VarObs}) giving the weights to use for elements of \code{FUN_CRIT} [-] \cr
}
When \code{Weights = NULL}, \code{CreateInputsCrit} returns an object of class \emph{Single} that is a list such as the one described above. \cr
When \code{Weights} contains at least one \code{NULL} value and \code{Obs} contains a list of observations, \code{CreateInputsCrit} returns an object of class \emph{Multi} that is a list of lists such as the one described above. The \code{\link{ErrorCrit}} function will then compute the different criteria prepared by \code{CreateInputsCrit}. \cr
When \code{Weights} contains at least one \code{NULL} value and \code{Obs} contains a list of observations, \code{CreateInputsCrit} returns an object of class \emph{Multi} that is a list of lists such as the one described above. The \code{\link{ErrorCrit}} function will then compute the different criteria prepared by \code{CreateInputsCrit}. \cr
When \code{Weights} is a list of at least 2 numerical values, \code{CreateInputsCrit} returns an object of class \emph{Compo} that is a list of lists such as the one described above. This object will be useful to compute composite criterion with the \code{\link{ErrorCrit}} function. \cr
To calculate composite or multiple criteria, it is necessary to use the \code{ErrorCrit} function. The other \code{ErrorCrit_*} functions (e.g. \code{\link{ErrorCrit_RMSE}}, \code{\link{ErrorCrit_NSE}}) can only use objects of class \emph{Single} (and not \emph{Multi} or \emph{Compo}). \cr
}
\description{
Creation of the \code{InputsCrit} object required to the \code{ErrorCrit_*} functions. This function is used to define whether the user wants to calculate a single criterion, multiple criteria in the same time, or a composite criterion, which averages several criteria.
}
\details{
Users wanting to use \code{FUN_CRIT} functions that are not included in the package must create their own InputsCrit object accordingly. \cr \cr
The syntax of the power transformation allows a numeric or a string of characters. For example for a squared transformation, the following can be used: \code{transfo = 2}, \code{transfo = "2"} or \code{transfo = "^2"}. Negative values are allowed. Fraction values are not allowed (e.g., \code{"-1/2"} must instead be written \code{"-0.5"}).
\cr \cr
In order to make sure that KGE and KGE2 remain dimensionless and not impacted by zero values, the Box-Cox transformation (\code{transfo = "boxcox"}) uses the formulation given in Equation 10 of Santos et al. (2018). Lambda is set to 0.25 accordingly.
\cr \cr
The epsilon value is useful when \code{"log"} or \code{"inv"} transformations are used (to avoid calculation of the inverse or of the logarithm of zero). The impact of this value and a recommendation about the epsilon value to use (usually one hundredth of average observation) are discussed in Pushpalatha et al. (2012) for NSE and in Santos et al. (2018) for KGE and KGE'. \cr \cr
## --- Period of calculation
Criteria can be calculated over discontinuous periods (i.e. only over winter periods, or when observed discharge is below a certain threshold). To do so, please indicate in \code{Bool_Crit} which indices must be used for calcullation. Discontinuous periods are allowed in the \code{Bool_Crit} argument.
## --- Transformations
Transformations are simple functions applied to the observed and simulated variables used in order to change their distribution. Transformations are often used in hydrology for modifying the weight put on errors made for high flows or low flows. The following transformations are available: \cr \cr
\itemize{
\item \code{""}: no transformation is used (default case)
\item \code{"sqrt"}: squared root transformation
\item \code{"log"}: logarithmic transformation (see below regarding the specific case of KGE or KGE2)
\item \code{"inv"}: inverse transformation
\item \code{"sort"}: sort transformation (the simulated and observed variables are sorted from lowest to highest)
\item \code{"boxcox"}: Box-Cox transformation (see below for details)
\item numeric: power transformation (see below for details)
}
We do not advise computing KGE or KGE' with log-transformation as it might be wrongly influenced by discharge values close to 0 or 1 and the criterion value is dependent on the discharge unit. See Santos et al. (2018) for more details and alternative solutions (see the references list below). \cr \cr
In order to make sure that KGE and KGE2 remain dimensionless and are not impacted by zero values, the Box-Cox transformation (\code{transfo = "boxcox"}) uses the formulation given in Equation 10 of Santos et al. (2018). Lambda is set to 0.25 accordingly. \cr \cr
The syntax of the power transformation allows a numeric or a string of characters. For example for a squared transformation, the following can be used: \code{transfo = 2}, \code{transfo = "2"} or \code{transfo = "^2"}. Negative values are allowed. Fraction values are not allowed (e.g., \code{"-1/2"} must instead be written \code{"-0.5"}).\cr \cr
## --- The epsilon value
The epsilon value is useful when \code{"log"} or \code{"inv"} transformations are used (to avoid calculation of the inverse or of the logarithm of zero). If an epsilon value is provided, then it is added to the observed and simulated variable time series at each time step and before the application of a transformation. The epsilon value has no effect when the \code{"boxcox"} transformation is used. The impact of this value and a recommendation about the epsilon value to use (usually one hundredth of average observation) are discussed in Pushpalatha et al. (2012) for NSE and in Santos et al. (2018) for KGE and KGE'. \cr \cr
## --- Single, multiple or composite criteria calculation
Users can set the following arguments as atomic or list: \code{FUN_CRIT}, \code{Obs}, \code{VarObs}, \code{BoolCrit}, \code{transfo}, \code{Weights}. If the list format is chosen, all the lists must have the same length. \cr
Calculation of a single criterion (e.g. NSE computed on discharge) is prepared by providing to \code{CreateInputsCrit} arguments atomics only. \cr
Calculation of multiple criteria (e.g. NSE computed on discharge and RMSE computed on discharge) is prepared by providing to \code{CreateInputsCrit} arguments lists except for \code{Weights} that must be set as \code{NULL}. \cr
......@@ -93,15 +108,15 @@ library(airGR)
data(L0123001)
## preparation of the InputsModel object
InputsModel <- CreateInputsModel(FUN_MOD = RunModel_GR4J, DatesR = BasinObs$DatesR,
InputsModel <- CreateInputsModel(FUN_MOD = RunModel_GR4J, DatesR = BasinObs$DatesR,
Precip = BasinObs$P, PotEvap = BasinObs$E)
## calibration period selection
Ind_Run <- seq(which(format(BasinObs$DatesR, format = "\%Y-\%m-\%d")=="1990-01-01"),
Ind_Run <- seq(which(format(BasinObs$DatesR, format = "\%Y-\%m-\%d")=="1990-01-01"),
which(format(BasinObs$DatesR, format = "\%Y-\%m-\%d")=="1999-12-31"))
## preparation of RunOptions object
RunOptions <- CreateRunOptions(FUN_MOD = RunModel_GR4J, InputsModel = InputsModel,
RunOptions <- CreateRunOptions(FUN_MOD = RunModel_GR4J, InputsModel = InputsModel,
IndPeriod_Run = Ind_Run)
## simulation
......@@ -120,20 +135,22 @@ invisible(ErrorCrit(InputsCrit = InputsCritSingle, OutputsModel = OutputsModel))
## 2 efficiency criteria: RMSE and Nash-Sutcliffe Efficiency
InputsCritMulti <- CreateInputsCrit(FUN_CRIT = list(ErrorCrit_RMSE, ErrorCrit_NSE),
InputsModel = InputsModel, RunOptions = RunOptions,
Obs = list(BasinObs$Qmm[Ind_Run], BasinObs$Qmm[Ind_Run]),
Obs = list(BasinObs$Qmm[Ind_Run],
BasinObs$Qmm[Ind_Run]),
VarObs = list("Q", "Q"), transfo = list("", "sqrt"),
Weights = NULL)
str(InputsCritMulti)
str(InputsCritMulti)
invisible(ErrorCrit(InputsCrit = InputsCritMulti, OutputsModel = OutputsModel))
## efficiency composite criterion: Nash-Sutcliffe Efficiency mixing
## both raw and log-transformed flows
InputsCritCompo <- CreateInputsCrit(FUN_CRIT = list(ErrorCrit_NSE, ErrorCrit_NSE),
InputsModel = InputsModel, RunOptions = RunOptions,
Obs = list(BasinObs$Qmm[Ind_Run], BasinObs$Qmm[Ind_Run]),
Obs = list(BasinObs$Qmm[Ind_Run],
BasinObs$Qmm[Ind_Run]),
VarObs = list("Q", "Q"), transfo = list("", "log"),
Weights = list(0.4, 0.6))
str(InputsCritCompo)
str(InputsCritCompo)
invisible(ErrorCrit(InputsCrit = InputsCritCompo, OutputsModel = OutputsModel))
}
......@@ -144,13 +161,13 @@ Olivier Delaigue, Laurent Coron, Guillaume Thirel
\references{
Pushpalatha, R., Perrin, C., Le Moine, N. and Andréassian, V. (2012).
A review of efficiency criteria suitable for evaluating low-flow simulations.
Journal of Hydrology, 420-421: 171-182. doi:10.1016/j.jhydrol.2011.11.055.
Pushpalatha, R., Perrin, C., Le Moine, N. and Andréassian, V. (2012).
A review of efficiency criteria suitable for evaluating low-flow simulations.
Journal of Hydrology, 420-421, 171-182, doi: 10.1016/j.jhydrol.2011.11.055.
\cr\cr
Santos, L., Thirel, G. and Perrin, C. (2018).
Technical note: Pitfalls in using log-transformed flows within the KGE criterion.
Hydrol. Earth Syst. Sci., 22, 4583-4591. doi:10.5194/hess-22-4583-2018.
Santos, L., Thirel, G. and Perrin, C. (2018).
Technical note: Pitfalls in using log-transformed flows within the KGE criterion.
Hydrol. Earth Syst. Sci., 22, 4583-4591, doi: 10.5194/hess-22-4583-2018.
}
......
\encoding{UTF-8}
\name{CreateInputsCrit_Lavenne}
\alias{CreateInputsCrit_Lavenne}
\title{Creation of the InputsCrit object for Lavenne Criterion}
\description{
Creation of the \code{InputsCrit} object required to the \code{\link{ErrorCrit}} function. This function defines a composite criterion based on the formula proposed by Lavenne et al. (2019).
}
\usage{
CreateInputsCrit_Lavenne(FUN_CRIT = ErrorCrit_KGE,
InputsModel,
RunOptions,
Obs,
VarObs = "Q",
AprParamR,
AprCrit = 1,
k = 0.15,
BoolCrit = NULL,
transfo = "sqrt",
epsilon = NULL)
}
\arguments{
\item{FUN_CRIT}{[function] error criterion function (e.g. \code{\link{ErrorCrit_KGE}}, \code{\link{ErrorCrit_NSE}}). Default \code{\link{ErrorCrit_KGE}}}
\item{InputsModel}{[object of class \emph{InputsModel}] see \code{\link{CreateInputsModel}} for details}
\item{RunOptions}{[object of class \emph{RunOptions}] see \code{\link{CreateRunOptions}} for details}
\item{Obs}{[numeric (atomic or list)] series of observed variable ([mm/time step] for discharge or SWE, [-] for SCA)}
\item{VarObs}{(optional) [character (atomic or list)] names of the observed variable (\code{"Q"} by default, or one of \code{"SCA"}, \code{"SWE"})}
\item{AprParamR}{[numeric] a priori parameter set from a donor catchment}
\item{AprCrit}{(optional) [numeric] performance criterion of the donor catchment (1 by default)}
\item{k}{(optional) [numeric] coefficient used for the weighted average between \code{FUN_CRIT} and the gap between the optimised parameter set and an a priori parameter set calculated with the function produced by \code{\link{CreateErrorCrit_GAPX}}}
\item{BoolCrit}{(optional) [boolean] boolean (the same length as \code{Obs}) giving the time steps to consider in the computation (all time steps are considered by default. See details)}
\item{transfo}{(optional) [character] name of the transformation applied to the variables (e.g. \code{""}, \code{"sqrt"}, \code{"log"}, \code{"inv"}, \code{"sort"}, \code{"boxcox"} or a numeric value for power transformation for \code{FUN_CRIT}. Default value is \code{"sqrt"}. See details of \code{\link{CreateInputsCrit}}}
\item{epsilon}{(optional) [numeric] small value to add to all observations and simulations for \code{FUN_CRIT} when \code{"log"} or \code{"inv"} transformations are used [same unit as \code{Obs}]. See details of \code{\link{CreateInputsCrit}}}
}
\value{
[list] object of class InputsCrit containing the data required to evaluate the model outputs (see \code{\link{CreateInputsCrit}} for more details).
\code{CreateInputsCrit_Lavenne} returns an object of class \emph{Compo}.
Items \code{Weights} of the criteria are respectively equal to \code{k} and \code{k * max(0, AprCrit)}.
To calculate the Lavenne criterion, it is necessary to use the \code{ErrorCrit} function as for any other composite criterion.
}
\details{
The parameters \code{FUN_CRIT}, \code{Obs}, \code{VarObs}, \code{BoolCrit}, \code{transfo}, and \code{epsilon} must be used as they would be used for \code{\link{CreateInputsCrit}} in the case of a single criterion.
\code{\link{ErrorCrit_RMSE}} cannot be used in a composite criterion since it is not a unitless value.
\code{CreateInputsCrit_Lavenne} creates a composite criterion in respect with Equations 1 and 2 of de Lavenne et al. (2019).
}
\examples{
library(airGR)
## loading catchment data
data(L0123001)
## preparation of the InputsModel object
InputsModel <- CreateInputsModel(FUN_MOD = RunModel_GR4J, DatesR = BasinObs$DatesR,
Precip = BasinObs$P, PotEvap = BasinObs$E)
## calibration period selection
Ind_Run <- seq(which(format(BasinObs$DatesR, format = "\%Y-\%m-\%d")=="1990-01-01"),
which(format(BasinObs$DatesR, format = "\%Y-\%m-\%d")=="1999-12-31"))
## preparation of RunOptions object
RunOptions <- CreateRunOptions(FUN_MOD = RunModel_GR4J, InputsModel = InputsModel,
IndPeriod_Run = Ind_Run)
## simulation
Param <- c(X1 = 257.238, X2 = 1.012, X3 = 88.235, X4 = 2.208)
OutputsModel <- RunModel_GR4J(InputsModel = InputsModel,
RunOptions = RunOptions, Param = Param)
## The "a priori" parameters for the Lavenne formula
AprParamR <- c(X1 = 157, X2 = 0.8, X3 = 100, X4 = 1.5)
## Single efficiency criterion: GAPX with a priori parameters
IC_DL <- CreateInputsCrit_Lavenne(InputsModel = InputsModel,
RunOptions = RunOptions,
Obs = BasinObs$Qmm[Ind_Run],
AprParamR = AprParamR)
str(ErrorCrit(InputsCrit = IC_DL, OutputsModel = OutputsModel))
}
\author{
David Dorchies
}
\references{
de Lavenne, A., Andréassian, V., Thirel, G., Ramos, M.-H. and Perrin, C. (2019).
A Regularization Approach to Improve the Sequential Calibration of a Semidistributed Hydrological Model.
Water Resources Research 55, 8821–8839. \doi{10.1029/2018WR024266}
}
\seealso{
\code{\link{RunModel}}, \code{\link{CreateInputsModel}}, \code{\link{CreateRunOptions}}, \code{\link{CreateCalibOptions}}, \code{\link{ErrorCrit}}
}
......@@ -3,15 +3,25 @@
\name{CreateInputsModel}
\alias{CreateInputsModel}
\alias{[.InputsModel}
\title{Creation of the InputsModel object required to the RunModel functions}
\description{
Creation of the \emph{InputsModel} object required to the \code{RunModel*} functions.
}
\usage{
CreateInputsModel(FUN_MOD, DatesR, Precip, PrecipScale = TRUE, PotEvap = NULL,
TempMean = NULL, TempMin = NULL, TempMax = NULL, ZInputs = NULL, HypsoData = NULL,
NLayers = 5, verbose = TRUE)
TempMean = NULL, TempMin = NULL, TempMax = NULL,
ZInputs = NULL, HypsoData = NULL, NLayers = 5,
Qupstream = NULL, LengthHydro = NULL, BasinAreas = NULL,
QupstrUnit = "mm", verbose = TRUE)
\method{[}{InputsModel}(x, i)
}
......@@ -39,6 +49,18 @@ CreateInputsModel(FUN_MOD, DatesR, Precip, PrecipScale = TRUE, PotEvap = NULL,
\item{NLayers}{(optional) [numeric] integer giving the number of elevation layers requested [-], required to create CemaNeige module inputs, default=5}
\item{verbose}{(optional) [boolean] boolean indicating if the function is run in verbose mode or not, default = \code{TRUE}}
\item{Qupstream}{(optional) [numerical matrix] time series of upstream flows (catchment average), its unit is defined by the \code{QupstrUnit} parameter, required to create the SD model inputs. See details}
\item{LengthHydro}{(optional) [numeric] real giving the distance between the downstream outlet and each upstream inlet of the sub-catchment [km], required to create the SD model inputs . See details}
\item{BasinAreas}{(optional) [numeric] real giving the area of each upstream sub-catchment [km2] and the area of the downstream sub-catchment in the last item, required to create the SD model inputs . See details}
\item{QupstrUnit}{(optional) [character] unit of the flow in the argument \code{Qupstream}, available units are: "mm" for mm/time-step (default), "m3" for m3/time-step, "m3/s" and "l/s". See details}
\item{x}{[InputsModel] object of class InputsModel}
\item{i}{[integer] of the indices to subset a time series or [character] names of the elements to extract}
}
......@@ -47,7 +69,7 @@ CreateInputsModel(FUN_MOD, DatesR, Precip, PrecipScale = TRUE, PotEvap = NULL,
\tabular{ll}{
\emph{$DatesR } \tab [POSIXlt] vector of dates \cr
\emph{$Precip } \tab [numeric] time series of total precipitation (catchment average) [mm/time step] \cr
\emph{$PotEvap } \tab [numeric] time series of potential evapotranspiration (catchment average) [mm/time step], \cr\tab defined if FUN_MOD includes GR4H, GR4J, GR5J, GR6J, GR2M or GR1A \cr \cr
\emph{$PotEvap } \tab [numeric] time series of potential evapotranspiration (catchment average) [mm/time step], \cr\tab defined if FUN_MOD includes GR4H, GR5H, GR4J, GR5J, GR6J, GR2M or GR1A \cr \cr
\emph{$LayerPrecip } \tab [list] list of time series of precipitation (layer average) [mm/time step], \cr\tab defined if \code{FUN_MOD} includes CemaNeige \cr \cr
\emph{$LayerTempMean } \tab [list] list of time series of mean air temperature (layer average) [°C], \cr\tab defined if \code{FUN_MOD} includes CemaNeige \cr \cr
\emph{$LayerFracSolidPrecip} \tab [list] list of time series of solid precipitation fraction (layer average) [-], \cr\tab defined if \code{FUN_MOD} includes CemaNeige \cr \cr
......@@ -55,17 +77,17 @@ CreateInputsModel(FUN_MOD, DatesR, Precip, PrecipScale = TRUE, PotEvap = NULL,
}
\description{
Creation of the \emph{InputsModel} object required to the \code{RunModel*} functions.
}
\details{
Users wanting to use \code{FUN_MOD} functions that are not included in
Users wanting to use \code{FUN_MOD} functions that are not included in
the package must create their own InputsModel object accordingly. \cr
Please note that if CemaNeige is used, and \code{ZInputs} is different than \code{HypsoData}, then precipitation and temperature are interpolated with the \code{DataAltiExtrapolation_Valery} function.
}
Users wanting to use a semi-distributed (SD) model should provide valid \code{Qupstream}, \code{LengthHydro}, and \code{BasinAreas} arguments. Each upstream sub-catchment is described by an upstream flow time series (one column in \code{Qupstream} matrix), a distance between the downstream outlet and the upstream inlet (one item in \code{LengthHydro}) and an area (one item in \code{BasinAreas}).
The order of the columns or of the items should be consistent for all these parameters.
\code{BasinAreas} should contain one extra information (stored in the last item) which is the area of the downstream sub-catchment.
Upstream flows that are not related to a sub-catchment such as release or withdraw spots are identified by an area equal to \code{NA}, and if \code{unit="mm"} the upstream flow must be expressed in m3/time step instead of mm/time step which is not possible in absence of a related area.
Please note that the use of SD model requires to use the \code{\link{RunModel}} function instead of \code{\link{RunModel_GR4J}} or the other \code{RunModel_*} functions.
}
\examples{
library(airGR)
......@@ -74,11 +96,11 @@ library(airGR)
data(L0123001)
## preparation of the InputsModel object
InputsModel <- CreateInputsModel(FUN_MOD = RunModel_GR4J, DatesR = BasinObs$DatesR,
InputsModel <- CreateInputsModel(FUN_MOD = RunModel_GR4J, DatesR = BasinObs$DatesR,
Precip = BasinObs$P, PotEvap = BasinObs$E)
## run period selection
Ind_Run <- seq(which(format(BasinObs$DatesR, format = "\%Y-\%m-\%d")=="1990-01-01"),
Ind_Run <- seq(which(format(BasinObs$DatesR, format = "\%Y-\%m-\%d")=="1990-01-01"),
which(format(BasinObs$DatesR, format = "\%Y-\%m-\%d")=="1999-12-31"))
## preparation of the RunOptions object
......@@ -87,14 +109,15 @@ RunOptions <- CreateRunOptions(FUN_MOD = RunModel_GR4J,
## simulation
Param <- c(X1 = 734.568, X2 = -0.840, X3 = 109.809, X4 = 1.971)
OutputsModel <- RunModel(InputsModel = InputsModel, RunOptions = RunOptions, Param = Param,
OutputsModel <- RunModel(InputsModel = InputsModel,
RunOptions = RunOptions, Param = Param,
FUN_MOD = RunModel_GR4J)
## results preview
plot(OutputsModel, Qobs = BasinObs$Qmm[Ind_Run])
## efficiency criterion: Nash-Sutcliffe Efficiency
InputsCrit <- CreateInputsCrit(FUN_CRIT = ErrorCrit_NSE, InputsModel = InputsModel,
InputsCrit <- CreateInputsCrit(FUN_CRIT = ErrorCrit_NSE, InputsModel = InputsModel,
RunOptions = RunOptions, Obs = BasinObs$Qmm[Ind_Run])
OutputsCrit <- ErrorCrit_NSE(InputsCrit = InputsCrit, OutputsModel = OutputsModel)
}
......
......@@ -8,14 +8,18 @@
\title{Creation of the RunOptions object required to the RunModel functions}
\description{
Creation of the RunOptions object required to the \code{RunModel*} functions.
}
\usage{
CreateRunOptions(FUN_MOD, InputsModel,
IndPeriod_WarmUp = NULL, IndPeriod_Run,
IniStates = NULL, IniResLevels = NULL,
Outputs_Cal = NULL, Outputs_Sim = "all",
RunSnowModule, MeanAnSolidPrecip = NULL,
IsHyst = FALSE,
warnings = TRUE, verbose = TRUE)
IndPeriod_WarmUp = NULL, IndPeriod_Run,
IniStates = NULL, IniResLevels = NULL, Imax = NULL,
Outputs_Cal = NULL, Outputs_Sim = "all",
MeanAnSolidPrecip = NULL, IsHyst = FALSE,
warnings = TRUE, verbose = TRUE)
}
......@@ -24,22 +28,21 @@ CreateRunOptions(FUN_MOD, InputsModel,
\item{InputsModel}{[object of class \emph{InputsModel}] see \code{\link{CreateInputsModel}} for details}
\item{IndPeriod_WarmUp}{(optional) [numeric] index of period to be used for the model warm-up [-]}
\item{IndPeriod_WarmUp}{(optional) [numeric] index of period to be used for the model warm-up [-]. See details}
\item{IndPeriod_Run}{[numeric] index of period to be used for the model run [-]}
\item{IndPeriod_Run}{[numeric] index of period to be used for the model run [-]. See details}
\item{IniStates}{(optional) [numeric] object of class \code{IniStates} [mm and °C], see \code{\link{CreateIniStates}} for details}
\item{IniResLevels}{(optional) [numeric] vector of initial fillings for the GR stores (2 or 3 values according to the model) [- and/or mm]; see details}
\item{IniResLevels}{(optional) [numeric] vector of initial fillings for the GR stores (4 values; use NA when not relevant for a given model) [- and/or mm]. See details}
\item{Imax}{(optional) [numeric] an atomic vector of the maximum capacity of the GR5H interception store [mm]; see \code{\link{RunModel_GR5H}}}
\item{Outputs_Cal}{(optional) [character] vector giving the outputs needed for the calibration \cr (e.g. c("Qsim")), the fewer outputs
the faster the calibration}
\item{Outputs_Sim}{(optional) [character] vector giving the requested outputs \cr (e.g. c(\code{"DatesR"}, \code{"Qsim"}, \code{"SnowPack"})), default = \code{"all"}}
\item{RunSnowModule}{(deprecated) [boolean] option indicating whether CemaNeige should be activated. Please adapt \code{FUN_MOD} instead}
\item{MeanAnSolidPrecip}{(optional) [numeric] vector giving the annual mean of average solid precipitation for each layer (computed from InputsModel if not defined) [mm/y]}
\item{IsHyst}{[boolean] boolean indicating if the hysteresis version of CemaNeige is used. See details}
......@@ -59,21 +62,21 @@ CreateRunOptions(FUN_MOD, InputsModel,
\emph{IniResLevels } \tab [numeric] vector of initial filling rates for production and routing stores [-] and level for the exponential store for GR6J [mm]\cr
\emph{Outputs_Cal } \tab [character] character vector giving only the outputs needed for the calibration \cr
\emph{Outputs_Sim } \tab [character] character vector giving the requested outputs \cr
\emph{Imax } \tab [numeric] vector giving the maximal capacity of the GR5H interception store \cr
\emph{MeanAnSolidPrecip} \tab [numeric] vector giving the annual mean of average solid precipitation for each layer [mm/y] \cr
}
}
\description{
Creation of the RunOptions object required to the \code{RunModel*} functions.
}
\details{
Users wanting to use \code{FUN_MOD} functions that are not included in
Users wanting to use \code{FUN_MOD} functions that are not included in
the package must create their own \code{RunOptions} object accordingly.
## ---- Initialisation options
## --- IndPeriod_WarmUp and IndPeriod_Run
Since the hydrological models included in airGR are continuous models, meaning that internal states of the models are propagated to the next time step, \code{IndPeriod_WarmUp} and \code{IndPeriod_Run} must be continuous periods, represented by continuous indices values; no gaps are allowed. To calculate criteria or to calibrate a model over discontinuous periods, please see the \code{Bool_Crit} argument of the \code{\link{CreateInputsCrit}} function.
## --- Initialisation options
The model initialisation options can either be set to a default configuration or be defined by the user.
......@@ -83,10 +86,10 @@ A default configuration is used for initialisation if these vectors are not defi
(1) Default initialisation options:
\itemize{
\item \code{IndPeriod_WarmUp} default setting ensures a one-year warm-up using the time steps preceding the \code{IndPeriod_Run}.
\item \code{IndPeriod_WarmUp} default setting ensures a one-year warm-up using the time steps preceding the \code{IndPeriod_Run}.
The actual length of this warm-up might be shorter depending on data availability (no missing value of climate inputs being allowed in model input series).
\item \code{IniStates} and \code{IniResLevels} are automatically set to initialise all the model states at 0, except for the production and routing stores which are respectively initialised at 30 \% and 50 \% of their capacity. In case GR6J is used, the exponential store is initialised by default with 0 mm. This initialisation is made at the very beginning of the model call (i.e. at the beginning of \code{IndPeriod_WarmUp} or at the beginning of \code{IndPeriod_Run} if the warm-up period is disabled).
\item \code{IniStates} and \code{IniResLevels} are automatically set to initialise all the model states at 0, except for the production and routing stores levels which are respectively initialised at 30 \% and 50 \% of their capacity. In case GR5H is used with an interception store, the intercetion store level is initialised by default with 0 mm. In case GR6J is used, the exponential store level is initialised by default with 0 mm. This initialisation is made at the very beginning of the model call (i.e. at the beginning of \code{IndPeriod_WarmUp} or at the beginning of \code{IndPeriod_Run} if the warm-up period is disabled).
}
(2) Customisation of initialisation options:
......@@ -96,7 +99,7 @@ The actual length of this warm-up might be shorter depending on data availabilit
\itemize{
\item remark 1: for most common cases, indices corresponding to one or several years preceding \code{IndPeriod_Run} are used (e.g. \code{IndPeriod_WarmUp = 1000:1365} and \code{IndPeriod_Run = 1366:5000)}. \cr
However, it is also possible to perform a long-term initialisation if other indices than the warm-up ones are set in \code{IndPeriod_WarmUp} (e.g. \code{IndPeriod_WarmUp = c(1:5000, 1:5000, 1:5000, 1000:1365)}). \cr
\item remark 2: it is also possible to completely disable the warm-up period when using \code{IndPeriod_WarmUp = 0L}. This is necessary if you want \code{IniStates} and/or \code{IniResLevels} to be the actual initial values of the model variables from your simulation (e.g. to perform a forecast form a given initial state).
\item remark 2: it is also possible to completely disable the warm-up period when using \code{IndPeriod_WarmUp = 0L}. This is necessary if you want \code{IniStates} and/or \code{IniResLevels} to be the actual initial values of the model variables from your simulation (e.g. to perform a forecast form a given initial state).
}
\item \code{IniStates} and \code{IniResLevels} can be used to specify the initial model states.
\itemize{
......@@ -104,11 +107,11 @@ However, it is also possible to perform a long-term initialisation if other indi
\item remark 2: if \code{IniStates} is used, two possibilities are offered:\cr
- \code{IniStates} can be set to the \emph{$StateEnd} output of a previous \code{RunModel} call, as \emph{$StateEnd} already respects the correct format; \cr
- \code{IniStates} can be created with the \code{\link{CreateIniStates}} function.
\item remark 3: in addition to \code{IniStates}, \code{IniResLevels} allows to set the filling rate of the production and routing stores for the GR models. For instance for GR4J and GR5J: \code{IniResLevels = c(0.3, 0.5)} should be used to obtain initial fillings of 30 \% and 50 \% for the production and routing stores, respectively. For GR6J, \code{IniResLevels = c(0.3, 0.5, 0)} should be use to obtain initial fillings of 30 \% and 50 \% for the production, routing stores and 0 mm for the exponential store, respectively. \code{IniResLevels} is optional and can only be used if \code{IniStates} is also defined (the state values corresponding to these two other stores in \code{IniStates} are not used in such case).
\item remark 3: in addition to \code{IniStates}, \code{IniResLevels} allows to set the filling rate of the production and routing stores for the GR models. For instance for GR4J and GR5J: \code{IniResLevels = c(0.3, 0.5, NA, NA)} should be used to obtain initial fillings of 30 \% and 50 \% for the production and routing stores, respectively. For GR6J, \code{IniResLevels = c(0.3, 0.5, 0, NA)} should be used to obtain initial fillings of 30 \% and 50 \% for the production and routing stores levels and 0 mm for the exponential store level, respectively. For GR5H with an interception store, \code{IniResLevels = c(0.3, 0.5, NA, 0.4)} should be used to obtain initial fillings of 30 \%, 50 \% and 40 \% for the production, routing and interception stores levels, respectively. \code{IniResLevels} is optional and can only be used if \code{IniStates} is also defined (the state values corresponding to these two other stores in \code{IniStates} are not used in such case).
}
}
## ---- CemaNeige version
## --- CemaNeige version
If \code{IsHyst = FALSE}, the original CemaNeige version from Valéry et al. (2014) is used. \cr
If \code{IsHyst = TRUE}, the CemaNeige version from Riboust et al. (2019) is used. Compared to the original version, this version of CemaNeige needs two more parameters and it includes a representation of the hysteretic relationship between the Snow Cover Area (SCA) and the Snow Water Equivalent (SWE) in the catchment. The hysteresis included in airGR is the Modified Linear hysteresis (LH*); it is represented on panel b) of Fig. 3 in Riboust et al. (2019). Riboust et al. (2019) advise to use the LH* version of CemaNeige with parameters calibrated using an objective function combining 75 \% of KGE calculated on discharge simulated from a rainfall-runoff model compared to observed discharge and 5 \% of KGE calculated on SCA on 5 CemaNeige elevation bands compared to satellite (e.g. MODIS) SCA (see Eq. (18), Table 3 and Fig. 6). Riboust et al. (2019)'s tests were realized with GR4J as the chosen rainfall-runoff model. \cr
......@@ -122,11 +125,11 @@ library(airGR)
data(L0123001)
## preparation of the InputsModel object
InputsModel <- CreateInputsModel(FUN_MOD = RunModel_GR4J, DatesR = BasinObs$DatesR,
InputsModel <- CreateInputsModel(FUN_MOD = RunModel_GR4J, DatesR = BasinObs$DatesR,
Precip = BasinObs$P, PotEvap = BasinObs$E)
## run period selection
Ind_Run <- seq(which(format(BasinObs$DatesR, format = "\%Y-\%m-\%d")=="1990-01-01"),
Ind_Run <- seq(which(format(BasinObs$DatesR, format = "\%Y-\%m-\%d")=="1990-01-01"),
which(format(BasinObs$DatesR, format = "\%Y-\%m-\%d")=="1999-12-31"))
## preparation of the RunOptions object
......@@ -136,14 +139,14 @@ RunOptions <- CreateRunOptions(FUN_MOD = RunModel_GR4J,
## simulation
Param <- c(X1 = 734.568, X2 = -0.840, X3 = 109.809, X4 = 1.971)
OutputsModel <- RunModel(InputsModel = InputsModel,
RunOptions = RunOptions, Param = Param,
RunOptions = RunOptions, Param = Param,
FUN_MOD = RunModel_GR4J)
## results preview
plot(OutputsModel, Qobs = BasinObs$Qmm[Ind_Run])
## efficiency criterion: Nash-Sutcliffe Efficiency
InputsCrit <- CreateInputsCrit(FUN_CRIT = ErrorCrit_NSE, InputsModel = InputsModel,
InputsCrit <- CreateInputsCrit(FUN_CRIT = ErrorCrit_NSE, InputsModel = InputsModel,
RunOptions = RunOptions,
Obs = BasinObs$Qmm[Ind_Run])
OutputsCrit <- ErrorCrit_NSE(InputsCrit = InputsCrit, OutputsModel = OutputsModel)
......@@ -157,5 +160,5 @@ Laurent Coron, Olivier Delaigue, Guillaume Thirel
\seealso{
\code{\link{RunModel}}, \code{\link{CreateInputsModel}}, \code{\link{CreateInputsCrit}},
\code{\link{CreateCalibOptions}}, \code{\link{CreateIniStates}}
\code{\link{CreateCalibOptions}}, \code{\link{CreateIniStates}}, \code{\link{Imax}}
}
......@@ -8,17 +8,22 @@
\title{Altitudinal extrapolation of precipitation and temperature series described by A. Valery}
\description{
Function which extrapolates the precipitation and air temperature series for different elevation layers (method from Valéry, 2010).
}
\usage{
DataAltiExtrapolation_Valery(DatesR, Precip, PrecipScale = TRUE,
TempMean, TempMin = NULL, TempMax = NULL,
ZInputs, HypsoData, NLayers, verbose = TRUE)
TempMean, TempMin = NULL, TempMax = NULL,
ZInputs, HypsoData, NLayers, verbose = TRUE)
}
\arguments{
\item{DatesR}{[POSIXt] vector of dates}
\item{Precip}{[numeric] time series of daily total precipitation (catchment average) [mm/d]}
\item{Precip}{[numeric] time series of daily total precipitation (catchment average) [mm/time step]}
\item{PrecipScale}{(optional) [boolean] indicating if the mean of the precipitation interpolated on the elevation layers must be kept or not, required to create CemaNeige module inputs, default = \code{TRUE} (the mean of the precipitation is kept to the original value)}
......@@ -38,24 +43,19 @@ DataAltiExtrapolation_Valery(DatesR, Precip, PrecipScale = TRUE,
}
\value{
list containing the extrapolated series of precip. and air temp. on each elevation layer
\tabular{ll}{
\emph{$LayerPrecip } \tab [list] list of time series of daily precipitation (layer average) [mm/d] \cr
\emph{$LayerTempMean } \tab [list] list of time series of daily mean air temperature (layer average) [°C] \cr
\emph{$LayerTempMin } \tab [list] list of time series of daily min air temperature (layer average) [°C] \cr
\emph{$LayerTempMax } \tab [list] list of time series of daily max air temperature (layer average) [°C] \cr
\emph{$LayerFracSolidPrecip} \tab [list] list of time series of daily solid precip. fract. (layer average) [-] \cr
\emph{$ZLayers } \tab [numeric] vector of median elevation for each layer \cr
\tabular{ll}{
\emph{$LayerPrecip } \tab [list] list of time series of daily precipitation (layer average) [mm/time step] \cr
\emph{$LayerTempMean } \tab [list] list of time series of daily mean air temperature (layer average) [°C] \cr
\emph{$LayerTempMin } \tab [list] list of time series of daily min air temperature (layer average) [°C] \cr
\emph{$LayerTempMax } \tab [list] list of time series of daily max air temperature (layer average) [°C] \cr
\emph{$LayerFracSolidPrecip} \tab [list] list of time series of daily solid precip. fract. (layer average) [-] \cr
\emph{$ZLayers } \tab [numeric] vector of median elevation for each layer \cr
}
}
\description{
Function which extrapolates the precipitation and air temperature series for different elevation layers (method from Valéry, 2010).
}
\details{
Elevation layers of equal surface are created the 101 elevation quantiles (\code{HypsoData})
Elevation layers of equal surface are created the 101 elevation quantiles (\code{HypsoData})
and the number requested elevation layers (\code{NLayers}). \cr
Forcing data (precipitation and air temperature) are extrapolated using gradients from Valery (2010).
(e.g. gradP = 0.0004 [m-1] for France and gradT = 0.434 [°C/100m] for January, 1st). \cr
......@@ -69,16 +69,16 @@ Laurent Coron, Audrey Valéry, Olivier Delaigue, Pierre Brigode, Guillaume Thire
\references{
Turcotte, R., L.-G. Fortin, V. Fortin, J.-P. Fortin and J.-P. Villeneuve (2007).
Operational analysis of the spatial distribution and the temporal evolution of the snowpack water equivalent in southern Quebec, Canada,
Nordic Hydrology, 38(3), 211. doi:10.2166/nh.2007.009.
Turcotte, R., Fortin, L.-G., Fortin, V., Fortin, J.-P. and Villeneuve, J.-P. (2007).
Operational analysis of the spatial distribution and the temporal evolution of the snowpack water equivalent in southern Quebec, Canada.
Nordic Hydrology, 38(3), 211, \doi{10.2166/nh.2007.009}.
\cr\cr
Valéry, A. (2010),
Modélisation précipitations-débit sous influence nivale ? : Elaboration d'un module neige et évaluation sur 380 bassins versants.
PhD thesis (in french), AgroParisTech, Paris, France.
Modélisation précipitations-débit sous influence nivale ? : Elaboration d'un module neige et évaluation sur 380 bassins versants.
PhD thesis (in French), AgroParisTech - Cemagref Antony, Paris, France.
\cr\cr
USACE (1956),
Snow Hydrology, pp. 437.
Snow Hydrology, pp. 437.
U.S. Army Coprs of Engineers (USACE) North Pacific Division, Portland, Oregon, USA.
}
......
......@@ -8,8 +8,13 @@
\title{Error criterion using the provided function}
\description{
Function which computes an error criterion with the provided function.
}
\usage{
ErrorCrit(InputsCrit, OutputsModel, FUN_CRIT, warnings = TRUE, verbose = TRUE)
ErrorCrit(InputsCrit, OutputsModel, warnings = TRUE, verbose = TRUE)
}
......@@ -18,18 +23,12 @@ ErrorCrit(InputsCrit, OutputsModel, FUN_CRIT, warnings = TRUE, verbose = TRUE)
\item{OutputsModel}{[object of class \emph{OutputsModel}] see \code{\link{RunModel_GR4J}} or \code{\link{RunModel_CemaNeigeGR4J}} for details}
\item{FUN_CRIT}{(deprecated) [function] error criterion function (e.g. \code{\link{ErrorCrit_RMSE}}, \code{\link{ErrorCrit_NSE}})}
\item{warnings}{(optional) [boolean] boolean indicating if the warning messages are shown, default = \code{TRUE}}
\item{verbose}{(optional) [boolean] boolean indicating if the function is run in verbose mode or not, default = \code{TRUE}}
}
\description{
Function which computes an error criterion with the provided function.
}
\value{
If \code{InputsCrit} is of class \emph{Single}:
\tabular{ll}{
......@@ -63,15 +62,15 @@ library(airGR)
data(L0123001)
## preparation of the InputsModel object
InputsModel <- CreateInputsModel(FUN_MOD = RunModel_GR4J, DatesR = BasinObs$DatesR,
InputsModel <- CreateInputsModel(FUN_MOD = RunModel_GR4J, DatesR = BasinObs$DatesR,
Precip = BasinObs$P, PotEvap = BasinObs$E)
## calibration period selection
Ind_Run <- seq(which(format(BasinObs$DatesR, format = "\%Y-\%m-\%d")=="1990-01-01"),
Ind_Run <- seq(which(format(BasinObs$DatesR, format = "\%Y-\%m-\%d")=="1990-01-01"),
which(format(BasinObs$DatesR, format = "\%Y-\%m-\%d")=="1999-12-31"))
## preparation of RunOptions object
RunOptions <- CreateRunOptions(FUN_MOD = RunModel_GR4J, InputsModel = InputsModel,
RunOptions <- CreateRunOptions(FUN_MOD = RunModel_GR4J, InputsModel = InputsModel,
IndPeriod_Run = Ind_Run)
## simulation
......@@ -84,24 +83,26 @@ InputsCritSingle <- CreateInputsCrit(FUN_CRIT = ErrorCrit_NSE,
InputsModel = InputsModel, RunOptions = RunOptions,
Obs = list(BasinObs$Qmm[Ind_Run]),
VarObs = "Q", transfo = "",
Weights = NULL)
Weights = NULL)
str(ErrorCrit(InputsCrit = InputsCritSingle, OutputsModel = OutputsModel))
## 2 efficiency critera: RMSE and the Nash-Sutcliffe Efficiency
InputsCritMulti <- CreateInputsCrit(FUN_CRIT = list(ErrorCrit_RMSE, ErrorCrit_NSE),
InputsModel = InputsModel, RunOptions = RunOptions,
Obs = list(BasinObs$Qmm[Ind_Run], BasinObs$Qmm[Ind_Run]),
Obs = list(BasinObs$Qmm[Ind_Run],
BasinObs$Qmm[Ind_Run]),
VarObs = list("Q", "Q"), transfo = list("", "sqrt"),
Weights = NULL)
Weights = NULL)
str(ErrorCrit(InputsCrit = InputsCritMulti, OutputsModel = OutputsModel))
## efficiency composite criterion: Nash-Sutcliffe Efficiency mixing
## both raw and log-transformed flows
InputsCritCompo <- CreateInputsCrit(FUN_CRIT = list(ErrorCrit_NSE, ErrorCrit_NSE),
InputsModel = InputsModel, RunOptions = RunOptions,
Obs = list(BasinObs$Qmm[Ind_Run], BasinObs$Qmm[Ind_Run]),
Obs = list(BasinObs$Qmm[Ind_Run],
BasinObs$Qmm[Ind_Run]),
VarObs = list("Q", "Q"), transfo = list("", "log"),
Weights = list(0.4, 0.6))
Weights = list(0.4, 0.6))
str(ErrorCrit(InputsCrit = InputsCritCompo, OutputsModel = OutputsModel))
}
......
......@@ -8,6 +8,11 @@
\title{Error criterion based on the KGE formula}
\description{
Function which computes an error criterion based on the KGE formula proposed by Gupta et al. (2009).
}
\usage{
ErrorCrit_KGE(InputsCrit, OutputsModel, warnings = TRUE, verbose = TRUE)
}
......@@ -38,14 +43,9 @@ ErrorCrit_KGE(InputsCrit, OutputsModel, warnings = TRUE, verbose = TRUE)
}
\description{
Function which computes an error criterion based on the KGE formula proposed by Gupta et al. (2009).
}
\details{
In addition to the criterion value, the function outputs include a multiplier (-1 or +1) which allows
the use of the function for model calibration: the product CritValue * Multiplier is the criterion to be minimised (Multiplier = -1 for KGE).\cr\cr
In addition to the criterion value, the function outputs include a multiplier (-1 or +1) which allows
the use of the function for model calibration: the product \eqn{CritValue \times Multiplier} is the criterion to be minimised (Multiplier = -1 for KGE).\cr\cr
The KGE formula is
\deqn{KGE = 1 - \sqrt{(r - 1)^2 + (\alpha - 1)^2 + (\beta - 1)^2}}{KGE = 1 - sqrt((r - 1)² + (\alpha - 1)² + (\beta - 1)²)}
with the following sub-criteria:
......@@ -62,11 +62,11 @@ library(airGR)
data(L0123001)
## preparation of the InputsModel object
InputsModel <- CreateInputsModel(FUN_MOD = RunModel_GR4J, DatesR = BasinObs$DatesR,
InputsModel <- CreateInputsModel(FUN_MOD = RunModel_GR4J, DatesR = BasinObs$DatesR,
Precip = BasinObs$P, PotEvap = BasinObs$E)
## run period selection
Ind_Run <- seq(which(format(BasinObs$DatesR, format = "\%Y-\%m-\%d")=="1990-01-01"),
Ind_Run <- seq(which(format(BasinObs$DatesR, format = "\%Y-\%m-\%d")=="1990-01-01"),
which(format(BasinObs$DatesR, format = "\%Y-\%m-\%d")=="1999-12-31"))
## preparation of the RunOptions object
......@@ -75,24 +75,24 @@ RunOptions <- CreateRunOptions(FUN_MOD = RunModel_GR4J,
## simulation
Param <- c(X1 = 734.568, X2 = -0.840, X3 = 109.809, X4 = 1.971)
OutputsModel <- RunModel(InputsModel = InputsModel, RunOptions = RunOptions,
OutputsModel <- RunModel(InputsModel = InputsModel, RunOptions = RunOptions,
Param = Param, FUN = RunModel_GR4J)
## efficiency criterion: Kling-Gupta Efficiency
InputsCrit <- CreateInputsCrit(FUN_CRIT = ErrorCrit_KGE, InputsModel = InputsModel,
InputsCrit <- CreateInputsCrit(FUN_CRIT = ErrorCrit_KGE, InputsModel = InputsModel,
RunOptions = RunOptions, Obs = BasinObs$Qmm[Ind_Run])
OutputsCrit <- ErrorCrit_KGE(InputsCrit = InputsCrit, OutputsModel = OutputsModel)
## efficiency criterion: Kling-Gupta Efficiency on square-root-transformed flows
transfo <- "sqrt"
InputsCrit <- CreateInputsCrit(FUN_CRIT = ErrorCrit_KGE, InputsModel = InputsModel,
InputsCrit <- CreateInputsCrit(FUN_CRIT = ErrorCrit_KGE, InputsModel = InputsModel,
RunOptions = RunOptions, Obs = BasinObs$Qmm[Ind_Run],
transfo = transfo)
OutputsCrit <- ErrorCrit_KGE(InputsCrit = InputsCrit, OutputsModel = OutputsModel)
## efficiency criterion: Kling-Gupta Efficiency above a threshold (quant. 75 \%)
BoolCrit <- BasinObs$Qmm[Ind_Run] >= quantile(BasinObs$Qmm[Ind_Run], 0.75, na.rm = TRUE)
InputsCrit <- CreateInputsCrit(FUN_CRIT = ErrorCrit_KGE, InputsModel = InputsModel,
InputsCrit <- CreateInputsCrit(FUN_CRIT = ErrorCrit_KGE, InputsModel = InputsModel,
RunOptions = RunOptions, Obs = BasinObs$Qmm[Ind_Run],
BoolCrit = BoolCrit)
OutputsCrit <- ErrorCrit_KGE(InputsCrit = InputsCrit, OutputsModel = OutputsModel)
......@@ -105,9 +105,9 @@ Laurent Coron, Olivier Delaigue
\references{
Gupta, H. V., Kling, H., Yilmaz, K. K. and Martinez, G. F. (2009).
Decomposition of the mean squared error and NSE performance criteria: Implications for improving hydrological modelling.
Journal of Hydrology, 377(1-2), 80-91. doi:10.1016/j.jhydrol.2009.08.003.
Gupta, H. V., Kling, H., Yilmaz, K. K. and Martinez, G. F. (2009).
Decomposition of the mean squared error and NSE performance criteria: Implications for improving hydrological modelling.
Journal of Hydrology, 377(1-2), 80-91, \doi{10.1016/j.jhydrol.2009.08.003}.
}
......
......@@ -8,6 +8,11 @@
\title{Error criterion based on the KGE' formula}
\description{
Function which computes an error criterion based on the KGE' formula proposed by Kling et al. (2012).
}
\usage{
ErrorCrit_KGE2(InputsCrit, OutputsModel, warnings = TRUE, verbose = TRUE)
}
......@@ -38,14 +43,9 @@ ErrorCrit_KGE2(InputsCrit, OutputsModel, warnings = TRUE, verbose = TRUE)
}
\description{
Function which computes an error criterion based on the KGE' formula proposed by Kling et al. (2012).
}
\details{
In addition to the criterion value, the function outputs include a multiplier (-1 or +1) which allows
the use of the function for model calibration: the product CritValue * Multiplier is the criterion to be minimised (Multiplier = -1 for KGE2).\cr\cr
In addition to the criterion value, the function outputs include a multiplier (-1 or +1) which allows
the use of the function for model calibration: the product \eqn{CritValue \times Multiplier} is the criterion to be minimised (Multiplier = -1 for KGE2).\cr\cr
The KGE' formula is
\deqn{KGE' = 1 - \sqrt{(r - 1)^2 + (\gamma - 1)^2 + (\beta - 1)^2}}{KGE' = 1 - sqrt((r - 1)² + (\gamma - 1)² + (\beta - 1)²)}
with the following sub-criteria:
......@@ -62,11 +62,11 @@ library(airGR)
data(L0123001)
## preparation of the InputsModel object
InputsModel <- CreateInputsModel(FUN_MOD = RunModel_GR4J, DatesR = BasinObs$DatesR,
InputsModel <- CreateInputsModel(FUN_MOD = RunModel_GR4J, DatesR = BasinObs$DatesR,
Precip = BasinObs$P, PotEvap = BasinObs$E)
## run period selection
Ind_Run <- seq(which(format(BasinObs$DatesR, format = "\%Y-\%m-\%d")=="1990-01-01"),
Ind_Run <- seq(which(format(BasinObs$DatesR, format = "\%Y-\%m-\%d")=="1990-01-01"),
which(format(BasinObs$DatesR, format = "\%Y-\%m-\%d")=="1999-12-31"))
## preparation of the RunOptions object
......@@ -75,24 +75,24 @@ RunOptions <- CreateRunOptions(FUN_MOD = RunModel_GR4J,
## simulation
Param <- c(X1 = 734.568, X2 = -0.840, X3 = 109.809, X4 = 1.971)
OutputsModel <- RunModel(InputsModel = InputsModel, RunOptions = RunOptions,
OutputsModel <- RunModel(InputsModel = InputsModel, RunOptions = RunOptions,
Param = Param, FUN = RunModel_GR4J)
## efficiency criterion: Kling-Gupta Efficiency
InputsCrit <- CreateInputsCrit(FUN_CRIT = ErrorCrit_KGE2, InputsModel = InputsModel,
InputsCrit <- CreateInputsCrit(FUN_CRIT = ErrorCrit_KGE2, InputsModel = InputsModel,
RunOptions = RunOptions, Obs = BasinObs$Qmm[Ind_Run])
OutputsCrit <- ErrorCrit_KGE2(InputsCrit = InputsCrit, OutputsModel = OutputsModel)
## efficiency criterion: Kling-Gupta Efficiency on square-root-transformed flows
transfo <- "sqrt"
InputsCrit <- CreateInputsCrit(FUN_CRIT = ErrorCrit_KGE2, InputsModel = InputsModel,
InputsCrit <- CreateInputsCrit(FUN_CRIT = ErrorCrit_KGE2, InputsModel = InputsModel,
RunOptions = RunOptions, Obs = BasinObs$Qmm[Ind_Run],
transfo = transfo)
OutputsCrit <- ErrorCrit_KGE2(InputsCrit = InputsCrit, OutputsModel = OutputsModel)
## efficiency criterion: Kling-Gupta Efficiency above a threshold (quant. 75 \%)
BoolCrit <- BasinObs$Qmm[Ind_Run] >= quantile(BasinObs$Qmm[Ind_Run], 0.75, na.rm = TRUE)
InputsCrit <- CreateInputsCrit(FUN_CRIT = ErrorCrit_KGE2, InputsModel = InputsModel,
InputsCrit <- CreateInputsCrit(FUN_CRIT = ErrorCrit_KGE2, InputsModel = InputsModel,
RunOptions = RunOptions, Obs = BasinObs$Qmm[Ind_Run],
BoolCrit = BoolCrit)
OutputsCrit <- ErrorCrit_KGE2(InputsCrit = InputsCrit, OutputsModel = OutputsModel)
......@@ -105,13 +105,13 @@ Laurent Coron, Olivier Delaigue
\references{
Gupta, H. V., Kling, H., Yilmaz, K. K. and Martinez, G. F. (2009).
Decomposition of the mean squared error and NSE performance criteria: Implications for improving hydrological modelling.
Journal of Hydrology, 377(1-2), 80-91. doi:10.1016/j.jhydrol.2009.08.003.
Gupta, H. V., Kling, H., Yilmaz, K. K. and Martinez, G. F. (2009).
Decomposition of the mean squared error and NSE performance criteria: Implications for improving hydrological modelling.
Journal of Hydrology, 377(1-2), 80-91, \doi{10.1016/j.jhydrol.2009.08.003}.
\cr\cr
Kling, H., Fuchs, M. and Paulin, M. (2012).
Runoff conditions in the upper Danube basin under an ensemble of climate change scenarios.
Journal of Hydrology, 424-425, 264-277. doi:10.1016/j.jhydrol.2012.01.011.
Kling, H., Fuchs, M. and Paulin, M. (2012).
Runoff conditions in the upper Danube basin under an ensemble of climate change scenarios.
Journal of Hydrology, 424-425, 264-277, \doi{10.1016/j.jhydrol.2012.01.011}.
}
......
......@@ -13,6 +13,11 @@ ErrorCrit_NSE(InputsCrit, OutputsModel, warnings = TRUE, verbose = TRUE)
}
\description{
Function which computes an error criterion based on the NSE formula proposed by Nash & Sutcliffe (1970).
}
\arguments{
\item{InputsCrit}{[object of class \emph{InputsCrit}] see \code{\link{CreateInputsCrit}} for details}
......@@ -36,14 +41,9 @@ ErrorCrit_NSE(InputsCrit, OutputsModel, warnings = TRUE, verbose = TRUE)
}
\description{
Function which computes an error criterion based on the NSE formula proposed by Nash & Sutcliffe (1970).
}
\details{
In addition to the criterion value, the function outputs include a multiplier (-1 or +1) which allows
the use of the function for model calibration: the product CritValue * Multiplier is the criterion to be minimised
In addition to the criterion value, the function outputs include a multiplier (-1 or +1) which allows
the use of the function for model calibration: the product \eqn{CritValue \times Multiplier} is the criterion to be minimised
(Multiplier = -1 for NSE).
}
......@@ -55,11 +55,11 @@ library(airGR)
data(L0123001)
## preparation of the InputsModel object
InputsModel <- CreateInputsModel(FUN_MOD = RunModel_GR4J, DatesR = BasinObs$DatesR,
InputsModel <- CreateInputsModel(FUN_MOD = RunModel_GR4J, DatesR = BasinObs$DatesR,
Precip = BasinObs$P, PotEvap = BasinObs$E)
## run period selection
Ind_Run <- seq(which(format(BasinObs$DatesR, format = "\%Y-\%m-\%d")=="1990-01-01"),
Ind_Run <- seq(which(format(BasinObs$DatesR, format = "\%Y-\%m-\%d")=="1990-01-01"),
which(format(BasinObs$DatesR, format = "\%Y-\%m-\%d")=="1999-12-31"))
## preparation of the RunOptions object
......@@ -68,24 +68,24 @@ RunOptions <- CreateRunOptions(FUN_MOD = RunModel_GR4J,
## simulation
Param <- c(X1 = 734.568, X2 = -0.840, X3 = 109.809, X4 = 1.971)
OutputsModel <- RunModel(InputsModel = InputsModel, RunOptions = RunOptions,
OutputsModel <- RunModel(InputsModel = InputsModel, RunOptions = RunOptions,
Param = Param, FUN = RunModel_GR4J)
## efficiency criterion: Nash-Sutcliffe Efficiency
InputsCrit <- CreateInputsCrit(FUN_CRIT = ErrorCrit_NSE, InputsModel = InputsModel,
InputsCrit <- CreateInputsCrit(FUN_CRIT = ErrorCrit_NSE, InputsModel = InputsModel,
RunOptions = RunOptions, Obs = BasinObs$Qmm[Ind_Run])
OutputsCrit <- ErrorCrit_NSE(InputsCrit = InputsCrit, OutputsModel = OutputsModel)
## efficiency criterion: Nash-Sutcliffe Efficiency on log-transformed flows
transfo <- "log"
InputsCrit <- CreateInputsCrit(FUN_CRIT = ErrorCrit_NSE, InputsModel = InputsModel,
InputsCrit <- CreateInputsCrit(FUN_CRIT = ErrorCrit_NSE, InputsModel = InputsModel,
RunOptions = RunOptions, Obs = BasinObs$Qmm[Ind_Run],
transfo = transfo)
OutputsCrit <- ErrorCrit_NSE(InputsCrit = InputsCrit, OutputsModel = OutputsModel)
## efficiency criterion: Kling-Gupta Efficiency above a threshold (quant. 75 \%)
BoolCrit <- BasinObs$Qmm[Ind_Run] >= quantile(BasinObs$Qmm[Ind_Run], 0.75, na.rm = TRUE)
InputsCrit <- CreateInputsCrit(FUN_CRIT = ErrorCrit_NSE, InputsModel = InputsModel,
InputsCrit <- CreateInputsCrit(FUN_CRIT = ErrorCrit_NSE, InputsModel = InputsModel,
RunOptions = RunOptions, Obs = BasinObs$Qmm[Ind_Run],
BoolCrit = BoolCrit)
OutputsCrit <- ErrorCrit_NSE(InputsCrit = InputsCrit, OutputsModel = OutputsModel)
......@@ -96,9 +96,10 @@ OutputsCrit <- ErrorCrit_NSE(InputsCrit = InputsCrit, OutputsModel = OutputsMode
Laurent Coron, Olivier Delaigue
}
\references{
Nash, J.E. and Sutcliffe, J.V. (1970).
River flow forecasting through conceptual models part 1.
A discussion of principles, Journal of Hydrology, 10(3), 282-290. doi:10.1016/0022-1694(70)90255-6.
Nash, J. E. and Sutcliffe, J. V. (1970).
River flow forecasting through conceptual models.
Part 1 - A discussion of principles.
Journal of Hydrology, 10(3), 282-290, \doi{10.1016/0022-1694(70)90255-6}.
}
......
......@@ -3,6 +3,8 @@
\name{ErrorCrit_RMSE}
\alias{ErrorCrit_RMSE}
\title{Error criterion based on the RMSE}
......@@ -11,6 +13,11 @@ ErrorCrit_RMSE(InputsCrit, OutputsModel, warnings = TRUE, verbose = TRUE)
}
\description{
Function which computes an error criterion based on the root-mean-square error (RMSE).
}
\arguments{
\item{InputsCrit}{[object of class \emph{InputsCrit}] see \code{\link{CreateInputsCrit}} for details}
......@@ -25,23 +32,18 @@ ErrorCrit_RMSE(InputsCrit, OutputsModel, warnings = TRUE, verbose = TRUE)
\value{
[list] list containing the function outputs organised as follows:
\tabular{ll}{
\emph{$CritValue } \tab [numeric] value of the criterion \cr
\emph{$CritName } \tab [character] name of the criterion \cr
\emph{$CritBestValue } \tab [numeric] theoretical best criterion value \cr
\emph{$Multiplier } \tab [numeric] integer indicating whether the criterion is indeed an error (+1) or an efficiency (-1) \cr
\emph{$Ind_notcomputed} \tab [numeric] indices of the time steps where \emph{InputsCrit$BoolCrit} = \code{FALSE} or no data is available \cr
\emph{$CritValue } \tab [numeric] value of the criterion \cr
\emph{$CritName } \tab [character] name of the criterion \cr
\emph{$CritBestValue } \tab [numeric] theoretical best criterion value \cr
\emph{$Multiplier } \tab [numeric] integer indicating whether the criterion is indeed an error (+1) or an efficiency (-1) \cr
\emph{$Ind_notcomputed} \tab [numeric] indices of the time steps where \emph{InputsCrit$BoolCrit} = \code{FALSE} or no data is available \cr
}
}
\description{
Function which computes an error criterion based on the root-mean-square error (RMSE).
}
\details{
In addition to the criterion value, the function outputs include a multiplier (-1 or +1) which allows
the use of the function for model calibration: the product CritValue * Multiplier is the criterion to be minimised
the use of the function for model calibration: the product \eqn{CritValue \times Multiplier} is the criterion to be minimised
(Multiplier = +1 for RMSE).
}
......
\encoding{UTF-8}
\name{Imax}
\alias{Imax}
\title{Computation of the maximum capacity of the GR5H interception store}
\description{
Function which calculates the maximal capacity of the GR5H interception store. This function compares the interception evapotranspiration from the GR5H interception store for different maximal capacity values with the interception evapotranspiration classically used in the daily GR models (e.g. GR4J). Among all the \code{TestedValues}, the value that gives the closest interception evapotranspiration flux over the whole period is kept.
}
\usage{
Imax(InputsModel, IndPeriod_Run,
TestedValues = seq(from = 0.1, to = 3, by = 0.1))
}
\arguments{
\item{InputsModel}{[object of class \emph{InputsModel}] see \code{\link{CreateInputsModel}} for details}
\item{IndPeriod_Run}{[numeric] index of period to be used for the model run [-]}
\item{TestedValues}{[numeric] vector of tested Imax values [mm]}
}
\value{
Optimal Imax value [mm].
}
\examples{
library(airGR)
## loading catchment data
data(L0123003)
## preparation of the InputsModel object
InputsModel <- CreateInputsModel(FUN_MOD = RunModel_GR5H, DatesR = BasinObs$DatesR,
Precip = BasinObs$P, PotEvap = BasinObs$E)
## run period selection
Ind_Run <- seq(which(format(BasinObs$DatesR, format = "\%Y-\%m-\%d \%H")=="2006-01-01 00"),
which(format(BasinObs$DatesR, format = "\%Y-\%m-\%d \%H")=="2006-12-31 23"))
## Imax computation
Imax <- Imax(InputsModel = InputsModel, IndPeriod_Run = Ind_Run,
TestedValues = seq(from = 0, to = 3, by = 0.2))
## preparation of the RunOptions object
RunOptions <- CreateRunOptions(FUN_MOD = RunModel_GR5H, Imax = Imax,
InputsModel = InputsModel, IndPeriod_Run = Ind_Run)
## simulation
Param <- c(X1 = 706.912, X2 = -0.163, X3 = 188.880, X4 = 2.575, X5 = 0.104)
OutputsModel <- RunModel_GR5H(InputsModel = InputsModel,
RunOptions = RunOptions, Param = Param)
## results preview
plot(OutputsModel, Qobs = BasinObs$Qmm[Ind_Run])
## efficiency criterion: Nash-Sutcliffe Efficiency
InputsCrit <- CreateInputsCrit(FUN_CRIT = ErrorCrit_NSE, InputsModel = InputsModel,
RunOptions = RunOptions, Obs = BasinObs$Qmm[Ind_Run])
OutputsCrit <- ErrorCrit_NSE(InputsCrit = InputsCrit, OutputsModel = OutputsModel)
}
\author{
Guillaume Thirel, Olivier Delaigue
}
\references{
Ficchi, A. (2017).
An adaptive hydrological model for multiple time-steps:
Diagnostics and improvements based on fluxes consistency.
PhD thesis, UPMC - Irstea Antony, Paris, France.
\cr\cr
Ficchi, A., Perrin, C. and Andréassian, V. (2019).
Hydrological modelling at multiple sub-daily time steps: model improvement via flux-matching.
Journal of Hydrology, 575, 1308-1327, \doi{10.1016/j.jhydrol.2019.05.084}.
}
\seealso{
\code{\link{RunModel_GR5H}},
\code{\link{CreateInputsModel}}, \code{\link{CreateRunOptions}}.
}
\encoding{UTF-8}
\name{PE_Oudin}
\alias{PE_Oudin}
\title{Computation of series of potential evapotranspiration at the daily or hourly time steps with Oudin's formula}
\usage{
PE_Oudin(JD, Temp, Lat, LatUnit = c("rad", "deg"),
TimeStepIn = "daily", TimeStepOut = "daily",
RunFortran = FALSE)
}
\arguments{
\item{JD}{[numeric] time series of Julian day of the year [-]; see details}
\item{Temp}{[numeric] time series of daily (or hourly) mean air temperature [°C]}
\item{Lat}{[numeric] latitude of measurement for the temperature series [radians or degrees]. Atomic vector, except if \code{RunFortran = TRUE}, it can be a vector of the same length as \code{Temp}}
\item{LatUnit}{[character] latitude unit (default = \code{"rad"} or \code{"deg"})}
\item{TimeStepIn}{[character] time step of inputs (e.g. \code{"daily"} or \code{"hourly"}, default = \code{"daily"})}
\item{TimeStepOut}{[character] time step of outputs (e.g. \code{"daily"} or \code{"hourly"}, default = \code{"daily"})}
\item{RunFortran}{[boolean] to run the code in the Fortran mode or in the R mode (default)}
}
\value{
[numeric] time series of daily potential evapotranspiration [mm/time step]
}
\description{
Function which computes PE using the formula from Oudin et al. (2005). PE can be computed at the daily time step from hourly or daily temperature and at the hourly time step with hourly or daily temperature through a disaggregation of daily PE . See details.
}
\details{
To calculate basin-wide Oudin potential evapotranspiration, it is advised, when possible, to use either station temperature or gridded temperature data to calculate PE and then average these PE values at the basin scale.
In the \code{JD} argument, the Julian day of the year of the 1st of January is equal to 1 and the 31st of December to 365 (366 in leap years). If the Julian day of the year is computed on an object of the \code{POSIXlt} class, the user has to add 1 to the returned value (e.g. \code{as.POSIXlt("2016-12-31")$yday + 1}).
When hourly temperature is provided, all the values of the same day have to be set to the same Julian day of the year (e.g. \code{as.POSIXlt("2016-12-31 00:00:00")$yday + 1} and \code{as.POSIXlt("2016-12-31 00:01:00")$yday + 1}). Each single day must be provided 24 identical Julian day values (one for each hour).
Four cases are possible:
\itemize{
\item \code{TimeStepIn = "daily"} and \code{TimeStepOut = "daily"}: this is the classical application of the Oudin et al. (2005) formula
\item \code{TimeStepIn = "daily"} and \code{TimeStepOut = "hourly"}: the daily temperature is used inside the \code{PE_Oudin} function to calculate daily PE, which is then disaggregated at the hourly time step with use of a sinusoidal function (see Lobligeois, 2014, p. 78)
\item \code{TimeStepIn = "hourly"} and \code{TimeStepOut = "daily"}: the hourly temperature is aggregated at the daily time step and the daily PE is calculated normally within \code{PE_Oudin}
\item \code{TimeStepIn = "hourly"} and \code{TimeStepOut = "hourly"}: the hourly temperature is aggregated at the daily time step, the daily PE is then calculated normally within \code{PE_Oudin}, which is finally disaggregated at the hourly time step with use of a sinusoidal function (see Lobligeois, 2014, p. 78)
}
The use of the \code{PEdaily_Oudin} corresponds to the first case of the use of \code{PE_Oudin}.
}
\examples{
library(airGR)
data(L0123001)
PotEvap <- PE_Oudin(JD = as.POSIXlt(BasinObs$DatesR)$yday + 1,
Temp = BasinObs$T,
Lat = 0.8, LatUnit = "rad")
}
\author{
Laurent Coron, Ludovic Oudin, Olivier Delaigue, Guillaume Thirel, François Bourgin
}
\references{
Oudin, L., Hervieu, F., Michel, C., Perrin, C., Andréassian, V., Anctil, F. and Loumagne, C. (2005).
Which potential evapotranspiration input for a lumped rainfall-runoff model?
Part 2 - Towards a simple and efficient potential evapotranspiration model for rainfall-runoff modelling.
Journal of Hydrology, 303(1-4), 290-306, \doi{10.1016/j.jhydrol.2004.08.026}.
\cr\cr
Lobligeois, F. (2014).
Mieux connaitre la distribution spatiale des pluies améliore-t-il la modélisation des crues ? Diagnostic sur 181 bassins versants français.
PhD thesis (in French), AgroParisTech - Irstea Antony, Paris, France.
}
\encoding{UTF-8}
\name{PEdaily_Oudin}
\alias{PEdaily_Oudin}
\title{Computation of daily series of potential evapotranspiration with Oudin's formula}
\usage{
PEdaily_Oudin(JD, Temp, LatRad, Lat, LatUnit)
}
\arguments{
\item{JD}{[numeric] time series of Julian day of the year [-]; see details below}
\item{Temp}{[numeric] time series of daily mean air temperature [°C]}
\item{LatRad}{(deprecated)[numeric] latitude of measurement for the temperature series [rad]. Please use \code{Lat} instead}
\item{Lat}{[numeric] latitude of measurement for the temperature series [radian or degrees]}
\item{LatUnit}{[character] latitude unit (default = \code{"rad"} or \code{"deg"})}
}
\value{
[numeric] time series of daily potential evapotranspiration [mm/d]
}
\description{
Function which computes daily PE using the formula from Oudin et al. (2005).
}
\details{
In the \code{JD} argument, the Julian day of the year of the 1st of January is equal to 1 and the 31st of December to 365 (366 in leap years)). If the Julian day of the year is computed on an object of the \code{POSIXlt} class, the user has to add 1 to the returned value (e.g. \code{as.POSIXlt("2016-12-31")$yday + 1}).
}
\examples{
library(airGR)
data(L0123001)
PotEvap <- PEdaily_Oudin(JD = as.POSIXlt(BasinObs$DatesR)$yday + 1,
Temp = BasinObs$T,
Lat = 0.8, LatUnit = "rad")
}
\author{
Laurent Coron, Ludovic Oudin, Olivier Delaigue, Guillaume Thirel
}
\references{
Oudin, L., F. Hervieu, C. Michel, C. Perrin, V. Andréassian, F. Anctil and C. Loumagne (2005).
Which potential evapotranspiration input for a lumped rainfall-runoff model?:
Part 2-Towards a simple and efficient potential evapotranspiration model for rainfall-runoff modelling.
Journal of Hydrology, 303(1-4), 290-306. doi:10.1016/j.jhydrol.2004.08.026.
}
......@@ -9,31 +9,32 @@
\title{Generalist parameter sets for the GR4J model}
\format{Data frame of parameters containing four numeric vectors
\itemize{
\item {GR4J X1} {production store capacity [mm]}
\item {GR4J X2} {intercatchment exchange coefficient [mm/d]}
\item {GR4J X3} {routing store capacity [mm]}
\item {GR4J X4u} {unajusted unit hydrograph time constant [d]}
}}
\description{
These parameter sets can be used as an alternative for the grid-screening calibration procedure (i.e. first step in \code{\link{Calibration_Michel}}).
Please note that the given GR4J X4u variable does not correspond to the actual GR4J X4 parameter. As explained in Andréassian et al. (2014; section 2.1), the given GR4J X4u value has to be adjusted (rescaled) using catchment area (S) [km2] as follows: {X4 = X4u / 5.995 * S^0.3} (please note that the formula is erroneous in the publication). Please, see the example below. \cr
Please note that the given GR4J X4u variable does not correspond to the actual GR4J X4 parameter. As explained in Andréassian et al. (2014; section 2.1), the given GR4J X4u value has to be adjusted (rescaled) using catchment area (S) [km2] as follows: \eqn{X4 = X4u / 5.995 \times S^{0.3}} (please note that the formula is erroneous in the publication). Please, see the example below. \cr
As shown in Andréassian et al. (2014; figure 4), only using these parameters sets as the tested values for calibration is more efficient than a classical calibration when the amount of data is low (6 months or less).
}
\format{Data frame of parameters containing four numeric vectors:
\tabular{ll}{
GR4J X1 \tab production store capacity [mm] \cr
GR4J X2 \tab intercatchment exchange coefficient [mm/d] \cr
GR4J X3 \tab routing store capacity [mm] \cr
GR4J X4u \tab unajusted unit hydrograph time constant [d]\cr
}
}
\seealso{
\code{\link{RunModel_GR4J}}, \code{\link{Calibration_Michel}}, \code{\link{CreateCalibOptions}}.
}
\references{
Andréassian, V., F. Bourgin, L. Oudin, T. Mathevet, C. Perrin, J. Lerat, L. Coron, L. Berthet (2014).
Seeking genericity in the selection of parameter sets: impact on hydrological model efficiency.
Water Resources Research, 50(10), 8356-8366. doi: 10.1002/2013WR014761.
Andréassian, V., Bourgin, F., Oudin, L., Mathevet, T., Perrin, C., Lerat, J., Coron, L. and Berthet, L. (2014).
Seeking genericity in the selection of parameter sets: Impact on hydrological model efficiency.
Water Resources Research, 50(10), 8356-8366, \doi{10.1002/2013WR014761}.
}
......@@ -53,18 +54,18 @@ Param_Sets_GR4J$X4u <- NULL
Param_Sets_GR4J <- as.matrix(Param_Sets_GR4J)
## preparation of the InputsModel object
InputsModel <- CreateInputsModel(FUN_MOD = RunModel_GR4J, DatesR = BasinObs$DatesR,
InputsModel <- CreateInputsModel(FUN_MOD = RunModel_GR4J, DatesR = BasinObs$DatesR,
Precip = BasinObs$P, PotEvap = BasinObs$E)
## ---- calibration step
## --- calibration step
## short calibration period selection (< 6 months)
Ind_Cal <- seq(which(format(BasinObs$DatesR, format = "\%Y-\%m-\%d")=="1990-01-01"),
which(format(BasinObs$DatesR, format = "\%Y-\%m-\%d")=="1990-02-28"))
Ind_Cal <- seq(which(format(BasinObs$DatesR, format = "\%Y-\%m-\%d")=="1990-01-01"),
which(format(BasinObs$DatesR, format = "\%Y-\%m-\%d")=="1990-02-28"))
## preparation of the RunOptions object for the calibration period
RunOptions_Cal <- CreateRunOptions(FUN_MOD = RunModel_GR4J,
InputsModel = InputsModel, IndPeriod_Run = Ind_Cal)
InputsModel = InputsModel, IndPeriod_Run = Ind_Cal)
## simulation and efficiency criterion (Nash-Sutcliffe Efficiency)
## with all generalist parameter sets on the calibration period
......@@ -72,8 +73,8 @@ OutputsCrit_Loop <- apply(Param_Sets_GR4J, 1, function(Param) {
OutputsModel_Cal <- RunModel_GR4J(InputsModel = InputsModel,
RunOptions = RunOptions_Cal,
Param = Param)
InputsCrit <- CreateInputsCrit(FUN_CRIT = ErrorCrit_NSE, InputsModel = InputsModel,
RunOptions = RunOptions_Cal, Qobs = BasinObs$Qmm[Ind_Cal])
InputsCrit <- CreateInputsCrit(FUN_CRIT = ErrorCrit_NSE, InputsModel = InputsModel,
RunOptions = RunOptions_Cal, Obs = BasinObs$Qmm[Ind_Cal])
OutputsCrit <- ErrorCrit_NSE(InputsCrit = InputsCrit, OutputsModel = OutputsModel_Cal)
return(OutputsCrit$CritValue)
})
......@@ -82,11 +83,11 @@ OutputsCrit_Loop <- apply(Param_Sets_GR4J, 1, function(Param) {
Param_Best <- unlist(Param_Sets_GR4J[which.max(OutputsCrit_Loop), ])
## ---- validation step
## --- validation step
## validation period selection
Ind_Val <- seq(which(format(BasinObs$DatesR, format = "\%Y-\%m-\%d")=="1990-03-01"),
which(format(BasinObs$DatesR, format = "\%Y-\%m-\%d")=="1999-12-31"))
Ind_Val <- seq(which(format(BasinObs$DatesR, format = "\%Y-\%m-\%d")=="1990-03-01"),
which(format(BasinObs$DatesR, format = "\%Y-\%m-\%d")=="1999-12-31"))
## preparation of the RunOptions object for the validation period
RunOptions_Val <- CreateRunOptions(FUN_MOD = RunModel_GR4J,
......@@ -101,7 +102,7 @@ OutputsModel_Val <- RunModel_GR4J(InputsModel = InputsModel,
plot(OutputsModel_Val, Qobs = BasinObs$Qmm[Ind_Val])
## efficiency criterion (Nash-Sutcliffe Efficiency) on the validation period
InputsCrit_Val <- CreateInputsCrit(FUN_CRIT = ErrorCrit_NSE, InputsModel = InputsModel,
RunOptions = RunOptions_Val, Qobs = BasinObs$Qmm[Ind_Val])
InputsCrit_Val <- CreateInputsCrit(FUN_CRIT = ErrorCrit_NSE, InputsModel = InputsModel,
RunOptions = RunOptions_Val, Obs = BasinObs$Qmm[Ind_Val])
OutputsCrit_Val <- ErrorCrit_NSE(InputsCrit = InputsCrit_Val, OutputsModel = OutputsModel_Val)
}
\ No newline at end of file
}
......@@ -3,11 +3,21 @@
\name{RunModel}
\alias{RunModel}
%\alias{[.OutputsModel}
\title{Run with the provided hydrological model function}
\description{
Function which performs a single model run with the provided function over the selected period.
}
\usage{
RunModel(InputsModel, RunOptions, Param, FUN_MOD)
RunModel(InputsModel, RunOptions, Param, FUN_MOD, ...)
%
%\method{[}{OutputsModel}(x, i)
}
......@@ -16,21 +26,28 @@ RunModel(InputsModel, RunOptions, Param, FUN_MOD)
\item{RunOptions}{[object of class \emph{RunOptions}] see \code{\link{CreateRunOptions}} for details}
\item{Param}{[numeric] vector of model parameters}
\item{Param}{[numeric] vector of model parameters (See details for SD lag model)}
\item{FUN_MOD}{[function] hydrological model function (e.g. \code{\link{RunModel_GR4J}}, \code{\link{RunModel_CemaNeigeGR4J}})}
\item{...}{(optional) arguments to pass to \code{FUN_MOD}}
%
%\item{x}{[InputsModel] object of class InputsModel}
%
%\item{i}{[integer] of the indices to subset a time series or [character] names of the elements to extract}
}
\value{
[list] see \code{\link{RunModel_GR4J}} or \code{\link{RunModel_CemaNeigeGR4J}} for details
}
\value{
[list] see \code{\link{RunModel_GR4J}} or \code{\link{RunModel_CemaNeigeGR4J}} for details.
\description{
Function which performs a single model run with the provided function over the selected period.
If \code{InputsModel} parameter has been created for using a semi-distributed (SD) lag model (See \code{\link{CreateInputsModel}}), the list value contains an extra item named \code{QsimDown} which is a numeric series of simulated discharge [mm/time step] related to the run-off contribution of the downstream sub-catchment.
}
\details{
If \code{InputsModel} parameter has been created for using a semi-distributed (SD) lag model (See \code{\link{CreateInputsModel}}), the first item of \code{Param} parameter should contain a constant lag parameter expressed as a velocity in m/s, parameters for the hydrological model are then shift one position to the right.
}
\examples{
library(airGR)
......@@ -39,13 +56,13 @@ library(airGR)
data(L0123001)
## preparation of the InputsModel object
InputsModel <- CreateInputsModel(FUN_MOD = RunModel_GR4J, DatesR = BasinObs$DatesR,
InputsModel <- CreateInputsModel(FUN_MOD = RunModel_GR4J, DatesR = BasinObs$DatesR,
Precip = BasinObs$P, PotEvap = BasinObs$E)
## run period selection
Ind_Run <- seq(which(format(BasinObs$DatesR, format = "\%Y-\%m-\%d")=="1990-01-01"),
Ind_Run <- seq(which(format(BasinObs$DatesR, format = "\%Y-\%m-\%d")=="1990-01-01"),
which(format(BasinObs$DatesR, format = "\%Y-\%m-\%d")=="1999-12-31"))
## preparation of the RunOptions object
RunOptions <- CreateRunOptions(FUN_MOD = RunModel_GR4J,
InputsModel = InputsModel, IndPeriod_Run = Ind_Run)
......@@ -53,14 +70,14 @@ RunOptions <- CreateRunOptions(FUN_MOD = RunModel_GR4J,
## simulation
Param <- c(X1 = 734.568, X2 = -0.840, X3 = 109.809, X4 = 1.971)
OutputsModel <- RunModel(InputsModel = InputsModel,
RunOptions = RunOptions, Param = Param,
RunOptions = RunOptions, Param = Param,
FUN_MOD = RunModel_GR4J)
## results preview
plot(OutputsModel, Qobs = BasinObs$Qmm[Ind_Run])
## efficiency criterion: Nash-Sutcliffe Efficiency
InputsCrit <- CreateInputsCrit(FUN_CRIT = ErrorCrit_NSE, InputsModel = InputsModel,
InputsCrit <- CreateInputsCrit(FUN_CRIT = ErrorCrit_NSE, InputsModel = InputsModel,
RunOptions = RunOptions, Obs = BasinObs$Qmm[Ind_Run])
OutputsCrit <- ErrorCrit_NSE(InputsCrit = InputsCrit, OutputsModel = OutputsModel)
}
......
......@@ -8,6 +8,11 @@
\title{Run with the CemaNeige snow module}
\description{
Function which performs a single run for the CemaNeige snow module at the daily or hourly time step.
}
\usage{
RunModel_CemaNeige(InputsModel, RunOptions, Param)
}
......@@ -19,44 +24,39 @@ RunModel_CemaNeige(InputsModel, RunOptions, Param)
\item{RunOptions}{[object of class \emph{RunOptions}] see \code{\link{CreateRunOptions}} for details}
\item{Param}{[numeric] vector of 2 (or 4 parameters if \code{IsHyst = TRUE}, see \code{\link{CreateRunOptions}} for details)
\tabular{ll}{
CemaNeige X1 \tab weighting coefficient for snow pack thermal state [-] \cr
CemaNeige X2 \tab degree-day melt coefficient [mm/°C/d] \cr
CemaNeige X3 \tab (optional) accumulation threshold [mm] (needed if \code{IsHyst = TRUE}) \cr
CemaNeige X4 \tab (optional) percentage (between 0 and 1) of annual snowfall defining the melt threshold [-] (needed if \code{IsHyst = TRUE}) \cr
}}
\tabular{ll}{
CemaNeige X1 \tab weighting coefficient for snow pack thermal state [-] \cr
CemaNeige X2 \tab degree-day melt coefficient [mm/°C/time step] \cr
CemaNeige X3 \tab (optional) accumulation threshold [mm] (needed if \code{IsHyst = TRUE}) \cr
CemaNeige X4 \tab (optional) percentage (between 0 and 1) of annual snowfall defining the melt threshold [-] (needed if \code{IsHyst = TRUE}) \cr
}}
}
\value{
[list] list containing the function outputs organised as follows:
\tabular{ll}{
\emph{$DatesR} \tab [POSIXlt] series of dates \cr
\emph{$CemaNeigeLayers} \tab [list] list of CemaNeige outputs (1 list per layer) \cr
\emph{$CemaNeigeLayers[[iLayer]]$Pliq } \tab [numeric] series of liquid precip. [mm/d] \cr
\emph{$CemaNeigeLayers[[iLayer]]$Psol } \tab [numeric] series of solid precip. [mm/d] \cr
\emph{$CemaNeigeLayers[[iLayer]]$SnowPack } \tab [numeric] series of snow pack [mm] \cr
\emph{$CemaNeigeLayers[[iLayer]]$ThermalState } \tab [numeric] series of snow pack thermal state [°C] \cr
\emph{$CemaNeigeLayers[[iLayer]]$Gratio } \tab [numeric] series of Gratio [0-1] \cr
\emph{$CemaNeigeLayers[[iLayer]]$PotMelt } \tab [numeric] series of potential snow melt [mm/d] \cr
\emph{$CemaNeigeLayers[[iLayer]]$Melt } \tab [numeric] series of actual snow melt [mm/d] \cr
\emph{$CemaNeigeLayers[[iLayer]]$PliqAndMelt } \tab [numeric] series of liquid precip. + actual snow melt [mm/d] \cr
\emph{$CemaNeigeLayers[[iLayer]]$Temp } \tab [numeric] series of air temperature [°C] \cr
\emph{$CemaNeigeLayers[[iLayer]]$Gthreshold } \tab [numeric] series of melt threshold [mm] \cr
\emph{$CemaNeigeLayers[[iLayer]]$Glocalmax } \tab [numeric] series of local melt threshold for hysteresis [mm] \cr
\emph{$StateEnd} \tab [numeric] states at the end of the run: CemaNeige states [mm & °C], \cr\tab see \code{\link{CreateIniStates}} for more details \cr
}
(refer to the provided references or to the package source code for further details on these model outputs)
}
\description{
Function which performs a single run for the CemaNeige daily snow module.
[list] containing the function outputs organised as follows:
\tabular{ll}{
\emph{$DatesR } \tab [POSIXlt] series of dates \cr
\emph{$CemaNeigeLayers} \tab [list] CemaNeige outputs (1 element per layer) \cr
\emph{$CemaNeigeLayers[[iLayer]]$Pliq } \tab [numeric] series of liquid precip. [mm/time step] \cr
\emph{$CemaNeigeLayers[[iLayer]]$Psol } \tab [numeric] series of solid precip. [mm/time step] \cr
\emph{$CemaNeigeLayers[[iLayer]]$SnowPack } \tab [numeric] series of snow pack (snow water equivalent) [mm] \cr
\emph{$CemaNeigeLayers[[iLayer]]$ThermalState} \tab [numeric] series of snow pack thermal state [°C] \cr
\emph{$CemaNeigeLayers[[iLayer]]$Gratio } \tab [numeric] series of Gratio [0-1] \cr
\emph{$CemaNeigeLayers[[iLayer]]$PotMelt } \tab [numeric] series of potential snow melt [mm/time step] \cr
\emph{$CemaNeigeLayers[[iLayer]]$Melt } \tab [numeric] series of actual snow melt [mm/time step] \cr
\emph{$CemaNeigeLayers[[iLayer]]$PliqAndMelt } \tab [numeric] series of liquid precip. + actual snow melt [mm/time step] \cr
\emph{$CemaNeigeLayers[[iLayer]]$Temp } \tab [numeric] series of air temperature [°C] \cr
\emph{$CemaNeigeLayers[[iLayer]]$Gthreshold } \tab [numeric] series of melt threshold [mm] \cr
\emph{$CemaNeigeLayers[[iLayer]]$Glocalmax } \tab [numeric] series of local melt threshold for hysteresis [mm] \cr
\emph{$StateEnd} \tab [numeric] states at the end of the run: CemaNeige states [mm & °C]. See \code{\link{CreateIniStates}} for more details \cr
}
Refer to the provided references or to the package source code for further details on these model outputs.
}
\details{
The choice of the CemaNeige version is explained in \code{\link{CreateRunOptions}}. \cr
The choice of the CemaNeige version (i.e. with or without hysteresis) is explained in \code{\link{CreateRunOptions}}. \cr
For further details on the model, see the references section. \cr
For further details on the argument structures and initialisation options, see \code{\link{CreateRunOptions}}.
}
......@@ -79,7 +79,7 @@ Ind_Run <- seq(which(format(BasinObs$DatesR, format = "\%Y-\%m-\%d")=="1990-01-0
which(format(BasinObs$DatesR, format = "\%Y-\%m-\%d")=="1999-12-31"))
## ---- original version of CemaNeige
## --- original version of CemaNeige
## preparation of the RunOptions object
RunOptions <- CreateRunOptions(FUN_MOD = RunModel_CemaNeige, InputsModel = InputsModel,
......@@ -94,13 +94,13 @@ OutputsModel <- RunModel_CemaNeige(InputsModel = InputsModel,
plot(OutputsModel)
## ---- version of CemaNeige with the Linear Hysteresis
## --- version of CemaNeige with the Linear Hysteresis
## preparation of the RunOptions object
RunOptions <- CreateRunOptions(FUN_MOD = RunModel_CemaNeige, InputsModel = InputsModel,
IndPeriod_Run = Ind_Run, IsHyst = TRUE)
## simulation
## simulation
Param <- c(CNX1 = 0.962, CNX2 = 2.249, CNX3 = 100, CNX4 = 0.4)
OutputsModel <- RunModel_CemaNeige(InputsModel = InputsModel,
RunOptions = RunOptions, Param = Param)
......@@ -111,20 +111,24 @@ plot(OutputsModel)
\author{
Laurent Coron, Olivier Delaigue
Laurent Coron, Audrey Valéry, Vazken Andréassian, Olivier Delaigue, Guillaume Thirel
}
\references{
Riboust, P., G. Thirel, N. Le Moine and P. Ribstein (2019),
Revisiting a simple degree-day model for integrating satellite data: implementation of SWE-SCA hystereses.
Journal of Hydrology and Hydromechanics, doi:10.2478/johh-2018-0004, 67, 1, 70–81. \cr
Valéry, A., V. Andréassian and C. Perrin (2014),
"As simple as possible but not simpler": what is useful in a temperature-based snow-accounting routine?
Part 1 - Comparison of six snow accounting routines on 380 catchments, Journal of Hydrology, doi:10.1016/j.jhydrol.2014.04.059. \cr
Valéry, A., V. Andréassian and C. Perrin (2014),
"As simple as possible but not simpler": What is useful in a temperature-based snow-accounting routine?
Part 2 - Sensitivity analysis of the Cemaneige snow accounting routine on 380 catchments, Journal of Hydrology, doi:10.1016/j.jhydrol.2014.04.058.
Riboust, P., Thirel, G., Le Moine, N. and Ribstein, P. (2019).
Revisiting a simple degree-day model for integrating satellite data: Implementation of SWE-SCA hystereses.
Journal of Hydrology and Hydromechanics, 67(1), 70–81, \doi{10.2478/johh-2018-0004}.
\cr\cr
Valéry, A., Andréassian, V. and Perrin, C. (2014).
"As simple as possible but not simpler": What is useful in a temperature-based snow-accounting routine?
Part 1 - Comparison of six snow accounting routines on 380 catchments.
Journal of Hydrology, 517(0), 1166-1175, \doi{10.1016/j.jhydrol.2014.04.059}.
\cr\cr
Valéry, A., Andréassian, V. and Perrin, C. (2014).
"As simple as possible but not simpler": What is useful in a temperature-based snow-accounting routine?
Part 2 - Sensitivity analysis of the Cemaneige snow accounting routine on 380 catchments.
Journal of Hydrology, 517(0), 1176-1187, \doi{10.1016/j.jhydrol.2014.04.058}.
}
......
......@@ -8,6 +8,11 @@
\title{Run with the CemaNeigeGR4H hydrological model}
\description{
Function which performs a single run for the CemaNeige-GR4H hourly lumped model over the test period.
}
\usage{
RunModel_CemaNeigeGR4H(InputsModel, RunOptions, Param)
}
......@@ -19,72 +24,75 @@ RunModel_CemaNeigeGR4H(InputsModel, RunOptions, Param)
\item{RunOptions}{[object of class \emph{RunOptions}] see \code{\link{CreateRunOptions}} for details}
\item{Param}{[numeric] vector of 6 (or 8 parameters if \code{IsHyst = TRUE}, see \code{\link{CreateRunOptions}} for details)
\tabular{ll}{
GR4H X1 \tab production store capacity [mm] \cr
GR4H X2 \tab intercatchment exchange coefficient [mm/h] \cr
GR4H X3 \tab routing store capacity [mm] \cr
GR4H X4 \tab unit hydrograph time constant [d] \cr
CemaNeige X1 \tab weighting coefficient for snow pack thermal state [-] \cr
CemaNeige X2 \tab degree-hour melt coefficient [mm/°C/h] \cr
CemaNeige X3 \tab (optional) accumulation threshold [mm] (needed if \code{IsHyst = TRUE}) \cr
CemaNeige X4 \tab (optional) percentage (between 0 and 1) of annual snowfall defining the melt threshold [-] (needed if \code{IsHyst = TRUE}) \cr
}}
\tabular{ll}{
GR4H X1 \tab production store capacity [mm] \cr
GR4H X2 \tab intercatchment exchange coefficient [mm/h] \cr
GR4H X3 \tab routing store capacity [mm] \cr
GR4H X4 \tab unit hydrograph time constant [h] \cr
CemaNeige X1 \tab weighting coefficient for snow pack thermal state [-] \cr
CemaNeige X2 \tab degree-hour melt coefficient [mm/°C/h] \cr
CemaNeige X3 \tab (optional) accumulation threshold [mm] (needed if \code{IsHyst = TRUE}) \cr
CemaNeige X4 \tab (optional) percentage (between 0 and 1) of annual snowfall defining the melt threshold [-] (needed if \code{IsHyst = TRUE}) \cr
}}
}
\value{
[list] list containing the function outputs organised as follows:
\tabular{ll}{
\emph{$DatesR } \tab [POSIXlt] series of dates \cr
\emph{$PotEvap } \tab [numeric] series of input potential evapotranspiration [mm/h] \cr
\emph{$Precip } \tab [numeric] series of input total precipitation [mm/h] \cr
\emph{$Prod } \tab [numeric] series of production store level [mm] \cr
\emph{$Pn } \tab [numeric] series of net rainfall [mm/h] \cr
\emph{$Ps } \tab [numeric] series of the part of Pn filling the production store [mm/h] \cr
\emph{$AE } \tab [numeric] series of actual evapotranspiration [mm/h] \cr
\emph{$Perc } \tab [numeric] series of percolation (PERC) [mm/h] \cr
\emph{$PR } \tab [numeric] series of PR=Pn-Ps+Perc [mm/h] \cr
\emph{$Q9 } \tab [numeric] series of UH1 outflow (Q9) [mm/h] \cr
\emph{$Q1 } \tab [numeric] series of UH2 outflow (Q1) [mm/h] \cr
\emph{$Rout } \tab [numeric] series of routing store level [mm] \cr
\emph{$Exch } \tab [numeric] series of potential semi-exchange between catchments [mm/h] \cr
\emph{$AExch1 } \tab [numeric] series of actual exchange between catchments for branch 1 [mm/h] \cr
\emph{$AExch2 } \tab [numeric] series of actual exchange between catchments for branch 2 [mm/h] \cr
\emph{$AExch } \tab [numeric] series of actual exchange between catchments (1+2) [mm/h] \cr
\emph{$QR } \tab [numeric] series of routing store outflow (QR) [mm/h] \cr
\emph{$QD } \tab [numeric] series of direct flow from UH2 after exchange (QD) [mm/h] \cr
\emph{$Qsim } \tab [numeric] series of simulated discharge [mm/h] \cr
\emph{$CemaNeigeLayers} \tab [list] list of CemaNeige outputs (1 list per layer) \cr
\emph{$CemaNeigeLayers[[iLayer]]$Pliq } \tab [numeric] series of liquid precip. [mm/h] \cr
\emph{$CemaNeigeLayers[[iLayer]]$Psol } \tab [numeric] series of solid precip. [mm/h] \cr
\emph{$CemaNeigeLayers[[iLayer]]$SnowPack } \tab [numeric] series of snow pack [mm] \cr
\emph{$CemaNeigeLayers[[iLayer]]$ThermalState } \tab [numeric] series of snow pack thermal state [°C] \cr
\emph{$CemaNeigeLayers[[iLayer]]$Gratio } \tab [numeric] series of Gratio [0-1] \cr
\emph{$CemaNeigeLayers[[iLayer]]$PotMelt } \tab [numeric] series of potential snow melt [mm/h] \cr
\emph{$CemaNeigeLayers[[iLayer]]$Melt } \tab [numeric] series of actual snow melt [mm/h] \cr
\emph{$CemaNeigeLayers[[iLayer]]$PliqAndMelt } \tab [numeric] series of liquid precip. + actual snow melt [mm/h] \cr
\emph{$CemaNeigeLayers[[iLayer]]$Temp } \tab [numeric] series of air temperature [°C] \cr
\emph{$CemaNeigeLayers[[iLayer]]$Gthreshold } \tab [numeric] series of melt threshold [mm] \cr
\emph{$CemaNeigeLayers[[iLayer]]$Glocalmax } \tab [numeric] series of local melt threshold for hysteresis [mm] \cr
\emph{$StateEnd} \tab [numeric] states at the end of the run: \cr\tab store & unit hydrographs levels [mm], CemaNeige states [mm & °C], \cr\tab see \code{\link{CreateIniStates}} for more details \cr
}
(refer to the provided references or to the package source code for further details on these model outputs)
}
\description{
Function which performs a single run for the CemaNeige-GR4H daily lumped model over the test period.
[list] containing the function outputs organised as follows:
\tabular{ll}{
\emph{$DatesR } \tab [POSIXlt] series of dates \cr
\emph{$PotEvap } \tab [numeric] series of input potential evapotranspiration (E) [mm/h] \cr
\emph{$Precip } \tab [numeric] series of input total precipitation (P) [mm/h] \cr
\emph{$Prod } \tab [numeric] series of production store level (S) [mm] \cr
\emph{$Pn } \tab [numeric] series of net rainfall (Pn) [mm/h] \cr
\emph{$Ps } \tab [numeric] series of the part of Pn filling the production store (Ps) [mm/h] \cr
\emph{$AE } \tab [numeric] series of actual evapotranspiration [mm/h] \cr
\emph{$Perc } \tab [numeric] series of percolation (Perc) [mm/h] \cr
\emph{$PR } \tab [numeric] series of Pr=Pn-Ps+Perc (Pr) [mm/h] \cr
\emph{$Q9 } \tab [numeric] series of UH1 outflow (Q9) [mm/h] \cr
\emph{$Q1 } \tab [numeric] series of UH2 outflow (Q1) [mm/h] \cr
\emph{$Rout } \tab [numeric] series of routing store level (R1) [mm] \cr
\emph{$Exch } \tab [numeric] series of potential semi-exchange between catchments [mm/h] \cr
\emph{$AExch1 } \tab [numeric] series of actual exchange between catchments for branch 1 [mm/h] \cr
\emph{$AExch2 } \tab [numeric] series of actual exchange between catchments for branch 2 [mm/h] \cr
\emph{$AExch } \tab [numeric] series of actual exchange between catchments (AExch1+AExch2) [mm/h] \cr
\emph{$QR } \tab [numeric] series of routing store outflow (Qr) [mm/h] \cr
\emph{$QD } \tab [numeric] series of direct flow from UH2 after exchange (Qd) [mm/h] \cr
\emph{$Qsim } \tab [numeric] series of simulated discharge (Q) [mm/h] \cr
\emph{$CemaNeigeLayers} \tab [list] CemaNeige outputs (1 element per layer) \cr
\emph{$CemaNeigeLayers[[iLayer]]$Pliq } \tab [numeric] series of liquid precip. [mm/h] \cr
\emph{$CemaNeigeLayers[[iLayer]]$Psol } \tab [numeric] series of solid precip. [mm/h] \cr
\emph{$CemaNeigeLayers[[iLayer]]$SnowPack } \tab [numeric] series of snow pack (snow water equivalent)[mm] \cr
\emph{$CemaNeigeLayers[[iLayer]]$ThermalState} \tab [numeric] series of snow pack thermal state [°C] \cr
\emph{$CemaNeigeLayers[[iLayer]]$Gratio } \tab [numeric] series of Gratio [0-1] \cr
\emph{$CemaNeigeLayers[[iLayer]]$PotMelt } \tab [numeric] series of potential snow melt [mm/h] \cr
\emph{$CemaNeigeLayers[[iLayer]]$Melt } \tab [numeric] series of actual snow melt [mm/h] \cr
\emph{$CemaNeigeLayers[[iLayer]]$PliqAndMelt } \tab [numeric] series of liquid precip. + actual snow melt [mm/h] \cr
\emph{$CemaNeigeLayers[[iLayer]]$Temp } \tab [numeric] series of air temperature [°C] \cr
\emph{$CemaNeigeLayers[[iLayer]]$Gthreshold } \tab [numeric] series of melt threshold [mm] \cr
\emph{$CemaNeigeLayers[[iLayer]]$Glocalmax } \tab [numeric] series of local melt threshold for hysteresis [mm] \cr
\emph{RunOptions$WarmUpQsim} \tab [numeric] series of simulated discharge (Q) on the warm-up period [mm/h] \cr
\emph{RunOptions$Param } \tab [numeric] parameter set parameter set used by the model \cr
\emph{$StateEnd} \tab [numeric] states at the end of the run: store & unit hydrographs levels [mm], CemaNeige states [mm & °C]. See \code{\link{CreateIniStates}} for more details \cr
}
Refer to the provided references or to the package source code for further details on these model outputs.
}
\details{
It is advised to run the GR5H model with an interception store (see Ficchi et al. (2019)) as it improves the consistency of the model fluxes and provides better performance. To do so, the \code{\link{Imax}} functions allows to estimates the maximal capacity of the interception store, which can then be given to \code{\link{CreateRunOptions}}. \cr
The choice of the CemaNeige version is explained in \code{\link{CreateRunOptions}}. \cr
For further details on the model, see the references section. \cr
For further details on the argument structures and initialisation options, see \code{\link{CreateRunOptions}}.
\cr
\cr
See \code{\link{RunModel_GR4J}} to look at the diagram of the hydrological model.
}
\examples{
\dontrun{
library(airGR)
## loading catchment data
......@@ -92,25 +100,25 @@ data(U2345030)
## preparation of the InputsModel object
InputsModel <- CreateInputsModel(FUN_MOD = RunModel_CemaNeigeGR4H, DatesR = BasinObs$DatesR,
Precip = BasinObs$P, PotEvap = BasinObs$E, TempMean = BasinObs$T,
InputsModel <- CreateInputsModel(FUN_MOD = RunModel_CemaNeigeGR4H, DatesR = BasinObs$DatesR,
Precip = BasinObs$P, PotEvap = BasinObs$E, TempMean = BasinObs$T,
ZInputs = BasinInfo$ZInputs,
HypsoData = BasinInfo$HypsoData, NLayers = 5)
## run period selection
Ind_Run <- seq(which(format(BasinObs$DatesR, format = "\%Y-\%m-\%d \%H:\%M")=="2004-03-01 00:00"),
which(format(BasinObs$DatesR, format = "\%Y-\%m-\%d \%H:\%M")=="2008-12-31 23:00"))
Ind_Run <- seq(which(format(BasinObs$DatesR, format = "\%Y-\%m-\%d \%H")=="2004-03-01 00"),
which(format(BasinObs$DatesR, format = "\%Y-\%m-\%d \%H")=="2008-12-31 23"))
## ---- original version of CemaNeige
## --- original version of CemaNeige
## preparation of the RunOptions object
RunOptions <- CreateRunOptions(FUN_MOD = RunModel_CemaNeigeGR4H, InputsModel = InputsModel,
RunOptions <- CreateRunOptions(FUN_MOD = RunModel_CemaNeigeGR4H, InputsModel = InputsModel,
IndPeriod_Run = Ind_Run)
## simulation
Param <- c(X1 = 149.905, X2 = -0.487, X3 = 391.506, X4 = 9.620,
CNX1 = 0.018, CNX2 = 13.088)
CNX1 = 0.520, CNX2 = 0.133)
OutputsModel <- RunModel_CemaNeigeGR4H(InputsModel = InputsModel,
RunOptions = RunOptions, Param = Param)
......@@ -118,35 +126,42 @@ OutputsModel <- RunModel_CemaNeigeGR4H(InputsModel = InputsModel,
plot(OutputsModel, Qobs = BasinObs$Qmm[Ind_Run])
## efficiency criterion: Nash-Sutcliffe Efficiency
InputsCrit <- CreateInputsCrit(FUN_CRIT = ErrorCrit_NSE, InputsModel = InputsModel,
InputsCrit <- CreateInputsCrit(FUN_CRIT = ErrorCrit_NSE, InputsModel = InputsModel,
RunOptions = RunOptions, Obs = BasinObs$Qmm[Ind_Run])
OutputsCrit <- ErrorCrit_NSE(InputsCrit = InputsCrit, OutputsModel = OutputsModel)
}
}
\author{
Laurent Coron, Audrey Valéry, Claude Michel, Charles Perrin, Vazken Andréassian, Olivier Delaigue
Laurent Coron, Claude Michel, Charles Perrin, Thibault Mathevet, Audrey Valéry, Vazken Andréassian, Olivier Delaigue, Guillaume Thirel
}
\references{
Perrin, C., C. Michel and V. Andréassian (2003).
Improvement of a parsimonious model for streamflow simulation.
Journal of Hydrology, 279(1-4), 275-289, doi:10.1016/S0022-1694(03)00225-7.
Mathevet, T. (2005).
Quels modèles pluie-débit globaux pour le pas de temps horaire ?
Développement empirique et comparaison de modèles sur un large échantillon de bassins versants.
PhD thesis (in French), ENGREF - Cemagref Antony, Paris, France.
\cr\cr
Le Moine, N. (2008).
Le bassin versant de surface vu par le souterrain :
une voie d'amélioration des performances et du réalisme des modèles pluie-débit ?
PhD thesis (in French), UPMC - Cemagref Antony, Paris, France.
\cr\cr
Riboust, P., G. Thirel, N. Le Moine and P. Ribstein (2019).
Revisiting a simple degree-day model for integrating satellite data: implementation of SWE-SCA hystereses.
Journal of Hydrology and Hydromechanics. doi:10.2478/johh-2018-0004, 67, 1, 70–81.
Riboust, P., Thirel, G., Le Moine, N. and Ribstein, P. (2019).
Revisiting a simple degree-day model for integrating satellite data: Implementation of SWE-SCA hystereses.
Journal of Hydrology and Hydromechanics, 67(1), 70–81, \doi{10.2478/johh-2018-0004}.
\cr\cr
Valéry, A., V. Andréassian and C. Perrin (2014).
"As simple as possible but not simpler": what is useful in a temperature-based snow-accounting routine?
Part 1 - Comparison of six snow accounting routines on 380 catchments.
Journal of Hydrology. doi:10.1016/j.jhydrol.2014.04.059.
Valéry, A., Andréassian, V. and Perrin, C. (2014).
"As simple as possible but not simpler": What is useful in a temperature-based snow-accounting routine?
Part 1 - Comparison of six snow accounting routines on 380 catchments.
Journal of Hydrology, 517(0), 1166-1175, \doi{10.1016/j.jhydrol.2014.04.059}.
\cr\cr
Valéry, A., V. Andréassian and C. Perrin (2014).
"As simple as possible but not simpler": What is useful in a temperature-based snow-accounting routine?
Part 2 - Sensitivity analysis of the Cemaneige snow accounting routine on 380 catchments.
Journal of Hydrology. doi:10.1016/j.jhydrol.2014.04.058.
Valéry, A., Andréassian, V. and Perrin, C. (2014).
"As simple as possible but not simpler": What is useful in a temperature-based snow-accounting routine?
Part 2 - Sensitivity analysis of the Cemaneige snow accounting routine on 380 catchments.
Journal of Hydrology, 517(0), 1176-1187, \doi{10.1016/j.jhydrol.2014.04.058}.
}
......
......@@ -8,6 +8,11 @@
\title{Run with the CemaNeigeGR4J hydrological model}
\description{
Function which performs a single run for the CemaNeige-GR4J daily lumped model over the test period.
}
\usage{
RunModel_CemaNeigeGR4J(InputsModel, RunOptions, Param)
}
......@@ -19,61 +24,58 @@ RunModel_CemaNeigeGR4J(InputsModel, RunOptions, Param)
\item{RunOptions}{[object of class \emph{RunOptions}] see \code{\link{CreateRunOptions}} for details}
\item{Param}{[numeric] vector of 6 (or 8 parameters if \code{IsHyst = TRUE}, see \code{\link{CreateRunOptions}} for details)
\tabular{ll}{
GR4J X1 \tab production store capacity [mm] \cr
GR4J X2 \tab intercatchment exchange coefficient [mm/d] \cr
GR4J X3 \tab routing store capacity [mm] \cr
GR4J X4 \tab unit hydrograph time constant [d] \cr
CemaNeige X1 \tab weighting coefficient for snow pack thermal state [-] \cr
CemaNeige X2 \tab degree-day melt coefficient [mm/°C/d] \cr
CemaNeige X3 \tab (optional) accumulation threshold [mm] (needed if \code{IsHyst = TRUE}) \cr
CemaNeige X4 \tab (optional) percentage (between 0 and 1) of annual snowfall defining the melt threshold [-] (needed if \code{IsHyst = TRUE}) \cr
}}
\tabular{ll}{
GR4J X1 \tab production store capacity [mm] \cr
GR4J X2 \tab intercatchment exchange coefficient [mm/d] \cr
GR4J X3 \tab routing store capacity [mm] \cr
GR4J X4 \tab unit hydrograph time constant [d] \cr
CemaNeige X1 \tab weighting coefficient for snow pack thermal state [-] \cr
CemaNeige X2 \tab degree-day melt coefficient [mm/°C/d] \cr
CemaNeige X3 \tab (optional) accumulation threshold [mm] (needed if \code{IsHyst = TRUE}) \cr
CemaNeige X4 \tab (optional) percentage (between 0 and 1) of annual snowfall defining the melt threshold [-] (needed if \code{IsHyst = TRUE}) \cr
}}
}
\value{
[list] list containing the function outputs organised as follows:
\tabular{ll}{
\emph{$DatesR } \tab [POSIXlt] series of dates \cr
\emph{$PotEvap } \tab [numeric] series of input potential evapotranspiration [mm/d] \cr
\emph{$Precip } \tab [numeric] series of input total precipitation [mm/d] \cr
\emph{$Prod } \tab [numeric] series of production store level [mm] \cr
\emph{$Pn } \tab [numeric] series of net rainfall [mm/d] \cr
\emph{$Ps } \tab [numeric] series of the part of Pn filling the production store [mm/d] \cr
\emph{$AE } \tab [numeric] series of actual evapotranspiration [mm/d] \cr
\emph{$Perc } \tab [numeric] series of percolation (PERC) [mm/d] \cr
\emph{$PR } \tab [numeric] series of PR=Pn-Ps+Perc [mm/d] \cr
\emph{$Q9 } \tab [numeric] series of UH1 outflow (Q9) [mm/d] \cr
\emph{$Q1 } \tab [numeric] series of UH2 outflow (Q1) [mm/d] \cr
\emph{$Rout } \tab [numeric] series of routing store level [mm] \cr
\emph{$Exch } \tab [numeric] series of potential semi-exchange between catchments [mm/d] \cr
\emph{$AExch1 } \tab [numeric] series of actual exchange between catchments for branch 1 [mm/d] \cr
\emph{$AExch2 } \tab [numeric] series of actual exchange between catchments for branch 2 [mm/d] \cr
\emph{$AExch } \tab [numeric] series of actual exchange between catchments (1+2) [mm/d] \cr
\emph{$QR } \tab [numeric] series of routing store outflow (QR) [mm/d] \cr
\emph{$QD } \tab [numeric] series of direct flow from UH2 after exchange (QD) [mm/d] \cr
\emph{$Qsim } \tab [numeric] series of simulated discharge [mm/d] \cr
\emph{$CemaNeigeLayers} \tab [list] list of CemaNeige outputs (1 list per layer) \cr
\emph{$CemaNeigeLayers[[iLayer]]$Pliq } \tab [numeric] series of liquid precip. [mm/d] \cr
\emph{$CemaNeigeLayers[[iLayer]]$Psol } \tab [numeric] series of solid precip. [mm/d] \cr
\emph{$CemaNeigeLayers[[iLayer]]$SnowPack } \tab [numeric] series of snow pack [mm] \cr
\emph{$CemaNeigeLayers[[iLayer]]$ThermalState } \tab [numeric] series of snow pack thermal state [°C] \cr
\emph{$CemaNeigeLayers[[iLayer]]$Gratio } \tab [numeric] series of Gratio [0-1] \cr
\emph{$CemaNeigeLayers[[iLayer]]$PotMelt } \tab [numeric] series of potential snow melt [mm/d] \cr
\emph{$CemaNeigeLayers[[iLayer]]$Melt } \tab [numeric] series of actual snow melt [mm/d] \cr
\emph{$CemaNeigeLayers[[iLayer]]$PliqAndMelt } \tab [numeric] series of liquid precip. + actual snow melt [mm/d] \cr
\emph{$CemaNeigeLayers[[iLayer]]$Temp } \tab [numeric] series of air temperature [°C] \cr
\emph{$CemaNeigeLayers[[iLayer]]$Gthreshold } \tab [numeric] series of melt threshold [mm] \cr
\emph{$CemaNeigeLayers[[iLayer]]$Glocalmax } \tab [numeric] series of local melt threshold for hysteresis [mm] \cr
\emph{$StateEnd} \tab [numeric] states at the end of the run: \cr\tab store & unit hydrographs levels [mm], CemaNeige states [mm & °C], \cr\tab see \code{\link{CreateIniStates}} for more details \cr
}
(refer to the provided references or to the package source code for further details on these model outputs)
}
\description{
Function which performs a single run for the CemaNeige-GR4J daily lumped model over the test period.
[list] containing the function outputs organised as follows:
\tabular{ll}{
\emph{$DatesR } \tab [POSIXlt] series of dates \cr
\emph{$PotEvap } \tab [numeric] series of input potential evapotranspiration [mm/d] (E) \cr
\emph{$Precip } \tab [numeric] series of input total precipitation (P) [mm/d] \cr
\emph{$Prod } \tab [numeric] series of production store level (S) [mm] \cr
\emph{$Pn } \tab [numeric] series of net rainfall (Pn) [mm/d] \cr
\emph{$Ps } \tab [numeric] series of the part of Pn filling the production store (Ps) [mm/d] \cr
\emph{$AE } \tab [numeric] series of actual evapotranspiration [mm/d] \cr
\emph{$Perc } \tab [numeric] series of percolation (Perc) [mm/d] \cr
\emph{$PR } \tab [numeric] series of Pr=Pn-Ps+Perc (Pr) [mm/d] \cr
\emph{$Q9 } \tab [numeric] series of UH1 outflow (Q9) [mm/d] \cr
\emph{$Q1 } \tab [numeric] series of UH2 outflow (Q1) [mm/d] \cr
\emph{$Rout } \tab [numeric] series of routing store level (R1) [mm] \cr
\emph{$Exch } \tab [numeric] series of potential semi-exchange between catchments [mm/d] \cr
\emph{$AExch1 } \tab [numeric] series of actual exchange between catchments for branch 1 [mm/d] \cr
\emph{$AExch2 } \tab [numeric] series of actual exchange between catchments for branch 2 [mm/d] \cr
\emph{$AExch } \tab [numeric] series of actual exchange between catchments (1+2) [mm/d] \cr
\emph{$QR } \tab [numeric] series of routing store outflow (Qr) [mm/d] \cr
\emph{$QD } \tab [numeric] series of direct flow from UH2 after exchange (Qd) [mm/d] \cr
\emph{$Qsim } \tab [numeric] series of simulated discharge (Q) [mm/d] \cr
\emph{$CemaNeigeLayers} \tab [list] list of CemaNeige outputs (1 list per layer) \cr
\emph{$CemaNeigeLayers[[iLayer]]$Pliq } \tab [numeric] series of liquid precip. [mm/d] \cr
\emph{$CemaNeigeLayers[[iLayer]]$Psol } \tab [numeric] series of solid precip. [mm/d] \cr
\emph{$CemaNeigeLayers[[iLayer]]$SnowPack } \tab [numeric] series of snow pack (snow water equivalent) [mm] \cr
\emph{$CemaNeigeLayers[[iLayer]]$ThermalState } \tab [numeric] series of snow pack thermal state [°C] \cr
\emph{$CemaNeigeLayers[[iLayer]]$Gratio } \tab [numeric] series of Gratio [0-1] \cr
\emph{$CemaNeigeLayers[[iLayer]]$PotMelt } \tab [numeric] series of potential snow melt [mm/d] \cr
\emph{$CemaNeigeLayers[[iLayer]]$Melt } \tab [numeric] series of actual snow melt [mm/d] \cr
\emph{$CemaNeigeLayers[[iLayer]]$PliqAndMelt } \tab [numeric] series of liquid precip. + actual snow melt [mm/d] \cr
\emph{$CemaNeigeLayers[[iLayer]]$Temp } \tab [numeric] series of air temperature [°C] \cr
\emph{$CemaNeigeLayers[[iLayer]]$Gthreshold } \tab [numeric] series of melt threshold [mm] \cr
\emph{$CemaNeigeLayers[[iLayer]]$Glocalmax } \tab [numeric] series of local melt threshold for hysteresis [mm] \cr
\emph{RunOptions$WarmUpQsim} \tab [numeric] series of simulated discharge (Q) on the warm-up period [mm/d] \cr
\emph{RunOptions$Param } \tab [numeric] parameter set parameter set used by the model \cr
\emph{$StateEnd} \tab [numeric] states at the end of the run: store & unit hydrographs levels [mm], CemaNeige states [mm & °C]. See \code{\link{CreateIniStates}} for more details \cr
}
Refer to the provided references or to the package source code for further details on these model outputs.
}
......@@ -81,6 +83,9 @@ Function which performs a single run for the CemaNeige-GR4J daily lumped model o
The choice of the CemaNeige version is explained in \code{\link{CreateRunOptions}}. \cr
For further details on the model, see the references section. \cr
For further details on the argument structures and initialisation options, see \code{\link{CreateRunOptions}}.
\cr
\cr
See \code{\link{RunModel_GR4J}} to look at the diagram of the hydrological model.
}
......@@ -91,20 +96,20 @@ library(airGR)
data(L0123002)
## preparation of the InputsModel object
InputsModel <- CreateInputsModel(FUN_MOD = RunModel_CemaNeigeGR4J, DatesR = BasinObs$DatesR,
Precip = BasinObs$P, PotEvap = BasinObs$E, TempMean = BasinObs$T,
InputsModel <- CreateInputsModel(FUN_MOD = RunModel_CemaNeigeGR4J, DatesR = BasinObs$DatesR,
Precip = BasinObs$P, PotEvap = BasinObs$E, TempMean = BasinObs$T,
ZInputs = median(BasinInfo$HypsoData),
HypsoData = BasinInfo$HypsoData, NLayers = 5)
## run period selection
Ind_Run <- seq(which(format(BasinObs$DatesR, format = "\%Y-\%m-\%d")=="1990-01-01"),
Ind_Run <- seq(which(format(BasinObs$DatesR, format = "\%Y-\%m-\%d")=="1990-01-01"),
which(format(BasinObs$DatesR, format = "\%Y-\%m-\%d")=="1999-12-31"))
## ---- original version of CemaNeige
## --- original version of CemaNeige
## preparation of the RunOptions object
RunOptions <- CreateRunOptions(FUN_MOD = RunModel_CemaNeigeGR4J, InputsModel = InputsModel,
RunOptions <- CreateRunOptions(FUN_MOD = RunModel_CemaNeigeGR4J, InputsModel = InputsModel,
IndPeriod_Run = Ind_Run)
## simulation
......@@ -117,18 +122,18 @@ OutputsModel <- RunModel_CemaNeigeGR4J(InputsModel = InputsModel,
plot(OutputsModel, Qobs = BasinObs$Qmm[Ind_Run])
## efficiency criterion: Nash-Sutcliffe Efficiency
InputsCrit <- CreateInputsCrit(FUN_CRIT = ErrorCrit_NSE, InputsModel = InputsModel,
InputsCrit <- CreateInputsCrit(FUN_CRIT = ErrorCrit_NSE, InputsModel = InputsModel,
RunOptions = RunOptions, Obs = BasinObs$Qmm[Ind_Run])
OutputsCrit <- ErrorCrit_NSE(InputsCrit = InputsCrit, OutputsModel = OutputsModel)
## ---- version of CemaNeige with the Linear Hysteresis
## --- version of CemaNeige with the Linear Hysteresis
## preparation of the RunOptions object
RunOptions <- CreateRunOptions(FUN_MOD = RunModel_CemaNeigeGR4J, InputsModel = InputsModel,
RunOptions <- CreateRunOptions(FUN_MOD = RunModel_CemaNeigeGR4J, InputsModel = InputsModel,
IndPeriod_Run = Ind_Run, IsHyst = TRUE)
## simulation
## simulation
Param <- c(X1 = 408.774, X2 = 2.646, X3 = 131.264, X4 = 1.174,
CNX1 = 0.962, CNX2 = 2.249, CNX3 = 100, CNX4 = 0.4)
OutputsModel <- RunModel_CemaNeigeGR4J(InputsModel = InputsModel,
......@@ -138,40 +143,40 @@ OutputsModel <- RunModel_CemaNeigeGR4J(InputsModel = InputsModel,
plot(OutputsModel, Qobs = BasinObs$Qmm[Ind_Run])
## efficiency criterion: Nash-Sutcliffe Efficiency
InputsCrit <- CreateInputsCrit(FUN_CRIT = ErrorCrit_NSE, InputsModel = InputsModel,
InputsCrit <- CreateInputsCrit(FUN_CRIT = ErrorCrit_NSE, InputsModel = InputsModel,
RunOptions = RunOptions, Obs = BasinObs$Qmm[Ind_Run])
OutputsCrit <- ErrorCrit_NSE(InputsCrit = InputsCrit, OutputsModel = OutputsModel)
}
\author{
Laurent Coron, Audrey Valéry, Claude Michel, Charles Perrin, Vazken Andréassian, Olivier Delaigue
Laurent Coron, Claude Michel, Charles Perrin, Audrey Valéry, Vazken Andréassian, Olivier Delaigue, Guillaume Thirel
}
\references{
Perrin, C., C. Michel and V. Andréassian (2003).
Improvement of a parsimonious model for streamflow simulation.
Journal of Hydrology, 279(1-4), 275-289, doi:10.1016/S0022-1694(03)00225-7.
Perrin, C., Michel, C. and Andréassian, V. (2003).
Improvement of a parsimonious model for streamflow simulation.
Journal of Hydrology, 279(1-4), 275-289, \doi{10.1016/S0022-1694(03)00225-7}.
\cr\cr
Riboust, P., G. Thirel, N. Le Moine and P. Ribstein (2019).
Revisiting a simple degree-day model for integrating satellite data: implementation of SWE-SCA hystereses.
Journal of Hydrology and Hydromechanics. doi:10.2478/johh-2018-0004, 67, 1, 70–81.
Riboust, P., Thirel, G., Le Moine, N. and Ribstein, P. (2019).
Revisiting a simple degree-day model for integrating satellite data: Implementation of SWE-SCA hystereses.
Journal of Hydrology and Hydromechanics, 67(1), 70–81, \doi{10.2478/johh-2018-0004}.
\cr\cr
Valéry, A., V. Andréassian and C. Perrin (2014).
"As simple as possible but not simpler": what is useful in a temperature-based snow-accounting routine?
Part 1 - Comparison of six snow accounting routines on 380 catchments.
Journal of Hydrology. doi:10.1016/j.jhydrol.2014.04.059.
Valéry, A., Andréassian, V. and Perrin, C. (2014).
"As simple as possible but not simpler": What is useful in a temperature-based snow-accounting routine?
Part 1 - Comparison of six snow accounting routines on 380 catchments.
Journal of Hydrology, 517(0), 1166-1175, \doi{10.1016/j.jhydrol.2014.04.059}.
\cr\cr
Valéry, A., V. Andréassian and C. Perrin (2014).
"As simple as possible but not simpler": What is useful in a temperature-based snow-accounting routine?
Part 2 - Sensitivity analysis of the Cemaneige snow accounting routine on 380 catchments.
Journal of Hydrology. doi:10.1016/j.jhydrol.2014.04.058.
Valéry, A., Andréassian, V. and Perrin, C. (2014).
"As simple as possible but not simpler": What is useful in a temperature-based snow-accounting routine?
Part 2 - Sensitivity analysis of the Cemaneige snow accounting routine on 380 catchments.
Journal of Hydrology, 517(0), 1176-1187, \doi{10.1016/j.jhydrol.2014.04.058}.
}
\seealso{
\code{\link{RunModel_CemaNeige}}, \code{\link{RunModel_CemaNeigeGR5J}},
\code{\link{RunModel_CemaNeige}}, \code{\link{RunModel_CemaNeigeGR5J}},
\code{\link{RunModel_CemaNeigeGR6J}}, \code{\link{RunModel_GR4J}},
\code{\link{CreateInputsModel}}, \code{\link{CreateRunOptions}}, \code{\link{CreateIniStates}}.
}
......
\encoding{UTF-8}
\name{RunModel_CemaNeigeGR5H}
\alias{RunModel_CemaNeigeGR5H}
\title{Run with the CemaNeigeGR5H hydrological model}
\description{
Function which performs a single run for the CemaNeige-GR5H hourly lumped model over the test period.
}
\usage{
RunModel_CemaNeigeGR5H(InputsModel, RunOptions, Param)
}
\arguments{
\item{InputsModel}{[object of class \emph{InputsModel}] see \code{\link{CreateInputsModel}} for details}
\item{RunOptions}{[object of class \emph{RunOptions}] see \code{\link{CreateRunOptions}} for details}
\item{Param}{[numeric] vector of 7 (or 9 parameters if \code{IsHyst = TRUE}, see \code{\link{CreateRunOptions}} for details)
\tabular{ll}{
GR5H X1 \tab production store capacity [mm] \cr
GR5H X2 \tab intercatchment exchange coefficient [mm/h] \cr
GR5H X3 \tab routing store capacity [mm] \cr
GR5H X4 \tab unit hydrograph time constant [h] \cr
GR5H X5 \tab intercatchment exchange threshold [-] \cr
CemaNeige X1 \tab weighting coefficient for snow pack thermal state [-] \cr
CemaNeige X2 \tab degree-hour melt coefficient [mm/°C/h] \cr
CemaNeige X3 \tab (optional) accumulation threshold [mm] (needed if \code{IsHyst = TRUE}) \cr
CemaNeige X4 \tab (optional) percentage (between 0 and 1) of annual snowfall defining the melt threshold [-] (needed if \code{IsHyst = TRUE}) \cr
}}
}
\value{
[list] containing the function outputs organised as follows:
\tabular{ll}{
\emph{$DatesR } \tab [POSIXlt] series of dates \cr
\emph{$PotEvap } \tab [numeric] series of input potential evapotranspiration (E) [mm/h] \cr
\emph{$Precip } \tab [numeric] series of input total precipitation (P) [mm/h] \cr
\emph{$Interc } \tab [numeric] series of interception store level (I) [mm] \cr
\emph{$Prod } \tab [numeric] series of production store level (S) [mm] \cr
\emph{$Pn } \tab [numeric] series of net rainfall (Pn) [mm/h] \cr
\emph{$Ps } \tab [numeric] series of the part of Pn filling the production store (Ps) [mm/h] \cr
\emph{$AE } \tab [numeric] series of actual evapotranspiration (Ei+Es) [mm/h] \cr
\emph{$EI } \tab [numeric] series of evapotranspiration from rainfall neutralisation or interception store (Ei) [mm/h] \cr
\emph{$ES } \tab [numeric] series of evapotranspiration from production store (Es) [mm/h] \cr
\emph{$Perc } \tab [numeric] series of percolation (Perc) [mm/h] \cr
\emph{$PR } \tab [numeric] series of Pr=Pn-Ps+Perc (Pr) [mm/h] \cr
\emph{$Q9 } \tab [numeric] series of UH outflow going into branch 9 (Q9) [mm/h] \cr
\emph{$Q1 } \tab [numeric] series of UH outflow going into branch 1 (Q1) [mm/h] \cr
\emph{$Rout } \tab [numeric] series of routing store level (R1) [mm] \cr
\emph{$Exch } \tab [numeric] series of potential semi-exchange between catchments [mm/h] \cr
\emph{$AExch1 } \tab [numeric] series of actual exchange between catchments for branch 1 [mm/h] \cr
\emph{$AExch2 } \tab [numeric] series of actual exchange between catchments for branch 2 [mm/h] \cr
\emph{$AExch } \tab [numeric] series of actual exchange between catchments (AExch1+AExch2) [mm/h] \cr
\emph{$QR } \tab [numeric] series of routing store outflow (Qr) [mm/h] \cr
\emph{$QD } \tab [numeric] series of direct flow from UH after exchange (Qd) [mm/h] \cr
\emph{$Qsim } \tab [numeric] series of simulated discharge (Q) [mm/h] \cr
\emph{$CemaNeigeLayers} \tab [list] CemaNeige outputs (1 element per layer) \cr
\emph{$CemaNeigeLayers[[iLayer]]$Pliq } \tab [numeric] series of liquid precip. [mm/h] \cr
\emph{$CemaNeigeLayers[[iLayer]]$Psol } \tab [numeric] series of solid precip. [mm/h] \cr
\emph{$CemaNeigeLayers[[iLayer]]$SnowPack } \tab [numeric] series of snow pack (snow water equivalent) [mm] \cr
\emph{$CemaNeigeLayers[[iLayer]]$ThermalState } \tab [numeric] series of snow pack thermal state [°C] \cr
\emph{$CemaNeigeLayers[[iLayer]]$Gratio } \tab [numeric] series of Gratio [0-1] \cr
\emph{$CemaNeigeLayers[[iLayer]]$PotMelt } \tab [numeric] series of potential snow melt [mm/h] \cr
\emph{$CemaNeigeLayers[[iLayer]]$Melt } \tab [numeric] series of actual snow melt [mm/h] \cr
\emph{$CemaNeigeLayers[[iLayer]]$PliqAndMelt } \tab [numeric] series of liquid precip. + actual snow melt [mm/h] \cr
\emph{$CemaNeigeLayers[[iLayer]]$Temp } \tab [numeric] series of air temperature [°C] \cr
\emph{$CemaNeigeLayers[[iLayer]]$Gthreshold } \tab [numeric] series of melt threshold [mm] \cr
\emph{$CemaNeigeLayers[[iLayer]]$Glocalmax } \tab [numeric] series of local melt threshold for hysteresis [mm] \cr
\emph{RunOptions$WarmUpQsim} \tab [numeric] series of simulated discharge (Q) on the warm-up period [mm/h] \cr
\emph{RunOptions$Param } \tab [numeric] parameter set parameter set used by the model \cr
\emph{$StateEnd} \tab [numeric] states at the end of the run: store & unit hydrographs levels [mm], CemaNeige states [mm & °C]. See \code{\link{CreateIniStates}} for more details \cr
}
Refer to the provided references or to the package source code for further details on these model outputs.
}
\details{
The choice of the CemaNeige version is explained in \code{\link{CreateRunOptions}}. \cr
For further details on the model, see the references section. \cr
For further details on the argument structures and initialisation options, see \code{\link{CreateRunOptions}}.
\cr
\cr
See \code{\link{RunModel_GR5H}} to look at the diagram of the hydrological model or \code{\link{RunModel_GR5J}} when no interception store is used.
}
\examples{
\dontrun{
library(airGR)
## loading catchment data
data(U2345030)
## preparation of the InputsModel object
InputsModel <- CreateInputsModel(FUN_MOD = RunModel_CemaNeigeGR5H, DatesR = BasinObs$DatesR,
Precip = BasinObs$P, PotEvap = BasinObs$E, TempMean = BasinObs$T,
ZInputs = BasinInfo$ZInputs,
HypsoData = BasinInfo$HypsoData, NLayers = 5)
## run period selection
Ind_Run <- seq(which(format(BasinObs$DatesR, format = "\%Y-\%m-\%d \%H")=="2004-03-01 00"),
which(format(BasinObs$DatesR, format = "\%Y-\%m-\%d \%H")=="2008-12-31 23"))
## --- original version of CemaNeige
## Imax computation
Imax <- Imax(InputsModel = InputsModel, IndPeriod_Run = Ind_Run,
TestedValues = seq(from = 0, to = 3, by = 0.2))
## preparation of the RunOptions object
RunOptions <- CreateRunOptions(FUN_MOD = RunModel_CemaNeigeGR5H, InputsModel = InputsModel,
Imax = Imax, IndPeriod_Run = Ind_Run)
## simulation
Param <- c(X1 = 218.537, X2 = -0.009, X3 = 174.862, X4 = 6.674, X5 = 0.000,
CNX1 = 0.002, CNX2 = 3.787)
OutputsModel <- RunModel_CemaNeigeGR5H(InputsModel = InputsModel,
RunOptions = RunOptions, Param = Param)
## results preview
plot(OutputsModel, Qobs = BasinObs$Qmm[Ind_Run])
## efficiency criterion: Nash-Sutcliffe Efficiency
InputsCrit <- CreateInputsCrit(FUN_CRIT = ErrorCrit_NSE, InputsModel = InputsModel,
RunOptions = RunOptions, Obs = BasinObs$Qmm[Ind_Run])
OutputsCrit <- ErrorCrit_NSE(InputsCrit = InputsCrit, OutputsModel = OutputsModel)
}
}
\author{
Laurent Coron, Guillaume Thirel, Olivier Delaigue, Audrey Valéry, Vazken Andréassian
}
\references{
Ficchi, A. (2017).
An adaptive hydrological model for multiple time-steps:
Diagnostics and improvements based on fluxes consistency.
PhD thesis, UPMC - Irstea Antony, Paris, France.
\cr\cr
Ficchi, A., Perrin, C. and Andréassian, V. (2019).
Hydrological modelling at multiple sub-daily time steps: model improvement via flux-matching.
Journal of Hydrology, 575, 1308-1327, \doi{10.1016/j.jhydrol.2019.05.084}.
\cr\cr
Perrin, C., Michel, C. and Andréassian, V. (2003).
Improvement of a parsimonious model for streamflow simulation.
Journal of Hydrology, 279(1-4), 275-289, \doi{10.1016/S0022-1694(03)00225-7}.
\cr\cr
Riboust, P., Thirel, G., Le Moine, N. and Ribstein, P. (2019).
Revisiting a simple degree-day model for integrating satellite data: Implementation of SWE-SCA hystereses.
Journal of Hydrology and Hydromechanics, 67(1), 70–81, \doi{10.2478/johh-2018-0004}.
\cr\cr
Valéry, A., Andréassian, V. and Perrin, C. (2014).
"As simple as possible but not simpler": What is useful in a temperature-based snow-accounting routine?
Part 1 - Comparison of six snow accounting routines on 380 catchments.
Journal of Hydrology, 517(0), 1166-1175, \doi{10.1016/j.jhydrol.2014.04.059}.
\cr\cr
Valéry, A., Andréassian, V. and Perrin, C. (2014).
"As simple as possible but not simpler": What is useful in a temperature-based snow-accounting routine?
Part 2 - Sensitivity analysis of the Cemaneige snow accounting routine on 380 catchments.
Journal of Hydrology, 517(0), 1176-1187, \doi{10.1016/j.jhydrol.2014.04.058}.
}
\seealso{
\code{\link{RunModel_CemaNeige}}, \code{\link{RunModel_CemaNeigeGR4H}}, \code{\link{RunModel_GR5H}}, \code{\link{Imax}},
\code{\link{CreateInputsModel}}, \code{\link{CreateRunOptions}}, \code{\link{CreateIniStates}}.
}