xrspatial.hydro.flow_path_mfd.flow_path_mfd#

xrspatial.hydro.flow_path_mfd.flow_path_mfd(flow_dir_mfd: DataArray, start_points: DataArray, name: str = 'flow_path_mfd') DataArray[source]#

Trace downstream flow paths using MFD dominant neighbor.

Parameters:
  • flow_dir_mfd (xarray.DataArray or xr.Dataset) – 3D MFD flow direction array of shape (8, H, W) as returned by flow_direction_mfd.

  • start_points (xarray.DataArray) – 2D raster where non-NaN cells are path starting locations.

  • name (str, default 'flow_path_mfd') – Name of output DataArray.

Returns:

2D grid where each cell on a traced path carries the label of its originating start point. All other cells are NaN.

Return type:

xarray.DataArray or xr.Dataset