pyflwdir.FlwdirRaster.upscale_error#

FlwdirRaster.upscale_error(other, idxs_out)[source]#

Returns an array with ones (True) where the upscaled flow directions are valid and zeros (False) where erroneous.

The flow direction from cell 1 to cell 2 is valid if the first outlet pixel downstream of cell 1 is located in cell 2

Cells with missing flow direction data have a value -1.

Parameters:
  • other (FlwdirRaster) – upscaled Flow Direction Raster

  • idxs_out (2D array of int) – linear indices of grid outlets

Returns:

flwerr – valid subgrid connection

Return type:

2D array of int8 with other.shape