Carbon Model Error

I keep getting the following error: MapCarbonPoolError: There was a KeyError when mapping land cover ids to carbon pools. This can happen when there is a land cover id that does not exist in the carbon pool data file.


all of the land cover ids have carbon pool data. 

thanks!
Erica

Comments

  • RichRich Administrator, NatCap Staff
    Hi Erica, are you using the most recent version of InVEST (3.3.0)?  http://data.naturalcapitalproject.org/invest-releases/InVEST_3_3_0_x86_Setup.exe

    We've experienced that error in the past due to a bug that was fixed.  If you are using the most recent version of InVEST could you dropbox me your datastack to richsharp@stanford.edu and I'll take a look?
  • HI Rich, 

    I'm just getting back to this and it's still not working. Do you still have time to look at my data? 

    Thanks so much!
    Erica
  • RichRich Administrator, NatCap Staff
    Sure, could you dropbox me your datastack to richsharp@stanford.edu and I'll take a look?
  • RichRich Administrator, NatCap Staff
    Hi Erica, I think i got a file from you this morning "for_invest0616.zip"?  But I was able to run the carbon storage scenario without a problem on InVEST 3.3.1.  

    If you're still having this problem, could you attach your log to this thread so I can take a look?
  • I'm sorry if my message wasn't clear. I'll run it again later today and see what happens. 


    Thanks for your help,

    Erica


  • I'm still getting the same error. Here is the log file. thanks for your help. Erica
  • Hi Rich! Any update on this? 

    Thanks so much for our help!
    Erica
  • RichRich Administrator, NatCap Staff
    Hi Erica, sorry for the delay.  It looks like your landcover map may have a landcover ID that is not represented in your carbon pool table.  Is that possible in your context?
  • No worries. Thanks for getting back to me. This is the error I receive when running the exact same files I sent you a few weeks ago. I don't see an id that isn't in the file. Thank you!
  • RichRich Administrator, NatCap Staff
    Are you referring to the "for_invest0616.zip" you sent a while back?  If so, I couldn't find a valid landcover map in that file.  I see your biophysical table, a raster called "drft_rail_nonspatial.tif" that seems to be a mask of something, and then a "w001001.adf" which looks like it's part of an ArcGIS raster.  Usually the latter is an entire directory not just that one file. 

    I'd be happy to look further if you could you try zipping up that whole directory or whatever your landcover map is and dropboxing me that file to richsharp@stanford.edu.


  • Ok. Yes those filea. I sent the exact files that I input but I'll send the whole directory later today. The adf file is the land cover file. Thanks
  • RichRich Administrator, NatCap Staff
    Right, I figured.  Just for context, I can't open the adf file by itself.  All the other files in the directory define the raster together.
  • RichRich Administrator, NatCap Staff
    Hi Erica, I received your landcover map and was able to run the model without a problem on the static carbon pools.  But looking at your log closely it looks like you're using the uncertainty module?  I don't have a copy of it, but can you check your uncertainty carbon pool table to ensure that it has all the landcover IDs in it?

    p.s. For what it's worth, we'll be removing the uncertainty module from the InVEST carbon model in the next release.
  • Ok. the carbon pool table was sent in the first batch of files i sent you. we only have data for above ground carbon so the rest of the values are 0s. please let me know if i should send it again. thanks. 
  • RichRich Administrator, NatCap Staff
    Hmm, I wonder if the issue is in your future scenario landcover map then.  If it looks okay to you, can you dropbox me "C:/Users/ea24548/Documents/Carbon_processing/redo_future/Non_spatial/optimistic/dfrt_rail_nonspatial/dfrt_rail_nonspatial_eco.tif" and I'll see if that's the landcover map that has an extra ID?
  • i figured it out! i had 2 future landcover scenarios and one combined classes and the other didn't. thanks for your help! 
  • RichRich Administrator, NatCap Staff
    Whew!  Glad you got it.
  • Hi Rich,

    now the model is running, but the outputs when using a different future model are all the same. I've run 4 producing the exact same outputs. Has anyone else been having this issue?

    Thanks!
    Erica
  • jdouglassjdouglass Administrator, NatCap Staff
    Sorry about the delay on this ... could you send your inputs and logfile to jdouglass@stanford.edu so I can take a look?

    Thanks!
    James
Sign In or Register to comment.