Carbon storage and sequestration model - ValueError: could not convert string to float:

I’m running the carbon model for some data, including a current and future LULC. I am receiving an error - ValueError: could not convert string to float:

My carbon pools.csv is all in comma format. However, one of the land cover classes includes parentheses (). Not sure if that would cause an issue

I have attached the log file
InVEST-Carbon-Storage-and-Sequestration-log-2022-04-08–16_52_45.txt (2.7 KB)

Hi @Ruby_P , thanks for your post,

Yes, this would cause an issue. The codes listed in the CSV need to match the pixel values of the LULC raster, and these will be purely numbers, no extra characters.

The error message from the log also makes me wonder if there is an extra blank cell somewhere in the CSV also? If you can, please upload that file here and we can take a closer look. Thanks,


Hi Dave,

Thanks for the clarity. I’ve updated both the rasters and CSV file to remove any special characters from them and re-ran the model but am still receiving the same message.

I’ve attached both the CSV of carbon pools and new log
InVEST-Carbon-Storage-and-Sequestration-log-2022-04-11–09_24_32.txt (2.7 KB)
Carbon Pools.csv (1.5 KB)

Thanks for sharing your table. I see this row which is probably causing the error:

7,Mineral extraction sites,,,38,

There are missing values for C_above, C_below, and C_dead