Carbon Values error

Hi I am running the Carbon Model version 3.9 and receiving an error "values in the LULC raster were found that are not represented under the ‘lucode’ column… the missing values found in the LULC raster but not the table are [-3.4e+38].

However, I have checked the values of the raster and that doesn’t seem to be true. Any help would be amazing! I have attached the raster that seems to be the problem and my Pools data.

02_WeightedAverageCpools.csv (489 Bytes)

TV.NLCD_2001w.tif (2.5 MB)

Hi @sarahhalperin ,

Is there any chance that your LULC’s nodata value set to -3.4e+38? If so, I’m pretty sure that we fixed this issue in InVEST 3.9.1. Could you try downloading the latest version of InVEST and re-running the model on your inputs to see if it has indeed been fixed?

Here’s the download page: InVEST | Natural Capital Project

Let us know if it’s still an issue!

Thanks,
James

1 Like

Hi @sarahhalperin ,

I know you from Bren and NCEAS and softball in SB! I hope you’re well.

James is indeed correct that your LULC’s NoData value is set to -3.4e+38. Please do try out InVEST 3.9.1 to see if the model runs with these same inputs that you uploaded here. We’d love to know if this bug has been fixed. If not, I went ahead and changed the LULC’s NoData value to a positive value [9999] using ArcGIS’s Set Null tool. When I used this as the input, the model ran successfully. The file is too large to attach here, but let me know if you want help changing the value yourself or if I you’d like me to email you the updated LULC.

Be well,
Jesse

1 Like

Thanks for the speedy response! I have tried downloading inVEST 3.9.1 onto my PC and it downloads successfully; however, when I go to run a model the normal black box opens and then immediately closes. Do you have any idea what could be causing this?

Thanks,

Sarah

Oh! Well, that’s not great … when the black cmd window closes that quickly, it means there was an error on startup. So let’s take a look at the error message. To do that, would you please follow the steps below to take a look at the error?

  1. Open cmd.exe
  2. At the command prompt, run the following: "C:\Program Files\InVEST_3.9.1_x64\invest-3-x64\invest.exe run carbon"
  3. Copy and paste the error text that’s printed to the command prompt here into the thread.

Once we have that error message, we can debug why it isn’t starting up and fix the issue.

Thanks for your help with this!
James

Hi James,

Please see the image attached. I ran what you suggested, but that seemed to be the incorrect. I modified the path, but that also didn’t seem to work.

Thanks!

Sarah

Hi @sarahhalperin ,

Thanks for trying that out and getting back to us. Could you try this instead?:
"C:\Program Files\InVEST_3.9.1_x64\invest-3-x64\invest.exe" run carbon

Not the quotes surround the path to the exe application. Let us know!

Doug

1 Like

Hi Doug,

My apologies! Let see if I did it right his time.

Thanks,

Sarah

Oh this is kind of exciting! We just saw a similar error on another computer. In this case, it looks like an environment variable isn’t being expanded. Would you be willing to share the contents of your PATH environment variable with us?

In this case, I suspect we’ll just need to replace %USERPROFILE% with the path to your user folder.

I’ll apologize in advance for my novice knowledge of computers. Is this what you are looking for?

EnvironmentVariables2
EnvironmentVariables

1 Like

Perfect, this is exactly the information we’re looking for!

So, to start out with, could you change the %USERPROFILE% in the second window to C:\Users\sarahhalperin and then try re-running InVEST?

It’s possible we may need to also change some of the other entries in the system environment variables, but the error was coming from the %USERPROFILE% one so let’s start there.

Ok, I switched the %USERPROFILE% and now I get the following error.

Oh! Did you happen to open a new cmd.exe prompt after changing the environment variables? I forgot to mention that you’d need to do that in order to use the new variables. I’m sorry about the hassle here!

No problem, I appreciate your help! I think I solved the problem!

I needed to simple set the to user profile to “%USERPROFILE%” not “%USERPROFILE%C:\Users\sarahhalperin”.

2 Likes

Hi @sarahhalperin ,

We’re glad you were able to fix your issue. For our own understanding and future debugging, would you mind outlining exactly what you changed, specifying what it was before and what it was after? Any helpful screen shots would be great too! Thanks and no worries if don’t have the time.

Doug

Hi @dcdenu4,

I unfortunately did not save all the screen shots of the errors, but the problem appeared to be with my environmental variable path. Specifically, the "%USERPROFILE%.

Before: "%USERPROFILE%\AppData\Local\Microsoft\WindowsApps
After: "%USERPROFILE%

Please see the screenshots attached. I hope that is helpful!

Best,

Sarah

EnvironmentVariables
EnvironmentVariablesSwitch

2 Likes