Skip to content

Commit d250a64

Browse files
committed
ignore_coordinate_units
1 parent 186acb3 commit d250a64

File tree

1 file changed

+12
-15
lines changed

1 file changed

+12
-15
lines changed

cf/field.py

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14281,21 +14281,18 @@ def derivative(
1428114281

1428214282
ignore_coordinate_units: `bool`, optional
1428314283
If True then the coordinates providing the cell
14284-
spacings along the axis are assumed to dimensionless,
14285-
even if they do in fact have units. This does not
14286-
change the returned numerical values, but will alter
14287-
the units of the returned field. If False (the
14288-
default) then the coordinate units will propagate
14289-
through to the result.
14290-
14291-
If *ignore_coordinate_units* is False then the units
14292-
of the returned field construct will be the original
14293-
units divided by the coordinate units.
14294-
14295-
If *ignore_coordinate_units* is True then the units of
14296-
the returned field construct will be identical to the
14284+
spacings along the specified axis are assumed to be
14285+
dimensionless, even if they do in fact have
14286+
units. This does not change the magnitude of the
14287+
returned numerical values, but the units of the
14288+
returned field construct will be identical to the
1429714289
original units.
1429814290

14291+
If False (the default) then the coordinate units will
14292+
propagate through to the result. i.e. the units of the
14293+
returned field construct will be the original units
14294+
divided by the coordinate units.
14295+
1429914296
For example, for a field construct with units of
1430014297
``m.s-1`` and X coordinate units of ``radians``, the
1430114298
units of the X derivative will be ``m.s-1.radians-1``
@@ -14436,8 +14433,8 @@ def derivative(
1443614433
d.insert_dimension(position=1, inplace=True)
1443714434

1443814435
if ignore_coordinate_units:
14439-
# Remove the coordinate units before we calculate the
14440-
# derivative
14436+
# Remove the coordinate units from the coordinate
14437+
# differences, before we calculate the derivative.
1444114438
d.override_units(None, inplace=True)
1444214439

1444314440
# Find the derivative

0 commit comments

Comments
 (0)