Skip to content

Commit dbdcd41

Browse files
committed
Make cube_delta a lazy operation.
1 parent e31fdec commit dbdcd41

File tree

5 files changed

+9
-6
lines changed

5 files changed

+9
-6
lines changed

docs/src/common_links.inc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@
6767
.. _@HGWright: https://github.com/HGWright
6868
.. _@jamesp: https://github.com/jamesp
6969
.. _@jonseddon: https://github.com/jonseddon
70+
.. _@jrackham-mo: https://github.com/jrackham-mo
7071
.. _@jvegasbsc: https://github.com/jvegasbsc
7172
.. _@lbdreyer: https://github.com/lbdreyer
7273
.. _@marqh: https://github.com/marqh

docs/src/whatsnew/3.11.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,6 @@ v3.11.1 (19 Dec 2024)
192192
Whatsnew author names (@github name) in alphabetical order. Note that,
193193
core dev names are automatically included by the common_links.inc:
194194
195-
.. _@jrackham-mo: https://github.com/jrackham-mo
196-
197195
198196
.. comment
199197
Whatsnew resources in alphabetical order:

docs/src/whatsnew/3.12.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,6 @@ v3.12.3 (22 Aug 2025)
288288
289289
.. _@fnattino: https://github.com/fnattino
290290
.. _@jfrost-mo: https://github.com/jfrost-mo
291-
.. _@jrackham-mo: https://github.com/jrackham-mo
292291
.. _@stefsmeets: https://github.com/stefsmeets
293292
.. _@valeriupredoi: https://github.com/valeriupredoi
294293

docs/src/whatsnew/latest.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,11 @@ This document explains the changes made to Iris for this release
5959
:func:`~iris.cube.Cube.slices` to work with dataless cubes.
6060
(:issue:`6725`, :pull:`6724`)
6161

62+
#. `@trexfeathers`_ and `@jrackham-mo`_ added support for lazy calculation in
63+
:func:`iris.analysis.calculus.cube_delta` (used in the
64+
:func:`~iris.analysis.calculus.differentiate` function). (:issue:`6734`,
65+
:pull:`6772`)
66+
6267

6368
🐛 Bugs Fixed
6469
=============

lib/iris/analysis/calculus.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ def cube_delta(cube, coord):
149149
.. note:: Missing data support not yet implemented.
150150
151151
.. note::
152-
This function does not maintain laziness when called; it realises data.
152+
This function maintains laziness when called; it does not realise data.
153153
See more at :doc:`/userguide/real_and_lazy_data`.
154154
155155
"""
@@ -175,7 +175,7 @@ def cube_delta(cube, coord):
175175
# Calculate the actual delta, taking into account whether the given
176176
# coordinate is circular.
177177
delta_cube_data = delta(
178-
cube.data, delta_dim, circular=getattr(coord, "circular", False)
178+
cube.core_data(), delta_dim, circular=getattr(coord, "circular", False)
179179
)
180180

181181
# If the coord/dim is circular there is no change in cube shape
@@ -260,7 +260,7 @@ def differentiate(cube, coord_to_differentiate):
260260
.. note:: Spherical differentiation does not occur in this routine.
261261
262262
.. note::
263-
This function does not maintain laziness when called; it realises data.
263+
This function maintains laziness when called; it does not realise data.
264264
See more at :doc:`/userguide/real_and_lazy_data`.
265265
266266
"""

0 commit comments

Comments
 (0)