The running of SDR InVEST 3.8.2 get stuck or closed and result is not complete

I’ve had the following problem twice.
The sed_retention, watershed_results_SDR files are missing in the output results of the model, and the running will be stuck or closed in the end.

At the first time, the calibrated parameters k=1.5 and IC0=0.628 were used. The simulation was successful in 2015, but failed in 2018,as showed in tex log file 1.1 and 1.2
On this basis, two adjustments were attempted for the simulation in 2018.
(1) The watershed boundary was replaced by the boundary without lake area, and the simulation is successful. Corresponding tex log file 1.3
(2) Lake area was still inclued in the watershed boundary, but k and IC0 were changed to default 2 and 0.5, and the simulation was successful. Corresponding tex log file 1.4

At the second time, the calibrated parameters k=1.4 and IC0=0.5 (default) were used, the simulation failed in 2010. Corresponding tex log file 2.1.
On this basis, two adjustments were made,
(1) the watershed boundary was changed to one without lakes, the simulation still fails. Corresponding tex log file 2.2
(2) Change k to the default 2.0, and the simulation was successful. Corresponding tex log file 2.3

As we can see, when k and IC0 are set as the default, the simulation succeeds, but some years it succeeds when it’s not the default;
So I was puzzled by these results. What’s the real reason for the failed running?

【1-2018-lake-faild】 InVEST-Sediment-Delivery-Ratio-Model-(SDR)-log-2020-10-12–13_15_19.txt (887.8 KB)
【1.2-2018-lake-faild】 InVEST-Sediment-Delivery-Ratio-Model-(SDR)-log-2020-10-12–13_15_19.txt (3.9 MB) 【1.3-2018-nolake-ok】 InVEST-Sediment-Delivery-Ratio-Model-(SDR)-log-2020-10-12–00_03_11.txt (74.9 KB) 【1.4-2018-lake-default-ok】 InVEST-Sediment-Delivery-Ratio-Model-(SDR)-log-2020-10-12–22_25_03.txt (67.1 KB) 【2.1-2010-lake-faild】 InVEST-Sediment-Delivery-Ratio-Model-(SDR)-log-2020-10-13–22_45_06.txt (3.8 MB) 【2.2-2010-nolake-faild】 InVEST-Sediment-Delivery-Ratio-Model-(SDR)-log-2020-10-14–09_39_16.txt (3.5 MB) 【2.3-2010-lake-default-ok】 InVEST-Sediment-Delivery-Ratio-Model-(SDR)-log-2020-10-14–10_00_09.txt (66.4 KB)

image
image

Hi @Gloria,

Thanks for letting us know about this issue!

So in looking at your logfiles, I’m seeing lots of errors that look like this:

2020-10-12 13:41:08,590 utils._log_gdal_errors(68) ERROR [errno 1] F:/INVEST/SDR\sed_deposition_2018_NSH.tif, band 1: IReadBlock failed at X offset 22, Y offset 13: TIFFReadEncodedTile() failed.
2020-10-12 13:41:08,592 utils._log_gdal_errors(68) ERROR [errno 1] LZWDecode:Corrupted LZW table at scanline 5632
2020-10-12 13:41:08,592 utils._log_gdal_errors(68) ERROR [errno 1] TIFFReadEncodedTile() failed.
2020-10-12 13:41:08,593 utils._log_gdal_errors(68) ERROR [errno 1] F:/INVEST/SDR\sed_deposition_2018_NSH.tif, band 1: IReadBlock failed at X offset 22, Y offset 13: TIFFReadEncodedTile() failed.
2020-10-12 13:41:08,593 utils._log_gdal_errors(68) ERROR [errno 1] LZWDecode:Corrupted LZW table at scanline 5632
2020-10-12 13:41:08,593 utils._log_gdal_errors(68) ERROR [errno 1] TIFFReadEncodedTile() failed.
2020-10-12 13:41:08,593 utils._log_gdal_errors(68) ERROR [errno 1] F:/INVEST/SDR\sed_deposition_2018_NSH.tif, band 1: IReadBlock failed at X offset 22, Y offset 13: TIFFReadEncodedTile() failed.

This is an issue within GDAL, which is one of the libraries that InVEST depends on for reading and writing rasters. In this case, the issue only happens on some rasters when some very specific conditions are met … which is why the issue is only happening on some of the years of your simulation.

So all of that is to say that this issue will be fixed properly in InVEST 3.9.0, which should be coming out in the next couple weeks, and until then, here’s a development preview of InVEST 3.9 that should include the updated GDAL version:

https://storage.googleapis.com/releases.naturalcapitalproject.org/invest/3.8.8.post533+g3648680d/InVEST_3.8.8.post533+g3648680d_x64_Setup.exe

Could you try out this development build and let us know how it goes?

Thanks!
James

1 Like