Level controlled

Workflow for deriving level controlled (peilbeheerst) regional models. All code can be found under src/peilbeheerst_model. The paths below are relative to this path.

  1. Run the preprocessing scripts. One script per water board, path: peilbeheerst_model/preprocess_data/
  2. Run the postprocessing script. One script per water board, path: peilbeheerst_model/postprocess_data/
  3. Run the crossings script. One script, path: 01_parse_crossings.ipynb. Moving to one script per water board under peilbeheerst_model/parse_crossings/.
  4. Run shortest paths scripts. One script per water board, path: Shortest_path/
  5. Run crossings to Ribasim script. One script, all water boards are below each other, path: 02_crossings_to_ribasim_notebook.ipynb. Moving to one script per water board under peilbeheerst_model/crossings_to_ribasim/.
  6. Run parametrize scripts. One script per water board, for now only Amstel, Gooi en Vecht (AGV), path: Parametrize/AmstelGooienVecht_parametrize.ipynb

We originally had more parametrize scripts, but because so much has changed I have now saved these in our backup. We will only use these to see if there were any additional manual adjustments. For the rest, it follows the same workflow as AmstelGooienVecht_parametrize.ipynb.

Finally: step 1 started with a clear script per water board. During the process of 1.5 years, these scripts have become increasingly larger and more confusing, whereby not every line is needed anymore. For now, there is no priority to clean this up, partly because this is a major risk that the data will (unintentionally) change, which will change the networks and the feedback forms can no longer be used.

Layout

At the end of the forcing stage, ribasim_nl.network_snapping.snap_model aligns the layout of the model with the hydro-objects in verwerkt/profielen/network.gpkg, which are written by the profile generation. This only changes the layout, not the model results:

  • Connector nodes stay at the location of the structure they represent.
  • Basin nodes are moved onto the nearest main route of the longest connected part of the hydro-objects in their basin, as in the gravity controlled models.
  • Links between a Basin and a connector node follow the hydro-objects, complemented by the Top10NL water lines. Hydro-objects are only connected where there is evidence: the culverts (duikersifonhevel) of the crossings data, gaps of at most 2 m, and gaps across BGT water surfaces. Connector nodes far from the hydro-objects are connected over the BGT water surfaces, crossing at most 50 m of land.
  • Links stay straight if no such route is found, or if it is not less than ribasim_nl.link_geometries.MAX_STRAIGHT_LINE_RATIO times longer than the straight line, the same threshold as for the gravity controlled models.

Then ribasim_nl.junctionify merges the shared parts of links into Junctions, and ribasim_nl.layout.tidy_layout makes sure no nodes are on top of each other and no links overlap: bergend Basins are placed 100 m from their doorgaand Basin, links are offset 5 m to the right of their direction, such that inflows and outflows along the same waterway are drawn side by side, and nodes that are still within 10 m of each other are moved apart. The gravity controlled models get the same layout step at the end of their dynamic stage, and ribasim_nl.validation.validate_model checks it.