Nutrient delivery ratio

InVEST-Nutrient-Delivery-Ratio-Model-(NDR)-log-2019-05-11–14_43_25.txt (50.5 KB)
Sir, Madam, I here attach the file for Ndr 3.7.0 output. I have faced some error ( zero division error) please, can you tell the appropriate solution for this error.

Hmm, something else is happening here that seems to predate the ZeroDivisionError. If you’re still having this issue, could you send your inputs to so I can take a look?


I’m encountering a similar error when running the Nutrient Delivery Ratio model on InVEST 3.7.0. It appears to be due to a “ZeroDivisionError”. The input data is supposedly correct, as it has been double-checked by an experimented user.

I have attached my log file.InVEST-Nutrient-Delivery-Ratio-Model-(NDR)-log-2019-05-21–16_36_44.txt (11.3 KB)
Could you kindly check for any mistake I made or possible solution to my problem please ?

Thank you in advance for your assistance,
Have a nice day!


Hi @Lcost,

Thanks for reaching out, and I’m sorry about the delay on this!

While the NDR model should not be crashing (we’ll fix this issue on our end in a future release of InVEST), there is an issue with your biophysical table that is causing this error to be raised. Specifically, several of your landcover table values in the crit_len_n and crit_len_p columns are set to 0. The model is not handling this case correctly and is resulting in a crash.

The workaround for this is to set these values of 0 to something smaller than the pixel size, which will achieve the desired effect. The User’s Guide notes that Setting this value to a distance smaller than the pixel size will result in the maximum retention efficiency being reached within one pixel only, so I used a value of 1 to make sure the model would run through (and it does).

CCing @Perrine here too, since she was asking about this.

Hope this helps!

This problem also happened to me. I changed my 0 values of the water bodies areas to 1 and had success