diff --git a/DESCRIPTION b/DESCRIPTION index fcb40f849ad1938e943871534037cb837abba2e3..6c524bdf1e5a97e69de1b4834982061dd4ed560e 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.12.12 +Version: 1.2.12.13 Date: 2019-04-01 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 c97f2be0d0bd9a2d9c780b142223b2a7484aba23..2d73e71d1860ef103042389d3e0e50aca9d244b6 100644 --- a/NEWS.rmd +++ b/NEWS.rmd @@ -13,7 +13,7 @@ output: -### 1.2.12.12 Release Notes (2019-04-01) +### 1.2.12.13 Release Notes (2019-04-01) diff --git a/man/Calibration.Rd b/man/Calibration.Rd index 0c091aad1f20fa7e897dde49081d26c75de02506..d7f58e7837b71a4e99398cddf31a9ea1437ab01c 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")=="01/01/1990"), - which(format(BasinObs$DatesR, format = "\%d/\%m/\%Y")=="31/12/1999")) +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, diff --git a/man/Calibration_Michel.Rd b/man/Calibration_Michel.Rd index c664e7993c6c444a8f4114ef8945ddc46c7dcacb..0242e521f8c1e2ce0c9d976dae283eefe1d8ac31 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")=="01/01/1990"), - which(format(BasinObs$DatesR, format = "\%d/\%m/\%Y")=="31/12/1999")) +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, diff --git a/man/CreateCalibOptions.Rd b/man/CreateCalibOptions.Rd index cc64c571752b9d9912149a243cdc7ec6ad4ddd09..be9b1c23bce1c03b4cbc23b8a20e13c69b553123 100644 --- a/man/CreateCalibOptions.Rd +++ b/man/CreateCalibOptions.Rd @@ -97,8 +97,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")=="01/01/1990"), - which(format(BasinObs$DatesR, format = "\%d/\%m/\%Y")=="31/12/1999")) +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, diff --git a/man/CreateIniStates.Rd b/man/CreateIniStates.Rd index caf19c6a8f5b27f2617c60827fedca9759d189ca..769380892dffff734c2de5609b7af14498a53c67 100644 --- a/man/CreateIniStates.Rd +++ b/man/CreateIniStates.Rd @@ -81,8 +81,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/1991 00:00")) +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 IniStates object with low values of ProdStore and RoutStore @@ -100,8 +100,9 @@ RunOptions <- CreateRunOptions(FUN_MOD = RunModel_GR4J, InputsModel = InputsMode IndPeriod_Run = Ind_Run, IniStates = IniStates) ## simulation -Param <- c(257.238, 1.012, 88.235, 2.208) -OutputsModel <- RunModel_GR4J(InputsModel = InputsModel, RunOptions = RunOptions, Param = Param) +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]) @@ -122,8 +123,9 @@ RunOptions <- CreateRunOptions(FUN_MOD = RunModel_GR4J, InputsModel = InputsMode IndPeriod_Run = Ind_Run, IniStates = IniStates) ## simulation -Param <- c(257.238, 1.012, 88.235, 2.208) -OutputsModel <- RunModel_GR4J(InputsModel = InputsModel, RunOptions = RunOptions, Param = Param) +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]) diff --git a/man/CreateInputsCrit.Rd b/man/CreateInputsCrit.Rd index 9ad7f90d0bf51318b417959a4845b7960da07027..f505f926808068fb5ef3d4e70e8278111fbce516 100644 --- a/man/CreateInputsCrit.Rd +++ b/man/CreateInputsCrit.Rd @@ -88,20 +88,20 @@ 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 = "\%d/\%m/\%Y")=="01/01/1990"), - which(format(BasinObs$DatesR, format = "\%d/\%m/\%Y")=="31/12/1999")) +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(257.238, 1.012, 88.235, 2.208) +Param <- c(X1 = 257.238, X2 = 1.012, X3 = 88.235, X4 = 2.208) OutputsModel <- RunModel_GR4J(InputsModel = InputsModel, RunOptions = RunOptions, Param = Param) ## single efficiency criterion: Nash-Sutcliffe Efficiency diff --git a/man/CreateRunOptions.Rd b/man/CreateRunOptions.Rd index bc9c16d0a51cbaa0cf48abd7c940bdc144924bba..ad565f8f97cc3228fdf170ec95a972f9b3603e1e 100644 --- a/man/CreateRunOptions.Rd +++ b/man/CreateRunOptions.Rd @@ -127,16 +127,17 @@ 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")=="01/01/1990"), - which(format(BasinObs$DatesR, format = "\%d/\%m/\%Y")=="31/12/1999")) +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) ## simulation -Param <- c(734.568, -0.840, 109.809, 1.971) -OutputsModel <- RunModel(InputsModel = InputsModel, RunOptions = RunOptions, Param = Param, +Param <- c(X1 = 734.568, X2 = -0.840, X3 = 109.809, X4 = 1.971) +OutputsModel <- RunModel(InputsModel = InputsModel, + RunOptions = RunOptions, Param = Param, FUN_MOD = RunModel_GR4J) ## results preview diff --git a/man/ErrorCrit.Rd b/man/ErrorCrit.Rd index b856d49624d47788b1fb3f71411c95bdb6a5cc36..ce5eb3ca438267b3fc847b10c8199cbebc43013d 100644 --- a/man/ErrorCrit.Rd +++ b/man/ErrorCrit.Rd @@ -62,21 +62,22 @@ 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 = "\%d/\%m/\%Y")=="01/01/1990"), - which(format(BasinObs$DatesR, format = "\%d/\%m/\%Y")=="31/12/1999")) +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(257.238, 1.012, 88.235, 2.208) -OutputsModel <- RunModel_GR4J(InputsModel = InputsModel, RunOptions = RunOptions, Param = Param) +Param <- c(X1 = 257.238, X2 = 1.012, X3 = 88.235, X4 = 2.208) +OutputsModel <- RunModel_GR4J(InputsModel = InputsModel, + RunOptions = RunOptions, Param = Param) ## single efficiency criterion: Nash-Sutcliffe Efficiency InputsCritSingle <- CreateInputsCrit(FUN_CRIT = ErrorCrit_NSE, diff --git a/man/ErrorCrit_KGE.Rd b/man/ErrorCrit_KGE.Rd index 1dc077f11e40fc92e0e771be8d49c9ded37f7ec6..e8e93cf1bde9073822707f40b44626e317254f2a 100644 --- a/man/ErrorCrit_KGE.Rd +++ b/man/ErrorCrit_KGE.Rd @@ -66,15 +66,15 @@ 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")=="01/01/1990"), - which(format(BasinObs$DatesR, format = "\%d/\%m/\%Y")=="31/12/1999")) +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) ## simulation -Param <- c(734.568, -0.840, 109.809, 1.971) +Param <- c(X1 = 734.568, X2 = -0.840, X3 = 109.809, X4 = 1.971) OutputsModel <- RunModel(InputsModel = InputsModel, RunOptions = RunOptions, Param = Param, FUN = RunModel_GR4J) diff --git a/man/ErrorCrit_KGE2.Rd b/man/ErrorCrit_KGE2.Rd index ed1d7e63644331acd588017c3f17e7a4c9759eae..f4de6d23de1c11680a56070aa04e372e80b842f8 100644 --- a/man/ErrorCrit_KGE2.Rd +++ b/man/ErrorCrit_KGE2.Rd @@ -66,15 +66,15 @@ 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")=="01/01/1990"), - which(format(BasinObs$DatesR, format = "\%d/\%m/\%Y")=="31/12/1999")) +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) ## simulation -Param <- c(734.568, -0.840, 109.809, 1.971) +Param <- c(X1 = 734.568, X2 = -0.840, X3 = 109.809, X4 = 1.971) OutputsModel <- RunModel(InputsModel = InputsModel, RunOptions = RunOptions, Param = Param, FUN = RunModel_GR4J) diff --git a/man/ErrorCrit_NSE.Rd b/man/ErrorCrit_NSE.Rd index 5a960c3044aff0927939277db57bc95436553e64..aed41be28c604b7ef99416b271525ec07e2d5eb0 100644 --- a/man/ErrorCrit_NSE.Rd +++ b/man/ErrorCrit_NSE.Rd @@ -59,15 +59,15 @@ 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")=="01/01/1990"), - which(format(BasinObs$DatesR, format = "\%d/\%m/\%Y")=="31/12/1999")) +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) ## simulation -Param <- c(734.568, -0.840, 109.809, 1.971) +Param <- c(X1 = 734.568, X2 = -0.840, X3 = 109.809, X4 = 1.971) OutputsModel <- RunModel(InputsModel = InputsModel, RunOptions = RunOptions, Param = Param, FUN = RunModel_GR4J) diff --git a/man/ErrorCrit_RMSE.Rd b/man/ErrorCrit_RMSE.Rd index 1aaf25422db873a06b9433a473dd70360e2bb336..ea4431f64b702b37436ceff8e3c6dedc88da8053 100644 --- a/man/ErrorCrit_RMSE.Rd +++ b/man/ErrorCrit_RMSE.Rd @@ -57,15 +57,15 @@ 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")=="01/01/1990"), - which(format(BasinObs$DatesR, format = "\%d/\%m/\%Y")=="31/12/1999")) +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) ## simulation -Param <- c(734.568, -0.840, 109.809, 1.971) +Param <- c(X1 = 734.568, X2 = -0.840, X3 = 109.809, X4 = 1.971) OutputsModel <- RunModel(InputsModel = InputsModel, RunOptions = RunOptions, Param = Param, FUN = RunModel_GR4J) diff --git a/man/Param_Sets_GR4J.Rd b/man/Param_Sets_GR4J.Rd index e8f0110e4a5bc980d55e9e2d3d52ccd43eb0d417..5794bb75da9573db905739dd863825e3b65b2862 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")=="01/01/1990"), - which(format(BasinObs$DatesR, format = "\%d/\%m/\%Y")=="28/02/1990")) +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, @@ -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")=="01/03/1990"), - which(format(BasinObs$DatesR, format = "\%d/\%m/\%Y")=="31/12/1999")) +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, diff --git a/man/RunModel.Rd b/man/RunModel.Rd index d57cf3a03b1fa6aa7e4cf31f0c3562321f16ce1b..76d11eb1f50d97eb55c984e8c526fc1d2a9a7273 100644 --- a/man/RunModel.Rd +++ b/man/RunModel.Rd @@ -43,16 +43,17 @@ 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")=="01/01/1990"), - which(format(BasinObs$DatesR, format = "\%d/\%m/\%Y")=="31/12/1999")) - +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) ## simulation -Param <- c(734.568, -0.840, 109.809, 1.971) -OutputsModel <- RunModel(InputsModel = InputsModel, RunOptions = RunOptions, Param = Param, +Param <- c(X1 = 734.568, X2 = -0.840, X3 = 109.809, X4 = 1.971) +OutputsModel <- RunModel(InputsModel = InputsModel, + RunOptions = RunOptions, Param = Param, FUN_MOD = RunModel_GR4J) ## results preview diff --git a/man/RunModel_CemaNeige.Rd b/man/RunModel_CemaNeige.Rd index 1f0de87d77244947f7f8d5bcf6e4141aa74822ff..f94ff8cb2ef99b017d112e2e31bb7dbdc13de088 100644 --- a/man/RunModel_CemaNeige.Rd +++ b/man/RunModel_CemaNeige.Rd @@ -75,15 +75,18 @@ InputsModel <- CreateInputsModel(FUN_MOD = RunModel_CemaNeige, DatesR = BasinObs NLayers = 5) ## run period selection -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")) +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 ## preparation of the RunOptions object RunOptions <- CreateRunOptions(FUN_MOD = RunModel_CemaNeige, InputsModel = InputsModel, IndPeriod_Run = Ind_Run) -## simulation with original CemaNeige version -Param <- c(0.962, 2.249) +## simulation +Param <- c(CNX1 = 0.962, CNX2 = 2.249) OutputsModel <- RunModel_CemaNeige(InputsModel = InputsModel, RunOptions = RunOptions, Param = Param) @@ -91,11 +94,14 @@ OutputsModel <- RunModel_CemaNeige(InputsModel = InputsModel, plot(OutputsModel) -## simulation 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) -Param <- c(0.962, 2.249, 100, 0.4) + +## simulation +Param <- c(CNX1 = 0.962, CNX2 = 2.249, CNX3 = 100, CNX4 = 0.4) OutputsModel <- RunModel_CemaNeige(InputsModel = InputsModel, RunOptions = RunOptions, Param = Param) diff --git a/man/RunModel_CemaNeigeGR4J.Rd b/man/RunModel_CemaNeigeGR4J.Rd index 26756ffda8efced6ee679a32e5e536e050ae91a0..acbd10a672a8a0594eb44262a0518480c36f8f6e 100644 --- a/man/RunModel_CemaNeigeGR4J.Rd +++ b/man/RunModel_CemaNeigeGR4J.Rd @@ -97,15 +97,19 @@ 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")=="01/01/1990"), - which(format(BasinObs$DatesR, format = "\%d/\%m/\%Y")=="31/12/1999")) +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 ## preparation of the RunOptions object RunOptions <- CreateRunOptions(FUN_MOD = RunModel_CemaNeigeGR4J, InputsModel = InputsModel, IndPeriod_Run = Ind_Run) ## simulation -Param <- c(408.774, 2.646, 131.264, 1.174, 0.962, 2.249) +Param <- c(X1 = 408.774, X2 = 2.646, X3 = 131.264, X4 = 1.174, + CNX1 = 0.962, CNX2 = 2.249) OutputsModel <- RunModel_CemaNeigeGR4J(InputsModel = InputsModel, RunOptions = RunOptions, Param = Param) @@ -118,11 +122,15 @@ InputsCrit <- CreateInputsCrit(FUN_CRIT = ErrorCrit_NSE, InputsModel = InputsMo OutputsCrit <- ErrorCrit_NSE(InputsCrit = InputsCrit, OutputsModel = OutputsModel) -## simulation with the Linear Hysteresis +## ---- version of CemaNeige with the Linear Hysteresis + ## preparation of the RunOptions object RunOptions <- CreateRunOptions(FUN_MOD = RunModel_CemaNeigeGR4J, InputsModel = InputsModel, IndPeriod_Run = Ind_Run, IsHyst = TRUE) -Param <- c(408.774, 2.646, 131.264, 1.174, 0.962, 2.249, 100, 0.4) + +## 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, RunOptions = RunOptions, Param = Param) diff --git a/man/RunModel_CemaNeigeGR5J.Rd b/man/RunModel_CemaNeigeGR5J.Rd index e7bf524af2eaaca5da37ccdac50ab3c98bd30d1a..f899f8775feb49e17b6dfe0110523c606ada7217 100644 --- a/man/RunModel_CemaNeigeGR5J.Rd +++ b/man/RunModel_CemaNeigeGR5J.Rd @@ -98,15 +98,16 @@ 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")=="01/01/1990"), - which(format(BasinObs$DatesR, format = "\%d/\%m/\%Y")=="31/12/1999")) +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_CemaNeigeGR5J, InputsModel = InputsModel, IndPeriod_Run = Ind_Run) ## simulation -Param <- c(179.139, -0.100, 203.815, 1.174, 2.478, 0.977, 2.774) +Param <- c(X1 = 179.139, X2 = -0.100, X3 = 203.815, X4 = 1.174, X5 = 2.478, + CNX1 = 0.977, CNX2 = 2.774) OutputsModel <- RunModel_CemaNeigeGR5J(InputsModel = InputsModel, RunOptions = RunOptions, Param = Param) diff --git a/man/RunModel_CemaNeigeGR6J.Rd b/man/RunModel_CemaNeigeGR6J.Rd index 7a68a223da2996a52eacbda19b2ef50202f12d58..dc2ef16aa3c63d26611676992ba55452dc5c85e3 100644 --- a/man/RunModel_CemaNeigeGR6J.Rd +++ b/man/RunModel_CemaNeigeGR6J.Rd @@ -101,15 +101,19 @@ 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")=="01/01/1990"), - which(format(BasinObs$DatesR, format = "\%d/\%m/\%Y")=="31/12/1999")) +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 ## preparation of the RunOptions object RunOptions <- CreateRunOptions(FUN_MOD = RunModel_CemaNeigeGR6J, InputsModel = InputsModel, IndPeriod_Run = Ind_Run) ## simulation -Param <- c(116.482, 0.500, 72.733, 1.224, 0.278, 30.333, 0.977, 2.776) +Param <- c(X1 = 116.482, X2 = 0.500, X3 = 72.733, X4 = 1.224, X5 = 0.278, X6 = 30.333, + CNX1 = 0.977, CNX2 = 2.776) OutputsModel <- RunModel_CemaNeigeGR6J(InputsModel = InputsModel, RunOptions = RunOptions, Param = Param) @@ -122,12 +126,15 @@ InputsCrit <- CreateInputsCrit(FUN_CRIT = ErrorCrit_NSE, InputsModel = InputsMo OutputsCrit <- ErrorCrit_NSE(InputsCrit = InputsCrit, OutputsModel = OutputsModel) +## ---- version of CemaNeige with the Linear Hysteresis -## simulation with the Linear Hysteresis -Param <- c(116.482, 0.500, 72.733, 1.224, 0.278, 30.333, 0.977, 2.774, 100, 0.4) ## preparation of the RunOptions object RunOptions <- CreateRunOptions(FUN_MOD = RunModel_CemaNeigeGR6J, InputsModel = InputsModel, IndPeriod_Run = Ind_Run, IsHyst = TRUE) + +## simulation +Param <- c(X1 = 116.482, X2 = 0.500, X3 = 72.733, X4 = 1.224, X5 = 0.278, X6 = 30.333, + CNX1 = 0.977, CNX2 = 2.774, CNX3 = 100, CNX4 = 0.4) OutputsModel <- RunModel_CemaNeigeGR6J(InputsModel = InputsModel, RunOptions = RunOptions, Param = Param) diff --git a/man/RunModel_GR1A.Rd b/man/RunModel_GR1A.Rd index efe22a375e913062d959494d2468282a991d8e7e..23ce6b99bcf84f900c7402ade68d6d5646f256cb 100644 --- a/man/RunModel_GR1A.Rd +++ b/man/RunModel_GR1A.Rd @@ -80,7 +80,7 @@ RunOptions <- CreateRunOptions(FUN_MOD = RunModel_GR1A, InputsModel = InputsModel, IndPeriod_Run = Ind_Run) ## simulation -Param <- c(0.840) +Param <- c(X1 = 0.840) OutputsModel <- RunModel_GR1A(InputsModel = InputsModel, RunOptions = RunOptions, Param = Param) ## results preview diff --git a/man/RunModel_GR2M.Rd b/man/RunModel_GR2M.Rd index 4f1b341d9e0ff2856ce1d364ff70f0d0a7b9f89e..ae5916f9f1f2274212df4e43ed2104281d62fd59 100644 --- a/man/RunModel_GR2M.Rd +++ b/man/RunModel_GR2M.Rd @@ -78,15 +78,15 @@ InputsModel <- CreateInputsModel(FUN_MOD = RunModel_GR2M, DatesR = BasinObs$Date Precip = BasinObs$P, PotEvap = BasinObs$E) ## run period selection -Ind_Run <- seq(which(format(BasinObs$DatesR, format = "\%m/\%Y")=="01/1990"), - which(format(BasinObs$DatesR, format = "\%m/\%Y")=="12/1999")) +Ind_Run <- seq(which(format(BasinObs$DatesR, format = "\%Y-\%m")=="1990-01"), + which(format(BasinObs$DatesR, format = "\%Y-\%m")=="1999-12")) ## preparation of the RunOptions object RunOptions <- CreateRunOptions(FUN_MOD = RunModel_GR2M, InputsModel = InputsModel, IndPeriod_Run = Ind_Run) ## simulation -Param <- c(265.072, 1.040) +Param <- c(X1 = 265.072, X2 = 1.040) OutputsModel <- RunModel_GR2M(InputsModel = InputsModel, RunOptions = RunOptions, Param = Param) ## results preview diff --git a/man/RunModel_GR4H.Rd b/man/RunModel_GR4H.Rd index f1225b3e1d7883cda097bde10d690d13bb58a238..b9e9405cd27c617b996a2f474ed2f3ee03bf5ade 100644 --- a/man/RunModel_GR4H.Rd +++ b/man/RunModel_GR4H.Rd @@ -74,15 +74,15 @@ InputsModel <- CreateInputsModel(FUN_MOD = RunModel_GR4H, 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/03/2004 00:00"), - which(format(BasinObs$DatesR, format = "\%d/\%m/\%Y \%H:\%M")=="31/12/2008 23:00")) +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")) ## preparation of the RunOptions object RunOptions <- CreateRunOptions(FUN_MOD = RunModel_GR4H, InputsModel = InputsModel, IndPeriod_Run = Ind_Run) ## simulation -Param <- c(521.113, -2.918, 218.009, 4.124) +Param <- c(X1 = 521.113, X2 = -2.918, X3 = 218.009, X4 = 4.124) OutputsModel <- RunModel_GR4H(InputsModel = InputsModel, RunOptions = RunOptions, Param = Param) ## results preview diff --git a/man/RunModel_GR4J.Rd b/man/RunModel_GR4J.Rd index 78f6d0a58d4d1d038b4c2bb5bdcd5aa473c75e16..cda342e2ffe36646f559e8592c1447a91f546bf4 100644 --- a/man/RunModel_GR4J.Rd +++ b/man/RunModel_GR4J.Rd @@ -82,16 +82,17 @@ 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")=="01/01/1990"), - which(format(BasinObs$DatesR, format = "\%d/\%m/\%Y")=="31/12/1999")) +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) ## simulation -Param <- c(257.238, 1.012, 88.235, 2.208) -OutputsModel <- RunModel_GR4J(InputsModel = InputsModel, RunOptions = RunOptions, Param = Param) +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]) diff --git a/man/RunModel_GR5J.Rd b/man/RunModel_GR5J.Rd index b4bd93d2758650a55d879b0d205f4be5b250feab..b7dadddbe599c69fd31f8c5712b45d701e3a1c3d 100644 --- a/man/RunModel_GR5J.Rd +++ b/man/RunModel_GR5J.Rd @@ -83,15 +83,15 @@ 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")=="01/01/1990"), - which(format(BasinObs$DatesR, format = "\%d/\%m/\%Y")=="31/12/1999")) +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_GR5J, InputsModel = InputsModel, IndPeriod_Run = Ind_Run) ## simulation -Param <- c(245.918, 1.027, 90.017, 2.198, 0.434) +Param <- c(X1 = 245.918, X2 = 1.027, X3 = 90.017, X4 = 2.198, X5 = 0.434) OutputsModel <- RunModel_GR5J(InputsModel = InputsModel, RunOptions = RunOptions, Param = Param) diff --git a/man/RunModel_GR6J.Rd b/man/RunModel_GR6J.Rd index cb7e5408ec24fb0cad8b9f4a30a433e8373d12af..d4c3a79c6be42719a503c0baf4be209beeffe1de 100644 --- a/man/RunModel_GR6J.Rd +++ b/man/RunModel_GR6J.Rd @@ -86,16 +86,17 @@ 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")=="01/01/1990"), - which(format(BasinObs$DatesR, format = "\%d/\%m/\%Y")=="31/12/1999")) +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_GR6J, InputsModel = InputsModel, IndPeriod_Run = Ind_Run) ## simulation -Param <- c(242.257, 0.637, 53.517, 2.218, 0.424, 4.759) -OutputsModel <- RunModel_GR6J(InputsModel = InputsModel, RunOptions = RunOptions, Param = Param) +Param <- c(X1 = 242.257, X2 = 0.637, X3 = 53.517, X4 = 2.218, X5 = 0.424, X6 = 4.759) +OutputsModel <- RunModel_GR6J(InputsModel = InputsModel, + RunOptions = RunOptions, Param = Param) ## results preview plot(OutputsModel, Qobs = BasinObs$Qmm[Ind_Run])