# Mismatch between the total carbon stored in 4 carbon pools and the number given in the final report of InVEST

Hi everyone,

My question is about the difference in total carbon -C- stock given in the output report of InVEST (Total cur) and the sum of four C pools.

I have used land use and land cover raster, the table of C pools in CSV format and run the model. It gives the Cabove, C below, Cdead and Csoil results without any problem. However, once I calculate the total amount of carbon in each pool by multiplying the ‘value’ and ‘count’ values of each pool (for this calculation, I used Properties>Symbology>Unique values of each TIF in ArcMap), the result is different than the number given as an output HTML document. Does anyone know what could be the reason of this difference?

Thank you.

Hi @MDelibas -

How different is the result that you get, versus the output of the model? Could it be explained by the input carbon pools being given in MgC / hectare, versus the output values being given in MgC / pixel?

~ Stacie

The sum of Cpools is around 3935591.4 Mg C/ha while the output value is 5758941.4 Mg C/ha.
I also realised that the difference between those two values which range between 1823350.023 to 1701313.55, gradually decreases in the total C calculation of different years (2000, 2006, 2012).

What you say could be the reason but previous time I did not have this problem, the values were coherent.

Hi @MDelibas,

I’m not too familiar with ArcMap, but I think the Unique values calculation maybe isn’t doing what you want it to. Each carbon pool TIF shows the carbon stored in that pool at each pixel. So to get the total carbon stored in a pool, you would need to sum the entire raster for that pool. `sum(c_above_cur.tif) + sum(c_below_cur.tif) + sum(c_dead_cur.tif) + sum(c_soil_cur.tif)` should equal the total current carbon in the InVEST output report.

There should be some sort of statistics tool that will calculate the sum of the raster for you. In QGIS you can do it with `Processing > Toolbox > Raster analysis > Raster layer statistics > Run`. In ArcMap maybe you can use the Raster Domain tool to get a polygon outline of the raster, and then the Zonal Statistics as Table tool to sum the raster over its entire area.

I hope that helps!
Emily

Sorry to chime in here, but it’s also worth noting that the Carbon model converts the per-hectare carbon pool volumes to account for the area of a pixel. Concretely, if the input table values are in units of megagrams per hectare, the pixel values of the carbon storage maps produced by the model are in megagrams per pixel.

So unless your pixels have an area of 1 ha, I’d expect the output pixel values to be a bit different from the sum of the carbon pool values!

Thank you so much for your suggestion. I calculated the sum of raster both in QGIS and ArcGIS by following the steps you mentioned. Both have the same result with what I have found by using TIF and all three are different than the output value of the report. Could the HTML module of the model be problematic?

Thank you pointing out this issue! I think it is the cell size what you mean, which is given as (X, Y) 5, 5. Do I need to change it to 1 ha and repeat the calculation?

Hi @MDelibas,

That is interesting. We have some extensive tests for the model so we are pretty confident that it works, but bugs are always possible! If you don’t mind sharing your data, you can send it to me and I will try to replicate the issue and figure out what is going on. You could upload it to google drive and share the link here, or you could email it to me privately at esoth@stanford.edu.
{"ft_lang_label":"__label__en","ft_lang_prob":0.90582573,"math_prob":0.93612146,"size":686,"snap":"2020-34-2020-40","text_gpt3_token_len":157,"char_repetition_ratio":0.107038125,"word_repetition_ratio":0.0,"special_character_ratio":0.21428572,"punctuation_ratio":0.0942029,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9831096,"pos_list":[0,1,2],"im_url_duplicate_count":[null,null,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-09-28T09:29:42Z\",\"WARC-Record-ID\":\"<urn:uuid:cb8932b2-1788-4fe6-bbb0-91d423924813>\",\"Content-Length\":\"33068\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:f7c76781-d836-4965-b41c-5b9f9ae1a6c1>\",\"WARC-Concurrent-To\":\"<urn:uuid:631ee45c-ee35-4c9a-a35e-b7ed053c1397>\",\"WARC-IP-Address\":\"66.220.12.141\",\"WARC-Target-URI\":\"https://community.naturalcapitalproject.org/t/mismatch-between-the-total-carbon-stored-in-4-carbon-pools-and-the-number-given-in-the-final-report-of-invest/1231\",\"WARC-Payload-Digest\":\"sha1:6ZBSR3MBVEDRZ2LMDF7L6APJHW576QCW\",\"WARC-Block-Digest\":\"sha1:HP6KF76MXNXH2NTHZVPKYHUQZAMBHO4A\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-40/CC-MAIN-2020-40_segments_1600401598891.71_warc_CC-MAIN-20200928073028-20200928103028-00522.warc.gz\"}"}