8
8
from pygmt .exceptions import GMTInvalidInput
9
9
10
10
11
- @pytest .mark .parametrize ("data_source" , ["igpp" , "gebco" ])
11
+ @pytest .mark .parametrize ("data_source" , ["igpp" , "gebco" , "synbath" ])
12
12
def test_earth_relief_fails (data_source ):
13
13
"""
14
14
Make sure earth relief fails for invalid resolutions.
@@ -21,12 +21,14 @@ def test_earth_relief_fails(data_source):
21
21
22
22
23
23
# Only test 01d and 30m to avoid downloading large datasets in CI
24
- def test_earth_relief_01d_igpp ():
24
+ @pytest .mark .parametrize ("data_source" , ["igpp" , "synbath" ])
25
+ def test_earth_relief_01d_igpp_synbath (data_source ):
25
26
"""
26
- Test some properties of the earth relief 01d data with IGPP data.
27
+ Test some properties of the earth relief 01d data with IGPP and SYNBATH
28
+ data.
27
29
"""
28
30
data = load_earth_relief (
29
- resolution = "01d" , registration = "gridline" , data_source = "igpp"
31
+ resolution = "01d" , registration = "gridline" , data_source = data_source
30
32
)
31
33
assert data .shape == (181 , 361 )
32
34
npt .assert_allclose (data .lat , np .arange (- 90 , 91 , 1 ))
@@ -112,6 +114,21 @@ def test_earth_relief_05m_with_region():
112
114
assert data .sizes ["lon" ] == 481
113
115
114
116
117
+ def test_earth_relief_30s_synbath ():
118
+ """
119
+ Test some properties of the earth relief 30s data with SYNBATH data.
120
+ """
121
+ data = load_earth_relief (
122
+ region = [- 95 , - 94 , - 1.5 , - 1 ],
123
+ resolution = "30s" ,
124
+ registration = "pixel" ,
125
+ data_source = "synbath" ,
126
+ )
127
+ assert data .shape == (60 , 120 )
128
+ npt .assert_allclose (data .min (), - 3552.5 )
129
+ npt .assert_allclose (data .max (), - 2154 )
130
+
131
+
115
132
def test_earth_relief_05m_without_region ():
116
133
"""
117
134
Test loading high-resolution earth relief without passing 'region'.
0 commit comments