Coastal blue carbon - zero net C sequestration in disturbed blue carbon habitats


I’ve run the coastal blue carbon model many times over the past year and recently noticed an unexpected pattern in some of the outputs. All of the output carbon accumulation, emissions, and net sequestration rasters have zero values in cells where blue carbon habitat present in the baseline habitat raster is disturbed in the first time step raster.

I would expect these cells to have positive values in the accumulation and net sequestration raster between the baseline year and first time step, and then positive values in the emissions raster and negative values in the net sequestration raster in subsequent time steps, after the disturbance occurs. I would also expect to see a negative value in the total net carbon sequestration raster (for the entire analysis period). All of these rasters have zero values for these cells. Blue carbon habitats that are disturbed in later time steps, other than the first one following the baseline year, show up as expected in the output rasters (accumulation of C until the disturbance occurs, followed by emissions).

I am using a development version of InVEST 3.8.2 which you provided in this thread in July. I’ve uploaded my input data, results, and log files here. I’d appreciate your help figuring out why this is happening and how to fix it; I can correct for the omission when calculating totals, but would like to have the correct spatial layers as well for visualization.

Thank you!

Hi @kwarnell, thanks for sharing your inputs and logfile!

I would also expect that there would be positive values in accumulation and net sequestration rasters between the baseline period and the first transition, and the fact that this is not happening is worrisome.

It so happens that we’re just finishing up a rewrite of the Coastal Blue Carbon model that we believe fixes a number of issues that were present in the old implementation (including the issues corrected in the dev build I had linked to you before). I’m currently using your inputs in the new implementation to make sure that everything looks correct before I send you a new development build.

I hope to have more for you soon!


Hi @kwarnell, Thanks for your patience on this! Could you try installing this development build and seeing if it resolves the issue for you?

Here’s the download link:

Note that some of the structure of the inputs has changed in this version:

  • Rather than providing various rasters and their corresponding years into a textfield in the UI, the new version of the model has you providing these through a table. Here’s an example table that I put together for running through the model on your inputs: snapshots.csv (342 Bytes)
  • The previous version of the Coastal Blue Carbon model required a couple of tables that described the initial state of carbon and some characteristics of the carbon pools in each landcover class. These have been rolled into a single biophysical table in this new version of the model. Here’s the biophysical table for your inputs: biophysical.csv (5.4 KB)
  • The transition table and all other inputs are the same as in the previous version of the model.

Let me know if you have any questions or run into any difficulties with this build!

Hi @jdouglass, thanks for the updated build! I ran it using the same input data I shared with you and for a different set of inputs for a second location. The results for both look good, without the gaps in the net sequestration and emissions outputs that I saw with the previous version. I like the consolidated input format as well.

Just one observation: the new version creates a series of net C accumulation and emissions rasters in the output folder, but doesn’t include the C accumulation or stock rasters. Not sure if this was a purposeful change or just an oversight, but I found the accumulation and stock rasters useful for summarizing the results.

Thanks again!

Thanks for trying out this build, Katie! I’m glad it’s working well, and I’m also glad you like the consolidated input format :slight_smile:

Thanks for pointing out the missing output rasters … the development build linked below now produces rasters of the total carbon accumulation (across all 3 pools) between each snapshot in the output folder.

The model also has been adjusted to write out stock rasters for every year, including the snapshot years, which are in the intermediate folder as total-carbon-stocks-{year}.tif. Is that what you were looking for in terms of carbon stocks?


Thanks for the update - I haven’t had a chance to try that latest dev build, but the carbon stock rasters in the intermediate folder are what I’m looking for.

However, I just noticed an issue in the carbon emissions estimates (from the first dev build you shared in this thread). It appears that emissions only take place during the time interval directly following a disturbance, not in any subsequent time intervals. I’m also not sure that the amount of emissions during that first time interval after a disturbance is correct.

For example, using the test data I shared earlier in the thread, there are areas of marsh that are disturbed (drown) between the baseline year and the first snapshot year (2026). From the description of carbon emissions after disturbance in the user’s guide, I expect emissions from those areas to begin in the time interval after the disturbance and continue through future time intervals, following an exponential decay function using the half-life and disturbance values in the biophysical input table. In this case, the marsh areas have a total carbon stock (all in sediment carbon) of 0.000803 MMT/ha when they are disturbed, and should emit 25% of their carbon in total, with a half-life of 10 years. I’m having trouble parsing the carbon emission equation in the user’s guide (is Dp 0.000803 in this context, or that multiplied by 25%? what is r?), but I’d expect to see a substantial portion of the 25% total expected emissions occur during the first interval after disturbance (14 years, from 2026-2040), somewhat less in the second interval (2040-2063), and so on.

What I’m actually seeing is 0.000013 emitted during the first time interval after disturbance (1.62% of carbon stocks at the time of disturbance) and 0 emissions in subsequent time intervals. Relevant output rasters are available here.

Can you verify that my expectation is reasonable and the model is not behaving as expected? If so, a fix would be greatly appreciated!

Thank you!

Just checking to see if anyone has been able to look into this. Thanks!

Hey @kwarnell, yep! I’m working on this and hope to have a development build to you soon. I’m sorry for the delay in writing back. I reproduced the issue you mentioned, where in the 2nd snapshot year, carbon emissions drop to 0. This obviously should not be the case, and is a bug in the way that the years of the latest transition are tracked on a given pixel.

So, for your emissions question, I’m working off of the equation that’s in the updated version of the UG, which is included with the installed (which I think you’re referring to as well):

E_{p,t} = D_{p,s} \cdot ({ 0.5 }^{ \frac { t-(s+1) }{ H_{p,s} } } - { 0.5 }^{ \frac { t-s }{ H_{p,s} } })

The subsequent description refers to a D_{p,r} , but this is a typo and it should instead refer to D_{p,s}. This will be fixed. The former iteration on the UG chapter used r and s mostly interchangeably.

So, in your example, we have a total carbon stock at the time of emission (all in sediment carbon) of 0.000803 MMT/ha, and we know that the disturbance of the transition will cause 25% of the carbon stocks to be emitted between the transition when the disturbance happened and t=\infty.

So in the equation for E_{p,t}, D_{p,s} represents the volume of carbon disturbed as a result of the transition. D_{p,s} itself is calculated by taking the magnitude of the disturbance (0.25) and multiplying it by the available carbon stocks at the year of the transition (0.000803), so I’d expect a value of D_{p,s} = 0.00020075 . The model writes out these rasters with D_{p,s} values as intermediate/disturbance-volume-[pool]-[year][suffix].tif.

If only 1.62% of the disturbance volume for the transition year is being emitted in that first year after the transition, that sounds like a bug, and the fact that emissions are dropping to 0 thereafter also sounds like a bug. I’ll look into these.

One other thing I’d like to mention is that I noticed your input values are getting pretty small! This isn’t a problem, strictly speaking, but it’s worth mentioning that this model is performing its calculations using float32 precision and so I’d expect nontrivial numerical error after about 10e-5 or so. Fortunately, despite the user’s guide insisting on Metatonnes of Carbon Dioxide-equivalent, the model does no unit conversions whatsoever. So if you were to scale up the units for the model run across all of your input tables, you may have less significant numerical error. That doesn’t explain the bugs, though, and so I hope to have more to you (and a dev build) soon!



OK! Here’s a development build (download link) that addresses the issue where emissions are dropping to 0.0 at a transition.

What I’m actually seeing is 0.000013 emitted during the first time interval after disturbance (1.62% of carbon stocks at the time of disturbance) and 0 emissions in subsequent time intervals.

So, the first part of this (0.000013 emitted during the first timestep) looks right to me. By my calculations, this is about 6.7% of the total possible carbon that will eventually be emitted due to this transition (which is 0.000803\cdot 0.25 = 0.00020075 MMT/ha that will eventually be emitted), and the amount of carbon emitted does decrease as expected with each passing year.

The 0 emissions in each subsequent time interval should be fixed by the above development build, with emissions decreasing by about half with each passing time interval:

Anyways, this has been a fun bug! Could you try the development build above and make sure that it works for you as expected and let me know if it doesn’t?

Thanks so much!

1 Like

Hi James,

Thanks for the updated build. I just tried it out, and it did fix the issue where emissions dropped to 0 after the first time interval following disturbance. I now see continued emissions in the intervals following disturbance that decrease with each successive interval, as you show in the table above.
Overall, the pattern of accumulation and emissions relates to changes in my habitat snapshots as I’d expect.

I still think that carbon emissions are being underestimated, however. I follow your explanation that if the carbon stock at the time of disturbance is 0.000803, then 0.00020075 MMT/ha would eventually be emitted (using a 25% loss rate). When I total all of the emissions rasters in the output (covering the years from 2027, the first snapshot year after the baseline, to 2124), I get 0.000024 MMT/ha emitted. Since the half-life in my run is 10 years, I would expect almost all of that 25% loss to occur by 2124 (97 years after the disturbance), but instead, only 2.9% of the initial stock was lost. I tried rerunning with the units adjusted to MT to see if the numerical error you mentioned was playing a role, and I can see the slight differences due to rounding, but still ended up with 3% of initial stock lost over the analysis period.

So, the first part of this (0.000013 emitted during the first timestep) looks right to me. By my calculations, this is about 6.7% of the total possible carbon that will eventually be emitted due to this transition (which is 0.000803 ⋅ 0.25 = 0.00020075 MMT/ha that will eventually be emitted), and the amount of carbon emitted does decrease as expected with each passing year.

The 6.7% of total possible emissions being emitted in the first timestep would make more sense if the first timestep were only one year, but the first timestep is 14 years (2026-2040), more than the 10-year half-life that is set in the parameters for sediment carbon losses following disturbance, so I’d expect more than half of the total possible emissions to be emitted in that timestep.

I thought that perhaps the emissions rasters were in different units from the C stock raster, representing the emissions from the cell rather than C units per area (i.e., had already been adjusted based on the cell size), but I tried adding up the emissions using that assumption and it didn’t make sense either (the total was more than 25% of the initial C stock).

Assuming that the description above makes sense to you and the model is underestimating C emissions following disturbance, maybe it’s not properly accounting for the length of each time step?

Oh good! I’m glad to hear that at least that’s working as expected :slight_smile:

Ah, I think we’re using timestep a little differently here. For our discussion on this thread I’ll try my very best to use years to talk about years and timesteps to talk about the intervals between transitions, as you’re using the term. The model operates at a 1 year granularity, summing the results between transition years and putting them into the output folder. The 6.7% emissions I saw was over the first year after the transition, and if I sum the first 10 years after the transition in 2026, 50% of the 0.00020075 MMT/ha was emitted. So the math of the half-life seems to working as expected, at least at the annual level.

But there’s definitely something funky going on with the output/carbon-emissions-between-{year}-and-{year}.tif that I’m looking into now. This should just be a sum, but somehow the output/carbon-emissions... rasters end up having only the pixel values of the first year after the transition. Obviously wrong.

I’ll write back (hopefully soon) when I’ve isolated the issue and implemented a fix.

Thanks, that makes sense! I dug into the outputs of the current dev build a bit more, and it looks like it’s just those carbon emissions between snapshot years outputs that are incorrect. The net C sequestration outputs appear to be using the correct total emissions (the sum of all of the individual year C emissions rasters in the intermediate folder).

Hi @kwarnell,

OK! I believe the development build linked below addresses the issue with the summary emissions rasters (the ones in the output directory). Could you verify that it does and let me know? Thanks in advance!