Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • airGRiwrm airGRiwrm
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 27
    • Issues 27
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 3
    • Merge requests 3
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar

La forge institutionnelle d'INRAE étant en production depuis le 10 juin 2025, nous vous invitons à y créer vos nouveaux projets.

  • IN-WOP
  • airGRiwrmairGRiwrm
  • Issues
  • #95
Closed
Open
Issue created Sep 04, 2022 by Dorchies David@david.dorchiesOwner

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

The challenge is: how to integrate this flow diversion in the current GRiwrm object?

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 with RunModel_GRxx
  • Copy of Qsim in a Qnat 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 for Qdiv)

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 the Diversion model
  • Qsim: the modelled flow which is transferred to the downstream node specified by the RunModel_xxxx line in the GRiwrm 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 handling Diversion node type
  • Modify plot.GRiwrm for plotting the network scheme with diversion nodes
  • Modify CreateInputsModel.GRiwrm to add a tag Diversion on InputsModel object
  • Modify RunModel.InputsModel to post-process airGR::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
Edited Oct 27, 2022 by Dorchies David
Assignee
Assign to
Time tracking