# Value Error: pixel sizes are not equivalent - Carbon Model

**URL:** <https://community.naturalcapitalalliance.org/t/value-error-pixel-sizes-are-not-equivalent-carbon-model/2361>\
**Category:** Software Support\
**Tags:** carbon\
**Created:** [December 6, 2021, 8:43am UTC](https://community.naturalcapitalalliance.org/t/value-error-pixel-sizes-are-not-equivalent-carbon-model/2361 "2021-12-06T08:43:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jorge](https://avatars.discourse-cdn.com/v4/letter/j/9fc29f/32.png) [@jorge](https://community.naturalcapitalalliance.org/u/jorge)\
**Post date:** [December 6, 2021, 8:43am UTC](https://community.naturalcapitalalliance.org/t/value-error-pixel-sizes-are-not-equivalent-carbon-model/2361/1 "2021-12-06T08:43:10Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![dave](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.naturalcapitalalliance.org/dave/32/70_2.png) [@dave](https://community.naturalcapitalalliance.org/u/dave)\
**Post date:** [December 6, 2021, 2:52pm UTC](https://community.naturalcapitalalliance.org/t/value-error-pixel-sizes-are-not-equivalent-carbon-model/2361/2 "2021-12-06T14:52:27Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex031/uploads/naturalcapitalproject/original/2X/8/8d95591aa074da87ea0fdd61ca47c1c3c0588aa7.png) [@system](https://community.naturalcapitalalliance.org/u/system)\
**Post date:** [June 14, 2023, 7:02pm UTC](https://community.naturalcapitalalliance.org/t/value-error-pixel-sizes-are-not-equivalent-carbon-model/2361/3 "2023-06-14T19:02:29Z")

</div>

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