Commit 17c37815 authored by Delaigue Olivier's avatar Delaigue Olivier
Browse files

v1.2.12.27 DOC: varObs changed into VarObs in CreateIntputsCrit doc

parent 20209f8a
Package: airGR
Type: Package
Title: Suite of GR Hydrological Models for Precipitation-Runoff Modelling
Version: 1.2.12.26
Version: 1.2.12.27
Date: 2019-04-01
Authors@R: c(
person("Laurent", "Coron", role = c("aut", "trl"), comment = c(ORCID = "0000-0002-1503-6204")),
......
......@@ -13,7 +13,7 @@ output:
### 1.2.12.26 Release Notes (2019-04-01)
### 1.2.12.27 Release Notes (2019-04-01)
......
......@@ -10,7 +10,7 @@
\usage{
CreateInputsCrit(FUN_CRIT, InputsModel, RunOptions,
Qobs, Obs, varObs = "Q", BoolCrit = NULL,
Qobs, Obs, VarObs = "Q", BoolCrit = NULL,
transfo = "", weights = NULL,
Ind_zeroes = NULL, epsilon = NULL,
warnings = TRUE, verbose = TRUE)
......@@ -28,7 +28,7 @@ CreateInputsCrit(FUN_CRIT, InputsModel, RunOptions,
\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{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)}
......@@ -51,11 +51,11 @@ CreateInputsCrit(FUN_CRIT, InputsModel, RunOptions,
\tabular{ll}{
\emph{$FUN_CRIT } \tab [function] error criterion function (e.g. \code{\link{ErrorCrit_RMSE}}, \code{\link{ErrorCrit_NSE}}) \cr
\emph{$Obs } \tab [numeric] series of observed variable(s) ([mm/time step] for discharge or SWE, [-] for SCA) \cr
\emph{$varObs } \tab [character] names of the observed variable(s) \cr
\emph{$VarObs } \tab [character] names of the observed variable(s) \cr
\emph{$BoolCrit } \tab [boolean] boolean giving the time steps considered in the computation \cr
\emph{$transfo } \tab [character] name of the transformation (e.g. \code{""}, \code{"sqrt"}, \code{"log"}, \code{"inv"}, \code{"sort"}) \cr
\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
\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
......@@ -74,7 +74,7 @@ Creation of the \code{InputsCrit} object required to the \code{ErrorCrit_*} func
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 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
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
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
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
Calculation of a composite criterion (e.g. the average between NSE computed on dscharge and NSE computed on log of discharge) is prepared by providing to \code{CreateInputsCrit} arguments lists including \code{weights}. \cr
......@@ -108,7 +108,7 @@ OutputsModel <- RunModel_GR4J(InputsModel = InputsModel, RunOptions = RunOptions
InputsCritSingle <- CreateInputsCrit(FUN_CRIT = ErrorCrit_NSE,
InputsModel = InputsModel, RunOptions = RunOptions,
Obs = list(BasinObs$Qmm[Ind_Run]),
varObs = "Q", transfo = "",
VarObs = "Q", transfo = "",
weights = NULL)
str(InputsCritSingle)
invisible(ErrorCrit(InputsCrit = InputsCritSingle, OutputsModel = OutputsModel))
......@@ -117,7 +117,7 @@ invisible(ErrorCrit(InputsCrit = InputsCritSingle, OutputsModel = OutputsModel))
InputsCritMulti <- CreateInputsCrit(FUN_CRIT = list(ErrorCrit_RMSE, ErrorCrit_NSE),
InputsModel = InputsModel, RunOptions = RunOptions,
Obs = list(BasinObs$Qmm[Ind_Run], BasinObs$Qmm[Ind_Run]),
varObs = list("Q", "Q"), transfo = list("", "sqrt"),
VarObs = list("Q", "Q"), transfo = list("", "sqrt"),
weights = NULL)
str(InputsCritMulti)
invisible(ErrorCrit(InputsCrit = InputsCritMulti, OutputsModel = OutputsModel))
......@@ -127,7 +127,7 @@ invisible(ErrorCrit(InputsCrit = InputsCritMulti, OutputsModel = OutputsModel))
InputsCritCompo <- CreateInputsCrit(FUN_CRIT = list(ErrorCrit_NSE, ErrorCrit_NSE),
InputsModel = InputsModel, RunOptions = RunOptions,
Obs = list(BasinObs$Qmm[Ind_Run], BasinObs$Qmm[Ind_Run]),
varObs = list("Q", "Q"), transfo = list("", "log"),
VarObs = list("Q", "Q"), transfo = list("", "log"),
weights = list(0.4, 0.6))
str(InputsCritCompo)
invisible(ErrorCrit(InputsCrit = InputsCritCompo, OutputsModel = OutputsModel))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment