Repository navigation
Open
Description
__________________ test_earth_relief_03s_default_registration __________________
def test_earth_relief_03s_default_registration():
"""
Test that the grid returned by default for the 3 arc-second resolution has
a "gridline" registration.
"""
data = load_earth_relief(resolution="03s", region=[-10, -9.8, 4.9, 5])
assert data.shape == (121, 241)
assert data.gmt.registration == 0
npt.assert_allclose(data.coords["lat"].data.min(), 4.9)
npt.assert_allclose(data.coords["lat"].data.max(), 5)
npt.assert_allclose(data.coords["lon"].data.min(), -10)
npt.assert_allclose(data.coords["lon"].data.max(), -9.8)
> npt.assert_allclose(data.min(), -2069.996)
../pygmt/tests/test_datasets_earth_relief.py:263:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
args = (<function assert_allclose.<locals>.compare at 0x7fb55d6cccc0>, array(-2131.9707, dtype=float32), array(-2069.996))
kwds = {'equal_nan': True, 'err_msg': '', 'header': 'Not equal to tolerance rtol=1e-07, atol=0', 'verbose': True}
@wraps(func)
def inner(*args, **kwds):
with self._recreate_cm():
> return func(*args, **kwds)
E AssertionError:
E Not equal to tolerance rtol=1e-07, atol=0
E
E Mismatched elements: 1 / 1 (100%)
E Max absolute difference: 61.9[747](https://github.com/GenericMappingTools/pygmt/actions/runs/4765800212/jobs/8471996968?pr=2435#step:18:748)0312
E Max relative difference: 0.02993953
E x: array(-2131.9707, dtype=float32)
E y: array(-2069.996)
Activity
seisman commentedon Apr 28, 2023
GMT 6.4 and 6.5 produce different grids:
seisman commentedon Apr 28, 2023
Here is the difference between the two grids:
Obviously, the two grids diff at the lower-left corner.
Then I tried to compare the two grids in a larger region:
Here is the diff:

The two grids diff at (-10, 4.6).
@PaulWessel Do you have any ideas why GMT 6.4/6.5 produce different grids and which one is correct?
PaulWessel commentedon Apr 28, 2023
You see the same thing, @Esteban82 ?
Esteban82 commentedon Apr 28, 2023
I can't test it for now because I have another problem. I get this message when I run anything with a remote data set.
*** buffer overflow detected ***: terminatedPaulWessel commentedon Apr 28, 2023
Please post the command so we can test
Esteban82 commentedon Apr 28, 2023
Now it works. I thinks that is something wrong in gmt_data_server.txt in the TEST server. We could see it later.
I got the error with this command for example this.
gmt grdcut @earth_relief_03s_g -R-10.5/-9.8/4.6/5.0 -Grelief-6.4.ncWe could see it later.
Esteban82 commentedon May 3, 2023
Yes, I also get a diff at 10, 4.6.
[-]Failing test with the GMT master branch (upcoming v6.5.0)[/-][+]Failing test with the GMT 6.5.0[/+]