-
Notifications
You must be signed in to change notification settings - Fork 228
Deprecate pygmt.io.load_dataarray, use xarray.load_dataarray instead #3922
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
base: main
Are you sure you want to change the base?
Conversation
Deprecate usage of `pygmt.io.load_dataarray` for loading NetCDF and other grids, use `xr.load_dataarray(..., engine="gmt")` instead.
Specifically with arguments (..., engine="gmt", decode_kind="grid").
Perhaps we should also replace xr.open_dataarray with xr.load_dataarray in the tests? |
I see you're doing some of that in #3643 already. Do you want to do it there, or in this PR? |
CodSpeed Performance ReportMerging #3922 will degrade performances by 85.18%Comparing Summary
Benchmarks breakdown
|
Please do it in this PR. |
Description of proposed changes
Deprecate usage of
pygmt.io.load_dataarray
for loading NetCDF and other grids, usexr.load_dataarray(..., engine="gmt")
instead.TODO:
load_dataarray
toxr.load_dataarray(..., engine="gmt", raster_kind="grid")
internallytest_io_load_dataarray
to somewhere elseCherry-picked from #3919
Preview:
Reminders
make format
andmake check
to make sure the code follows the style guide.doc/api/index.rst
.Slash Commands
You can write slash commands (
/command
) in the first line of a comment to performspecific operations. Supported slash command is:
/format
: automatically format and lint the code