hydromt_wflow.WflowModel.setup_1dmodel_connection#
- WflowModel.setup_1dmodel_connection(river1d_fn: str | Path | GeoDataFrame, connection_method: str = 'subbasin_area', area_max: float = 30.0, add_tributaries: bool = True, include_river_boundaries: bool = True, mapname: str = '1dmodel', update_toml: bool = True, toml_output: str = 'netcdf', **kwargs)[source]#
Connect wflow to a 1D model by deriving linked subcatch (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 additional tributary using the include_river_boundaries option.
River edges or river nodes are snapped to the closest downstream wflow river cell using the
hydromt.flw.gauge_map()
method.Optionally, the toml file can also be updated to save lateral.river.inwater to save all river inflows for the subcatchments and lateral.river.q_av for the tributaries using
hydromt_wflow.wflow.setup_config_output_timeseries()
.Adds model layer:
wflow_subcatch_{mapname} map/geom: connection subbasins between wflow and the 1D model.
wflow_subcatch_riv_{mapname} map/geom: connection subbasins between wflow and the 1D model for river cells only.
wflow_gauges_{mapname} map/geom, optional: outlets of the tributaries flowing into the 1D model.
- Parameters:
river1d_fn (str, Path, gpd.GeoDataFrame) – GeodataFrame with the 1D model river network and nodes where to derive subbasins for connection_method nodes.
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).
mapname (str, default 1dmodel) – Name of the map to save the subcatchments and tributaries in the wflow model staticmaps and geoms (wflow_subcatch_{mapname}).
update_toml (bool, default True) – If True, updates the wflow configuration file to save the required outputs for the 1D model.
toml_output (str, optional) – One of [‘csv’, ‘netcdf’, None] to update [csv] or [netcdf] section of wflow toml file or do nothing. By default, ‘netcdf’.
**kwargs – Additional keyword arguments passed to the snapping method hydromt.flw.gauge_map. See its documentation for more information.
See also