Skip to content

Commit fdb4b49

Browse files
authored
Allow derived coord references to be lazy. (#6517)
* Allow derived coord references to be lazy, when the source AuxCoord is. * Small doctest fix. * Add whatsnew.
1 parent b62c743 commit fdb4b49

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

docs/src/userguide/cube_statistics.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ These areas can now be passed to the ``collapsed`` method as weights:
143143
forecast_reference_time 2009-11-19 04:00:00
144144
grid_latitude 1.5145501 degrees, bound=(0.13755022, 2.89155) degrees
145145
grid_longitude 358.74948 degrees, bound=(357.48724, 360.01172) degrees
146-
surface_altitude 399.625 m, bound=(-14.0, 813.25) m
146+
surface_altitude <lazy>+bound
147147
Cell methods:
148148
0 grid_longitude: grid_latitude: mean
149149
Attributes:
@@ -191,7 +191,7 @@ the units of the resulting cube are multiplied by an area unit:
191191
forecast_reference_time 2009-11-19 04:00:00
192192
grid_latitude 1.5145501 degrees, bound=(0.13755022, 2.89155) degrees
193193
grid_longitude 358.74948 degrees, bound=(357.48724, 360.01172) degrees
194-
surface_altitude 399.625 m, bound=(-14.0, 813.25) m
194+
surface_altitude <lazy>+bound
195195
Cell methods:
196196
0 grid_longitude: grid_latitude: sum
197197
Attributes:

docs/src/whatsnew/latest.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ This document explains the changes made to Iris for this release
4646
the behaviour when calling :attr:`iris.MeshCoord.points` and :attr:`MeshCoord.bounds`, which will return
4747
real data but will leave the :class:`iris.MeshCoord` (and attached mesh) lazy. (:issue:`4757`, :pull:`6405`)
4848

49+
#. `@pp-mo`_ made it possible for the reference surfaces of derived coordinates, like orography, to be lazy.
50+
(:pull: 6517).
51+
4952

5053
🐛 Bugs Fixed
5154
=============

lib/iris/fileformats/rules.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ def _dereference_args(factory, reference_targets, regrid_cache, cube):
159159
src, cube = _ensure_aligned(regrid_cache, src, cube)
160160
if src is not None:
161161
new_coord = iris.coords.AuxCoord(
162-
src.data,
162+
src.core_data(),
163163
src.standard_name,
164164
src.long_name,
165165
src.var_name,

0 commit comments

Comments
 (0)