Skip to content

load_earth_relief now returns grid-registrated grids when registration is not specified #1929

@seisman

Description

@seisman

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.

Optionally, you can append _g or _p to specifically get the gridline-registered or pixel-registered version (if they both exist). If reg is not specified then the behavior depends on whether you are making a plot or processing/extracting a subset of the data:

  1. For plots we will return the pixel-registered version unless only the gridline-registered file is available.
  2. For grid processing modules we will return the gridline-registered version unless only the pixel-registered file is available. We will also issue a warning since for calculations you should ideally know and specify exactly what you want.

If you do specify a specific registration and that version is not available you will get an error message.

In PyGMT, we provide the load_earth_relief function to load the earth relief dataset into a xarray.DataArray object. When registration 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    upstreamBug or missing feature of upstream core GMT

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions