diff --git a/DESCRIPTION b/DESCRIPTION index 06e415659e886108b69c06582f8765e4179c22df..b3d590423a0061dfb4b79e82dd096f9ba724c278 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.0.10.5 +Version: 1.0.10.6 Date: 2018-05-22 Authors@R: c( person("Laurent", "Coron", role = c("aut", "trl")), diff --git a/NEWS.rmd b/NEWS.rmd index ae046acbe613557cec3a2aaee9c0d59f40ead037..65173df08c4579f67eff2556911abe95d3ef180a 100644 --- a/NEWS.rmd +++ b/NEWS.rmd @@ -14,7 +14,7 @@ output: -### 1.0.10.5 Release Notes (2018-05-22) +### 1.0.10.6 Release Notes (2018-05-22) ____________________________________________________________________________________ diff --git a/man/Calibration.Rd b/man/Calibration.Rd index ca8ba830d7e8057844234c4ff1f03fae8903a169..0a1827937425df7df08898be91b5a77f0c25fd45 100644 --- a/man/Calibration.Rd +++ b/man/Calibration.Rd @@ -56,8 +56,8 @@ InputsModel <- CreateInputsModel(FUN_MOD = RunModel_GR4J, DatesR = BasinObs$Date Precip = BasinObs$P, PotEvap = BasinObs$E) ## calibration period selection -Ind_Run <- seq(which(format(BasinObs$DatesR, format = "\%d/\%m/\%Y \%H:\%M")=="01/01/1990 00:00"), - which(format(BasinObs$DatesR, format = "\%d/\%m/\%Y \%H:\%M")=="31/12/1999 00:00")) +Ind_Run <- seq(which(format(BasinObs$DatesR, format = "\%d/\%m/\%Y")=="01/01/1990"), + which(format(BasinObs$DatesR, format = "\%d/\%m/\%Y")=="31/12/1999")) ## preparation of RunOptions object RunOptions <- CreateRunOptions(FUN_MOD = RunModel_GR4J, diff --git a/man/Calibration_Michel.Rd b/man/Calibration_Michel.Rd index fa4090f4e8841fbed295142b3158eca8778f315b..c0dd0071feb8d1f55de8445b38fc887c16a970c9 100644 --- a/man/Calibration_Michel.Rd +++ b/man/Calibration_Michel.Rd @@ -87,8 +87,8 @@ InputsModel <- CreateInputsModel(FUN_MOD = RunModel_GR4J, DatesR = BasinObs$Date Precip = BasinObs$P, PotEvap = BasinObs$E) ## calibration period selection -Ind_Run <- seq(which(format(BasinObs$DatesR, format = "\%d/\%m/\%Y \%H:\%M")=="01/01/1990 00:00"), - which(format(BasinObs$DatesR, format = "\%d/\%m/\%Y \%H:\%M")=="31/12/1999 00:00")) +Ind_Run <- seq(which(format(BasinObs$DatesR, format = "\%d/\%m/\%Y")=="01/01/1990"), + which(format(BasinObs$DatesR, format = "\%d/\%m/\%Y")=="31/12/1999")) ## preparation of RunOptions object RunOptions <- CreateRunOptions(FUN_MOD = RunModel_GR4J, InputsModel = InputsModel, diff --git a/man/CreateCalibOptions.Rd b/man/CreateCalibOptions.Rd index 706e3dc35d90c2753d6c46ce45f324433853486e..8b018b33b3a8bcb9d4e5aa49662bdaebc44f53f9 100644 --- a/man/CreateCalibOptions.Rd +++ b/man/CreateCalibOptions.Rd @@ -89,8 +89,8 @@ InputsModel <- CreateInputsModel(FUN_MOD = RunModel_GR4J, DatesR = BasinObs$Date Precip = BasinObs$P, PotEvap = BasinObs$E) ## calibration period selection -Ind_Run <- seq(which(format(BasinObs$DatesR, format = "\%d/\%m/\%Y \%H:\%M")=="01/01/1990 00:00"), - which(format(BasinObs$DatesR, format = "\%d/\%m/\%Y \%H:\%M")=="31/12/1999 00:00")) +Ind_Run <- seq(which(format(BasinObs$DatesR, format = "\%d/\%m/\%Y")=="01/01/1990"), + which(format(BasinObs$DatesR, format = "\%d/\%m/\%Y")=="31/12/1999")) ## preparation of RunOptions object RunOptions <- CreateRunOptions(FUN_MOD = RunModel_GR4J, diff --git a/man/CreateInputsCrit.Rd b/man/CreateInputsCrit.Rd index 70c1803effd9f1382df65e347f12a10afd97d84f..e31b8fab33c5d8c7bbba5de7c0bc257f6f3ffaf5 100644 --- a/man/CreateInputsCrit.Rd +++ b/man/CreateInputsCrit.Rd @@ -67,8 +67,8 @@ InputsModel <- CreateInputsModel(FUN_MOD = RunModel_GR4J, DatesR = BasinObs$Date Precip = BasinObs$P, PotEvap = BasinObs$E) ## run period selection -Ind_Run <- seq(which(format(BasinObs$DatesR, format = "\%d/\%m/\%Y \%H:\%M")=="01/01/1990 00:00"), - which(format(BasinObs$DatesR, format = "\%d/\%m/\%Y \%H:\%M")=="31/12/1999 00:00")) +Ind_Run <- seq(which(format(BasinObs$DatesR, format = "\%d/\%m/\%Y")=="01/01/1990"), + which(format(BasinObs$DatesR, format = "\%d/\%m/\%Y")=="31/12/1999")) ## preparation of the RunOptions object RunOptions <- CreateRunOptions(FUN_MOD = RunModel_GR4J, diff --git a/man/CreateInputsModel.Rd b/man/CreateInputsModel.Rd index 4aefc131791da23aebab1e768773c44b0b8a870d..aea745f25ebc660cb827a4126e3ba29c2c3056eb 100644 --- a/man/CreateInputsModel.Rd +++ b/man/CreateInputsModel.Rd @@ -78,8 +78,8 @@ InputsModel <- CreateInputsModel(FUN_MOD = RunModel_GR4J, DatesR = BasinObs$Date Precip = BasinObs$P, PotEvap = BasinObs$E) ## run period selection -Ind_Run <- seq(which(format(BasinObs$DatesR, format = "\%d/\%m/\%Y \%H:\%M")=="01/01/1990 00:00"), - which(format(BasinObs$DatesR, format = "\%d/\%m/\%Y \%H:\%M")=="31/12/1999 00:00")) +Ind_Run <- seq(which(format(BasinObs$DatesR, format = "\%d/\%m/\%Y")=="01/01/1990"), + which(format(BasinObs$DatesR, format = "\%d/\%m/\%Y")=="31/12/1999")) ## preparation of the RunOptions object RunOptions <- CreateRunOptions(FUN_MOD = RunModel_GR4J, diff --git a/man/CreateRunOptions.Rd b/man/CreateRunOptions.Rd index dfbed6aca19813e9afddab2cf1a07868290f7751..4c5e5e598c4ee994e328dd8451d8f25bc078783d 100644 --- a/man/CreateRunOptions.Rd +++ b/man/CreateRunOptions.Rd @@ -114,8 +114,8 @@ InputsModel <- CreateInputsModel(FUN_MOD = RunModel_GR4J, DatesR = BasinObs$Date Precip = BasinObs$P, PotEvap = BasinObs$E) ## run period selection -Ind_Run <- seq(which(format(BasinObs$DatesR, format = "\%d/\%m/\%Y \%H:\%M")=="01/01/1990 00:00"), - which(format(BasinObs$DatesR, format = "\%d/\%m/\%Y \%H:\%M")=="31/12/1999 00:00")) +Ind_Run <- seq(which(format(BasinObs$DatesR, format = "\%d/\%m/\%Y")=="01/01/1990"), + which(format(BasinObs$DatesR, format = "\%d/\%m/\%Y")=="31/12/1999")) ## preparation of the RunOptions object RunOptions <- CreateRunOptions(FUN_MOD = RunModel_GR4J, diff --git a/man/ErrorCrit.Rd b/man/ErrorCrit.Rd index 0b6a5318d5beabadf66519ed488a1a4199b6f50b..b10e5fc979124cc1f7c68acf812ff08035c95bf0 100644 --- a/man/ErrorCrit.Rd +++ b/man/ErrorCrit.Rd @@ -45,8 +45,8 @@ InputsModel <- CreateInputsModel(FUN_MOD = RunModel_GR4J, DatesR = BasinObs$Date Precip = BasinObs$P, PotEvap = BasinObs$E) ## run period selection -Ind_Run <- seq(which(format(BasinObs$DatesR, format = "\%d/\%m/\%Y \%H:\%M")=="01/01/1990 00:00"), - which(format(BasinObs$DatesR, format = "\%d/\%m/\%Y \%H:\%M")=="31/12/1999 00:00")) +Ind_Run <- seq(which(format(BasinObs$DatesR, format = "\%d/\%m/\%Y")=="01/01/1990"), + which(format(BasinObs$DatesR, format = "\%d/\%m/\%Y")=="31/12/1999")) ## preparation of the RunOptions object RunOptions <- CreateRunOptions(FUN_MOD = RunModel_GR4J, diff --git a/man/Param_Sets_GR4J.Rd b/man/Param_Sets_GR4J.Rd index 3c335d1a0f1380f8fd634f5e497e55c5123b20f9..e8f0110e4a5bc980d55e9e2d3d52ccd43eb0d417 100644 --- a/man/Param_Sets_GR4J.Rd +++ b/man/Param_Sets_GR4J.Rd @@ -59,8 +59,8 @@ InputsModel <- CreateInputsModel(FUN_MOD = RunModel_GR4J, DatesR = BasinObs$Date ## ---- calibration step ## short calibration period selection (< 6 months) -Ind_Cal <- seq(which(format(BasinObs$DatesR, format = "\%d/\%m/\%Y \%H:\%M")=="01/01/1990 00:00"), - which(format(BasinObs$DatesR, format = "\%d/\%m/\%Y \%H:\%M")=="28/02/1990 00:00")) +Ind_Cal <- seq(which(format(BasinObs$DatesR, format = "\%d/\%m/\%Y")=="01/01/1990"), + which(format(BasinObs$DatesR, format = "\%d/\%m/\%Y")=="28/02/1990")) ## preparation of the RunOptions object for the calibration period RunOptions_Cal <- CreateRunOptions(FUN_MOD = RunModel_GR4J, @@ -85,8 +85,8 @@ Param_Best <- unlist(Param_Sets_GR4J[which.max(OutputsCrit_Loop), ]) ## ---- validation step ## validation period selection -Ind_Val <- seq(which(format(BasinObs$DatesR, format = "\%d/\%m/\%Y \%H:\%M")=="01/03/1990 00:00"), - which(format(BasinObs$DatesR, format = "\%d/\%m/\%Y \%H:\%M")=="31/12/1999 00:00")) +Ind_Val <- seq(which(format(BasinObs$DatesR, format = "\%d/\%m/\%Y")=="01/03/1990"), + which(format(BasinObs$DatesR, format = "\%d/\%m/\%Y")=="31/12/1999")) ## preparation of the RunOptions object for the validation period RunOptions_Val <- CreateRunOptions(FUN_MOD = RunModel_GR4J, diff --git a/man/RunModel.Rd b/man/RunModel.Rd index e4986e9846dcc62cacbe22f299f40fc3a4cb4121..551969610092bed5a3585ac69d64168d9a38ed7b 100644 --- a/man/RunModel.Rd +++ b/man/RunModel.Rd @@ -43,8 +43,8 @@ InputsModel <- CreateInputsModel(FUN_MOD = RunModel_GR4J, DatesR = BasinObs$Date Precip = BasinObs$P, PotEvap = BasinObs$E) ## run period selection -Ind_Run <- seq(which(format(BasinObs$DatesR, format = "\%d/\%m/\%Y \%H:\%M")=="01/01/1990 00:00"), - which(format(BasinObs$DatesR, format = "\%d/\%m/\%Y \%H:\%M")=="31/12/1999 00:00")) +Ind_Run <- seq(which(format(BasinObs$DatesR, format = "\%d/\%m/\%Y")=="01/01/1990"), + which(format(BasinObs$DatesR, format = "\%d/\%m/\%Y")=="31/12/1999")) ## preparation of the RunOptions object RunOptions <- CreateRunOptions(FUN_MOD = RunModel_GR4J, diff --git a/man/RunModel_CemaNeige.Rd b/man/RunModel_CemaNeige.Rd index bd27b51642cc5719c247aac119799f5dea0d137f..dee53c8aa08c798951626754461db681df9f55e8 100644 --- a/man/RunModel_CemaNeige.Rd +++ b/man/RunModel_CemaNeige.Rd @@ -70,8 +70,8 @@ InputsModel <- CreateInputsModel(FUN_MOD = RunModel_CemaNeige, DatesR = BasinObs NLayers = 5) ## run period selection -Ind_Run <- seq(which(format(BasinObs$DatesR, format = "\%d/\%m/\%Y \%H:\%M")=="01/01/1990 00:00"), - which(format(BasinObs$DatesR, format = "\%d/\%m/\%Y \%H:\%M")=="31/12/1999 00:00")) +Ind_Run <- seq(which(format(BasinObs$DatesR, format = "\%d/\%m/\%Y")=="01/01/1990"), + which(format(BasinObs$DatesR, format = "\%d/\%m/\%Y")=="31/12/1999")) ## preparation of the RunOptions object RunOptions <- CreateRunOptions(FUN_MOD = RunModel_CemaNeige, InputsModel = InputsModel, diff --git a/man/RunModel_CemaNeigeGR4J.Rd b/man/RunModel_CemaNeigeGR4J.Rd index e27085b6ec6bb9383546fd7617f51e665b5f76c8..eb646e31613134dd3204d9136b07d96f0e80337b 100644 --- a/man/RunModel_CemaNeigeGR4J.Rd +++ b/man/RunModel_CemaNeigeGR4J.Rd @@ -92,8 +92,8 @@ InputsModel <- CreateInputsModel(FUN_MOD = RunModel_CemaNeigeGR4J, DatesR = Basi HypsoData = BasinInfo$HypsoData, NLayers = 5) ## run period selection -Ind_Run <- seq(which(format(BasinObs$DatesR, format = "\%d/\%m/\%Y \%H:\%M")=="01/01/1990 00:00"), - which(format(BasinObs$DatesR, format = "\%d/\%m/\%Y \%H:\%M")=="31/12/1999 00:00")) +Ind_Run <- seq(which(format(BasinObs$DatesR, format = "\%d/\%m/\%Y")=="01/01/1990"), + which(format(BasinObs$DatesR, format = "\%d/\%m/\%Y")=="31/12/1999")) ## preparation of the RunOptions object RunOptions <- CreateRunOptions(FUN_MOD = RunModel_CemaNeigeGR4J, InputsModel = InputsModel, diff --git a/man/RunModel_CemaNeigeGR5J.Rd b/man/RunModel_CemaNeigeGR5J.Rd index bcc36ea40b40dcdfe96c58e552a0b9f2c923fb4f..c5d21ce347a1c23b42b22d7021e7f75f3b6b6a17 100644 --- a/man/RunModel_CemaNeigeGR5J.Rd +++ b/man/RunModel_CemaNeigeGR5J.Rd @@ -93,8 +93,8 @@ InputsModel <- CreateInputsModel(FUN_MOD = RunModel_CemaNeigeGR5J, DatesR = Basi HypsoData = BasinInfo$HypsoData, NLayers = 5) ## run period selection -Ind_Run <- seq(which(format(BasinObs$DatesR, format = "\%d/\%m/\%Y \%H:\%M")=="01/01/1990 00:00"), - which(format(BasinObs$DatesR, format = "\%d/\%m/\%Y \%H:\%M")=="31/12/1999 00:00")) +Ind_Run <- seq(which(format(BasinObs$DatesR, format = "\%d/\%m/\%Y")=="01/01/1990"), + which(format(BasinObs$DatesR, format = "\%d/\%m/\%Y")=="31/12/1999")) ## preparation of the RunOptions object RunOptions <- CreateRunOptions(FUN_MOD = RunModel_CemaNeigeGR5J, InputsModel = InputsModel, diff --git a/man/RunModel_CemaNeigeGR6J.Rd b/man/RunModel_CemaNeigeGR6J.Rd index 2f3c8410bce75a6d1b7926ccf1217e7a4d47b69a..73df2b7c9362c6d4cdee9cffc03ea33e40f6a517 100644 --- a/man/RunModel_CemaNeigeGR6J.Rd +++ b/man/RunModel_CemaNeigeGR6J.Rd @@ -94,8 +94,8 @@ InputsModel <- CreateInputsModel(FUN_MOD = RunModel_CemaNeigeGR6J, DatesR = Basi HypsoData = BasinInfo$HypsoData, NLayers = 5) ## run period selection -Ind_Run <- seq(which(format(BasinObs$DatesR, format = "\%d/\%m/\%Y \%H:\%M")=="01/01/1990 00:00"), - which(format(BasinObs$DatesR, format = "\%d/\%m/\%Y \%H:\%M")=="31/12/1999 00:00")) +Ind_Run <- seq(which(format(BasinObs$DatesR, format = "\%d/\%m/\%Y")=="01/01/1990"), + which(format(BasinObs$DatesR, format = "\%d/\%m/\%Y")=="31/12/1999")) ## preparation of the RunOptions object RunOptions <- CreateRunOptions(FUN_MOD = RunModel_CemaNeigeGR6J, InputsModel = InputsModel, diff --git a/man/RunModel_GR4H.Rd b/man/RunModel_GR4H.Rd index d01a0e21794923b62e926a9f09a2113d5274d32d..a3a4497638d1e13e90cfdc16e003cd3ea38e59e8 100644 --- a/man/RunModel_GR4H.Rd +++ b/man/RunModel_GR4H.Rd @@ -78,7 +78,8 @@ Ind_Run <- seq(which(format(BasinObs$DatesR, format = "\%d/\%m/\%Y \%H:\%M")=="0 which(format(BasinObs$DatesR, format = "\%d/\%m/\%Y \%H:\%M")=="31/12/2008 23:00")) ## preparation of the RunOptions object -RunOptions <- CreateRunOptions(FUN_MOD = RunModel_GR4H, InputsModel = InputsModel, IndPeriod_Run = Ind_Run) +RunOptions <- CreateRunOptions(FUN_MOD = RunModel_GR4H, + InputsModel = InputsModel, IndPeriod_Run = Ind_Run) ## simulation Param <- c(521.113, -2.918, 218.009, 4.124) diff --git a/man/RunModel_GR4J.Rd b/man/RunModel_GR4J.Rd index a59e0f9068b845b6ddcec1ce97da8f79cddd2c3e..cf1057067093886633159e7e484e1d9e98d08200 100644 --- a/man/RunModel_GR4J.Rd +++ b/man/RunModel_GR4J.Rd @@ -78,8 +78,8 @@ InputsModel <- CreateInputsModel(FUN_MOD = RunModel_GR4J, DatesR = BasinObs$Date Precip = BasinObs$P, PotEvap = BasinObs$E) ## run period selection -Ind_Run <- seq(which(format(BasinObs$DatesR, format = "\%d/\%m/\%Y \%H:\%M")=="01/01/1990 00:00"), - which(format(BasinObs$DatesR, format = "\%d/\%m/\%Y \%H:\%M")=="31/12/1999 00:00")) +Ind_Run <- seq(which(format(BasinObs$DatesR, format = "\%d/\%m/\%Y")=="01/01/1990"), + which(format(BasinObs$DatesR, format = "\%d/\%m/\%Y")=="31/12/1999")) ## preparation of the RunOptions object RunOptions <- CreateRunOptions(FUN_MOD = RunModel_GR4J, diff --git a/man/RunModel_GR5J.Rd b/man/RunModel_GR5J.Rd index 6c51f521ced40cbb044cd075f6a7369b23436b8a..3379ffa4d3caf0cee3f3b3a8c627a6536eff87b1 100644 --- a/man/RunModel_GR5J.Rd +++ b/man/RunModel_GR5J.Rd @@ -79,8 +79,8 @@ InputsModel <- CreateInputsModel(FUN_MOD = RunModel_GR5J, DatesR = BasinObs$Date Precip = BasinObs$P, PotEvap = BasinObs$E) ## run period selection -Ind_Run <- seq(which(format(BasinObs$DatesR, format = "\%d/\%m/\%Y \%H:\%M")=="01/01/1990 00:00"), - which(format(BasinObs$DatesR, format = "\%d/\%m/\%Y \%H:\%M")=="31/12/1999 00:00")) +Ind_Run <- seq(which(format(BasinObs$DatesR, format = "\%d/\%m/\%Y")=="01/01/1990"), + which(format(BasinObs$DatesR, format = "\%d/\%m/\%Y")=="31/12/1999")) ## preparation of the RunOptions object RunOptions <- CreateRunOptions(FUN_MOD = RunModel_GR5J, diff --git a/man/RunModel_GR6J.Rd b/man/RunModel_GR6J.Rd index 9b357de00e37c8c2b161ff17daa8408455df8057..245bd5b4d7ad89986fb95bbae74b622de2e51c4e 100644 --- a/man/RunModel_GR6J.Rd +++ b/man/RunModel_GR6J.Rd @@ -82,8 +82,8 @@ InputsModel <- CreateInputsModel(FUN_MOD = RunModel_GR6J, DatesR = BasinObs$Date Precip = BasinObs$P, PotEvap = BasinObs$E) ## run period selection -Ind_Run <- seq(which(format(BasinObs$DatesR, format = "\%d/\%m/\%Y \%H:\%M")=="01/01/1990 00:00"), - which(format(BasinObs$DatesR, format = "\%d/\%m/\%Y \%H:\%M")=="31/12/1999 00:00")) +Ind_Run <- seq(which(format(BasinObs$DatesR, format = "\%d/\%m/\%Y")=="01/01/1990"), + which(format(BasinObs$DatesR, format = "\%d/\%m/\%Y")=="31/12/1999")) ## preparation of the RunOptions object RunOptions <- CreateRunOptions(FUN_MOD = RunModel_GR6J, diff --git a/vignettes/V01_get_started.Rmd b/vignettes/V01_get_started.Rmd index bde49cff798b184d5eebcf94c326559ca0d52460..cf4105abe887bdf0cc407071675951bd2a34f6f0 100644 --- a/vignettes/V01_get_started.Rmd +++ b/vignettes/V01_get_started.Rmd @@ -108,8 +108,8 @@ The user must at least define the following arguments: To select a period for which the user wants to run the model, select the corresponding indexes for different time periods (not the POSIXt dates), as follows: ```{r} -Ind_Run <- seq(which(format(BasinObs$DatesR, format = "%d/%m/%Y %H:%M")=="01/01/1990 00:00"), - which(format(BasinObs$DatesR, format = "%d/%m/%Y %H:%M")=="31/12/1999 00:00")) +Ind_Run <- seq(which(format(BasinObs$DatesR, format = "%d/%m/%Y")=="01/01/1990"), + which(format(BasinObs$DatesR, format = "%d/%m/%Y")=="31/12/1999")) str(Ind_Run) ``` @@ -130,7 +130,7 @@ str(RunOptions) ``` The `CreateRunOptions()` function returns warnings if the default initialization options are used: - * `IniStates` and `IniResLevels` are automatically set to initialize all the model states at 0, except for the production and routing stores, which are initialized at respectively 30% and 50 % of their capacity + * `IniStates` and `IniResLevels` are automatically set to initialize all the model states at 0, except for the production and routing stores, which are initialized at respectively 30 % and 50 % of their capacity * `IndPeriod_WarmUp` default setting ensures a one-year warm up using the time steps preceding the `IndPeriod_Run`, if available