Gravity controlled

Workflow for deriving and parametizing “gravity controlled systems”. They include 11 water authorities on the Eastern side of The Neterlands for which initial datasets have been prepared by SWECO. You need code in src/ribasim_nl.

Under notebooks you’ll find 4 scripts per water authority, e.g. notebooks\aa_en_maas, you can run in sequence. These are also run in sequence in main.py.

  1. 01_fix_model.py will “fix” the GIS-models supplied by Sweco in the directories {authority}_2024_6_3 to valid Ribasim-models in the directory {authority}_fix_model
  2. 02_prepare_model.pywill read {authority}_fix_model and add levels and flow_rate to the model and a static_data.xlsx that can be reviewed. The model will be written as {authority}_prepare_model
  3. 03_parameterized_model.py will read {authority}_prepare_model and static_data.xlsx to a model {authority}_parameterized_model
  4. 04_add_full_control.py adds control.

In this step control-nodes will get one of these 4 functions: - drain: outlet draining an area - supply: inlet supplying an area - flow_control: flow through an area in supply (drought) and drain conditions - flushing: an outlet with a specific flow to be maintained at any conditions (supply or drain)

Explanation of a node’s function in terms of upstream/downstream levels, supply (aanvoer) or drain (afvoer) state:

function state determined by flow_rate @ supply-state flow_rate @ drain-state Nodes added
supply downstream level capacity [m3/s] 0 [m3/s] DiscreteControl
drain upstream level 0 [m3/s] capacity [m3/s] DiscreteControl
flow control upstream & downstream level capacity [m3/s] capacity [m3/s] DiscreteControl
flushing upstream level & node flow_rate demand [m3/s] capacity [m3/s] DiscreteControl + FlowDemand

Steps 5, 6 and 7 are shared between water authorities, and live directly beneath the notebooks directory.

  1. 05_add_bergend.py adds VdGaast-based storage basins (input = models are from script 4)
  2. 06_add_synthetic_forcing.py adds synthetic forcing (constant precipitation switched to constant evaporation) to the models produced by script 5
  3. 07_add_dynamic_forcing.py adds Modflow-Metaswap drainage/infiltration and WIWB precipitation/evaporation to the models produced by script 5

Finally uploaden_modellen.py uploads all models produced by script 7.