Commit 7cc62c5a authored by Delaigue Olivier's avatar Delaigue Olivier
Browse files

v1.2.12.22 UPDATE: ErrorCrit* funs and many examples in doc now use Obs...

v1.2.12.22 UPDATE: ErrorCrit* funs and many examples in doc now use Obs argument of CreateRunOptions instead obs or Qobs
parent 73f199a8
......@@ -122,7 +122,7 @@ plot(OutputsModel, Qobs = BasinObs$Qmm[Ind_Run])
## efficiency criterion: Nash-Sutcliffe Efficiency
InputsCrit <- CreateInputsCrit(FUN_CRIT = ErrorCrit_NSE, InputsModel = InputsModel,
RunOptions = RunOptions, obs = BasinObs$Qmm[Ind_Run], varObs = "Q")
RunOptions = RunOptions, Obs = BasinObs$Qmm[Ind_Run], varObs = "Q")
OutputsCrit <- ErrorCrit_NSE(InputsCrit = InputsCrit, OutputsModel = OutputsModel)
......@@ -143,7 +143,7 @@ plot(OutputsModel, Qobs = BasinObs$Qmm[Ind_Run])
## efficiency criterion: Nash-Sutcliffe Efficiency
InputsCrit <- CreateInputsCrit(FUN_CRIT = ErrorCrit_NSE, InputsModel = InputsModel,
RunOptions = RunOptions, obs = BasinObs$Qmm[Ind_Run], varObs = "Q")
RunOptions = RunOptions, Obs = BasinObs$Qmm[Ind_Run], varObs = "Q")
OutputsCrit <- ErrorCrit_NSE(InputsCrit = InputsCrit, OutputsModel = OutputsModel)
}
......
......@@ -88,7 +88,7 @@ plot(OutputsModel, Qobs = BasinObs$Qmm[Ind_Run])
## efficiency criterion: Nash-Sutcliffe Efficiency
InputsCrit <- CreateInputsCrit(FUN_CRIT = ErrorCrit_NSE, InputsModel = InputsModel,
RunOptions = RunOptions, obs = BasinObs$Qmm[Ind_Run], varObs = "Q")
RunOptions = RunOptions, Obs = BasinObs$Qmm[Ind_Run], varObs = "Q")
OutputsCrit <- ErrorCrit_NSE(InputsCrit = InputsCrit, OutputsModel = OutputsModel)
}
......
......@@ -94,7 +94,7 @@ plot(OutputsModel, Qobs = BasinObs$Qmm[Ind_Run])
## efficiency criterion: Nash-Sutcliffe Efficiency
InputsCrit <- CreateInputsCrit(FUN_CRIT = ErrorCrit_NSE, InputsModel = InputsModel,
RunOptions = RunOptions, obs = BasinObs$Qmm[Ind_Run], varObs = "Q")
RunOptions = RunOptions, Obs = BasinObs$Qmm[Ind_Run], varObs = "Q")
OutputsCrit <- ErrorCrit_NSE(InputsCrit = InputsCrit, OutputsModel = OutputsModel)
}
......
......@@ -90,7 +90,7 @@ plot(OutputsModel, Qobs = BasinObs$Qmm[Ind_Run])
## efficiency criterion: Nash-Sutcliffe Efficiency
InputsCrit <- CreateInputsCrit(FUN_CRIT = ErrorCrit_NSE, InputsModel = InputsModel,
RunOptions = RunOptions, obs = BasinObs$Qmm[Ind_Run], varObs = "Q")
RunOptions = RunOptions, Obs = BasinObs$Qmm[Ind_Run], varObs = "Q")
OutputsCrit <- ErrorCrit_NSE(InputsCrit = InputsCrit, OutputsModel = OutputsModel)
}
......
......@@ -99,7 +99,7 @@ plot(OutputsModel, Qobs = BasinObs$Qmm[Ind_Run])
## efficiency criterion: Nash-Sutcliffe Efficiency
InputsCrit <- CreateInputsCrit(FUN_CRIT = ErrorCrit_NSE, InputsModel = InputsModel,
RunOptions = RunOptions, obs = BasinObs$Qmm[Ind_Run], varObs = "Q")
RunOptions = RunOptions, Obs = BasinObs$Qmm[Ind_Run], varObs = "Q")
OutputsCrit <- ErrorCrit_NSE(InputsCrit = InputsCrit, OutputsModel = OutputsModel)
}
......
......@@ -100,7 +100,7 @@ plot(OutputsModel, Qobs = BasinObs$Qmm[Ind_Run])
## efficiency criterion: Nash-Sutcliffe Efficiency
InputsCrit <- CreateInputsCrit(FUN_CRIT = ErrorCrit_NSE, InputsModel = InputsModel,
RunOptions = RunOptions, obs = BasinObs$Qmm[Ind_Run], varObs = "Q")
RunOptions = RunOptions, Obs = BasinObs$Qmm[Ind_Run], varObs = "Q")
OutputsCrit <- ErrorCrit_NSE(InputsCrit = InputsCrit, OutputsModel = OutputsModel)
}
......
......@@ -103,7 +103,7 @@ plot(OutputsModel, Qobs = BasinObs$Qmm[Ind_Run])
## efficiency criterion: Nash-Sutcliffe Efficiency
InputsCrit <- CreateInputsCrit(FUN_CRIT = ErrorCrit_NSE, InputsModel = InputsModel,
RunOptions = RunOptions, obs = BasinObs$Qmm[Ind_Run], varObs = "Q")
RunOptions = RunOptions, Obs = BasinObs$Qmm[Ind_Run], varObs = "Q")
OutputsCrit <- ErrorCrit_NSE(InputsCrit = InputsCrit, OutputsModel = OutputsModel)
}
......
......@@ -142,13 +142,13 @@ The `CreateInputsCrit()` function allows to prepare the input in order to calcul
* `FUN_CRIT`: the name of the error criterion function (the available functions are introduced later on)
* `InputsModel`: the inputs of the hydrological model previously prepared by the `CreateInputsModel()` function
* `RunOptions`: the options of the hydrological model previously prepared by the `CreateRunOptions()` function
* `Qobs`: the observed discharge expressed in *mm/time step*
* `Obs`: the observed discharge expressed in *mm/time step*
Missing values (`NA`) are **allowed** for observed discharge.
```{r}
InputsCrit <- CreateInputsCrit(FUN_CRIT = ErrorCrit_NSE, InputsModel = InputsModel,
RunOptions = RunOptions, Qobs = BasinObs$Qmm[Ind_Run])
RunOptions = RunOptions, Obs = BasinObs$Qmm[Ind_Run])
str(InputsCrit)
```
......@@ -240,7 +240,7 @@ Although it is possible for the user to design its own graphics from the outputs
* correlation plot between simulated and observed discharge (if observed discharge provided)
```{r,eval=F}
plot(OutputsModel, Qobs = BasinObs$Qmm[Ind_Run])
plot(OutputsModel, Obs = BasinObs$Qmm[Ind_Run])
```
Moreover, if the CemaNeige model is used, the air temperature and the simulated snowpack water equivalent time series are plotted.
......
......@@ -86,7 +86,7 @@ RunOptions_Cal <- CreateRunOptions(FUN_MOD = RunModel_GR4J,
## efficiency criterion: Nash-Sutcliffe Efficiency
InputsCrit_Cal <- CreateInputsCrit(FUN_CRIT = ErrorCrit_NSE, InputsModel = InputsModel,
RunOptions = RunOptions_Cal, Qobs = BasinObs$Qmm[Ind_Cal])
RunOptions = RunOptions_Cal, Obs = BasinObs$Qmm[Ind_Cal])
## ---- validation step
......@@ -101,7 +101,7 @@ RunOptions_Val <- CreateRunOptions(FUN_MOD = RunModel_GR4J,
## efficiency criterion (Nash-Sutcliffe Efficiency) on the validation period
InputsCrit_Val <- CreateInputsCrit(FUN_CRIT = ErrorCrit_NSE, InputsModel = InputsModel,
RunOptions = RunOptions_Val, Qobs = BasinObs$Qmm[Ind_Val])
RunOptions = RunOptions_Val, Obs = BasinObs$Qmm[Ind_Val])
```
......
......@@ -101,7 +101,7 @@ In order to calibrate and assess the model performance, we will follow the recom
## efficiency criterion: 75 % KGE'(Q) + 5 % KGE'(SCA) on each of the 5 layers
InputsCrit_Cal <- CreateInputsCrit(FUN_CRIT = rep("ErrorCrit_KGE2", 6),
InputsModel = InputsModel, RunOptions = RunOptions_Cal,
obs = list(BasinObs$Qmm[Ind_Cal],
Obs = list(BasinObs$Qmm[Ind_Cal],
BasinObs$SCA1[Ind_Cal],
BasinObs$SCA2[Ind_Cal],
BasinObs$SCA3[Ind_Cal],
......@@ -112,7 +112,7 @@ InputsCrit_Cal <- CreateInputsCrit(FUN_CRIT = rep("ErrorCrit_KGE2", 6),
InputsCrit_Val <- CreateInputsCrit(FUN_CRIT = rep("ErrorCrit_KGE2", 6),
InputsModel = InputsModel, RunOptions = RunOptions_Val,
obs = list(BasinObs$Qmm[Ind_Val],
Obs = list(BasinObs$Qmm[Ind_Val],
BasinObs$SCA1[Ind_Val],
BasinObs$SCA2[Ind_Val],
BasinObs$SCA3[Ind_Val],
......@@ -191,7 +191,7 @@ RunOptions_Val_NoHyst <- CreateRunOptions(FUN_MOD = RunModel_CemaNeigeGR4J,
InputsCrit_Cal_NoHyst <- CreateInputsCrit(FUN_CRIT = ErrorCrit_KGE2,
InputsModel = InputsModel,
RunOptions = RunOptions_Cal_NoHyst,
obs = BasinObs$Qmm[Ind_Cal], varObs = "Q")
Obs = BasinObs$Qmm[Ind_Cal], varObs = "Q")
## preparation of CalibOptions object
CalibOptions_NoHyst <- CreateCalibOptions(FUN_MOD = RunModel_CemaNeigeGR4J,
......
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