diff --git a/DESCRIPTION b/DESCRIPTION index 4c3e121e20cbd43e7b310e79c06d80ba2f929e6e..e10821892e52bbedeb0290bf5bb8c47afcf33504 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: airGR Type: Package Title: Suite of GR Hydrological Models for Precipitation-Runoff Modelling -Version: 1.2.9.28 +Version: 1.2.9.29 Date: 2019-03-20 Authors@R: c( person("Laurent", "Coron", role = c("aut", "trl"), comment = c(ORCID = "0000-0002-1503-6204")), diff --git a/NEWS.rmd b/NEWS.rmd index 77629e896dfe714e142476be3fe63053a0e0d262..91b1edad0844f8c5a900e2b138bf3ce2b2a583ec 100644 --- a/NEWS.rmd +++ b/NEWS.rmd @@ -13,7 +13,7 @@ output: -### 1.2.9.28 Release Notes (2019-03-20) +### 1.2.9.29 Release Notes (2019-03-20) diff --git a/man/Calibration.Rd b/man/Calibration.Rd index ac9558984cd182fd0be8ae36b98f0a49993d4c6f..0c091aad1f20fa7e897dde49081d26c75de02506 100644 --- a/man/Calibration.Rd +++ b/man/Calibration.Rd @@ -27,7 +27,7 @@ Calibration(InputsModel, RunOptions, InputsCrit, CalibOptions, FUN_MOD, \item{FUN_CRIT}{[function] error criterion function (e.g. \code{\link{ErrorCrit_RMSE}}, \code{\link{ErrorCrit_NSE}})} -\item{FUN_CALIB}{(optional) [function] calibration algorithm function (e.g. \code{\link{Calibration_Michel}}), \code{default = Calibration_Michel}} +\item{FUN_CALIB}{(deprecated) [function] calibration algorithm function (e.g. \code{\link{Calibration_Michel}}), \code{default = Calibration_Michel}} \item{FUN_TRANSFO}{(optional) [function] model parameters transformation function, if the \code{FUN_MOD} used is native in the package \code{FUN_TRANSFO} is automatically defined} @@ -65,7 +65,7 @@ RunOptions <- CreateRunOptions(FUN_MOD = RunModel_GR4J, ## calibration criterion: preparation of the InputsCrit object InputsCrit <- CreateInputsCrit(FUN_CRIT = ErrorCrit_NSE, InputsModel = InputsModel, - RunOptions = RunOptions, Qobs = BasinObs$Qmm[Ind_Run]) + RunOptions = RunOptions, obs = BasinObs$Qmm[Ind_Run], varObs = "Q") ## preparation of CalibOptions object CalibOptions <- CreateCalibOptions(FUN_MOD = RunModel_GR4J, FUN_CALIB = Calibration_Michel) @@ -73,7 +73,7 @@ CalibOptions <- CreateCalibOptions(FUN_MOD = RunModel_GR4J, FUN_CALIB = Calibrat ## calibration OutputsCalib <- Calibration(InputsModel = InputsModel, RunOptions = RunOptions, InputsCrit = InputsCrit, CalibOptions = CalibOptions, - FUN_MOD = RunModel_GR4J, FUN_CRIT = ErrorCrit_NSE, + FUN_MOD = RunModel_GR4J, FUN_CALIB = Calibration_Michel) ## simulation @@ -86,12 +86,12 @@ plot(OutputsModel, Qobs = BasinObs$Qmm[Ind_Run]) ## efficiency criterion: Nash-Sutcliffe Efficiency InputsCrit <- CreateInputsCrit(FUN_CRIT = ErrorCrit_NSE, InputsModel = InputsModel, - RunOptions = RunOptions, Qobs = BasinObs$Qmm[Ind_Run]) + RunOptions = RunOptions, obs = BasinObs$Qmm[Ind_Run], varObs = "Q") OutputsCrit <- ErrorCrit_NSE(InputsCrit = InputsCrit, OutputsModel = OutputsModel) ## efficiency criterion: Kling-Gupta Efficiency InputsCrit <- CreateInputsCrit(FUN_CRIT = ErrorCrit_KGE, InputsModel = InputsModel, - RunOptions = RunOptions, Qobs = BasinObs$Qmm[Ind_Run]) + RunOptions = RunOptions, obs = BasinObs$Qmm[Ind_Run], varObs = "Q") OutputsCrit <- ErrorCrit_KGE(InputsCrit = InputsCrit, OutputsModel = OutputsModel) } diff --git a/man/Calibration_Michel.Rd b/man/Calibration_Michel.Rd index 022138d068aa61271e00ad5086e889d138b1ab96..a1961b8127b75f4c38fba394d90f88d237d0c7e9 100644 --- a/man/Calibration_Michel.Rd +++ b/man/Calibration_Michel.Rd @@ -25,7 +25,7 @@ Calibration_Michel(InputsModel, RunOptions, InputsCrit, CalibOptions, \item{FUN_MOD}{[function] hydrological model function (e.g. \code{\link{RunModel_GR4J}}, \code{\link{RunModel_CemaNeigeGR4J}})} -\item{FUN_CRIT}{[function] error criterion function (e.g. \code{\link{ErrorCrit_RMSE}}, \code{\link{ErrorCrit_NSE}})} +\item{FUN_CRIT}{(deprecated) [function] error criterion function (e.g. \code{\link{ErrorCrit_RMSE}}, \code{\link{ErrorCrit_NSE}})} \item{FUN_TRANSFO}{(optional) [function] model parameters transformation function, if the \code{FUN_MOD} used is native in the package \code{FUN_TRANSFO} is automatically defined} @@ -35,17 +35,17 @@ Calibration_Michel(InputsModel, RunOptions, InputsCrit, CalibOptions, \value{ [list] list containing the function outputs organised as follows: - \tabular{ll}{ - \emph{$ParamFinalR } \tab [numeric] parameter set obtained at the end of the calibration \cr - \emph{$CritFinal } \tab [numeric] error criterion selected as objective function obtained at the end of the calibration \cr - \emph{$NIter } \tab [numeric] number of iterations during the calibration \cr - \emph{$NRuns } \tab [numeric] number of model runs done during the calibration \cr - \emph{$HistParamR } \tab [numeric] table showing the progression steps in the search for optimal set: parameter values \cr - \emph{$HistCrit } \tab [numeric] table showing the progression steps in the search for optimal set: criterion values \cr - \emph{$MatBoolCrit } \tab [boolean] table giving the requested and actual time steps over which the model is calibrated \cr - \emph{$CritName } \tab [character] name of the calibration criterion used as objective function \cr - \emph{$CritBestValue} \tab [numeric] theoretical best criterion value \cr - } + \tabular{ll}{ + \emph{$ParamFinalR } \tab [numeric] parameter set obtained at the end of the calibration \cr + \emph{$CritFinal } \tab [numeric] error criterion selected as objective function obtained at the end of the calibration \cr + \emph{$NIter } \tab [numeric] number of iterations during the calibration \cr + \emph{$NRuns } \tab [numeric] number of model runs done during the calibration \cr + \emph{$HistParamR } \tab [numeric] table showing the progression steps in the search for optimal set: parameter values \cr + \emph{$HistCrit } \tab [numeric] table showing the progression steps in the search for optimal set: criterion values \cr + \emph{$MatBoolCrit } \tab [boolean] table giving the requested and actual time steps over which the model is calibrated \cr + \emph{$CritName } \tab [character] name of the calibration criterion used as objective function \cr + \emph{$CritBestValue} \tab [numeric] theoretical best criterion value \cr + } } @@ -96,7 +96,7 @@ RunOptions <- CreateRunOptions(FUN_MOD = RunModel_GR4J, InputsModel = InputsMode ## calibration criterion: preparation of the InputsCrit object InputsCrit <- CreateInputsCrit(FUN_CRIT = ErrorCrit_NSE, InputsModel = InputsModel, - RunOptions = RunOptions, Qobs = BasinObs$Qmm[Ind_Run]) + RunOptions = RunOptions, obs = BasinObs$Qmm[Ind_Run], varObs = "Q") ## preparation of CalibOptions object CalibOptions <- CreateCalibOptions(FUN_MOD = RunModel_GR4J, FUN_CALIB = Calibration_Michel) @@ -104,7 +104,7 @@ CalibOptions <- CreateCalibOptions(FUN_MOD = RunModel_GR4J, FUN_CALIB = Calibrat ## calibration OutputsCalib <- Calibration_Michel(InputsModel = InputsModel, RunOptions = RunOptions, InputsCrit = InputsCrit, CalibOptions = CalibOptions, - FUN_MOD = RunModel_GR4J, FUN_CRIT = ErrorCrit_NSE) + FUN_MOD = RunModel_GR4J) ## simulation Param <- OutputsCalib$ParamFinalR @@ -116,12 +116,12 @@ plot(OutputsModel, Qobs = BasinObs$Qmm[Ind_Run]) ## efficiency criterion: Nash-Sutcliffe Efficiency InputsCrit <- CreateInputsCrit(FUN_CRIT = ErrorCrit_NSE, InputsModel = InputsModel, - RunOptions = RunOptions, Qobs = BasinObs$Qmm[Ind_Run]) + RunOptions = RunOptions, obs = BasinObs$Qmm[Ind_Run], varObs = "Q") OutputsCrit <- ErrorCrit_NSE(InputsCrit = InputsCrit, OutputsModel = OutputsModel) ## efficiency criterion: Kling-Gupta Efficiency InputsCrit <- CreateInputsCrit(FUN_CRIT = ErrorCrit_KGE, InputsModel = InputsModel, - RunOptions = RunOptions, Qobs = BasinObs$Qmm[Ind_Run]) + RunOptions = RunOptions, obs = BasinObs$Qmm[Ind_Run], varObs = "Q") OutputsCrit <- ErrorCrit_KGE(InputsCrit = InputsCrit, OutputsModel = OutputsModel) } diff --git a/man/CreateCalibOptions.Rd b/man/CreateCalibOptions.Rd index 8b018b33b3a8bcb9d4e5aa49662bdaebc44f53f9..4d4d5a3521dd8ecb645b5befc022b09a0cd36e63 100644 --- a/man/CreateCalibOptions.Rd +++ b/man/CreateCalibOptions.Rd @@ -58,12 +58,12 @@ CreateCalibOptions(FUN_MOD, FUN_CALIB = Calibration_Michel, } \value{ [list] object of class \emph{CalibOptions} containing the data required to evaluate the model outputs; it can include the following: - \tabular{ll}{ - \emph{$FixedParam } \tab [numeric] vector giving the values to allocate to non-optimised parameter values \cr - \emph{$SearchRanges } \tab [numeric] matrix giving the ranges of raw parameters \cr - \emph{$StartParamList } \tab [numeric] matrix of parameter sets used for grid-screening calibration procedure \cr - \emph{$StartParamDistrib} \tab [numeric] matrix of parameter values used for grid-screening calibration procedure \cr - } + \tabular{ll}{ + \emph{$FixedParam } \tab [numeric] vector giving the values to allocate to non-optimised parameter values \cr + \emph{$SearchRanges } \tab [numeric] matrix giving the ranges of raw parameters \cr + \emph{$StartParamList } \tab [numeric] matrix of parameter sets used for grid-screening calibration procedure \cr + \emph{$StartParamDistrib} \tab [numeric] matrix of parameter values used for grid-screening calibration procedure \cr + } } @@ -98,7 +98,7 @@ RunOptions <- CreateRunOptions(FUN_MOD = RunModel_GR4J, ## calibration criterion: preparation of the InputsCrit object InputsCrit <- CreateInputsCrit(FUN_CRIT = ErrorCrit_NSE, InputsModel = InputsModel, - RunOptions = RunOptions, Qobs = BasinObs$Qmm[Ind_Run]) + RunOptions = RunOptions, obs = BasinObs$Qmm[Ind_Run], varObs = "Q") ## preparation of CalibOptions object CalibOptions <- CreateCalibOptions(FUN_MOD = RunModel_GR4J, FUN_CALIB = Calibration_Michel) @@ -106,7 +106,7 @@ CalibOptions <- CreateCalibOptions(FUN_MOD = RunModel_GR4J, FUN_CALIB = Calibrat ## calibration OutputsCalib <- Calibration(InputsModel = InputsModel, RunOptions = RunOptions, InputsCrit = InputsCrit, CalibOptions = CalibOptions, - FUN_MOD = RunModel_GR4J, FUN_CRIT = ErrorCrit_NSE, + FUN_MOD = RunModel_GR4J, FUN_CALIB = Calibration_Michel) ## simulation @@ -119,12 +119,12 @@ plot(OutputsModel, Qobs = BasinObs$Qmm[Ind_Run]) ## efficiency criterion: Nash-Sutcliffe Efficiency InputsCrit <- CreateInputsCrit(FUN_CRIT = ErrorCrit_NSE, InputsModel = InputsModel, - RunOptions = RunOptions, Qobs = BasinObs$Qmm[Ind_Run]) + RunOptions = RunOptions, obs = BasinObs$Qmm[Ind_Run], varObs = "Q") OutputsCrit <- ErrorCrit_NSE(InputsCrit = InputsCrit, OutputsModel = OutputsModel) ## efficiency criterion: Kling-Gupta Efficiency InputsCrit <- CreateInputsCrit(FUN_CRIT = ErrorCrit_KGE, InputsModel = InputsModel, - RunOptions = RunOptions, Qobs = BasinObs$Qmm[Ind_Run]) + RunOptions = RunOptions, obs = BasinObs$Qmm[Ind_Run], varObs = "Q") OutputsCrit <- ErrorCrit_KGE(InputsCrit = InputsCrit, OutputsModel = OutputsModel) } diff --git a/man/CreateInputsModel.Rd b/man/CreateInputsModel.Rd index aea745f25ebc660cb827a4126e3ba29c2c3056eb..f74f80909bb20ec1d9c7dcd91398d99c737224b4 100644 --- a/man/CreateInputsModel.Rd +++ b/man/CreateInputsModel.Rd @@ -44,13 +44,13 @@ CreateInputsModel(FUN_MOD, DatesR, Precip, PrecipScale = TRUE, PotEvap = NULL, \value{ [list] object of class \emph{InputsModel} containing the data required to evaluate the model outputs; it can include the following: - \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{$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 + \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{$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 } } @@ -95,7 +95,7 @@ plot(OutputsModel, Qobs = BasinObs$Qmm[Ind_Run]) ## efficiency criterion: Nash-Sutcliffe Efficiency InputsCrit <- CreateInputsCrit(FUN_CRIT = ErrorCrit_NSE, InputsModel = InputsModel, - RunOptions = RunOptions, Qobs = BasinObs$Qmm[Ind_Run]) + RunOptions = RunOptions, obs = BasinObs$Qmm[Ind_Run], varObs = "Q") OutputsCrit <- ErrorCrit_NSE(InputsCrit = InputsCrit, OutputsModel = OutputsModel) } diff --git a/man/CreateRunOptions.Rd b/man/CreateRunOptions.Rd index c5ec5f1931edb2fb47ab17ccad90efefa48f7fc9..6bdb1c3cb828a72c618b2841f973ac2c8e562342 100644 --- a/man/CreateRunOptions.Rd +++ b/man/CreateRunOptions.Rd @@ -49,15 +49,15 @@ CreateRunOptions(FUN_MOD, InputsModel, \value{ [list] object of class \emph{RunOptions} containing the data required to evaluate the model outputs; it can include the following: - \tabular{ll}{ - \emph{IndPeriod_WarmUp } \tab [numeric] index of period to be used for the model warm-up [-] \cr - \emph{IndPeriod_Run } \tab [numeric] index of period to be used for the model run [-] \cr - \emph{IniStates } \tab [numeric] vector of initial model states [mm and °C] \cr - \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{MeanAnSolidPrecip} \tab [numeric] vector giving the annual mean of average solid precipitation for each layer [mm/y] \cr - } + \tabular{ll}{ + \emph{IndPeriod_WarmUp } \tab [numeric] index of period to be used for the model warm-up [-] \cr + \emph{IndPeriod_Run } \tab [numeric] index of period to be used for the model run [-] \cr + \emph{IniStates } \tab [numeric] vector of initial model states [mm and °C] \cr + \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{MeanAnSolidPrecip} \tab [numeric] vector giving the annual mean of average solid precipitation for each layer [mm/y] \cr + } } @@ -135,7 +135,7 @@ plot(OutputsModel, Qobs = BasinObs$Qmm[Ind_Run]) ## efficiency criterion: Nash-Sutcliffe Efficiency InputsCrit <- CreateInputsCrit(FUN_CRIT = ErrorCrit_NSE, InputsModel = InputsModel, - RunOptions = RunOptions, Qobs = BasinObs$Qmm[Ind_Run]) + RunOptions = RunOptions, obs = BasinObs$Qmm[Ind_Run], varObs = "Q") OutputsCrit <- ErrorCrit_NSE(InputsCrit = InputsCrit, OutputsModel = OutputsModel) }