Commit b896ec92 authored by Delaigue Olivier's avatar Delaigue Olivier

v1.4.3.53 DOC: minor text and code revisions in the vignette V01_get_started

parent e49eea19
Package: airGR Package: airGR
Type: Package Type: Package
Title: Suite of GR Hydrological Models for Precipitation-Runoff Modelling Title: Suite of GR Hydrological Models for Precipitation-Runoff Modelling
Version: 1.4.3.52 Version: 1.4.3.53
Date: 2020-01-21 Date: 2020-01-22
Authors@R: c( Authors@R: c(
person("Laurent", "Coron", role = c("aut", "trl"), comment = c(ORCID = "0000-0002-1503-6204")), person("Laurent", "Coron", role = c("aut", "trl"), comment = c(ORCID = "0000-0002-1503-6204")),
person("Olivier", "Delaigue", role = c("aut", "cre"), comment = c(ORCID = "0000-0002-7668-8468"), email = "airGR@inrae.fr"), person("Olivier", "Delaigue", role = c("aut", "cre"), comment = c(ORCID = "0000-0002-7668-8468"), email = "airGR@inrae.fr"),
......
...@@ -2,7 +2,12 @@ ...@@ -2,7 +2,12 @@
### 1.4.3.52 Release Notes (2020-01-20) ### 1.4.3.53 Release Notes (2020-01-22)
____________________________________________________________________________________
### 1.4.3.52 Release Notes (2020-01-21)
#### New features #### New features
......
...@@ -105,14 +105,14 @@ The `CreateRunOptions()` function allows to prepare the options required to the ...@@ -105,14 +105,14 @@ The `CreateRunOptions()` function allows to prepare the options required to the
The user must at least define the following arguments: The user must at least define the following arguments:
* `FUN_MOD`: the name of the model function to run * `FUN_MOD`: the name of the model function to run
* `InputsModel`: the associated inputs data * `InputsModel`: the associated input data
* `IndPeriod_Run`: the period on which the model is run * `IndPeriod_Run`: the period on which the model is run
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: 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} ```{r}
Ind_Run <- seq(which(format(BasinObs$DatesR, format = "%d/%m/%Y")=="01/01/1990"), Ind_Run <- seq(which(format(BasinObs$DatesR, format = "%Y-%m-%d") == "1990-01-01"),
which(format(BasinObs$DatesR, format = "%d/%m/%Y")=="31/12/1999")) which(format(BasinObs$DatesR, format = "%Y-%m-%d") == "1999-12-31"))
str(Ind_Run) str(Ind_Run)
``` ```
...@@ -145,13 +145,14 @@ The `CreateInputsCrit()` function allows to prepare the input in order to calcul ...@@ -145,13 +145,14 @@ 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) * `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 * `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 * `RunOptions`: the options of the hydrological model previously prepared by the `CreateRunOptions()` function
* `Obs`: the observed discharge expressed in *mm/time step* * `VarObs`: the name of the considered variable (by default `"Q"` for the discharge)
* `Obs`: the observed variable time serie (e.g. the discharge expressed in *mm/time step*)
Missing values (`NA`) are **allowed** for observed discharge. Missing values (`NA`) are **allowed** for observed discharge.
```{r} ```{r}
InputsCrit <- CreateInputsCrit(FUN_CRIT = ErrorCrit_NSE, InputsModel = InputsModel, InputsCrit <- CreateInputsCrit(FUN_CRIT = ErrorCrit_NSE, InputsModel = InputsModel,
RunOptions = RunOptions, Obs = BasinObs$Qmm[Ind_Run]) RunOptions = RunOptions, VarObs = "Q", Obs = BasinObs$Qmm[Ind_Run])
str(InputsCrit) str(InputsCrit)
``` ```
...@@ -235,7 +236,7 @@ str(OutputsModel) ...@@ -235,7 +236,7 @@ str(OutputsModel)
## Results preview ## Results preview
Although it is possible for the user to design its own graphics from the outputs of the `RunModel*()` functions, the **airGR** package offers the possibility to make use of the `plot.OutputsModel()` function (or `plot()` with an `OutputsModel` object). This function returns a dashboard of results including various graphs (depending on the model used): Although it is possible for the user to design its own graphics from the outputs of the `RunModel*()` functions, the **airGR** package offers the possibility to make use of the `plot()` function. This function returns a dashboard of results including various graphs (depending on the model used):
* time series of total precipitation and simulated discharge (and observed discharge if provided) * time series of total precipitation and simulated discharge (and observed discharge if provided)
* interannual average daily simulated discharge (and daily observed discharge if provided) and interannual average monthly precipitation * interannual average daily simulated discharge (and daily observed discharge if provided) and interannual average monthly precipitation
...@@ -255,9 +256,11 @@ To evaluate the efficiency of the model, it is possible to use the same criterio ...@@ -255,9 +256,11 @@ To evaluate the efficiency of the model, it is possible to use the same criterio
```{r} ```{r}
OutputsCrit <- ErrorCrit_NSE(InputsCrit = InputsCrit, OutputsModel = OutputsModel) OutputsCrit <- ErrorCrit_NSE(InputsCrit = InputsCrit, OutputsModel = OutputsModel)
str(OutputsCrit)
``` ```
```{r} ```{r}
OutputsCrit <- ErrorCrit_KGE(InputsCrit = InputsCrit, OutputsModel = OutputsModel) OutputsCrit <- ErrorCrit_KGE(InputsCrit = InputsCrit, OutputsModel = OutputsModel)
str(OutputsCrit)
``` ```
......
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