1
1
"""
2
- Function to download the IGPP Earth east-west and south- north deflection datasets from
2
+ Function to download the IGPP Earth east-west and north-south deflection datasets from
3
3
the GMT data server, and load as :class:`xarray.DataArray`.
4
4
5
5
The grids are available in various resolutions.
@@ -20,18 +20,18 @@ def load_earth_deflection(
20
20
] = "01d" ,
21
21
region : Sequence [float ] | str | None = None ,
22
22
registration : Literal ["gridline" , "pixel" , None ] = None ,
23
- direction : Literal ["east_west " , "south_north " ] = "east_west " ,
23
+ direction : Literal ["east " , "north " ] = "east " ,
24
24
) -> xr .DataArray :
25
25
r"""
26
- Load the IGPP Earth east-west and south- north deflection datasets in various
26
+ Load the IGPP Earth east-west and north-south deflection datasets in various
27
27
resolutions.
28
28
29
29
.. list-table::
30
30
:widths: 50 50
31
31
:header-rows: 1
32
32
33
33
* - IGPP Earth east-west deflection
34
- - IGPP Earth south- north deflection
34
+ - IGPP Earth north-south deflection
35
35
* - .. figure:: https://www.generic-mapping-tools.org/remote-datasets/_images/GMT_earth_edefl.jpg
36
36
- .. figure:: https://www.generic-mapping-tools.org/remote-datasets/_images/GMT_earth_ndefl.jpg
37
37
@@ -71,8 +71,8 @@ def load_earth_deflection(
71
71
``"gridline"`` for gridline registration. Default is ``None``, means
72
72
``"gridline"`` for all resolutions except ``"01m"`` which is ``"pixel"`` only.
73
73
direction
74
- By default, the east-west deflection (``direction="east_west "``) is returned,
75
- ``direction="south_north "`` to return the south- north deflection.
74
+ By default, the east-west deflection (``direction="east "``) is returned,
75
+ ``direction="north "`` to return the north-south deflection.
76
76
77
77
Returns
78
78
-------
@@ -97,16 +97,16 @@ def load_earth_deflection(
97
97
>>> # load the default grid for east-west deflection (gridline-registered
98
98
>>> # 1 arc-degree grid)
99
99
>>> grid = load_earth_deflection()
100
- >>> # load the default grid for south- north deflection
101
- >>> grid = load_earth_deflection(direction ="ndefl")
100
+ >>> # load the default grid for north-south deflection
101
+ >>> grid = load_earth_deflection(component ="ndefl")
102
102
>>> # load the 30 arc-minutes grid with "gridline" registration
103
103
>>> grid = load_earth_deflection(resolution="30m", registration="gridline")
104
104
>>> # load high-resolution (5 arc-minutes) grid for a specific region
105
105
>>> grid = load_earth_deflection(
106
106
... resolution="05m", region=[120, 160, 30, 60], registration="gridline"
107
107
... )
108
108
"""
109
- prefix = "earth_ndefl" if direction == "south_north " else "earth_edefl"
109
+ prefix = "earth_ndefl" if direction == "north " else "earth_edefl"
110
110
grid = _load_remote_dataset (
111
111
name = prefix ,
112
112
prefix = prefix ,
0 commit comments