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

Xarray rasterio backend deprecation URGENT! #72

Closed
joelfiddes opened this issue May 9, 2023 · 3 comments
Closed

Xarray rasterio backend deprecation URGENT! #72

joelfiddes opened this issue May 9, 2023 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@joelfiddes
Copy link
Collaborator

see "breaking changes" https://docs.xarray.dev/en/stable/whats-new.html#v2023-04-2-april-20-2023

and
pydata/xarray#4697

Affects at least:

File "/home/joel/src/TopoPyScale/TopoPyScale/topo_param.py", line 141, in compute_dem_param
ds = xr.open_rasterio(dem_file).to_dataset('band')
AttributeError: module 'xarray' has no attribute 'open_rasterio'

Alternative:

rioxarray.open_rasterio

todo:

conda install -c conda-forge rioxarray
add import rioxarry to topo_param.py and topo_da.py
change all cases of xr.open_rasterio to rioxarray.open_rasterio

@joelfiddes
Copy link
Collaborator Author

i can push these changes but be aware it will break stuff - although anyone with latest xarray package will not be able to currently run code anyway......

@joelfiddes joelfiddes added the bug Something isn't working label May 9, 2023
@joelfiddes joelfiddes self-assigned this May 9, 2023
@joelfiddes
Copy link
Collaborator Author

pushed commits

@joelfiddes
Copy link
Collaborator Author

pushed commits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant