The example below is inspired by the semi-distributed model developed in the ClimAware project [@theobaldClimAwareImpactsClimate2014a].
The example below is inspired by the semi-distributed model developed in the ClimAware project [@theobaldClimAwareImpactsClimate2014a], in which we used the daily rainfall-runoff model GR4J.
## Semi-distributive network description
The aim of this vignette is to create the semi-distributed network necessary for the hydrological model.
## Semi-distributed network description
The model is distributed according to the gauging stations described in @dorchiesClimateChangeImpacts2014.
List of nodes
First, we must read the list of nodes and the associated metadata:
```{r seine_nodes}
seine_nodes <- read.table(
...
...
@@ -32,22 +34,25 @@ seine_nodes <- read.table(
seine_nodes
```
Create the GRiwrm object which lists the nodes and describes the network diagram. It's a dataframe of class `GRiwrm` and `GRiwrm` with specific column names:
Using that information, we must create the GRiwrm object that lists the nodes and describes the network diagram. It is a dataframe of class `GRiwrm` with specific column names:
- `id`: the identifier of the node in the network.
- `down`: the identifier of the next hydrological node downstream.
- `length`: hydraulic distance to the next hydrological downstream node.
- `model`: Name of the hydrological model used (E.g. "RunModel_GR4J"). `NA` for other type of node.
- `area`: Area of the sub-catchment (km<sup>2</sup>). Used for hydrological model such as GR models. `NA` if not used.
- `model`: Name of the hydrological model used (E.g. "RunModel_GR4J"). `NA` for other types of nodes.
- `area`: Area of the sub-catchment (km<sup>2</sup>). Used for hydrological models such as GR models. `NA` if not used.
`GRiwrm` function helps to rename the columns of the dataframe and assign the variable classes.
The `CreateGRiwrm` function helps to rename the columns of the dataframe and assign the variable classes.
```{r griwrm}
seine_nodes$id_aval[seine_nodes$id_aval == ""] <- NA
@@ -65,18 +70,18 @@ The daily mean precipitation and potential evaporation at the scale of the inter
The daily naturalised flow is provided by @hydratecActualisationBaseDonnees2011a.
These data are embedded in a the R package 'seinebasin' which is not publicly available.
These data are embedded in the R package 'seinebasin', which is not publicly available.
```{r QNAT, warning=FALSE, message=FALSE}
library(seinebasin)
data(QNAT)
```
## Generate the GRIWRM InputsModel object
## Generate the GRiwrm InputsModel object
The GRIWRM InputsModel object is a list of **airGR** InputsModel. The identifier of the sub-basin is used as key in the list which is ordered from upstream to downstream.
The GRiwrm InputsModel object is a list of **airGR** InputsModel objects. The identifier of the sub-basin is used as a key in the list, which is ordered from upstream to downstream.
The **airGR** CreateInputsModel function is extended in order to handle the griwrm object which describe the basin diagram:
The **airGR** CreateInputsModel function is extended in order to handle the GRiwrm object that describes the basin diagram:
The lag $\tau_0$ and route $K_0$ parameters of TGR are expressed as time delay in hours corresponding to the delay time between the farest upstream inlet and the outlet of the sub-basin.
Almost all sub basin has only a lag parameter. The only exception is for La Marne à Noisiel (NOISI_17) that has a routing parameter which can be approximated to a single lag parameter equals to $\tau_0 + K_0$.
The lag $\tau_0$ and routing $K_0$ parameters of TGR are expressed as time delay in hours corresponding to the delay time between the farthest upstream inlet and the outlet of the sub-basin.
Almost all sub basins have a routing parameter equal to 0. The only exception is for La Marne à Noisiel (NOISI_17) that has a routing parameter that can be approximated to a single lag parameter equal to $\tau_0 + K_0$.
This lag parameter has to be converted in a speed in m/s used in the **airGR** lag model:
title: "Seine_03: Calibration of a semi-distributive GR model network"
title: "Seine_03: Calibration of a semi-distributed GR model network"
author: "David Dorchies"
vignette: >
%\VignetteIndexEntry{Seine_03: Calibration of a semi-distributive GR model network}
%\VignetteIndexEntry{Seine_03: Calibration of a semi-distributed GR model network}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
---
...
...
@@ -11,6 +11,8 @@ vignette: >
knitr::opts_chunk$set(echo = TRUE)
```
The aim of this vignette is to perform a first calibration of the semi-distributed hydrological model, using naturalised discharge.
## Loading libraries, network and time series data
Run `vignette("01_First_network", package = "airGRiwrm")` and `vignette("02_First_run", package = "airGRiwrm")` before this one in order to create the Rdata files loaded below:
...
...
@@ -25,11 +27,14 @@ data(QNAT)
## InputsCrit object
We need then to prepare the InputsCrit object that is necessary to define the calibration objective function. We chose here the KGE' criterion:
## Integration of the reservoir connections into the model
The goal of this vignette is to add reservoirs connections to the Seine River model previously set up. A complete description of the reservoir system of the Seine River can be found in @dehayEtudeImpactChangement2012
The aim of this vignette is to add reservoir connections to the Seine River model previously set up. A complete description of the reservoir system of the Seine River can be found in @dehayEtudeImpactChangement2012
### Add connections to the reservoirs in the gauging station network
Because of the **airGR** SD model structure, the topology of the network will differ between the physical one and the modelled one.
Because of the **airGR** SD model structure, the topology of the network will differ between the physical one and the modelled one. In the following, we provide details for each of the 4 lakes, and then we present the complete SD network.
For example, the physical topology of the Aube lake is represented below:
First, the physical topology of the Aube lake is represented below:
In the SD model, we do not model intermediate flows as well as the reservoir in the catchment. As a result, an equivalent topology compatible with **airGR** will be the one below:
In the SD model, we do not simulate intermediate flows as well as the reservoir in the catchment. As a result, an equivalent topology compatible with **airGR** will be the one below:
```{r mmd_aube_model, echo = FALSE}
mmd("
...
...
@@ -65,9 +65,9 @@ style AUBE_R3 fill:#fcc
", width = "100%")
```
`AUBE_P2` will propagate negative flow to downstream (reservoir inflows) while `AUBE_R3` will propagate positive flow to downstream (reservoir releases).
`AUBE_P2` will propagate negative flows downstream (reservoir inflows) while `AUBE_R3` will propagate positive flows downstream (reservoir releases).
With $Q_{PANNEC\_P} = - Q_{CHAUM\_07}$ as all the upstream flow fills the reservoir.
With $Q_{PANNEC\_P} = - Q_{CHAUM\_07}$ as all the upstream flows fill the reservoir.
Marne lake can be mapped as:
The Marne lake can be mapped as:
```{r mmd_marne_true, echo = FALSE}
mmd("
...
...
@@ -142,7 +142,8 @@ style MARNE_R25 fill:#fcc
style M fill:#ccf
", width = "100%")
```
And can be modeled as:
And can be modelled as:
```{r mmd_marne_model, echo = FALSE}
mmd("
...
...
@@ -197,17 +198,20 @@ data(QNAT)
data(Qreservoirs)
```
## How to handle online reservoir? The Pannecière lake case.
## How to handle an inline reservoir? The Pannecière lake case.
There are two possibilities:
- truncate the system and only simulate the release of the reservoir if we only care about downstream flows
- add a fictive inlet to the reservoir that will store all upstream discharge into the reservoir
If we know in advance the flow released by the reservoir, upstream flow informations is not usefull for the simulation. But reservoir management simulation would need upstream flow informations for simulating the reservoir state during simulation. The second alternative will be useful for the next phases.
If we know in advance the flows released by the reservoir, upstream flow informations is not useful for the simulation. However, reservoir management simulation would require upstream flow informations for simulating the reservoir state during simulation. The second alternative will therefore be useful for the next phases.
As in vignette V05, this vignette proposes an example of calibration of influenced flow with the Marne reservoir but here with the GR6J model instead of GR4J.
It will used influenced observation flows directly measured at gauging stations and flows recorded at reservoir inlets and outlet.
It will use influenced observation flows directly measured at gauging stations and flows recorded at reservoir inlets and outlets.
## Set the data
...
...
@@ -31,7 +31,7 @@ Loading naturalised data and influenced flow configuration:
load("_cache/V04.RData")
```
Remove extra items from global configuration
We remove extra items from a complete configuration to keep only the Marne system: