seasonal water yield model error

HunHun Member
Hi everyone, I used the seasonal water yield model for the first time and I had problems with the model operation.
The model shows that there was a problem with the amount of evaporation in January. I would like to ask everyone to do this. The monthly evaporation volume and monthly rainfall I use are input using the information provided by the InVEST website:Global monthly reference evapotranspiration may be obtained from the CGIAR CSI dataset (based on WorldClim data): http://www.cgiar-csi.org/data/global-aridity-and-pet-database, but an error message is displayed. 
 I hope someone can answer the question for me. I don't know which operation was wrong. In addition, provide txt file for everyone to refer to, thank you!

The following is my data file name:
1.Monthly Precipitation Diretory(月降雨量)
Name: PRE, reference InVEST global data, tiff type
2.ETO Directory(月蒸發散量)
Name: PET, reference InVEST global data, tiff type
3.DEM
Water_dem: tiff type
4.landuse(土地使用)
Name:1995lur,grid type
5. Soil composition
Name: soil_group, tiff type
6.Watershed
Name:watersheds_ok(study),shp type
7.Biophysical table
Name: biophysical_table, csv type
8.rainfall event
Name: rain_events_table: csv type

Comments

  • swolnyswolny Member, NatCap Staff
    Hi @Hun -

    The Seasonal Water Yield model requires that *only* ".tif" files are in the Monthly Precipitation Diretory and ET0 Directory, no ".tfw" files or any other file types, but *only* .tif. So try making new folders for Precipitation and ET0, and copy only the files with a ".tif" extension on them, no others, and see if that helps. Sorry, this should probably be documented in the User Guide.

    ~ Stacie

  • HunHun Member
    Hellow @swolny

    Thank you! I amended the data file format to tiff. Thanks for your reminders, but I still encountered error messages during the operation of the model. I do not know where the problem is?
    I hope you can help me solve the problem, thank you for your help.

    ~Hun
  • Hello,

    I have used all inputs in .tiff format in the seasonal water yield model, yet when I am running it, I am getting an error message. I cannot solve this problem. I request you to kindly help me with this problem.
    978 x 510 - 110K
    702 x 531 - 158K
    617 x 907 - 126K
  • swolnyswolny Member, NatCap Staff
    Hi @sunayana -

    You don't need to put ".tiff" in the Suffix field, the model will create .tiffs for output files. That field is used so you can name the output files differently for different scenarios, inputs or whatever.

    As for the KeyError message, a lot of other people have asked about this error on the forum. Have you searched the forum to see if any of the other posts help?

    ~ Stacie

  • sunayanasunayana Member
    edited October 2018
    Hi @Stacie,

    I am sorry to bother you again but I cannot get enough idea about this error. I came to know that it is related to some mismatching inputs, but where I am lacking, I am unable to catch.

    Please help me. I would really be very grateful to you.

    Thanks in advance.
    Post edited by sunayana on
  • swolnyswolny Member, NatCap Staff
    Hi @sunayana -

    I'm not exactly sure where the error is happening, if you post your whole log file (not just the final error) that will help. 

    The first thing is to make sure that all of the Values in your land use/land cover raster have matching lucode entries in the biophysical table. This error could mean that you have a Value of 1 in your LULC raster, but no entry for lucode 1 in your biophysical table.

    It's also possible that the problem is with the watersheds shapefile, maybe ws_id 1 is outside of the area covered by your input data.

    Check those two things, and if they don't help please post the whole log file. Thanks.

    ~ Stacie
  • Dear Stacie,

    Thanks a lot for your time. I am uploading my data and log file. Kindly help me.

    Thanks in advance.
  • swolnyswolny Member, NatCap Staff
    Thanks for uploading the log file. It looks like it's failing while trying to process your Rain Events CSV. Look at that file in a text editor (not Excel) and make sure that the values are separated by commas (not semicolons or something else) and make sure that there is no blank line at the bottom (if there is, delete it.) If this doesn't help, please post your data somewhere I can download it and I'll check it out.

    ~ Stacie

  • Thank you so much for your help. But even after correcting the errors, I am getting the same error. I tried to upload the data that I am using, but it is also creating a problem. May I request u to send me your email ID where I can upload my data?
    My email ID is sunayana.sharma1710@gmail.com.
    I would be grateful to you if you could get me out of this problem.

    Thank you.
  • swolnyswolny Member, NatCap Staff
    edited November 2018
    Thank you for sending your data. The problem is that the rain events table has the months listed as JAN, FEB, MAR, etc, when they actually need to be 1, 2, 3, etc. So the model is looking for a "month" value of 1 but not finding it in the table, which is giving you the KeyError. 

    I see that our User Guide does not specify how the months are to be listed, or give an example, so apologies for that lack of information, I'll try to get that fixed. You can, however, use the sample data that we provide to see how the files need to be formatted. The sample data can either be downloaded using the InVEST installation tool, or directly downloaded from this webpage.

    So the rain events CSV should look like this

    month,events
    1,7.8
    2,5.2
    3,3.0
    ...
    11,2.1
    12,6.4

    Similarly, the biophysical table is not formatted correctly, and again I see that the User Guide does not provide complete information. It requires fields lucode, Kc_1...Kc12, CN_A, CN_B, CN_C, CN_D, and Kc and CN need to be filled in with values for each lucode. Again, please use the sample data as a guide for how this table needs to be formatted.

    ~ Stacie

    Post edited by swolny on
  • Hi,

    Thanks a lot for your time...but can you please tell me where do I get the values to be entered in the biophysical table?
    It is very confusing.

    Thanks in advance.
  • swolnyswolny Member, NatCap Staff
    Hi @sunayana -

    We get those values from a literature search. It is best to find values that are from studies from the place you're working, or somewhere similar in vegetation, soil and climate. If you cannot find these, you can use more general values from sources such as the ones listed in the Data Sources section of the User Guide.

    ~ Stacie
  • Hi @Stacie,

    I managed to create my biophysical table with the help of your suggestion. This time it the previous error did not appear, rather a new error popped up. I am attaching a screenshot of the work space and the log file.
    Please suggest me corrections.

    Regards,
    Sunayana.
  • swolnyswolny Member, NatCap Staff
    I've never seen this error before, but suspect that it's related to the curve number (CN) values in your biophysical table - @Rich, any ideas? 

    ~ Stacie
  • RichRich Administrator, NatCap Staff
    Hi @sunayana, I'm not sure I can tell what's going on from just the error message. Could you dropbox me your data at richsharp@stanford.edu?
  • Dear @Rich,

    I am attaching my entire data in your mail. Please go through it once at your convenience and suggest me alterations if required.

    Thanks in advance.

    Sunayana.
  • Dear Sir,

    Please let me know if there is any alteration that I need to make in my data.
    I am really sorry to bother you again.

    Looking forward to hearing from you soon.

    Thanks in advance.
    Sunayana.
  • RichRich Administrator, NatCap Staff
    Hi @sunayana, I just got back to this but I can't download from the google drive folder you shared with me. I've "requested access".
  • Dear @Rich Sir,

    Sorry for the delayed response. I have done as you said.

    Thanking you.

    Sunayana.
  • RichRich Administrator, NatCap Staff
    Hi @sunayana, your soil group raster has numbers ranging from 1-14. Though I don't think it should crash, the model expects values that are only 1, 2, 3, or 4. So the bug you're experiencing happens when there's a little region containing a soil group raster that's not in the range 1-4. Could you try cleaning that raster to filter out values > 4? I'll make an issue on my end to add a better error message for future versions of InVEST.
Sign In or Register to comment.