QGIS plugin

1 Preparing a model

This guide assumes you have already installed the Ribasim core, test models and QGIS plugin as described in the install page. Open an existing model or create a new model. As an example of an existing model, you can use the “basic” model from generated_testmodels.zip.

Check if your coordinate reference system (CRS) is set correctly.

If you are working with an unknown CRS, right click the model database group in Layers, and click “Set Group CRS…”.

If you are modeling the Netherlands, select “Amersfoort / RD New” (EPSG:28992).

1.1 Editing nodes

1.1.1 Adding nodes on the map

Select the Node layer.

Turn on the edit mode to be able to add nodes on the map.

Add nodes to the map with a left click and select the node type.

Node form

Turn the edit mode off and save the edits to the Nodes layer.

1.1.2 Editing node properties

Right click a layer and select “Open Attribute Table”.

Click the yellow pencil icon on the top left to enable editing, and copy and paste a record. A record can be selected by clicking on the row number.

Adjust the content. Note that the node_id field is connected to the Node layer and thus must be set to an existing node_id. If you prefer, it also works to copy data with the same columns from Excel. Turn off edit mode and save changes to the layer.

1.2 Connect nodes

1.2.1 Turn on snapping

Make sure the Snapping Toolbar is visible, by going to the View > Toolbars menu. Turn on snapping mode by clicking the magnet and set the snapping distance to 25 pixels. The keyboard shortcut for snapping is s (once the toolbar is enabled).

1.2.2 Creating connecting edges

Select the Edge layer and turn on the edit mode.

Select “Add line feature”.

Create a connection by left clicking a source node and right clicking the destination node.

Create an edge

A form where one can change the edge attributes will pop up. Once done with editing, click ok.

Edge form

Now leave the edit mode and save the results to the layer. Your model is now ready to run. See

2 Running a model

  • Install the Ribasim core application as described in the install section
  • Open a terminal like Powershell or Cmd and navigate to the model directory.
  • Call Ribasim with the .toml file as input. E.g. <path_to_ribasim>\ribasim.exe my_model.toml.
  • In your model directory there is now a results/ folder with basin.arrow and flow.arrow output files.

3 Inspect a (large) model

For larger models the node tables can grow quite large. To facilitate inspection, the tables are linked via the node_id field to the Node table, and react to the selection of the Node layer. That is, on selection of certain nodes—either via the map or the attribute table—the selection is also made in all related tables. This is also the case for the Edge layer. It helps to set the attribute table of a table of interest to show selected features only (using the dropdown button on the bottom left).

Selection change

4 Inspecting results

Before inspecting the results, verify that the run was successfully and the output files are there.

Click the “Time Series” button of the iMOD plugin.

Select the layer that you wish to plot. From the “Node” layer you can plot level or storage on Basin nodes. From the “Edge” layer you can plot flow over flow edges. Note that before switching between these, you typically have to click “Clear” to clear the selection. If you run a simulation with the model open in QGIS, you have to close and re-open the “iMOD Time Series Plot” panel for the new results to be loaded.

Select the variables that you want to plot.

Click “Select points” and select a node by dragging a rectangle around it on the map. Hold the Ctrl key to select multiple nodes.

The associated time series are shown the the graph.

Only the basin.arrow and flow.arrow can be inspected with the “iMOD Time Series Plot” panel. All Arrow files can be loaded as a layer by dragging the files onto QGIS. Right click the layer and select “Open Attribute Table” to view the contents.