I am trying to get acquainted with some of the InVEST models to hopefully apply it for my PhD research (on the impact of maritime development/infrastructure on ecosystem structure, functioning and services).
I am using version 3.7.0_x86 and I’m very new to it (to GIS as well) so I’m going through the guidelines and trying out the models (with the provided sample data) that may be applicable for me. I managed to make the Habitat Quality model work yesterday but have stumbled upon troubles with the Coastal Blue Carbon model. Not sure what I’m doing wrong as I’m just using what was provided with the installation. I get a ValueError encountered: could not convert string to float
I know a little python code so I know what it means but not sure in what file I should check to find the “typo’d” float.
The log file:
InVEST-Coastal-Blue-Carbon-log-2020-02-07–11_43_32.txt (2.7 KB)
Thanks in advance
Taking a look at the InVEST 3.7.0 source code for CBC, it looks like you’ve selected the option to include an economic analysis, but also that you haven’t provided a discount rate. The InVEST 3.7.0 User Interface doesn’t catch this requirement, but the next version of InVEST will … sorry about the unnecessary frustration here! If you provide a discount rate, the model should at least continue. I see from your logfile that you have chosen to not use a price table … no problem! But be sure to provide an inflation rate as well. Again, this will be caught by validation in the next version of InVEST.
Hope this helps!
PS: The binaries that we distribute don’t really come with easily-readable source code … it’s just a side effect of our build process. You can always view the source code of InVEST over at its repository here: https://bitbucket.org/natcap/invest (although it will soon be moving here: https://github.com/natcap/invest/)
Indeed I excluded the price table as I wanted to try the model one step at a time. I didn’t notice that the “calculate net present value of sequestered carbon” box was ticked while I left out everything else for price calculation, probably leading to the model’s confusion. Unticking it got the thing going.
I’ll try it with pricing now too.
Thanks a bunch for the helpful and quick response.