hydromt_sfincs.SfincsModel.setup_river_inflow#
- SfincsModel.setup_river_inflow(rivers: str | Path | GeoDataFrame | None = None, hydrography: str | Path | Dataset | None = None, river_upa: float = 10.0, river_len: float = 1000.0, river_width: float = 500, merge: bool = False, first_index: int = 1, keep_rivers_geom: bool = False)[source]#
Setup discharge (src) points where a river enters the model domain.
If rivers is not provided, river centerlines are extracted from the hydrography dataset based on the river_upa threshold.
Waterlevel or outflow boundary cells intersecting with the river are removed from the model mask.
Discharge is set to zero at these points, but can be updated using the setup_discharge_forcing or setup_discharge_forcing_from_grid methods.
Note: this method assumes the rivers are directed from up- to downstream.
Adds model layers:
dis forcing: discharge forcing
mask map: SFINCS mask layer (only if river_width > 0)
rivers_inflow geoms: river centerline (if keep_rivers_geom; not used by SFINCS)
- Parameters:
rivers (str, Path, gpd.GeoDataFrame, optional) – Path, data source name, or geopandas object for river centerline data. If present, the ‘uparea’ and ‘rivlen’ attributes are used.
hydrography (str, Path, xr.Dataset optional) –
Path, data source name, or a xarray raster object for hydrography data.
Required layers: [‘uparea’, ‘flwdir’].
river_upa (float, optional) – Minimum upstream area threshold for rivers [km2], by default 10.0
river_len (float, optional) – Mimimum river length within the model domain threshhold [m], by default 1 km.
river_width (float, optional) – Estimated constant width [m] of the inflowing river. Boundary cells within half the width are forced to be closed (mask = 1) to avoid instabilities with nearby open or waterlevel boundary cells, by default 500 m.
merge (bool, optional) – If True, merge rivers source points with existing points, by default False.
first_index (int, optional) – First index for the river source points, by default 1.
keep_rivers_geom (bool, optional) – If True, keep a geometry of the rivers “rivers_inflow” in geoms. By default False.
buffer (int, optional) – Buffer [no. of cells] around model domain, by default 10.