pysheds icon indicating copy to clipboard operation
pysheds copied to clipboard

Incorrect/failed dinf flow routing/catchment delineation

Open jmdelvecchio opened this issue 3 years ago • 1 comments

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). image

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

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!

artcic pysheds.zip

jmdelvecchio avatar Nov 03 '21 15:11 jmdelvecchio

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.

mdbartos avatar Jan 03 '22 19:01 mdbartos