Skip to content
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

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

Conversation

core-man
Copy link
Member

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

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

@@ -33,7 +33,8 @@ jobs:
gmt which -Ga @earth_relief_10m_p @earth_relief_10m_g \
@earth_relief_30m_p @earth_relief_30m_g \
@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
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
Copy link
Member

seisman commented Mar 1, 2021

@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
Member

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.

@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
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