-
Notifications
You must be signed in to change notification settings - Fork 229
PyGMT load_earth_relief breaks with xarray 0.18.0 (ValueError: cannot guess the engine) #1262
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
Comments
Using xarray directly gives the same error: import xarray as xr
# Fail with the same error
xr.open_dataarray("~/.gmt/server/earth/earth_relief/earth_relief_01d_p.grd")
# Specifying engine="netcdf4" works
xr.open_dataarray("~/.gmt/server/earth/earth_relief/earth_relief_01d_p.grd", engine="netcdf4") |
Oops, a bit too slow, I'll close down #1263 as a duplicate. |
I'm not familiar with xarray, but I guess that xarray tries to open the grid file using different engines, and it should work when it tries the "netcdf4" engine. It looks like an upstream bug to me, rather than a breaking API change. |
I'm aware that this will cause issues for any PyGMT users creating a new environment with |
Yes, please.
You mean creating a branch from the v0.3.1 tag, backport the changes in #1264, and make the v0.3.2 release? |
Is a *.grd file the same as a NetCDF4 file? I've stepped through the
Yes, that is one option (though not sure if I like that idea). Alternatively we can just start working on the PyGMT v0.4.0 release 🙈 Technically we've fixed this issue on the PyGMT side in #1264, but let's keep this issue pinned for a while, and keep watch to see if users make bug reports on the forum/github. If there's a lot of bug reports, maybe then go with a v0.3.2 release. |
xarray v0.18.1 has been released (https://github.com/pydata/xarray/releases/tag/v0.18.1). The patch release should fix the problem. |
Uh oh!
There was an error while loading. Please reload this page.
Description of the problem
xarray 0.18.0 was released on May 6, 2021, and some PyGMT tests break. I'm not sure if it's a bug or a breaking change of xarray.
Full code that generated the error
After upgrading to xarray 0.18.0, following codes no longer work:
Full error message
System information
Please paste the output of
python -c "import pygmt; pygmt.show_versions()"
:The text was updated successfully, but these errors were encountered: