|
7 | 7 | from pygmt.datasets.load_remote_dataset import _load_remote_dataset
|
8 | 8 | from pygmt.helpers import kwargs_to_strings
|
9 | 9 |
|
| 10 | +__doctest_skip__ = ["load_earth_magnetic_anomaly"] |
| 11 | + |
10 | 12 |
|
11 | 13 | @kwargs_to_strings(region="sequence")
|
12 | 14 | def load_earth_magnetic_anomaly(
|
@@ -69,6 +71,27 @@ def load_earth_magnetic_anomaly(
|
69 | 71 | The :class:`xarray.DataArray` grid doesn't support slice operation, for
|
70 | 72 | Earth magnetic anomaly with resolutions of 5 arc-minutes or higher,
|
71 | 73 | which are stored as smaller tiles.
|
| 74 | +
|
| 75 | + Examples |
| 76 | + -------- |
| 77 | +
|
| 78 | + >>> from pygmt.datasets import load_earth_magnetic_anomaly |
| 79 | + >>> # load the default grid (gridline-registered 1 arc-degree grid) |
| 80 | + >>> grid = load_earth_magnetic_anomaly() |
| 81 | + >>> # load the 30 arc-minutes grid with "gridline" registration |
| 82 | + >>> grid = load_earth_magnetic_anomaly( |
| 83 | + ... resolution="30m", registration="gridline" |
| 84 | + ... ) |
| 85 | + >>> # load high-resolution (5 arc-minutes) grid for a specific region |
| 86 | + >>> grid = load_earth_magnetic_anomaly( |
| 87 | + ... resolution="05m", |
| 88 | + ... region=[120, 160, 30, 60], |
| 89 | + ... registration="gridline", |
| 90 | + ... ) |
| 91 | + >>> # load the 20 arc-minutes grid of the mag4km dataset |
| 92 | + >>> grid = load_earth_magnetic_anomaly( |
| 93 | + ... resolution="20m", registration="gridline", mag4km=True |
| 94 | + ... ) |
72 | 95 | """
|
73 | 96 | dataset_prefix = "earth_mag4km_" if mag4km is True else "earth_mag_"
|
74 | 97 | grid = _load_remote_dataset(
|
|
0 commit comments