Uh oh!
There was an error while loading. Please reload this page.
Remote datasets: Add "load_earth_dist" to load "GSHHG Earth distance to shoreline" dataset - #3706
Conversation
yvonnefroehlich
commented
Dec 22, 2024
/format |
seisman
commented
Dec 23, 2024
Thanks for working on this function. I feel we should first update the upstream documentation to clarify the following points: |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| assert data.attrs["units"] == "km" | ||
| assert data.attrs["horizontal_datum"] == "WGS84" | ||
| assert data.shape == (181, 361) | ||
| assert data.gmt.registration == 0 |
There was a problem hiding this comment.
Need to update to the new syntax in #3696, depending on which PR is merged first.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
Uh oh!
There was an error while loading. Please reload this page.
seisman
left a comment
There was a problem hiding this comment.
Looks good to me. The dataset image will be updated automatically when the upstream PR is merged.
Currently we use both, the abbreviation and the complete word for units in pygmt/pygmt/datasets/load_remote_dataset.py Lines 113 to 115 in b90fa46 but pygmt/pygmt/datasets/load_remote_dataset.py Lines 135 to 137 in b90fa46 I think we should decide on one way and update the dictionary in Edit: |
seisman
commented
Dec 25, 2024
That's a good point. The CF convention mentions that the unit string must be recognized by the UDUNIT package. I quickly read the UNUNIT documentation, I think valid values are |
seisman
commented
Dec 26, 2024
This section (http://cfconventions.org/Data/cf-conventions/cf-conventions-1.12/cf-conventions.html#_dimensional_vertical_coordinate) says:
So I think |
yvonnefroehlich
commented
Dec 26, 2024
Submitted PR #3725 for updating this for all datasets. |

Description of proposed changes
Add
load_earth_distto download the "GSHHG Earth distance to shoreline" dataset and load into axarray.DataArray:Adresses#2431
Preview: https://pygmt-dev--3706.org.readthedocs.build/en/3706/api/generated/pygmt.datasets.load_earth_dist.html
Reminders
make formatandmake checkto 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