hydromt_wflow.WflowSedimentModel.setup_rivers#

WflowSedimentModel.setup_rivers(hydrography_fn: str | Dataset, river_geom_fn: str | GeoDataFrame | None = None, river_upa: float = 30, slope_len: float = 2000.0, min_rivlen_ratio: float = 0.0, min_rivwth: float = 30, smooth_len: float = 5000.0, output_names: Dict = {'river__length': 'river_length', 'river__slope': 'river_slope', 'river__width': 'river_width', 'river_location__mask': 'river_mask'})[source]#

Set all river parameter maps.

The river mask is defined by all cells with a minimum upstream area threshold river_upa [km2].

The river length is defined as the distance from the subgrid outlet pixel to the next upstream subgrid outlet pixel. The min_rivlen_ratio is the minimum global river length to avg. cell resolution ratio and is used as a threshold in window based smoothing of river length.

The river slope is derived from the subgrid elevation difference between pixels at a half distance slope_len [m] up- and downstream from the subgrid outlet pixel.

The river manning roughness coefficient is derived based on reclassification of the streamorder map using a lookup table rivman_mapping_fn.

The river width is derived from the nearest river segment in river_geom_fn. Data gaps are filled by the nearest valid upstream value and averaged along the flow directions over a length smooth_len [m]

Adds model layers:

  • river_mask map: river mask [-]

  • river_length map: river length [m]

  • river_width map: river width [m]

  • river_slope map: river slope [m/m]

  • rivers geom: river vector based on wflow_river mask

Parameters:
  • hydrography_fn (str, Path, xarray.Dataset) –

    Name of RasterDataset source for hydrography data. Must be same as setup_basemaps for consistent results.

    • Required variables: ‘flwdir’ [LLD or D8 or NEXTXY], ‘uparea’ [km2], ‘elevtn’[m+REF]

    • Optional variables: ‘rivwth’ [m]

  • river_geom_fn (str, Path, geopandas.GeoDataFrame, optional) –

    Name of GeoDataFrame source for river data.

    • Required variables: ‘rivwth’ [m]

  • river_upa (float, optional) – Minimum upstream area threshold for the river map [km2]. By default 30.0

  • slope_len (float, optional) – Length over which the river slope is calculated [km]. By default 2.0

  • min_rivlen_ratio (float, optional) – Ratio of cell resolution used minimum length threshold in a moving window based smoothing of river length, by default 0.0 The river length smoothing is skipped if min_riverlen_ratio = 0. For details about the river length smoothing, see pyflwdir.FlwdirRaster.smooth_rivlen()

  • smooth_len (float, optional) – Length [m] over which to smooth the output river width and depth, by default 5e3

  • min_rivwth (float, optional) – Minimum river width [m], by default 30.0

  • output_names (dict, optional) – Dictionary with output names that will be used in the model netcdf input files. Users should provide the Wflow.jl variable name followed by the name in the netcdf file.