This forum is shutting down! Please post new discussions at

SDR in version 3.1.1 failing on flow accumulation

clintonclinton Member
edited March 2015 in Freshwater Models
My first tests of SDR using the new 3.1.1 version are resulting in no output. It appears to be failing at the stage of calculating flow accumulation. The log is pasted below. I had been working with the dev237 beta version and this didn't happen, so I'm not sure what the issue is. I'm still using the same input files. The log file is attached.
Post edited by clinton on


  • RichRich Administrator, NatCap Staff
    Oh no!  The log itself does not appear to suggest that flow accumulation didn't occur, just that there is an unroutable pixel at 0,7.  Onlyl way for me to check this is to get your data stack, can you dropbox it to me?
  • Rich, just sent you a message with the link.
  • RichRich Administrator, NatCap Staff
    Got it, I see the flow accumulation being nodata across the whole raster.  Odd since the flow direction is well defined.  I'll dig into it.
  • RichRich Administrator, NatCap Staff
    Thanks for sharing your data stack.  Turns out there were two things going on.  The first is that your DEM is a 32int type with INT_MAX as the nodata value.  That's fine, but in pygeoprocessing it treated the DEM as a 64 bit float, but incorrectly treated the nodata value as a 32 bit float.  that meant it couldn't detect the nodata areas and instead classified them as really low dem values, thus causing the entire raster to have defined flow directions on it.  the flow accumulation step routes from the pixels that have no defined flow direction because they are considered to be sinks.  that's what was happening in your case with an empty flow accumulation raster.

    the second issue occurred where there were some reservoirs whose edges were clipped to the edge of the watershed.  this created large plateaus with no drain except off the edge of the defined raster.  we added a second pass in the plateau drainage algorithm to test for these cases which now seems to drain well.

    at any rate, i've been able to run SDR successfully on the datastack you send me with this build: [025d55cabd77]_x86_Setup.exe

    Let us know if that doesn't fix your issue or you find more.  And thanks for spotting this issue so quickly!
  • Excellent! That does seem to fix the problem. I also see that the stream network produced by InVest is much less fragmented than it was in earlier versions.
This discussion has been closed.