This forum is shutting down! Please post new discussions at

InVEST 3.1.1 released!

RichRich Administrator, NatCap Staff

Today we released InVEST 3.1.1 as a major performance and memory bug patch to the InVEST toolsuite.  We recommend all users upgrade to this version which can be downloaded at

Specific updates include:

* Fixed an issue surrounding reports of SDR or Nutrient model outputs of zero values, nodata holes, excessive runtimes, or out of memory errors.  Some of those problems happened to be related to interesting DEMs that would break the flat drainage algorithm we have inside RouteDEM that adjusted the heights of those regions to drain away from higher edges and toward lower edges, and then pass the height adjusted dem to the InVEST model to do all its model specific calculations.  Unfortunately this solution was not amenable to some degenerate DEM cases and we have now adjusted the algorithm to treat each plateau in the DEM as its own separate region that is processed independently from the other regions. This decreases memory use so we never effectively run out of memory at a minor hit to overall runtime.  We also now adjust the flow direction directly instead of adjust the dem itself.  This saves us from having to modify the DEM and potentially get it into a state where a drained plateau would be higher than its original pixel neighbors that used to drain into it.

There are side effects that result in sometimes large changes to un calibrated runs of SDR or nutrient.  These are related to slightly different flow directions across the landscape and a bug fix on the distance to stream calculation.  

* InVEST geoprocessing now uses the PyGeoprocessing package (v0.1.4) rather than the built in functionality that used to be in InVEST.  This will not affect end users of InVEST but may be of interest to users who script InVEST calls who want a standalone Python processing package for raster stack math and hydrological routing.  The project is hosted at

* Fixed an marine water quality issue where users could input AOIs that were unprojected, but output pixel sizes were specified in meters.  Really the output pixel size should be in the units of the polygon and are now specified as such.  Additionally an exception is raised if the pixel size is too small to generate a numerical solution that is no longer a deep scipy error.

* Added a suffix parameter to the timber and marine water quality models that append a user defined string to the output files; consistent with most of the other InVEST models.

* Fixed a user interface issue where sometimes the InVEST model run would not open a windows explorer to the user’s workspace.  Instead it would open to C:\User[..]\My Documents.  This would often happen if there were spaces in the the workspace name or “/” characters in the path.

* Fixed an error across all InVEST models where a specific combination of rasters of different cell sizes and alignments and unsigned data types could create errors in internal interpolation of the raster stacks.  Often these would appear as “KeyError: 0” across a variety of contexts.  Usually the “0” was an erroneous value introduced by a faulty interpolation scheme.

* Fixed a MemoryError that could occur in the pollination and habitat quality models when the the base landcover map was large and the biophysical properties table allowed the effect to be on the order of that map.  Now can use any raster or range values with only a minor hit to runtime performance.

* Fixed a serious bug in the plateau resolution algorithm that occurred on DEMs with large plateau areas greater than 10x10 in size.  The underlying 32 bit floating point value used to record small height offsets did not have a large enough precision to differentiate between some offsets thus creating an undefined flow direction and holes in the flow accumulation algorithm.  

* Minor performance improvements in the routing core, in some cases decreasing runtimes by 30%.

* Fixed a minor issue in DEM resolution that occurred when a perfect plateau was encountered.  Rather that offset the height so the plateau would drain, it kept the plateau at the original height.  This occurred because the uphill offset was nonexistent so the algorithm assumed no plateau resolution was needed.  Perfect plateaus now drain correctly.  In practice this kind of DEM was encountered in areas with large bodies of water where the remote sensing algorithm would classify the center of a lake 1 meter higher than the rest of the lake.

* Fixed a serious routing issue where divergent flow directions were not getting accumulated 50% of the time. Related to a division speed optimization that fell back on C-style modulus which differs from Python.

* InVEST SDR model thresholded slopes in terms of radians, not percent thus clipping the slope tightly between 0.001 and 1%.  The model now only has a lower threshold of 0.00005% for the IC_0 factor, and no other thresholds.  We believe this was an artifact left over from an earlier design of the model.

* Fixed a potential memory inefficiency in Wave Energy Model when computing the percentile rasters. Implemented a new memory efficient percentile algorithm and updated the outputs to reflect the new open source framework of the model. Now outputting csv files that describe the ranges and meaning of the percentile raster outputs.

* Fixed a bug in Habitat Quality where the future output ‘quality_out_f.tif’ was not reflecting the habitat value given in the sensitivity table for the specified landcover types.

This discussion has been closed.