hydromt_wflow.WflowModel.setup_gauges#

WflowModel.setup_gauges(gauges_fn='grdc', source_gdf=None, index_col=None, snap_to_river=True, mask=None, derive_subcatch=False, derive_outlet=True, basename=None, update_toml=True, gauge_toml_header=None, gauge_toml_param=None, **kwargs)[source]#

This components sets the default gauge map based on basin outlets and additional gauge maps 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 additional subcatch map is derived from the gauge locations.

Adds model layers:

  • wflow_gauges map: gauge IDs map from catchment outlets [-]

  • 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 geom: polygon of catchment outlets

  • 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.

  • index_col (str, optional) – Column in gauges_fn to use for ID values, by default None (use the default index column)

  • 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 staticmaps (wflow_gauges_basename), if None use the gauges_fn basename.

  • update_toml (boolean, optional) – Update [outputcsv] section of wflow toml file.

  • 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_av) and P (for vertical.precipitation).

  • 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_av (for Q) and vertical.precipitation (for P).