SWY Error: Invalid Value Encountered in Multiply

margozmargoz Member
edited October 31 in Freshwater Models
Hello,

I am running the Seasonal Water Yield Model for a hydro-region in California. I got the model to sucessfully run using a test-biophysical table that a colleague developed in our intial stages just to make sure we could run the model. Now that we have accurate Kc and CN values I'm trying to run the model with the updated BP table but I keep getting the error "RuntimeWarning: invalid value encountered in multiply" when the model starts to calculate B. I know the error has to do with the BP table because it is the only input that I'm changing but I can't seem to figure out why. I've changed my Kc values to whole numbers, verified the lulc codes, made sure there is no spacing in the table that could be throwing it off and I'm still getting the same error.

Please Help! I attached a copy of the log and can share any other inputs via email!

Thank you!

-Margo






p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Calibri}
span.s1 {font-kerning: none}



Post edited by margoz on

Comments

  • RichRich Administrator, NatCap Staff
    Hi, did you also post on another thread? I'm having trouble keeping track. Sorry if we haven't been as responsive lately if so. We've had a hectic couple weeks here at our project and are just getting back to user support.  

    Regarding your error, is there any chance you could take a look at the intermediate files of the flow accumulation raster? See if there are short choppy streams, if so there may be hydrological pits that might cause invalid values in this model. You can fill a DEM with a Wang & Liu pit fill algorithm you can find in SAGA GIS or some equivalent in ArcGIS. If the flow accumulation rasters look nice and long and smooth, would you mind sharing your data with me via Dropbox to richsharp@stanford.edu? I'm quite behind a lot of work at the moment, but if there's something easy I may be able to help spot it.

  • RichRich Administrator, NatCap Staff
    Hello again! I realize we might have had this bug in the past and fixed it a few months ago. We're getting ready to release InVEST 3.4.0 and have an early release we're happy to have you try to see if it fixes your issue. Would you be willing to try it at http://data.naturalcapitalproject.org/invest-releases/3.4.0rc2/InVEST_3.4.0rc2_x86_Setup.exe and see if it resolves your SWY bug?
  • Hi Rich!
    Thanks for your help. I'm having a little trouble installing the early release, there doesn't appear to be a .dmg file when I download the file by following the link you sent me. Is InVEST 3.4 mac compatible? I think that might be the issue. Please let me know when you get a chance.
    Thank you!
    Margo
  • RichRich Administrator, NatCap Staff
    Ahh sorry Margo, I didn't realize you were on Mac. Sorry the early release is not build for mac yet.
  • jdouglassjdouglass Administrator, NatCap Staff
    Hey Margo, Turns out we do have a mac build for 3.4.0rc2:
  • Thanks guys! 3.4 did the trick for the data discussed above. However, now I am on to my next hydroregion in CA (Tulare before and now San Francisco Bay) and encountering the same error. I filled my DEM using Wang&Liu and double checked for all the errors I've come across in the millions of times Ive run this model and I can't figure out what's happening. I attached my log for reference and can dropbox my data if the problem isn't obvious. 

    Thank you!
  • RichRich Administrator, NatCap Staff
    Hi, yes please Dropbox your data and I'll take a look. Send to richsharp@stanford.edu please!
  • RichRich Administrator, NatCap Staff
    Hi @margozI tried to run the model with your data this morning, but I don't see the biophysical table in the dropbox you sent me. Could you add that, let me know, and I'll take a look?
  • Hi Rich! Just checked- the BP table is in there. It's "SF_Bay_bp.csv"

    Let me know if you still aren't seeing it and I can add another copy.

    Thank you!
    Margo
  • RichRich Administrator, NatCap Staff
    Thanks @margoz, I see it. I think your issue was related to an issue several users have experienced where the raster stack may have some nodata pixels that overlay with the DEM within the watershed. I've patched the model to now treat those cases as "0"-whatever and I'm able to do a run-through of the model with the data you dropboxed me. Could you please try this development version of InVEST and see if it fixes the issue on your end? If it does we'll be rolling out that change the with InVEST 3.4.0 release that's coming soon.

  • do you have a mac version of the latest patch? 
Sign In or Register to comment.