v3.12 (24 Mar 2025)#
This document explains the changes made to Iris for this release (View all changes.)
v3.12 Release Highlights
The highlights for this minor release of Iris include:
Iris now supports Python version 3.13, and has dropped support for Python 3.10, as per the Scientific Python SPEC 0 schedule.
Data is now optional in a cube, which can simplify the regridding process and lays the ground work for future features. See Issue #4447.
Added
iris.loading.LOAD_PROBLEMSto capture objects which could not be loaded correctly, to assist in fixing loading problems via the Iris API. Several loading operations no longer raise their own warnings; instead their loading problems are captured in the common object, and a single generic warning is raised. Seeiris.loading.LoadProblems.Extended the features of
iris.LoadPolicyandiris.LOAD_POLICY, which are now renamed toiris.CombineOptionsandiris.COMBINE_POLICYrespectively, and gave access to the mechanism in the newiris.util.combine_cubes()utility.Added two new utility functions,
iris.util.combine_cubes()andiris.util.equalise_cubes(), to assist with merge/concatenate, as well as other features to improve loading control.
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!
v3.12.1 (30 Apr 2025)#
v3.12.1 Patches
The patches in this release of Iris include:
Iris no longer supports the
setup.py developcommand, due to an incompatibility with the latest version of Setuptools.setup.pycommands of this sort are deprecated, and the recommended replacement fordevelophas beenpip install -efor several years now. See Running setuptools commands for more.
v3.12.2 (09 May 2025)#
v3.12.2 Patches
The patches in this release of Iris include:
Iris is now compatible with Dask versions
2025.4.0and above. We are aware that previous incompatibilities had been affecting load and save operations for many users.
v3.12.3 (22 Aug 2025)#
v3.12.3 Patches
The patches in this release of Iris include:
Improved compatibility with NumPy >= v1.25 for array comparisons, in response to deprecations around un-broadcastable arrays. Delivered in a patch release to meet a time-critical need for a specific user. See the full entry for more.
π’ Announcements#
N/A
β¨ Features#
@pp-mo renamed the
iris.LoadPolicyasiris.CombineOptionsandiris.LOAD_POLICYasiris.COMBINE_POLICY, though the original names remain functional (and refer to the same things) for now. (Issue #6203, PR #6334)@pp-mo added new
combine()andcombine_cube()methods of aCubeListas an alternative way of accessing thecombine_cubes()mechanism. (Issue #6203, PR #6334)@pp-mo added a new utility function
combine_cubes(), to give general public access to the combine merge/concatenate mechanism introduced for generalised loading support viairis.LoadPolicyin the Iris 3.11 release. (Issue #6203, PR #6334)@pp-mo overhauled the
iris.LoadPolicyfacility by adding a newequalise_cubes_kwargkeyword, enabling it to call theequalise_cubes()utility function as one of its processing stages. (Issue #6203, PR #6334)@pp-mo added a new utility function
equalise_cubes(), to help with aligning cubes so they can merge / concatenate. (Issue #6248, PR #6257)@fnattino added the lazy median aggregator
iris.analysis.MEDIANbased on the implementation discussed by @rcomer and @stefsmeets in Issue #4039 (PR #6167).@ESadek-MO made
dataoptional in aCube, whenshapeis provided. A dataless cube may be used as a target in regridding, or as a template cube to add data to at a later time.This is the first step in providing dataless cube support. Currently, most cube methods wonβt work with a dataless cube and will raise an exception. However,
transpose()will work, as willcopy(). Note that,cube.copy(data=iris.DATALESS)will provide a dataless copy of a cube. (Issue #4447, PR #6253)@ESadek-MO added the
iris.quickplotfooterkwarg to render text in the bottom right of the plot figure. (Issue #6247, PR #6332)@trexfeathers and @pp-mo added
iris.loading.LOAD_PROBLEMSto capture objects that could not be loaded correctly, increasing transparency and helping users to fix loading problems via the Iris API. As a first pass, this is currently limited tostandard_nameand dimension coordinates from NetCDF files. (Issue #6317, PR #6338)
π Bugs Fixed#
@rcomer added handling for string stash codes when saving pp files. (Issue #6239, PR #6289)
@trexfeathers and @jrackham-mo added a check for dtype castability when saving NetCDF
valid_range,valid_minandvalid_maxattributes - older NetCDF formats e.g.NETCDF4_CLASSICsupport a maximum precision of 32-bit. (Issue #6178, PR #6343)@ukmo-ccbunney added support for loading NetCDF variable-length string types and size hinting for better lazy loading (Issue #6149, PR #6340)
@bouweandela fixed handling of masked Dask arrays in
array_equal().@trexfeathers removed the custom
setup.py developcommand, since Setuptools are deprecatingdevelop; developers should instead usepip install -e .. See Running setuptools commands for more. (PR #6424)
π£ Incompatible Changes#
iris.tests.IrisTestis being replaced byiris.tests._shared_utils. Once conversion from unittest to pytest is completed,iris.tests.IrisTestclass will be deprecated.@trexfeathers and @pp-mo significantly changed Irisβ NetCDF loading warnings as part of the
LOAD_PROBLEMSwork. Several loading operations no longer raise their own warnings; instead their loading problems are captured inLOAD_PROBLEMS. WhenLOAD_PROBLEMSis populated, a singleIrisLoadWarningis raised; see below. As a first pass, this changed behaviour is currently limited tostandard_nameand dimension coordinates from NetCDF files. (PR #6338)IrisLoadWarning: Not all file objects were parsed correctly. See iris.loading.LOAD_PROBLEMS for details.
π Performance Enhancements#
@bouweandela made loading
Cubes from NetCDF files faster. (PR #6229 and PR #6252)@fnattino enabled lazy cube interpolation using the linear and nearest-neighbour interpolators (
iris.analysis.Linearandiris.analysis.Nearest). Note that this implementation removes performance benefits linked to caching an interpolator object. While this does not break previously suggested code (instantiating and re-using an interpolator object remains possible), this is no longer an advertised feature. (PR #6084)@bouweandela made coordinate dimension lookups faster for derived coordinates. (PR #6337)
π₯ Deprecations#
N/A
π Dependencies#
@stephenworsley dropped support for
py310and adopted support forpy313as per the SPEC 0 schedule. (PR #6195)@stephenworsley and @valeriupredoi removed the pin from dask since newer versions of dask fix the bug casuing the pin. Introduced a minimum pin (2025.1.0) to avoid this bug. (PR #6342)
@trexfeathers refactored Iris loading and saving to make it compatible with Dask version
2025.4.0and above. (PR #6451)
@trexfeathers and @ukmo-ccbunney adapted array comparison in response to NumPy v1.25 deprecating comparison of un-broadcastable arrays. It is hoped that users will see no difference in behaviour, but please get in touch if you notice anything. See NumPy v1.25 expired deprecations and numpy#22707 for more. (PR #6665)
π Documentation#
@ESadek-MO and @trexfeathers created Converting From unittest to pytest as a guide for converting from
unittesttopytest. (PR #5785)@ESadek-MO and @trexfeathers created a style guide for
pytesttests, and consolidatedTest CategoriesandTesting Toolsinto Writing Tests. (Issue #5574, PR #5785)@jfrost-mo corrected
unittounitsin the docstring foriris.coords.AuxCoord. (Issue #6347, PR #6348)
πΌ Internal#
@ESadek-MO @pp-mo @bjlittle @trexfeathers and @HGWright have converted around a third of Irisβ
unitteststyle tests topytest. This is part of an ongoing effort to move fromunittesttopytest. (PR #6207, part of Issue #6212)@trexfeathers, @ESadek-MO and @HGWright heavily re-worked Release Do-Nothing Script to be more thorough and apply lessons learned from recent releases. (PR #6062)
@schlunma made lazy smart weights used for cube aggregations have the same chunks as their parent cube if broadcasting is necessary. (Issue #6285, PR #6288)
@trexfeathers improved the handling of benchmark environments, especially when working across Python versions. (PR #6329)
@trexfeathers temporarily pinned Sphinx to < 8.2. (PR #6344, Issue #6345)
@bouweandela fixed a bug in the benchmarking code that caused all benchmarks to be run with lazy data. (PR #6339)