I am encountering errors while executing an urban stormwater retention model. All input data, including land use/land cover (LULC), soil hydrologic group, precipitation, and the biophysical table, appear valid. The data utilizes consistent formats and coordinate systems. I have searched online resources for solutions but haven’t identified the root cause, which I suspect might be related to the Python code.
Could any members of the community share their experiences with similar issues or suggest potential troubleshooting steps?
Thank you for your response. I just checked that errors come from my raster files, I already fixed and the model can run now. However, after I ran it, I realized that two warnings say:
py.warnings WARNING natcap\invest\stormwater.py:901: RuntimeWarning: overflow encountered in multiply
py.warnings WARNING natcap\invest\stormwater.py:960: RuntimeWarning: invalid value encountered in multiply
Glad to hear that you got it working @john16. @jdouglass might be able to give a more specific response to this particular warning message, but in general you can safely ignore things labeled WARNING. Warnings are common, and generally don’t affect results. The main time I pay attention to them is if they’re followed by an error that causes the model run to fail, in which case they may be related to the error.
Usually these warnings are the result of some kind of non-finite value that is present in your arrays, especially in your precip, lulc or soils rasters, leading to a numerical overflow. Some rasters or GIS software use nan values instead of a true nodata value, so if this is the case, then you shouldn’t need to worry about the validity of outputs. Either way, you can avoid this by removing any nan or +/- infinity values in your input rasters.
And if this doesn’t make sense with your inputs, let us know and we can try to look into it a bit more.