Skip to content

Commit 9ee7c3a

Browse files
committed
Update docs.
1 parent c68d372 commit 9ee7c3a

File tree

3 files changed

+27
-22
lines changed

3 files changed

+27
-22
lines changed

doc/weather-climate.rst

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,33 +10,38 @@ Weather and climate data
1010
1111
``xarray`` can leverage metadata that follows the `Climate and Forecast (CF) conventions`_ if present. Examples include automatic labelling of plots with descriptive names and units if proper metadata is present (see :ref:`plotting`) and support for non-standard calendars used in climate science through the ``cftime`` module (see :ref:`CFTimeIndex`). There are also a number of geosciences-focused projects that build on xarray (see :ref:`related-projects`).
1212

13+
.. _Climate and Forecast (CF) conventions: http://cfconventions.org
14+
15+
.. _cf_variables:
16+
17+
Related Variables
18+
-----------------
19+
1320
Several CF variable attributes contain lists of other variables
1421
associated with the variable with the attribute. A few of these are
1522
now parsed by XArray, with the attribute value popped to encoding on
1623
read and the variables in that value interpreted as non-dimension
1724
coordinates:
1825

19-
- `coordinates`
20-
- `bounds`
21-
- `grid_mapping`
22-
- `climatology`
23-
- `geometry`
24-
- `node_coordinates`
25-
- `node_count`
26-
- `part_node_count`
27-
- `interior_ring`
28-
- `cell_measures`
29-
- `formula_terms`
30-
31-
This decoding is controlled by the `decode_coords` kwarg to
26+
- ``coordinates``
27+
- ``bounds``
28+
- ``grid_mapping``
29+
- ``climatology``
30+
- ``geometry``
31+
- ``node_coordinates``
32+
- ``node_count``
33+
- ``part_node_count``
34+
- ``interior_ring``
35+
- ``cell_measures``
36+
- ``formula_terms``
37+
38+
This decoding is controlled by the ``decode_coords`` kwarg to
3239
:py:func:`open_dataset` and :py:func:`open_mfdataset`.
3340

34-
The CF attribute `ancillary_variables` was not included in the list
41+
The CF attribute ``ancillary_variables`` was not included in the list
3542
due to the variables listed there being associated primarily with the
3643
variable with the attribute, rather than with the dimensions.
3744

38-
.. _Climate and Forecast (CF) conventions: http://cfconventions.org
39-
4045
.. _metpy_accessor:
4146

4247
CF-compliant coordinate variables

doc/whats-new.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ Breaking changes
3333
are now automatically set as coordinate variables. These attributes
3434
are moved to :py:attr:`DataArray.encoding` from
3535
:py:attr:`DataArray.attrs`. This behaviour is controlled by the
36-
`decode_coords` kwarg to :py:func:`open_dataset` and
37-
:py:func:`open_mfdataset`. The precise list of variables is in
36+
``decode_coords`` kwarg to :py:func:`open_dataset` and
37+
:py:func:`open_mfdataset`. The full list of decoded attributes is in
3838
:ref:`weather-climate` (:pull:`2844`, :issue:`3689`)
3939

4040

xarray/backends/api.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -355,8 +355,8 @@ def open_dataset(
355355
removed) if they have no corresponding variable and if they are only
356356
used as the last dimension of character arrays.
357357
decode_coords : bool, optional
358-
If True, decode the 'coordinates' attribute to identify coordinates in
359-
the resulting dataset.
358+
Use the 'coordinates', 'grid_mapping', 'bounds' and other attributes
359+
on variables (or the dataset itself) to identify coordinate variables.
360360
engine : {"netcdf4", "scipy", "pydap", "h5netcdf", "pynio", "cfgrib", \
361361
"pseudonetcdf", "zarr"}, optional
362362
Engine to use when reading files. If not provided, the default engine
@@ -614,8 +614,8 @@ def open_dataarray(
614614
removed) if they have no corresponding variable and if they are only
615615
used as the last dimension of character arrays.
616616
decode_coords : bool, optional
617-
If True, decode the 'coordinates' attribute to identify coordinates in
618-
the resulting dataset.
617+
Use the 'coordinates', 'grid_mapping', 'bounds' and other attributes
618+
on variables (or the dataset itself) to identify coordinate variables.
619619
engine : {"netcdf4", "scipy", "pydap", "h5netcdf", "pynio", "cfgrib"}, \
620620
optional
621621
Engine to use when reading files. If not provided, the default engine

0 commit comments

Comments
 (0)