Repository navigation
Closed
Description
Description of the problem
I compile gmt from source, within a docker file:
git clone https://github.com/GenericMappingTools/gmt.git
cd gmt && mkdir build && cd build &&
cmake -G Ninja .. && cmake --build . --target install
and install pygmt with pip install pygmt[all]
I cannot download earth relief from gebco (resolution 03s). I defined a local cache directory to be able to run on docker:
ENV GMT_USERDIR=/gmt_cache
But my feeling is that GEBCO Data are not available on the standard gmt servers.
Full script that generated the error
topography=pygmt.datasets.load_earth_relief(region=(20.2,20.9,38.0,38.54),data_source="gebc\
o",use_srtm=False,resolution="03s")
Full error message
Traceback (most recent call last):
File "<python-input-2>", line 1, in <module>
topography=pygmt.datasets.load_earth_relief(region=(20.2,20.9,38.0,38.54),data_source="gebco",use_srtm=False,resolution="03s")
File "/app/easyrisk/lib/python3.13/site-packages/pygmt/datasets/earth_relief.py", line 180, in load_earth_relief
grid = _load_remote_dataset(
name=name,
...<3 lines>...
registration=registration,
)
File "/app/easyrisk/lib/python3.13/site-packages/pygmt/datasets/load_remote_dataset.py", line 582, in _load_remote_dataset
grid = xr.load_dataarray(
fname, engine="gmt", raster_kind=dataset.kind, region=region
)
File "/app/easyrisk/lib/python3.13/site-packages/xarray/backends/api.py", line 190, in load_dataarray
with open_dataarray(filename_or_obj, **kwargs) as da:
~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/easyrisk/lib/python3.13/site-packages/xarray/backends/api.py", line 803, in open_dataarray
dataset = open_dataset(
filename_or_obj,
...<16 lines>...
**kwargs,
)
File "/app/easyrisk/lib/python3.13/site-packages/xarray/backends/api.py", line 596, in open_dataset
backend_ds = backend.open_dataset(
filename_or_obj,
...<2 lines>...
**kwargs,
)
File "/app/easyrisk/lib/python3.13/site-packages/pygmt/helpers/decorators.py", line 742, in new_module
return module_func(*bound.args, **bound.kwargs)
File "/app/easyrisk/lib/python3.13/site-packages/pygmt/xarray/backend.py", line 149, in open_dataset
source: str | list = which(fname=filename_or_obj, verbose="quiet")
~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/easyrisk/lib/python3.13/site-packages/pygmt/helpers/decorators.py", line 576, in new_module
return module_func(*args, **kwargs)
File "/app/easyrisk/lib/python3.13/site-packages/pygmt/src/which.py", line 88, in which
raise FileNotFoundError(msg)
FileNotFoundError: File(s) '@earth_gebco_03s_g' not found.```
**Actual outcome**
**Expected outcome**
I tried to downgrade to v 6.5.0 and i have the same problem.
**System information**
Pulling `debian:sid` from dockerhub.
* Operating system:
* GMT version (`gmt --version`): I tried the latest (v 6.7.0) and v. 6.5.0
Activity
Esteban82 commentedon Oct 25, 2025
Hi @FilLTP89. I try this command and it worked:
gmt grdimage @earth_gebco_03 -RUY -png test -BI don't think it is a bug.
Feel free to check the pygmt tutorial or to make a question in the GMT forum.
joa-quim commentedon Oct 26, 2025
FilLTP89 commentedon Oct 27, 2025
@Esteban82 I tried the exact same command and obtained:
How is it this not a bug @joa-quim ??
anbj commentedon Oct 27, 2025
I think @Esteban82 is missing the resolution at the end.
Add
_03s.joa-quim commentedon Oct 27, 2025
A non-existing file is not a bug. But @anbj already gave you the answer.
Esteban82 commentedon Oct 27, 2025
Yes, sorry. I forgot the
s.github-actions commentedon Oct 28, 2025
👋 Thanks for opening your first issue here!
Please make sure you filled out the template with as much detail as possible. You might also want to take a look at our contributing guidelines and code of conduct.
seisman commentedon Oct 28, 2025
As explained in the GMT forum https://forum.generic-mapping-tools.org/t/gebco-earth-relief-data-file-not-found/6271/2, this is actually a PyGMT bug, so I've transfered the issue to the PyGMT repository:
[-]load_earth_relief with gebco data v.6.7.0[/-][+]load_earth_relief fails with gebco 03s/01s datasets[/+]seisman commentedon Nov 8, 2025
As mentioned above, the GMT remote server doesn't provide 03s and 01s resolutions for earth_gebco/earth_gebcosi/earth_synbath datasets. When users request a dataset like
@earth_gebco_03s, GMT uses@earth_relief_03sinstead, but PyGMT doesn't know it, and tries to find the path to@earth_gebco_03stiles and fails.We have two solutions when users request 03s/01s gebco/gebcosi/synbath datasets:
data_source="igpp".earth_reliefI prefer option 1 since it's simpler and users know exactly what's happening.
Allow passing region to GMTBackendEntrypoint.open_dataset (#3932)
FilLTP89 commentedon Dec 5, 2025
I can confirm that
load_earth_reliefworks for GEBCO data at 03s and 01s, until version 6.5. The main difference between that version and the latest is the following lines:pygmt<=6.5
pygmt>6.5
Those last lines make the code fail with resolutions 01s and 03s. I agree that they might not exist on GEBCO servers, but then why was it working before? Which data was is using? In that case, I can find a workaround.
igppdata are messing all my codes up, because it's not the same kind of datum : I need the ocean floor.seisman commentedon Dec 5, 2025
It uses the
@earth_relief_03sdataset, which is exactly what you'll use when settingdata_source="igpp".This can be confirmed by the following GMT CLI commands: