Possible error in SDR for InVEST v. 3.5/3.6?

I’ve been running the SDR model for Rwanda, where there’s interest in using it in the government for future ecosystem accounting/PES support. I originally used InVEST 3.3.3, and In testing the use of updated versions of InVEST, I’ve found that versions 3.5 and 3.6 give strange values that look like errors, though the latest development build (suggested by James here: https://storage.googleapis.com/releases.naturalcapitalproject.org/invest/3.6.0.post430%2Bh6444d041f0ee/InVEST_natcap3.6.0.post430%2Bh6444d041f0ee_x86_Setup.exe) seems to be giving “correct” values.

Happy to share more details, log files, or input data if it’s helpful, but given that the problem seems to be solved by the development build this is perhaps just a warning/request for confirmation from the InVEST team whether these are known errors or whether others have encountered the same problem with SDR in 3.5/3.6.


Hi Ken,

I’m unaware of any specific issues with SDR matching the outputs you describe, but we do occasionally hear of some edge cases (particularly relating to the d-infinity routing algorithm used in the versions you mention) that can result in some unexpected outputs. The dev build’s routing has been completely rebuilt, so it’s reasonable that any issues relating specifically to d-infinity routing would no longer apply.

@rich, do you know about any specific issues like what @kjbagstad mentions?


Hi @kjbagstad,

The differences beween SDR 3.3.3 and the development build are significant. The short is this:

  1. We believe the 3.6 development build of SDR is the most stable/bug free version of SDR and it’s what everyone should use.
  2. SDR (and almost all of the InVEST models) need calibration.

The main difference you’re seeing between the sed_export of 3.3.3 and 3.6.x is the introduction of a multiple flow direction algorithm in 3.6 when 3.3.3 used d-infinity. The large negative numbers were a bug related to routing the nodata values in a raster, possibly where there was some valid data in one layer but nodata in another. And the main difference in LS I would guess is because of the change in the flow accumulation raster due to multiple flow direction. I’m a little surprised to see that the low end is not 0 though. Usually I’d expect a zero slope in a large enough real world DEM, but we did make a slight change to the slope calculation from 3.6 to the 3.6 dev, so that’s a possibility. If you’re worried about that (I am a little curious) I’d be happy to run your datastack on my end and see if I can find an explanation or bug.

Also, just FYI in case you haven’t seen it, InVEST ships with a HISTORY.rst file in its root install as well as available in the repo where you can see every user facing change we’ve made per release and development release. You can read about some of the SDR changes in there too if you’re interested: https://bitbucket.org/natcap/invest/src/develop/HISTORY.rst

1 Like

Thanks for your help Rich and James. Error diagnosis isn’t crucial as long as we have a working version now with the 3.6 development build.


1 Like