Skip to main content

API reference

Model

The model class, and building a model from parts.

Model
Network Create a network from a GeoDataFrame with lines.
NetworkValidator Contains some methods for validating a Ribasim-model
concat
prefix_index Reindex node-tables and links with a prefix and a max number of digits
reset_index
CloudStorage Connect a local ’data_dir` to cloud-storage.

Regional models

Steps shared by the regional models.

regional_model Steps shared by the regional models of all water authorities, vrij afwaterend and peilbeheerst alike.
design_capacities Set the unknown capacities of Pumps and Outlets from the area they drain or supply.
capacity Level limits of the DiscreteControl-controlled Outlets and Pumps.
seasonal_levels Summer and winter target levels (zomer- en winterpeil) in a model with one target level per Basin.
peilbeheer The level management (peilbeheer) of the peilgebieden of the water boards, in summer and winter.
supply Labelling Ribasim-basins as “aanvoer”-basins, i.e., water can (and should) be supplied to these basins during shortages.
transboundary_inflow Foreign inflows (buitenlandse aanvoer) on the FlowBoundaries of the regional models.
observations Add Observation nodes with measured discharges to a model.
split_basins Split basins in a Ribasim model, based on pre-split basin polygons, or along a route.

Geometry and layout

The layout of a model on the map, which does not change its results.

layout Layout of a model on the map: nodes not on top of each other, and links without overlapping segments.
network_snapping Route link geometries of a Ribasim-scheme along the network of hydro-objects.
flow_paths Routes of flow links through Junctions, and changes to them that only change the layout.
geometry Functions to apply on a shapely.geometry
junctionify Add Junction nodes in a model inplace where flow links share common geometry.

Validation and results

Checks on the model input and on the results of a run.

validation Ribasim-NL-specific validations that supplement Ribasim validation.
result_validation Regression checks on the results of a model run, which supplement the input checks of ribasim_nl.validation.
goodness_of_fit How well the simulated values of a model run fit the measurements of its Observation nodes.
steady_state_regression Regression checks for Basin water-level steady state.
write_performance Write performance.xlsx to the results directory of a model.

Model viewer

Exporting and publishing a model for the model viewer.

webmap Export a Ribasim model to web-friendly files for the documentation model viewer.
webmap_diff Compare two Ribasim models for the model viewer, to review the changes of a pull request.
webmap_publish Publish the export_webmap output to MinIO for the model viewer on the documentation site.