pysheds
pysheds copied to clipboard
Incorrect/failed dinf flow routing/catchment delineation
Trying to route flow and delineate catchments with dinf flow routing. DEMs originally downloaded from ArcticDEM with polar-centric crs, but sew_clip.tif has been georeferenced to a different crs.
dinf flow routing seems to have errors after preprocessing the dem as described in examples (though fill and flats correction steps do not seem to do anything to change original DEM).

The DEM with the different crs also has an odd low-accumulation zone, and the nan-edged grid cells get flow routed through them

Finally, when I try to delineate catchments on the DEM that had (mostly) correct flow routing, I get ValueError: cannot convert float NaN to integer, which did not occur when I was using the d8 algorithm on the same DEM.
Relevant files and code attached. pysheds installed via conda about a week ago. Thank you!
Greetings,
I'd highly recommend upgrading to pysheds v0.3 and seeing if the issue persists. Among other things, some corrections were made to the resolve_flats algorithm.