Memory error in Coastal Blue Carbon model

How many unique habitat types can the blue carbon model pre-processor handle? My LULC table has 83,700 unique habitat types (all mangrove, marsh, and seagrass with slightly different carbon stock measurements). I get a memory error when I try to run the pre-processor. I'm wondering if there are too many values for the model to handle?

I've attached the log, the LULC input table, and the raster. Thanks for your help!


  • jdouglassjdouglass Administrator, NatCap Staff
    Hi Monica, I just wrote back to you over email, but I'd like to write back here for posterity as well.  The real challenge for the CBC model is in the mapping of transitions between landcover codes where we end up with n^2 possible transitions, all of which need to be represented in the transient table.

    There's no great solution for this at the moment, since the right way to represent this sort of spatial variation is probably not with tables anyways.  A cheapo workaround for this might be to slice up the landcover raster into more manageable chunks (I bet tiles of 256x256 would probably do the trick).

    The other thing to consider is whether there are any transitions at all!  From the logfile, I see that the same landcover raster is represented twice in the snapshot list.  If an evaluation of the current carbon stocks is all you need, then the analysis would be much, much simpler.
  • MonMon Member
    Hi James,
    Thanks for your explanation of the memory error. This was our test run with no transitions, but we plan on using transitions in other scenarios. I'll try the slicing trick and see if that makes it easier to handle.
  • MonMon Member
    Hi James,

    I did some rounding and was able to reduce the number of unique habitat values to ~350 without slicing them up. The pre-preprocessor ran smoothly, and the core model was able to show the green success box, but the carbon stock raster outputs don't seem to have the correct values. They range between -Inf and 0. The rest of the raster outputs appear to be reasonable numbers so I'm not sure why the carbon stock ones are being problematic.
Sign In or Register to comment.