hydromt_sfincs.SfincsModel.setup_q_forcing_from_grid

SfincsModel.setup_q_forcing_from_grid(discharge_fn, locs_fn=None, uparea_fn=None, wdw=1, rel_error=0.05, abs_error=50, **kwargs)[source]

Setup discharge boundary location (src) and timeseries (dis) based on a gridded discharge dataset.

If locs_fn is not provided, the discharge source locations are expected to be pre-set, e.g. using the setup_river_inflow() method.

If an upstream area grid is provided the discharge boundary condition is snapped to the best fitting grid cell within a wdw neighboring cells. The best fit is dermined based on the minimal relative upstream area error if an upstream area value is available for the discharge boundary locations; otherwise it is based on maximum upstream area.

Adds model layers:

  • dis forcing: discharge time series [m3/s]

  • src geom: discharge gauge point locations

Adds meta layer (not used by SFINCS):

  • src_snapped geom: snapped gauge location on discharge grid

Parameters
  • discharge_fn (str, Path, optional) –

    Path or data source name for gridded discharge timeseries dataset.

    • Required variables: [‘discharge’ (m3/s)]

    • Required coordinates: [‘time’, ‘y’, ‘x’]

  • locs_fn (str, Path, optional) – Path or data source name for point location dataset. Not required if point location have previously been set with setup_river_inflow() See hydromt.open_vector(), for accepted files.

  • uparea_fn (str, Path, optional) –

    Path to upstream area grid in gdal (e.g. geotiff) or netcdf format.

    • Required variables: [‘uparea’ (km2)]

  • wdw (int, optional) – Window size in number of cells around discharge boundary locations to snap to, only used if uparea_fn is provided. By default 1.

  • rel_error (float, optional) – Maximum relative error (default 0.05) and absolute error (default 50 km2) between the discharge boundary location upstream area and the upstream area of the best fit grid cell, only used if “discharge” staticgeoms has a “uparea” column.

  • abs_error (float, optional) – Maximum relative error (default 0.05) and absolute error (default 50 km2) between the discharge boundary location upstream area and the upstream area of the best fit grid cell, only used if “discharge” staticgeoms has a “uparea” column.