Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
HYCAR-Hydro
airGR
Commits
75610d53
Commit
75610d53
authored
Apr 01, 2019
by
Delaigue Olivier
Browse files
v1.2.12.13 CLEAN: reformat date periods and vector of Param in many doc examples
parent
7dff15da
Changes
25
Hide whitespace changes
Inline
Side-by-side
DESCRIPTION
View file @
75610d53
Package: airGR
Type: Package
Title: Suite of GR Hydrological Models for Precipitation-Runoff Modelling
Version: 1.2.12.1
2
Version: 1.2.12.1
3
Date: 2019-04-01
Authors@R: c(
person("Laurent", "Coron", role = c("aut", "trl"), comment = c(ORCID = "0000-0002-1503-6204")),
...
...
NEWS.rmd
View file @
75610d53
...
...
@@ -13,7 +13,7 @@ output:
### 1.2.12.1
2
Release Notes (2019-04-01)
### 1.2.12.1
3
Release Notes (2019-04-01)
...
...
man/Calibration.Rd
View file @
75610d53
...
...
@@ -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,
...
...
man/Calibration_Michel.Rd
View file @
75610d53
...
...
@@ -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,
...
...
man/CreateCalibOptions.Rd
View file @
75610d53
...
...
@@ -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,
...
...
man/CreateIniStates.Rd
View file @
75610d53
...
...
@@ -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])
...
...
man/CreateInputsCrit.Rd
View file @
75610d53
...
...
@@ -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
...
...
man/CreateRunOptions.Rd
View file @
75610d53
...
...
@@ -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
...
...
man/ErrorCrit.Rd
View file @
75610d53
...
...
@@ -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,
...
...
man/ErrorCrit_KGE.Rd
View file @
75610d53
...
...
@@ -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)
...
...
man/ErrorCrit_KGE2.Rd
View file @
75610d53
...
...
@@ -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)
...
...
man/ErrorCrit_NSE.Rd
View file @
75610d53
...
...
@@ -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)
...
...
man/ErrorCrit_RMSE.Rd
View file @
75610d53
...
...
@@ -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)
...
...
man/Param_Sets_GR4J.Rd
View file @
75610d53
...
...
@@ -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,
...
...
man/RunModel.Rd
View file @
75610d53
...
...
@@ -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
...
...
man/RunModel_CemaNeige.Rd
View file @
75610d53
...
...
@@ -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)
...
...
man/RunModel_CemaNeigeGR4J.Rd
View file @
75610d53
...
...
@@ -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)
...
...
man/RunModel_CemaNeigeGR5J.Rd
View file @
75610d53
...
...
@@ -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)
...
...
man/RunModel_CemaNeigeGR6J.Rd
View file @
75610d53
...
...
@@ -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)
...
...
man/RunModel_GR1A.Rd
View file @
75610d53
...
...
@@ -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
...
...
Prev
1
2
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment