Thanks for sending the input data. I’ve been playing with it, and still don’t know what specifically is breaking, so asked our software team to look at it.
For anyone wanting to do your own InVEST debugging, I started by looking at the output files, and found that quickflow (QF) seemed to calculate fine, but the output rasters for AET, and L_sum_avail (really all of the L rasters) have values of +/- infinity. Some of these are going into the Vri calculation (where the error occurred), so we need to trace back through the equations (see the User Guide for those.) L_sum_avail is where flow routing occurs, so perhaps it’s a problem with the DEM. I tried doing a QGIS Wang and Liu Fill on the DEM, but that didn’t help. And that’s where I’m punting to the software team…
It is weird, I tried also to track the error and the problem occurs during the Vri Calculation, but I don’t understand where exactly occurs in the equation. I did an Annual Water Yield model too, and it worked fine for the same data.
Thank you very much for your help, let me know if the team solve the problem.
Sorry, it doesn’t look like they’ve gotten to this issue yet. Let’s ping @rich and/or @jdouglass. I’m sure that when they do get a chance to look at it, they’ll post here.
Hi @swolny and @dierestrepo, I’ve started looking into this, but the issue is pretty deep into the model and will take a little time to debug. I’ll keep digging and write back here when I find something.
At you might expect, the Seasonal Water Yield model is driven by the DEM, and so every DEM pixel should also have a corresponding pixel in each of the other input rasters. The problem here is that some of the DEM pixels do not have overlapping pixel values in one or more of the other rasters, which then causes problems.
The easiest thing here is to make sure that all of your rasters are clipped to an area that completely contains the DEM, and I’m pretty sure that the issue should then be resolved.
All that being said, the model should really handle this sort of error more cleanly. Hopefully we’ll be able to have better checking for this in a future version of InVEST.
I tried clipping the DEM, and all the other input rasters (based on a small buffer of the basin shapefile), and It worked! I think the problem was on the edges of the DEM, some pixels there had wrong values.
Thank you very much for your help, it was very useful.