SDR model KEY ERROR: nan

Hello,
while running the SDR model I get a key error “nan”. I am not sure why, seems “not an actual number” so I guess it deals with the LULC raster, but I think all classes are actual numbers…any idea? I attach the log. Thanks for your supportInVEST-Sediment-Delivery-Ratio-Model-(SDR)-log-2020-09-29--18_37_48.txt|attachment (142.7 KB)
have a nice day,
Luisa

Hi @luisagalgani,

Could you try attaching the log again? It doesn’t appear to be a downloadable link.

Thanks!

Doug

InVEST-Sediment-Delivery-Ratio-Model-(SDR)-log-2020-09-28–16_29_07.txt (142.8 KB)
Thank you Doug. Does it work now?

Hi @luisagalgani,

Thanks. Could you check what the nodata value of the LULC raster is? If it’s not defined could you define it? If the nodata value seems fine for the LULC raster could you share your biophysical table and LULC raster?

Thanks!

Doug

Thank you so much Doug. I have modified the raster, filling nodata values with 0. However, now I obtain a different error.
“ValueError: The following 1 raster values [2241.] from “C:/Users/luisa/Documents/InVEST models/sdr_workspace_DEM10mCLC2000\intermediate_outputs\churn_dir_not_for_humans\aligned_lulc.tif” do not have corresponding entries in the value_map: {111: 0.078, 112: 0.078, 121: 0.078, 131: 0.078, 133: 0.078, 142: 0.078, 221: 0.3454, 222: 0.2188, 231: 0.0988, 242: 0.1478, 243: 0.1245, 3112: 0.0013, 3113: 0.0013, 3114: 0.0013, 3115: 0.0013, 3116: 0.0013, 3117: 0.0013, 3122: 0.0013, 3123: 0.0013, 3124: 0.0013, 31313: 0.0013, 31315: 0.0013, 31316: 0.0013, 31322: 0.0013, 31323: 0.0013, 31324: 0.0013, 3211: 0.0416, 3212: 0.0416, 322: 0.042, 324: 0.0242, 331: 0.078, 332: 0.0, 333: 0.2509, 335: 0.0, 511: 0.0, 512: 0.0, 523: 0.0, 2111: 0.1478}
2020-10-01 10:22:33,115 execution.run(83) INFO Execution finished”. I attach the biophysical table. The raster gives me errors when trying to upload. Maybe it is too big. And it won’t allow zip uploads. How may I share it?
Thanks for your help!
LuisaSDR_PiaveCLC2000.csv (2.8 KB)

Hey @luisagalgani,

This error indicates that you have a value in the LULC raster of 2241 that is not represented in the biophysical table. Could you open the LULC raster in a GIS viewer and see if you can confirm that there is a 2241 value there? If so, you’ll need to add an entry for it in the biophysical table.

If not you could share that LULC raster via google drive link, or dropbox, or another cloud sharing service. You can either post the shared link here, direct message it to me, or email it to me at ddenu@stanford.edu. Hope this helps!

Doug

1 Like

Thank you so much! I have been able to run it finally! Thanks again!! Have a nice day!
Luisa

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.