@@ -23,9 +23,11 @@ def load_earth_relief(resolution="01d", region=None, registration=None):
2323 These grids can also be accessed by passing in the file name
2424 **@earth_relief**\_\ *res*\[_\ *reg*] to any grid plotting/processing
2525 function. *res* is the grid resolution (see below), and *reg* is grid
26- registration type (**p** for pixel registration or *g* for gridline
27- registration). Refer to :gmt-docs:`datasets/remote-data.html` for more
28- details.
26+ registration type (**p** for pixel registration or **g** for gridline
27+ registration).
28+
29+ Refer to :gmt-docs:`datasets/remote-data.html#global-earth-relief-grids`
30+ for more details.
2931
3032 Parameters
3133 ----------
@@ -37,8 +39,10 @@ def load_earth_relief(resolution="01d", region=None, registration=None):
3739 or ``'01s'``.
3840
3941 region : str or list
40- The subregion of the grid to load. Required for Earth relief grids with
41- resolutions higher than 5 arc-minute (i.e., ``05m``).
42+ The subregion of the grid to load, in the forms of a list
43+ [*xmin*, *xmax*, *ymin*, *ymax*] or a string *xmin/xmax/ymin/ymax*.
44+ Required for Earth relief grids with resolutions higher than 5
45+ arc-minute (i.e., ``05m``).
4246
4347 registration : str
4448 Grid registration type. Either ``pixel`` for pixel registration or
@@ -81,7 +85,7 @@ def load_earth_relief(resolution="01d", region=None, registration=None):
8185 reg = f"_{ registration [0 ]} " if registration else ""
8286 else :
8387 raise GMTInvalidInput (
84- f"Invalid grid registration: { registration } , should be either "
88+ f"Invalid grid registration: ' { registration } ' , should be either "
8589 "'pixel', 'gridline' or None. Default is None, where a "
8690 "pixel-registered grid is returned unless only the "
8791 "gridline-registered grid is available."
@@ -90,6 +94,15 @@ def load_earth_relief(resolution="01d", region=None, registration=None):
9094 if resolution not in non_tiled_resolutions + tiled_resolutions :
9195 raise GMTInvalidInput (f"Invalid Earth relief resolution '{ resolution } '." )
9296
97+ # Check combination of resolution and registeration.
98+ if (resolution == "15s" and registration == "gridline" ) or (
99+ resolution in ("03s" , "01s" ) and registration == "pixel"
100+ ):
101+ raise GMTInvalidInput (
102+ f"{ registration } -registered Earth relief data for "
103+ f"resolution '{ resolution } ' is not supported."
104+ )
105+
93106 # different ways to load tiled and non-tiled earth relief data
94107 # Known issue: tiled grids don't support slice operation
95108 # See https://github.com/GenericMappingTools/pygmt/issues/524
0 commit comments