Value Error: pixel sizes are not equivalent - Carbon Model

I’m running Carbon Model on InVEST 3.9.1 and I always encounter this error. Can anybody help me with this issue will be much appreciated.

Thanks.

Initializing…
Showing messages with level INFO and higher
2021-12-06 16:37:14,267 (natcap.invest.utils) utils.prepare_workspace(157) INFO Writing log messages to G:/Jorge_Cipriano/Cipriano_Files/MENRO/GHGs/InVEST/Derivatives\InVEST-InVEST-Carbon-Model-log-2021-12-06–16_37_14.txt
2021-12-06 16:37:14,268 (natcap.invest.ui.model) model._logged_target(1644) Level 100 Starting model with parameters:
Arguments for InVEST natcap.invest.carbon 3.9.1:
calc_sequestration True
carbon_pools_path G:/Jorge_Cipriano/Cipriano_Files/MENRO/GHGs/InVEST/Derivatives/carbon_pools_maramag.csv
do_redd True
do_valuation False
lulc_cur_path G:/Jorge_Cipriano/Cipriano_Files/MENRO/GHGs/InVEST/LULC_Data/final/2015_LULC_Maramag_v4.tif
lulc_cur_year 2015
lulc_fut_path G:/Jorge_Cipriano/Cipriano_Files/MENRO/GHGs/InVEST/LULC_Data/final/2020_LULC_Maramag.tif
lulc_fut_year 2020
lulc_redd_path G:/Jorge_Cipriano/Cipriano_Files/MENRO/GHGs/InVEST/LULC_Data/final/2015_LULC_Maramag.tif
n_workers -1
results_suffix _maramag_v3
workspace_dir G:/Jorge_Cipriano/Cipriano_Files/MENRO/GHGs/InVEST/Derivatives

2021-12-06 16:37:14,271 (natcap.invest.carbon) carbon.execute(249) INFO Building file registry
2021-12-06 16:37:14,408 (natcap.invest.ui.model) model._logged_target(1652) ERROR Exception while executing <function execute at 0x000002BBD51C31F0>
Traceback (most recent call last):
File “natcap\invest\ui\model.py”, line 1650, in _logged_target
File “natcap\invest\carbon.py”, line 284, in execute
ValueError: the pixel sizes of [‘lulc_cur_path’, ‘lulc_fut_path’, ‘lulc_redd_path’] are not equivalent. Here are the different sets that were found in processing: {(115.6577660482903, -115.6577660482903), (115.6577660482889, -115.6577660482889), (10.0, -10.0)}
2021-12-06 16:37:14,412 (natcap.invest.ui.model) model._logged_target(1656) INFO Execution finished
2021-12-06 16:37:14,414 (natcap.invest.utils) utils.prepare_workspace(162) INFO Elapsed time: 0.15s
2021-12-06 16:37:14,415 (natcap.invest.ui.execution) execution.run(78) ERROR Target <function InVESTModel.execute_model.._logged_target at 0x000002BBD6775CA0> failed with exception
Traceback (most recent call last):
File “natcap\invest\ui\execution.py”, line 68, in run
File “natcap\invest\ui\model.py”, line 1650, in _logged_target
File “natcap\invest\carbon.py”, line 284, in execute
ValueError: the pixel sizes of [‘lulc_cur_path’, ‘lulc_fut_path’, ‘lulc_redd_path’] are not equivalent. Here are the different sets that were found in processing: {(115.6577660482903, -115.6577660482903), (115.6577660482889, -115.6577660482889), (10.0, -10.0)}
2021-12-06 16:37:14,416 (natcap.invest.ui.execution) execution.run(83) INFO Execution finished

Hi @jorge , thanks for posting this issue.

It seems the Carbon model requires all the input rasters to be well-aligned with each other: they must all have the same pixel cell size and extent. You can do some pre-processing in GIS to ensure this. For example, in QGIS you can do this from the Raster > Align Rasters tool.

1 Like

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