Skip to content

Commit

Permalink
Add an inline example for load_earth_mask
Browse files Browse the repository at this point in the history
  • Loading branch information
seisman committed Feb 9, 2023
1 parent 79a8bfa commit 86519b9
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions pygmt/datasets/earth_mask.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,19 @@ def load_earth_mask(resolution="01d", region=None, registration=None):
- 3: Islands in lakes in the land areas
- 4: Smaller lakes in islands that are found within lakes
inside the land area
Examples
--------
>>> from pygmt.datasets import load_earth_mask
>>> # load the default grid (gridline-registered 1 arc-degree grid)
>>> grid = load_earth_mask()
>>> # Location (120E, 50N) is in land area (1)
>>> grid.sel(lon=120, lat=50).values
array(1, dtype=int8)
>>> # Location (170E, 50N) is in oceanic area (0)
>>> grid.sel(lon=170, lat=50).values
array(0, dtype=int8)
"""
grid = _load_remote_dataset(
dataset_name="earth_mask",
Expand Down

0 comments on commit 86519b9

Please sign in to comment.