hydromt_wflow.WflowSedimentModel.setup_gauges#

WflowSedimentModel.setup_gauges(gauges_fn=None, source_gdf=None, snap_to_river=True, mask=None, derive_subcatch=False, basename=None, toml_output='csv', gauge_toml_header=['Q', 'TSS'], gauge_toml_param=['lateral.river.q_riv', 'lateral.river.SSconc'], **kwargs)[source]#

Set a gauge map based on gauges_fn data.

Supported gauge datasets include “grdc” or “<path_to_source>” for user supplied csv or geometry files with gauge locations. If a csv file is provided, a “x” or “lon” and “y” or “lat” column is required and the first column will be used as IDs in the map. If snap_to_river is set to True, the gauge location will be snapped to the boolean river mask. If derive_subcatch is set to True, an additonal subcatch map is derived from the gauge locations.

Adds model layers:

  • wflow_gauges_source map: gauge IDs map from source [-] (if gauges_fn)

  • wflow_subcatch_source map: subcatchment based on gauge locations [-] (if derive_subcatch)

  • gauges_source geom: polygon of gauges from source

  • subcatch_source geom: polygon of subcatchment based on gauge locations [-] (if derive_subcatch)

Parameters:
  • gauges_fn (str, {"grdc"}, optional) – Known source name or path to gauges file geometry file, by default None.

  • source_gdf (geopandas.GeoDataFame, optional) – Direct gauges file geometry, by default None.

  • snap_to_river (bool, optional) – Snap point locations to the closest downstream river cell, by default True

  • mask (np.boolean, optional) – If provided snaps to the mask, else snaps to the river (default).

  • derive_subcatch (bool, optional) – Derive subcatch map for gauges, by default False

  • derive_outlet (bool, optional) – Derive gaugemap based on catchment outlets, by default True

  • basename (str, optional) – Map name in grid (wflow_gauges_basename). If None use the gauges_fn basename.

  • toml_output (str, optional) – One of [‘csv’, ‘netcdf’, None] to update [csv] or [netcdf] section of wflow toml file or do nothing. By default, ‘csv’.

  • gauge_toml_header (list, optional) – Save specific model parameters in csv section. This option defines the header of the csv file. By default saves Q (for lateral.river.q_riv) and TSS (for lateral.river.SSconc).

  • gauge_toml_param (list, optional) – Save specific model parameters in csv section. This option defines the wflow variable corresponding to the names in gauge_toml_header. By default saves lateral.river.q_riv (for Q) and lateral.river.SSconc (for TSS).