Error-Seasonal water yield 3.7.0

Hi, I’m receiving the error from the SWY model “ValueError: Bounding boxes do not intersect.” I’ve searched for the answer to this error. It mainly tells you that the raster dataset is not overlapped. I’ve changed the coordinate system of all the raster map into the same one, however, the error still exists.

I was wondering if all the maps including PET, P, LUCC, DEM, Soilhydro, and watershed should have exactly the same boundaries? Do I need to clip them into the same size? My PET and P maps are the results from Kriging and it’s a square map overtop of the watershed map. The rest of the maps are clipped into the same size as the watershed boundary. Please let me know if this is the question.

Thanks for your time and efforts,

Best wishes,
Hao Chen

InVEST-Seasonal-Water-Yield-log-2019-11-07–15_48_19.txt (8.0 KB)

Hello @chn7424814

The input rasters don’t need to all have exactly the same boundary, but they do all need to be in the same projection and they need to all overlap. The model will execute on the raster stack only where the rasters all intersect. Based on your logfile, it looks like one of your inputs has a bounding box with these coordinates: [-524783.7532149766, 3464915.6995883803, 918391.3767209562, 4622057.5373152755], while most of your other inputs have coordinates that look more like this: [108.85047912597662, 36.516342163085994, 109.43965148925787, 37.325832366943516].

If you can address this, I bet the model will continue.

Let us know how this goes!

Thanks a lot @jdouglass,

I just checked my dataset, the DEM has the wrong coordinates. I just re clip the data set again and this error disappared. I also have something wrong with the soil group map, the value of soil map is not limited in 1-4 and error appeared again, I reclassify the soil group map and finally the model run successfully.

Thanks for your time!
Hao Chen

1 Like

Hi @jdouglass,

I just encountered another error, “IndexError: index 7 is out of bounds for axis 0”.

I have different dataset years like 1990,1995,2000. in the same area. The model run well in 1990 and this error occurred in 1995 and 2000. So I think the bio table and rain events are correct. Is that possible because of the no value points in the P or PET raster map? I cannot find the solution now, so could you please help me with it? Thanks a lot.

Best regards,
Hao Chen

InVEST-Seasonal-Water-Yield-log-2019-11-12–09_59_39.txt (13.8 KB)

Hi @chn7424814 -

Which inputs are you changing for the different years? Are you only changing the land use map, or are other layers also changing?

The error is happening when calculating curve number. Curve number is calculated by mapping the CN_ACN_D values from the biophysical table to a combination of the land cover raster and soil group raster. Often, the issue is that there are values in the soil group raster (like 7) that are not just the values 1-4 that the model accepts. Or, there is a new value in the land cover map (maybe a value of 7?) that isn’t in the biophysical table. Look for both of these things and let us know if it helps.

~ Stacie

1 Like

Hi @swolny,

Thanks for your reply, the input data for different years are changing by PET and P map, LUCC and rain events. The bio table, soil group map, DEM, watershed map are the same.

So I run successfully with 1990 model and in 1995 the problem is most likely to be LUCC according to your explanation. I’ve checked the lucode, soil group raster and biophysical table, none of them including a number 7. The model run perfectly with 1990 so the soil group, bio table should be correct. I couldn’t find the reason for the modeling error.

Thanks for your time,

Best regards,
Hao Chen

Hi @chn7424814, @swolny’s right about this being related to the Curve Number calculations, and you’re right that this might be related to your LULC table as well.

We have recently fixed a couple of seemingly unrelated issues with Seasonal Water Yield, but would you be willing to try out a development build to see if one of those fixes might have also fixed this issue?

Here’s the download link: