hydromt.flw.upscale_flwdir#

hydromt.flw.upscale_flwdir(ds: ~xarray.core.dataset.Dataset, flwdir: ~pyflwdir.pyflwdir.FlwdirRaster, scale_ratio: int, method: str = 'com2', uparea_name: str | None = None, flwdir_name: str = 'flwdir', logger=<Logger hydromt.flw (WARNING)>, **kwargs) Tuple[DataArray, FlwdirRaster][source]#

Upscale flow direction network to lower resolution.

Parameters:
  • ds (xarray.Dataset) – Dataset flow direction.

  • flwdir (pyflwdir.FlwdirRaster) – Flow direction raster object.

  • scale_ratio (int) – Size of upscaled (coarse) grid cells.

  • uparea_name (str, optional) – Name of upstream area DataArray, by default None and derived on the fly.

  • flwdir_name (str, optional) – Name of upscaled flow direction raster DataArray, by default “flwdir”

  • method ({'com2', 'com', 'eam', 'dmm'}) – Upscaling method for flow direction data, by default ‘com2’.

  • logger (logger object, optional) – The logger object used for logging messages. If not provided, the default logger will be used.

  • **kwargs – Additional keyword arguments that are passed to the flwdir.upscale function.

Returns:

  • da_flwdir = xarray.DataArray – Upscaled D8 flow direction grid.

  • flwdir_out (pyflwdir.FlwdirRaster) – Upscaled pyflwdir flow direction raster object.

See also

pyflwdir.FlwdirRaster.upscale