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 earth_relief_15s tile and set GMT_DATA_SERVER to use https #1553

Merged
merged 11 commits into from
Oct 1, 2021

Conversation

seisman
Copy link
Member

@seisman seisman commented Oct 1, 2021

Description of proposed changes

This PR caches the earth_relief_15s tile used in examples/gallery/images/grdgradient.py, but it may point to an upstream bug (GenericMappingTools/gmt#5829).

Also force GMT_DATA_SERVER to use https instead of HTTP, due to unknown GMT server issues.

Fixes #

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

@weiji14
Copy link
Member

weiji14 commented Oct 1, 2021

Vercel build still failing... If you're trying to workaround the download error, maybe set the environment variable GMT_DATA_SERVER to https://oceania.generic-mapping-tools.org as mentioned in #1548 (comment), instead of deleting the gallery example.

@seisman
Copy link
Member Author

seisman commented Oct 1, 2021

Vercel build still failing... If you're trying to workaround the download error, maybe set the environment variable GMT_DATA_SERVER to oceania.generic-mapping-tools.org as mentioned in #1548 (comment), instead of deleting the gallery example.

I'm trying to find out why the GitHub Action CI fails. It's clear that something is wrong with downloading data files from the GMT server, but the GitHub Action CI should not download any files, because these files are available in CI caches.

@seisman seisman marked this pull request as ready for review October 1, 2021 05:14
@seisman
Copy link
Member Author

seisman commented Oct 1, 2021

https://github.com/GenericMappingTools/pygmt/runs/3763747598

The GitHub Action CI fails because the grdgradient example uses the 03s earth relief tile (already cached), but the 03s tile needs the 15s tile (not cached).

But why does the 03s tile needs the 15s tile? The map region is -R-119.825/-119.4/37.6/37.825, which is on the land.

To reproduce the issue, I deleted my local cache and ran the following command, it's clear that both 03s and 15s tiles are downloaded.

$ gmt grdimage -R-119.825/-119.4/37.6/37.825 @earth_relief_03s -JQ10c -B -pdf map
grdblend [NOTICE]: Remote data courtesy of GMT data server china [http://china.generic-mapping-tools.org]

grdblend [NOTICE]: Earth Relief at 3x3 arc seconds tiles provided by SRTMGL3 (land only) [NASA/USGS].
grdblend [NOTICE]:   -> Download 1x1 degree grid tile (earth_relief_03s_g): N37W120
grdblend [NOTICE]: Earth Relief at 15x15 arc seconds provided by SRTM15+V2.1 [Tozer et al., 2019].
grdblend [NOTICE]:   -> Download 10x10 degree grid tile (earth_relief_15s_p): N30W120

@weiji14
Copy link
Member

weiji14 commented Oct 1, 2021

The GitHub Action CI fails because the grdgradient example uses the 03s earth relief tile (already cached), but the 03s tile needs the 15s tile (not cached).

But why does the 03s tile needs the 15s tile? The map region is -R-119.825/-119.4/37.6/37.825, which is on the land.

Seems like an upstream GMT bug? Can we isolate it solely to grdcut, or does the bug only appear for grdgradient/grdimage?

@seisman
Copy link
Member Author

seisman commented Oct 1, 2021

The GitHub Action CI fails because the grdgradient example uses the 03s earth relief tile (already cached), but the 03s tile needs the 15s tile (not cached).
But why does the 03s tile needs the 15s tile? The map region is -R-119.825/-119.4/37.6/37.825, which is on the land.

Seems like an upstream GMT bug? Can we isolate it solely to grdcut, or does the bug only appear for grdgradient/grdimage?

It also happens to grdcut. Reported to GenericMappingTools/gmt#5829

@weiji14 weiji14 added maintenance Boring but important stuff for the core devs skip-changelog Skip adding Pull Request to changelog labels Oct 1, 2021
@seisman seisman changed the title WIP: Temporarily remove the gallery example for grdgradient Cache earth_relief_15s tile and set GMT_DATA_SERVER to https Oct 1, 2021
@seisman seisman added this to the 0.5.0 milestone Oct 1, 2021
@weiji14 weiji14 changed the title Cache earth_relief_15s tile and set GMT_DATA_SERVER to https Cache earth_relief_15s tile and set GMT_DATA_SERVER to use https Oct 1, 2021
@seisman seisman merged commit e53c7ae into main Oct 1, 2021
@seisman seisman deleted the remove-grdgradient-gallery branch October 1, 2021 08:49
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.

2 participants