SWY error: exception encountered in raster_calculator

Hello everyone,

I’m trying to run SWY model, and have a same problem with " exception encountered in raster_calculator"(SDR error: exception encountered in raster_calculator). I’ve confirmed LULC data have an entry in the biophysical table, so I tried to reclassify all of other RASTER’s NA cells to -1 by using “Reclassify” and “Raster Calculator-with formula of Con(IsNull(“eto_1”),-1,“eto_1”)” in ArcGIS (Reference to Warning ” Raster has undefined NODATA value” in InVEST 3.11.0 Workbench), but I find the result was similar to my previous input data, only with NODATA at the boundary!
So I would like to ask if the NODATA value at the boundary may be the key impact of happens " exception encountered in raster_calculator" problem when running InVEST??
(That’s mean maybe I need to clip the interest area before run the model, putting back the consideration of continuity of the surrounding terrain?? also I have read hydro DEM guide, there is suggestions in step7 to Clip the DEM to your study area but still a little bit confused)

(The pink area means NODATA)

Looking forward to any experiences shared by members of the community, thanks all.
And also I will continue to try and error until it works.

InVEST-natcap.invest.seasonal_water_yield.seasonal_water_yield-log-2023-05-15–02_21_00.txt (4.3 MB)

This is an overflow error happening in the quickflow equation where we calculate \exp\left( - \frac{0.2S_{i}}{a_{i,m}} \right). An overflow error means that the result is such a large number that the software can’t store it. This should not happen with normal data.

Are you sure that your nodata values are set correctly? It seems like either S_{i} or a_{i,m} is negative, which it should not be.


@esoth Thankyou for your reply. I have tried to double-check the NODATA value in my data, and it seems like an extremely small value. But when I using “Reclassify” and “Raster Calculator-with formula of Con(IsNull(“tif”),-1,“tif”)” in ArcGIS(reference to GIS guide for nodata). There is no question about using a command “Reclassify” for integer data, but floating point data by using “Raster Calculator" seems like the same(pic 1), so I can only reset the NODATA value when export raster data. (pic 2, for example my DEM is between 3942 to -1.5032230615616 so I set “NoData as -3” in the while.)

When I opened this new TIFF ,the properties of the data (pic 3) seems like reset to -3 successfully, so this is my new inputdata.

Or, is it possible that the above steps did not actually reset NODATA successfully?

I look forward to any feedback, and again, thank you for your help. At the same time I will see if others on the forum have the same problem!

I tried to search for a solution by using “overflow error” as a keyword and fixed it. And also corrected the weird values for precipitation and evapotranspiration that maybe comes from Kriging. And I’m so glad it finally works! Thanks for @esoth helping me to identify the key problem.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.