@@ -30,26 +30,29 @@ def load_earth_age(
3030
3131 Earth seafloor crustal age dataset.
3232
33- The grids are downloaded to a user data directory
34- (usually ``~/.gmt/server/earth/earth_age/``) the first time you invoke
35- this function. Afterwards, it will load the grid from the data directory.
36- So you'll need an internet connection the first time around.
37-
38- These grids can also be accessed by passing in the file name
39- **@earth_age**\_\ *res*\[_\ *reg*] to any grid processing function or
40- plotting method. *res* is the grid resolution (see below), and *reg* is
41- the grid registration type (**p** for pixel registration or **g** for
42- the gridline registration).
43-
44- The default color palette table (CPT) for this dataset is *@earth_age.cpt*.
45- It's implicitly used when passing in the file name of the dataset to any
46- grid plotting method if no CPT is explicitly specified. When the dataset
47- is loaded and plotted as an :class:`xarray.DataArray` object, the default
48- CPT is ignored, and GMT's default CPT (*turbo*) is used. To use the
49- dataset-specific CPT, you need to explicitly set ``cmap="@earth_age.cpt"``.
50-
51- Refer to :gmt-datasets:`earth-age.html` for more details about available
52- datasets, including version information and references.
33+ This function downloads the dataset from the GMT data server, caches it in a user
34+ data directory (usually ``~/.gmt/server/earth/earth_age/``), and load the dataset as
35+ an :class:`xarray.DataArray`. An internet connection is required the first time
36+ around, but subsequent calls will load the dataset from the local data directory.
37+
38+ The dataset can also be accessed by specifying a file name in any grid processing
39+ function or plotting method, using the following file name format:
40+ **@earth_age**\_\ *res*\_\ *reg*. *res* is the grid resolution; *reg* is the grid
41+ registration type (**p** for pixel registration, **g** for gridline registration).
42+ If *reg* is omitted (e.g., ``@earth_age_01d``), the gridline-registered grid will be
43+ loaded for grid proccessing functions and the pixel-registered grid will be loaded
44+ for plotting functions. If *res* is also omitted (i.e., ``@earth_age``), GMT
45+ automatically selects a suitable resolution based on the current region and
46+ projection settings.
47+
48+ This dataset comes with a color palette table (CPT) file, ``@earth_age.cpt``. To use
49+ the dataset-specific CPT when plotting the dataset, explicitly set
50+ ``cmap="@earth_age.cpt"``, otherwise GMT's default CPT (*turbo*) will be used. If
51+ the dataset is referenced by the file name in a grid plotting method, the
52+ dataset-specific CPT file is used automatically unless another CPT is specified.
53+
54+ Refer to :gmt-datasets:`earth-age.html` for more details about available datasets,
55+ including version information and references.
5356
5457 Parameters
5558 ----------
@@ -67,29 +70,28 @@ def load_earth_age(
6770 Returns
6871 -------
6972 grid
70- The Earth seafloor crustal age grid. Coordinates are latitude and
71- longitude in degrees. Age is in millions of years (Myr).
73+ The Earth seafloor crustal age grid. Coordinates are latitude and longitude in
74+ degrees. Age is in millions of years (Myr).
7275
7376 Note
7477 ----
7578 The registration and coordinate system type of the returned
76- :class:`xarray.DataArray` grid can be accessed via the GMT accessors
77- (i.e., ``grid.gmt.registration`` and ``grid.gmt.gtype`` respectively).
78- However, these properties may be lost after specific grid operations (such
79- as slicing) and will need to be manually set before passing the grid to any
80- PyGMT data processing or plotting functions. Refer to
81- :class:`pygmt.GMTDataArrayAccessor` for detailed explanations and
82- workarounds.
79+ :class:`xarray.DataArray` grid can be accessed via the GMT accessors (i.e.,
80+ ``grid.gmt.registration`` and ``grid.gmt.gtype`` respectively). However, these
81+ properties may be lost after specific grid operations (such as slicing) and will
82+ need to be manually set before passing the grid to any PyGMT data processing or
83+ plotting functions. Refer to :class:`pygmt.GMTDataArrayAccessor` for detailed
84+ explanations and workarounds.
8385
8486 Examples
8587 --------
8688
8789 >>> from pygmt.datasets import load_earth_age
88- >>> # load the default grid (gridline-registered 1 arc-degree grid)
90+ >>> # Load the default grid (gridline-registered 1 arc-degree grid)
8991 >>> grid = load_earth_age()
90- >>> # load the 30 arc-minutes grid with "gridline" registration
92+ >>> # Load the 30 arc-minutes grid with "gridline" registration
9193 >>> grid = load_earth_age(resolution="30m", registration="gridline")
92- >>> # load high-resolution (5 arc-minutes) grid for a specific region
94+ >>> # Load high-resolution (5 arc-minutes) grid for a specific region
9395 >>> grid = load_earth_age(
9496 ... resolution="05m",
9597 ... region=[120, 160, 30, 60],
0 commit comments