hydromt_sfincs.components.geometries.SfincsWeirs.create#

SfincsWeirs.create(locations: str | Path | GeoDataFrame, dep: str | Path | DataArray = None, buffer: float = None, dz: float = None, merge: bool = True, **kwargs)[source]#

Create model weir lines (old name: setup_structures).

If elevation ‘z’ at weir locations is not provided, it can be calculated from the model elevation directly (dep supplied, but not dz), or from the model elevation plus an additional set elevation ‘dz’ (dep & dz supplied).

Adds model layers:

  • weir geom: weir lines

Parameters:
  • locations (str, Path, gpd.GeoDataFrame) – Path, data source name, or geopandas object for weir lines.

  • dep (str, Path, xr.DataArray, optional) –

    Data source name, Path, or xarray raster object (‘elevation’) describing the depth in an alternative resolution which is used for sampling the weir.

    Note

    Currently, you can only supply one datasource for dep, or use the -coarser- active dep data in self.grid.data if dep not provided, but not your whole elevation_list list!

    Note

    Tip: use fine resolution dep_subgrid.tif for merged high-res data in case of using multiple elevation datasets.

  • buffer (float, optional) – If provided, describes the distance from the centerline to the foot of the structure. This distance is supplied to the raster.sample as the window (wdw).

  • dz (float, optional) – If provided, for weir structures the z value is calculated from the model elevation (dep) plus dz.

  • merge (bool, optional) – If True, merge the new weir lines with the existing ones. By default True.