Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rasterio 1.4.0/1.4.1 flips y-axis in compute_availabilitymatrix #420

Merged
merged 1 commit into from
Jan 3, 2025

Conversation

fneum
Copy link
Member

@fneum fneum commented Jan 3, 2025

This is a bit of a random find, but caused some significant faults in renewable potential calculations...

Versions 1.4.0 and 1.4.1 or rasterio cause a flipped y-axis in cutout.compute_availabilitymatrix(), which neither earlier nor later versions of rasterio do. With no changes but changed rasterio version:

With rasterio==1.4.{0,1}

With rasterio<1.4,>=1.4.2

I think excluding these versions makes more sense than implementing version-specific behavior in atlite.

@fneum fneum requested a review from lkstrp January 3, 2025 16:19
@fneum fneum changed the title rasterio 1.4.0/1.4.1 causes faults in compute_availabilitymatrix rasterio 1.4.0/1.4.1 flips y-axis in compute_availabilitymatrix Jan 3, 2025
Copy link
Member

@lkstrp lkstrp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quite a random find, great!

I think this is also what's causing the pypsa-eur problems, which is why we've pinned it to rasterio==1.4.1 right now. Do you think this could be solved with a fix in atlite or do we need to upload updated cutouts somewhere as well?
At least hopefully it does.

EDIT: Hmm, it can't be the former, I'll check the cached cutouts.

@fneum
Copy link
Member Author

fneum commented Jan 3, 2025

I don't think the cutouts are affected by this.

@lkstrp
Copy link
Member

lkstrp commented Jan 3, 2025

rasterio==1.4.1 pin in pypsa-eur is no longer needed. So either the cutouts have been affected or some other rasterio dependency issue. Anyway

@lkstrp lkstrp merged commit 85dacce into master Jan 3, 2025
19 checks passed
@lkstrp lkstrp deleted the rasterio-1.4-fix branch January 3, 2025 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants