Implementation of "Diversion" node
Study cases
There are several cases where flow can be diverted from the river to artificial infrastructure, other catchment, or another part of the catchment. Here's below a minimal example:
graph LR
idUp[Upstream node]
idA(Diversion)
idDn[Downstream node]
idR[Reservoir, canal or river branch]
subgraph Node with GR model + Diversion
idUp -->| 0 km| idA
end
idA -->| x km| idDn
idA -->| y km| idR
idR -->| z km| idDn
classDef UpGau fill:#aaf
classDef IntGau fill:#afa
classDef IntUng fill:#efe
classDef DirInj fill:#faa
class idDn IntGau
class idR IntUng
class idA DirInj
class idUp UpGau
The "Diversion" node acts as a direct injection node that withdraws flow from the upstream node and transfers this flow to the "reservoir/canal/river branch" node.
This minimal example can be extended at upstream, downstream or can have several additional branches and intermediate nodes.
The diverted flow should have some limitation, first of all because the flow downstream the diversion (remaining flow in the river) can't be negative and, eventually, can't legally be under an instream flow or minimum ecological flow.
Proposition of implementation
GRiwrm
object?
The challenge is: how to integrate this flow diversion in the current I propose the following trick: the "diversion" node is a post-process of the "Upstream node" and so it has the same id
but with a Diversion
model and a down
id equal to the "reservoir/canal/river branch" node.
id | down | length | model | area |
---|---|---|---|---|
Up | Down | x | RunModel_xxxx |
aUp |
Up | Reservoir | y | Diversion |
NA |
Reservoir | Down | z |
Reservoir , RunModel_Lag or RunModel_GRxx
|
aReservoir |
Down | NA | NA | RunModel_GRxx |
aDown |
Modification and add-on to the GRiwrmInputsModel object
The diverted flow needs to be filled in the model inputs. I propose to use the existing Qobs
parameter as for direct injection nodes. As for direct injection nodes, the sign of this column determines the direction of the flow (if negative, abstraction of the flow; if positive, release of the flow taken from the downstream node of the Diversion
node).
An additional Qmin
for the minimal flow to be left in the river at the diversion node. Qmin
can be a matrix with named columns (with the id
of the diversion node) and one row by time step to take into account variation of the instream flow during time. By default Qmin
equals zero for avoiding negative flow downstream the diversion.
Calculation process
The calculation can follow the following process:
- Calculation of the flow
Qsim
in the upstream node withRunModel_GRxx
- Copy of
Qsim
in aQnat
variable (the "natural" flow before human influence at this location) - Limitation of the diverted flow by instream flow
Qabs <- min(-Qdiv, Qnat - Qmin)
- Subtraction of the diversion from the "natural" flow:
Qsim <- Qnat + Qdiv
(abstracted flow means negative value forQdiv
)
In a nutshell, the OutputsModel
object produces the variables:
-
Qnat
: flow before diversion (output of the GR model) -
Qdiv
: the modified diverted flow after limitation which is transferred to the downstream node specified by theDiversion
model -
Qsim
: the modelled flow which is transferred to the downstream node specified by theRunModel_xxxx
line in theGRiwrm
object
Overview of existing models and specifications
Node type | Available models | Inputs | Parameters |
---|---|---|---|
Hydrological | airGR GR models |
P , T , PE
|
GR and SD routing parameters |
Routing | RunModel_Lag |
None | SD routing parameters |
Direct injection | NA |
Qobs (<0 for abstraction, >0 for release) |
None |
Reservoir | Reservoir |
Qobs (only >0 for release) |
None |
Diversion | Diversion |
Qobs (diverted flow), Qmin (instream flow) |
None |
Tasks:
-
Modify CreateGRiwrm
for handlingDiversion
node type -
Modify plot.GRiwrm
for plotting the network scheme with diversion nodes -
Modify CreateInputsModel.GRiwrm
to add a tagDiversion
onInputsModel
object -
Modify RunModel.InputsModel
to post-processairGR::RunModel
with diversion tasks -
Modify UpdateQsimUpstream
to brings-Qdiv
upstream of the node collecting the diverted flows -
Write an example in RunModel.GRiwrmInputsModel
-
Modify RunModel.Supervision
to integrate diversion tasks in the model -
Write a vignette illustrating RunModel.Supervision
with a Diversion node -
Modify Calibration.GRiwrmInputsModel
to integrate diversion tasks