-
Notifications
You must be signed in to change notification settings - Fork 224
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
load_earth_relief now returns grid-registrated grids when registration is not specified #1929
Comments
Is the same change needed for load_earth_age? Also, the alternative to providing a note about different behavior between 6.3 and 6.4 is to define the default as gridline in the function signature, which might be cleaner. |
Yes.
Sounds a good idea, but for earth_relief dataset, the 15s data only provide the pixel-registrated version and the 03s and 01s data only provide the gridline-registrated version. So |
@seisman Would it be best to write in an if statement in
|
Sounds great! Or we can change the order of available registrations in the dataset metadata (i.e., changing
|
@seisman Is their a way to see what a grid's registration is once it is returned from I added |
You can use:
See https://www.pygmt.org/dev/api/generated/pygmt.GMTDataArrayAccessor.html#pygmt.GMTDataArrayAccessor. |
Description of the problem
In GMT<=6.3, when users access a remote grid but don't specify the grid registration (e.g.,
@earth_relief_01d
), the pixel-registrated grid is returned by default unless only the gridline-registrated grid is available.The behavior has changed recently (GenericMappingTools/gmt#6710). The new behavior is well documented in https://docs.generic-mapping-tools.org/dev/datasets/remote-data.html#data-registration.
In PyGMT, we provide the
load_earth_relief
function to load the earth relief dataset into a xarray.DataArray object. Whenregistration
is not specified, the function returns a pixel-registrated grid in GMT<=6.3, but will return a gridline-registrated grid in GMT 6.4, thus a few tests will fail.The text was updated successfully, but these errors were encountered: