@@ -12,8 +12,8 @@ Temporal Coordinates
1212
1313.. readingtime ::
1414
15- Here we provide some handy patterns and tips for working with temporal
16- coordinates i.e. , ``time `` coordinates.
15+ This page provides practical patterns and tips for working with temporal
16+ coordinates, that is , ``time `` coordinates.
1717
1818
1919Introduction
@@ -46,10 +46,10 @@ individual components:
4646* ``time `` - This is the *name * of the coordinate. The name is derived firstly
4747 from the coordinate ``standard_name ``. Failing that, the ``long_name `` is
4848 used, otherwise the ``var_name `` before defaulting to a value of ``unknown ``.
49- * ``hours since 1970-01-01 00:00:00 `` - This tells us the coordinates temporal
49+ * ``hours since 1970-01-01 00:00:00 `` - This tells us the coordinate's temporal
5050 units of measure (``hours ``) relative to its epoch (``1970-01-01 00:00:00 ``).
5151* ``[...] `` - Represents the temporal ``points ``, the values of which are not
52- displayed in this shortend summary. However, note that if the coordinate had
52+ displayed in this shortened summary. However, if the coordinate had
5353 ``bounds `` this would be represented as ``[...]+bounds ``.
5454* ``shape(6,) `` - Tells us that the coordinate has one dimension containing
5555 ``6 `` points.
@@ -60,7 +60,7 @@ We can easily inspect the ``points`` contained within our ``tcoord``::
6060 array([347926.16666667, 347926.33333333, 347926.5 , 347926.66666667,
6161 347926.83333333, 347927. ])
6262
63- However, these raw values are pretty meaningless on their own. As hinted to above,
63+ However, these raw values are difficult to interpret on their own. As noted above,
6464these ``points `` are measured in units of ``hours `` relative to the epoch
6565``1970-01-01 00:00:00 ``. The metadata defining all this information is available
6666from the ``units `` attribute of the :class: `coordinate <iris.coords.Coord> `::
@@ -74,7 +74,7 @@ from the ``units`` attribute of the :class:`coordinate <iris.coords.Coord>`::
7474 their ``units ``.
7575
7676In this case our ``tcoord `` has a ``standard `` (or ``gregorian ``) calendar and
77- we can convert its hard to understand raw values into meaningful **date **/**time **
77+ we can convert its hard-to-interpret raw values into meaningful **date **/**time **
7878(``YYYY-MM-DD HH:MM:SS ``) representations relative to its ``calendar `` and
7979epoch::
8080
@@ -87,8 +87,8 @@ epoch::
8787 dtype: float64
8888 standard_name: 'time'
8989
90- Now we can clearly see that our ``tcoord `` time interval commences on ``2009-09-09 ``
91- at ``22:10:00 `` with samples that are each ``10 `` minutes apart.
90+ Now we can clearly see that the ``tcoord `` interval starts on ``2009-09-09 `` at
91+ ``22:10:00 `` with samples spaced ``10 `` minutes apart.
9292
9393Note that our ``tcoord `` does not have any ``bounds `` associated with it::
9494
@@ -127,7 +127,7 @@ its :meth:`~iris.coords.Coord.guess_bounds` method::
127127Indexing
128128--------
129129
130- :class: `Coordinates <iris.coords.Coord> ` are *first-class- citizens * and may be
130+ :class: `Coordinates <iris.coords.Coord> ` are *first-class citizens * and may be
131131indexed akin to other ``python `` built-in types such as `lists `_ or `tuples `_.
132132
133133As an example, let's index the **last ** sample of the ``tcoord ``::
@@ -157,8 +157,8 @@ In the above example, indexing the ``tcoord`` yields a scalar
157157A **lighter-weight ** indexing solution is to leverage the :meth: `~iris.coords.Coord.cell `
158158method instead::
159159
160- >> tcell = tcoord.cell(-1)
161- >> tcell
160+ >>> tcell = tcoord.cell(-1)
161+ >>> tcell
162162 Cell(point=cftime.DatetimeGregorian(2009, 9, 9, 23, 0, 0, 0, has_year_zero=False), bound=(cftime.DatetimeGregorian(2009, 9, 9, 22, 55, 0, 0, has_year_zero=False), cftime.DatetimeGregorian(2009, 9, 9, 23, 5, 0, 0, has_year_zero=False)))
163163
164164This returns a :class: `~iris.coords.Cell ` object rather than a
@@ -206,7 +206,7 @@ To convert these ``points`` and ``bounds`` into equivalent ``tcell``
206206Iteration
207207---------
208208
209- Akin to :ref: `indexing <explanation-temporal-coordinates-indexing >`, we can also
209+ As with :ref: `indexing <explanation-temporal-coordinates-indexing >`, we can also
210210iterate over :class: `coordinates <iris.coords.Coord> ` just as you would naturally
211211with other ``python `` built-in types such as `lists `_ or `tuples `_.
212212
@@ -302,15 +302,14 @@ Depending on your workflow, you may wish to deal directly with either
302302:class: `~datetime.datetime ` objects rather than raw temporal values within
303303the ``points ``/``bounds `` of a :class: `coordinate <iris.coords.Coord> `.
304304
305- There are several different ways to convert raw temporal values, so let's
306- consolidating our understanding and enumerate the various options
307- available to us.
305+ There are several ways to convert raw temporal values, so let's consolidate
306+ our understanding and enumerate the options available to us.
308307
309308``cftime ``
310309~~~~~~~~~~
311310
312- The direct approach is to leverage either of the :meth: `~iris.coords.Coord.cell `
313- or :meth: `~iris.coords.Coord.cells ` methods . Both of which provide one or more
311+ The direct approach is to use either :meth: `~iris.coords.Coord.cell `
312+ or :meth: `~iris.coords.Coord.cells `. Both provide one or more
314313:class: `~iris.coords.Cell ` objects.
315314
316315By default a temporal :class: `~iris.coords.Cell ` will always contain
@@ -451,7 +450,7 @@ For example:
451450 Native ``matplotlib `` only supports ``python `` :class: `~datetime.datetime `
452451 compatible objects.
453452
454- Note that, :mod: `iris.plot ` and :mod: `iris.quickplot ` provide the convenience
453+ Note that :mod: `iris.plot ` and :mod: `iris.quickplot ` provide the convenience
455454of also understanding ``iris `` objects, such as coordinates and cubes. However
456455they also use the `nc-time-axis `_ package, which provides support for a `cftime `_
457456axis in `matplotlib `_.
0 commit comments