hydromt_wflow.workflows.wflow_1dmodel_connection#

hydromt_wflow.workflows.wflow_1dmodel_connection(gdf_riv: ~geopandas.geodataframe.GeoDataFrame, ds_model: ~xarray.core.dataset.Dataset, connection_method: str = 'subbasin_area', area_max: float = 10.0, add_tributaries: bool = True, include_river_boundaries: bool = True, logger=<Logger hydromt_wflow.workflows.connect (WARNING)>) Dataset[source]#

Connect wflow to a 1D model by deriving linked subcatchs (and tributaries).

There are two methods to connect models:

  • subbasin_area:

    creates subcatchments linked to the 1d river based on an area threshold (area_max) for the subbasin size. With this method, if a tributary is larger than the area_max, it will be connected to the 1d river directly.

  • nodes:

    subcatchments are derived based on the 1driver nodes (used as gauges locations). With this method, large tributaries can also be derived separately using the add_tributaries option and adding a area_max threshold for the tributaries.

If add_tributary option is on, you can decide to include or exclude the upstream boundary of the 1d river as an additionnal tributary using the include_river_boundaries option.

Parameters:
  • gdf_riv (gpd.GeoDataFrame) – River geometry.

  • ds_model (xr.Dataset) – Model dataset with ‘flwdir’, ‘rivmsk’, ‘rivlen’, ‘uparea’.

  • connection_method (str, default subbasin_area) – Method to connect wflow to the 1D model. Available methods are {‘subbasin_area’, ‘nodes’}.

  • area_max (float, default 10.0) – Maximum area [km2] of the subbasins to connect to the 1D model in km2 with connection_method subbasin_area or nodes with add_tributaries set to True.

  • add_tributaries (bool, default True) – If True, derive tributaries for the subbasins larger than area_max. Always True for subbasin_area method.

  • include_river_boundaries (bool, default True) – If True, include the upstream boundary(ies) of the 1d river as an additional tributary(ies).

  • logger (logging.Logger, optional) – Logger object, by default logger

Returns:

ds_out – Dataset with variables ‘subcatch’ for the subbasin map, ‘subcatch_riv’ for the subbasin map masked with river cells to be able to save river output with wflow and ‘gauges’ for the tributaries outflow locations (add_tributaries True or subbasin_area method).

Return type:

xr.Dataset