Error Monthly alpha Table

I wanted to run the Seasonal Water Yield module (inVEST v3.9.1) with a monthly alpha table. I added a column (named alpha) to the rain events table with values like 0.049154654… for every month (csv-file), and activated and linked the file in the directory. Yet, as soon as I do though, DEM, LULC, Soil Group and AOI turn to “invalid” (red cross). While with the simple Rain events table and a single alpha = 1/12 everything was validated correct. What can cause that? Work-around? Solution?
Thanks for the help :slight_smile:

Hi @fconitz -

It’s strange that the rain events table would cause the spatial data to give an error. When you click on the red X, what is the error message?

~ Stacie

Hi Stacie,

for some reason when I started the SWY module today, every other input parameter was fine, but the monthly alpha table stating "Key is required but has no valuemonthlyalphatable
this is how my table looks like (without the alpha-column in the Rainevents parameter input field).


After restarting the software, I tried again by remowing the events-column (in the manuel it reads like there must be only month and alpha-column!), but now it’s saying “Spatial file [directory]/MonthlyAlphaTable.csv has no projection” for all red crosses, namely DEM, LULC, Soil Group and AOI as well as Monthly Alpha Table .

I ran the old version 9.3.0 (2021-01-29T22:19:12.412Z - 140.0 MB) without problems. Though may be there happened a mistake in the code when updating to 3.9.1, recently?

Hey @fconitz, it looks like you found a bug with the latest version. I just replicated the issue by adding an alpha column to the rain events table (which you should definitely be able to do), giving it floating point values, entering it into the 3.9.1 UI, and I got the same errors as you, about the CSV having no projection (which is just wrong, it’s not a spatial layer), and “Key is required but has no value” (I have no idea what it’s looking for and can’t find). I’ll ping the software team to look into this. Meanwhile, I’m glad that 3.9.0 works for you.

~ Stacie

Hi @fconitz,
Thanks for reporting this! We have identified and fixed the issue, and the fix will be released in InVEST 3.9.2 in the last week of this month (we are now trying out monthly scheduled releases).
In the meantime, you can get around this issue by using the command line interface:

  1. Save your inputs to a datastack JSON file (in the top menu, File > Save as… > Parameter set).
  2. Open the command line and install the natcap.invest python package:
    conda create -y -c conda-forge -n invest391 python=3.9.7 gdal=3.3.1 && conda activate invest391 && pip install natcap.invest==3.9.1
  3. Run the model in headless mode (without the UI) using the invest command line interface:
    invest -vvv run seasonal_water_yield --headless -d <path to your datastack JSON file> -w <path to workspace directory>

@swolny @esoth Thank you very much for the support and guidance!

Version 3.9.1 post464 doesn’t report any issue with the monthly alpha table anymore - Wonderful :)!