hydromt.flw.reproject_hydrography_like#

hydromt.flw.reproject_hydrography_like(ds_hydro: ~xarray.core.dataset.Dataset, da_elv: ~xarray.core.dataarray.DataArray, river_upa: float = 5.0, river_len: float = 1000.0, uparea_name: str = 'uparea', flwdir_name: str = 'flwdir', logger=<Logger hydromt.flw (WARNING)>, **kwargs) Dataset[source]#

Reproject flow direction and upstream area data to the da_elv crs and grid.

Flow directions are derived from a reprojected grid of synthetic elevation, based on the log10 upstream area [m2]. For regions without upstream area, the original elevation is used assuming these elevation values are <= 0 (i.e. offshore bathymetry).

The upstream area on the reprojected grid is based on the new flow directions and rivers entering the domain, defined by the minimum upstream area river_upa [km2] and a distance from river outlets river_len [m]. The latter is to avoid setting boundary conditions at the downstream end / outflow of a river.

NOTE: the resolution of ds_hydro should be similar or smaller than the resolution of da_elv for good results. NOTE: this method is still experimental and might change in the future!

Parameters:
  • ds_hydro (xarray.Dataset) – Dataset with gridded flow directions named flwdir_name and upstream area named uparea_name [km2].

  • da_elv (xarray.DataArray) – DataArray with elevation on destination grid.

  • river_upa (float, optional) – Minimum upstream area threshold [km2] for inflowing rivers, by default 5 km2

  • river_len (float, optional) – Mimimum distance from river outlet for inflowing river location, by default 1000 m.

  • uparea_name (str, optional) – Name of upstream area (default “uparea”) and flow direction (“flwdir”) variables in ds_hydro.

  • flwdir_name (str, optional) – Name of upstream area (default “uparea”) and flow direction (“flwdir”) variables in ds_hydro.

  • kwargs (key-word arguments) – key-word arguments are passed to d8_from_dem

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

Returns:

Reprojected gridded dataset with flow direction and upstream area variables.

Return type:

xarray.Dataset

See also

d8_from_dem