v3.10 (13 Aug 2024)#

This document explains the changes made to Iris for this release (View all changes.)

v3.10 Release Highlights

The highlights for this minor release of Iris include:

  • Breaking Change: We have moved all of the mesh API from iris.experimental.ugrid to iris.mesh. This is no longer experimental making this public supported API.

  • We have made a suite of mesh improvements, there is a separate entry below for each of these changes .

  • We have made guess_bounds() capable of setting bounds to the start and end of months and years.

  • We have significantly reduced warning noise during NetCDF loading. The datum FutureWarning will now only be raised if the datum_support Future flag is disabled AND a datum is present on the loaded NetCDF grid mapping.

  • Checkout the performance enhancements section for an array of improvements to the performance of Iris. Special thanks to the ESMValTool devs for these contributions.

And finally, get in touch with us on GitHub if you have any issues or feature requests for improving Iris. Enjoy!

📢 Announcements#

  1. Breaking Change: We have moved all of the mesh API from iris.experimental.ugrid to iris.mesh. This is no longer experimental making this public supported API. Future changes will honour Semantic Versioning - i.e. breaking changes will only be in major releases, and ideally will be previewed via iris.Future flags.

  2. Note that Iris is currently pinned to NumPy <2, we hope to unpin this in the next minor release (Iris v3.11).

✨ Features#

  1. @ESadek-MO updated the error messages in iris.cube.CubeList.concatenate() to better explain the error. (PR #6005)

  2. @trexfeathers added the collapsed() method to MeshCoord, enabling collapsing of the Cube mesh_dim (see Collapsing Entire Data Dimensions). (Issue #5377, PR #6003)

  3. @pp-mo made a MeshCoord inherit a coordinate system from its location coord, as it does its metadata. N.B. mesh location coords can not however load a coordinate system from netcdf at present, as this needs the ‘extended’ grid-mappping syntax – see : Issue #3388. (Issue #5562, PR #6016)

  4. @HGWright added the monthly and yearly options to the guess_bounds() method. (Issue #4864, PR #6090)

  5. @HGWright updated to the latest CF Standard Names Table v85 (30 July 2024). (PR #6100)

🐛 Bugs Fixed#

  1. @bouweandela updated the chunktype of Dask arrays, so it corresponds to the array content. (PR #5801)

  2. @rcomer made the WPERCENTILE aggregator work with rolling_window(). (Issue #5777, PR #5825)

  3. @pp-mo corrected the use of mesh dimensions when saving with multiple meshes. (Issue #5908, PR #6004)

  4. @trexfeathers fixed the datum FutureWarning to only be raised if the datum_support Future flag is disabled AND a datum is present on the loaded NetCDF grid mapping. (Issue #5749, PR #6050)

💣 Incompatible Changes#

  1. @rcomer removed the target parameter from as_fields() and save_pairs_from_cube() because it had no effect. (PR #5783)

  2. @stephenworsley made masked arrays on Iris objects now compare as equal precisely when all unmasked points are equal and when the masks are identical. This is due to changes in array_equal() which previously ignored masks entirely. (PR #4457)

  3. @trexfeathers renamed the Mesh class to MeshXY, in preparation for a future more flexible parent class (Mesh). (Issue #6052 PR #6056)

  4. @stephenworsley replaced the include_nodes, include_edges and include_faces arguments with a single location argument in the Mesh methods coord(), coords() and remove_coords(). (PR #6055)

  5. @pp-mo moved all the mesh API from the iris.experimental.ugrid module to to iris.mesh, making this public supported API. Note that the iris.experimental.ugrid.Mesh class is renamed as iris.mesh.MeshXY, to allow for possible future mesh types with different properties to exist as subclasses of a common generic Mesh class. (Issue #6057, PR #6061, PR #6077)

  6. @pp-mo and @stephenworsley Turned on UGRID loading by default, effectively removing the need for and deprecating the PARSE_UGRID_ON_LOAD() context manager. (PR #6054, PR #6088)

🚀 Performance Enhancements#

  1. @bouweandela added the option to specify the Dask chunks of the target array in iris.util.broadcast_to_shape(). (PR #5620)

  2. @schlunma allowed iris.analysis.cartography.area_weights() to return dask arrays with arbitrary chunks. (PR #5658)

  3. @bouweandela made iris.cube.Cube.rolling_window() work with lazy data. (PR #5795)

  4. @bouweandela updated iris.cube.CubeList.concatenate() so it keeps ancillary variables and cell measures lazy. (PR #6010)

  5. @bouweandela made iris.cube.CubeList.concatenate() faster for cubes that have coordinate factories. (PR #6038)

🔥 Deprecations#

None!

🔗 Dependencies#

  1. @tkknight removed the pin for sphinx <=5.3, so the latest should now be used, currently being v7.2.6. (PR #5901)

  2. @trexfeathers updated the iris.experimental.geovista documentation’s use of geovista.geodesic.BBox to be compatible with GeoVista v0.5, as well as previous versions. (PR #6064)

  3. @pp-mo temporarily pinned matplotlib to “>=3.5, !=3.9.1”, to avoid current CI test failures on plot results, apparently due to a matplotlib bug. See : matplotlib/matplotlib#28567 (PR #6065)

  4. Note that Iris is currently pinned to NumPy <2, we hope to unpin this in the next minor release (Iris v3.11).

📚 Documentation#

  1. @hsteptoe added more detailed examples to Cube functions slices() and slices_over(). (PR #5735)

💼 Internal#

  1. @bouweandela removed a workaround in merge() for an issue with dask.array.stack() which has been solved since 2017. (PR #5923)

  2. @trexfeathers introduced a temporary fix for Airspeed Velocity’s deprecated use of the conda --force argument. To be removed once airspeed-velocity/asv#1397 is merged and released. (PR #5931)

  3. @trexfeathers created iris.tests.stock.realistic_4d_w_everything(); providing a Cube aimed to exercise as much of Iris as possible. (PR #5949)

  4. @trexfeathers deactivated any small ‘unit-style’ benchmarks for default benchmark runs, and introduced larger more ‘real world’ benchmarks where coverage was needed. (PR #5949).

  5. @trexfeathers made a Nox benchmarks session as the recommended entry point for running benchmarks. (PR #5951)

  6. @ESadek-MO added further benchmarks for aggregation and collapse. (PR #5954)

  7. @trexfeathers set the benchmark data generation environment to automatically install iris-test-data during setup. (PR #5958)

  8. @pp-mo reworked benchmark peak-memory measurement to use the tracemalloc package. (PR #5948)

  9. @pp-mo added a benchmark ‘trialrun’ sub-command, to quickly test benchmarks during development. (PR #5957)

  10. @pp-mo moved several memory-measurement benchmarks from ‘on-demand’ to the standard set, in hopes that use of ‘tracemalloc’ (PR #5948) makes the results consistent enough to monitor for performance changes. (PR #5959)

  11. @rcomer made some slices_over() tests go faster (PR #5973)

  12. @bouweandela enabled mypy checks for type hints. The entire team would like to thank Bouwe for putting in the hard work on an unglamorous but highly valuable contribution. (PR #5956)

  13. @trexfeathers re-wrote the delegated ASV environment plugin to reduce complexity, remove unnecessary slow operations, apply the least-surprise principle, be more robust against failures, and improve the ability to benchmark historic commits (especially older Python versions). (PR #5963)

  14. @bouweandela made some tests for izip() faster. (PR #6041)