Skip to content

Cache the 03s earth relief tile @N35E135.earth_relief_03s_g.nc - #985

Merged
seisman merged 5 commits into
GenericMappingTools:masterfrom
core-man:cache-earth-relief-03s-landonly-srtm-g
Mar 2, 2021
Merged

seisman merged 5 commits into
GenericMappingTools:masterfrom
core-man:cache-earth-relief-03s-landonly-srtm-g

Conversation

@core-man

@core-man core-man commented Mar 1, 2021 •

Copy link
Copy Markdown
Member

Description of proposed changes

Originally posted in #976 (comment).

33.5MB https://github.com/GenericMappingTools/pygmt/suites/2150973318/artifacts/44049313

Reminders

  • Run make format and make check to make sure the code follows the style guide.
  • Add tests for new features or tests that would have caught the bug that you're fixing.
  • Add new public functions/methods/classes to doc/api/index.rst.
  • Write detailed docstrings for all functions/methods.
  • If adding new functionality, add an example to docstrings or tutorials.

Slash Commands

You can write slash commands (/command) in the first line of a comment to perform
specific operations. Supported slash commands are:

  • /format: automatically format and lint the code
  • /test-gmt-dev: run full tests on the latest GMT development version

Comment thread .github/workflows/cache_data.yaml Resolved
Comment thread .github/workflows/cache_data.yaml Outdated
@earth_relief_01d_p @earth_relief_01d_g \
@earth_relief_05m_p @earth_relief_05m_g
@earth_relief_05m_p @earth_relief_05m_g \
@N35E135.earth_relief_03s_g.nc

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😕 I even didn't know that we can use gmt which -Ga @N35E135.earth_relief_03s_g.nc to download a single tile.

@weiji14 weiji14 added maintenance Boring but important stuff for the core devs skip-changelog Skip adding Pull Request to changelog labels Mar 1, 2021
@weiji14 weiji14 added this to the 0.3.1 milestone Mar 1, 2021
@seisman

seisman commented Mar 1, 2021

Copy link
Copy Markdown
Member

@PaulWessel It seems we can use the following command to download a tile of 03s earth relief grid:

gmt which -Ga @N35E135.earth_relief_03s_g.nc

I never saw it in the GMT documentation. Is it an undocumented feature? Is it the recommended way to download one tile?

I don't understand why it works, since the tiles are stored in jp2 format on the GMT server.

@PaulWessel

Copy link
Copy Markdown

Certainly undocumented since we don't really want to tell people to get specific tiles, except indirectly via a -R setting. But it works as it does because the filename matches a known tile and off it goes. It knows what to do with these (jp2->nc).

I think we should keep quiet about this because we may decide to change our tiling structure etc. It should not be something users should be aware of.

Comment thread .github/workflows/cache_data.yaml Resolved
@seisman seisman changed the title Cache the tile of earth_relief_03s_landonly_srtm_g used in the load_earth_relief() example Cache the 03s earth relief tile @N35E135.earth_relief_03s_g.nc Mar 2, 2021
@seisman
seisman merged commit 2ac5a1b into GenericMappingTools:master Mar 2, 2021
@core-man
core-man deleted the cache-earth-relief-03s-landonly-srtm-g branch March 2, 2021 06:47
@core-man core-man mentioned this pull request Aug 2, 2021
5 tasks
sixy6e pushed a commit to sixy6e/pygmt that referenced this pull request Dec 21, 2022

This branch was previously deployed

1 inactive deployment
Preview — ba3e9f90 Deployed Mar 2, 2021 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Boring but important stuff for the core devs skip-changelog Skip adding Pull Request to changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants