You are viewing the latest unreleased documentation 3.9.0.dev5. You can switch to a stable version.

v3.4 (01 Dec 2022)#

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

v3.4.0 Release Highlights

The highlights for this minor release of Iris include:

  • We have archived older Iris documentation - everything before v3.0.0 - so older versions will soon no longer appear in search engines. If you need this older documentation: please see Support.

  • We have added a Glossary to the Iris documentation.

  • We have completed work to make Pandas interoperability handle n-dimensional Cubes.

  • We have begun refactoring Iris’ regridding, which has already improved performance and functionality, with more potential in future!

  • We have made several other significant 🚀 Performance Enhancements.

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

v3.4.1 (21 Feb 2023)#

v3.4.1 Patches

The patches in this release of Iris include:

  1. @trexfeathers and @pp-mo made Iris’ use of the netCDF4 library thread-safe. (PR #5095)

  2. @trexfeathers and @pp-mo removed the netCDF4 pin mentioned in 🔗 Dependencies point 3. (PR #5095)

📢 Announcements#

  1. Welcome to @ESadek-MO, @TTV-Intrepid and @hsteptoe, who made their first contributions to Iris 🎉

  2. Do you enjoy python-stratify? Did you know that Iris includes a convenience for using python-stratify with Cubes? It has been ‘experimental’ for several years now, without receiving much feedback, so it’s use it or lose it time: please try out iris.experimental.stratify and let us know what you think!

✨ Features#

  1. @ESadek-MO edited expand_filespecs() to allow expansion of non-existing paths, and added expansion functionality to save(). (Issue #4772, PR #4913)

  2. @trexfeathers and Julian Heming added new mappings between CF standard names and UK Met Office LBFC codes. (PR #4859)

  3. @pp-mo changed the metadata of a face/edge-type MeshCoord, to be same as the face/edge coordinate in the mesh from which it takes its .points. Previously, all MeshCoords took their metadata from the node coord, but only a node-type MeshCoord now does that. Also, the MeshCoord .var_name is now that of the underlying coord, whereas previously this was always None. These changes make MeshCoord more like an ordinary AuxCoord, which avoids some specific known usage problems. (Issue #4860, PR #5020)

  4. @Esadek-MO and @trexfeathers added dim coord prioritisation to _get_lon_lat_coords() in iris.analysis.cartography. This allows iris.analysis.cartography.area_weights() and project() to handle cubes which contain both dim and aux coords of the same type e.g. longitude and grid_longitude. (Issue #3916, PR #5029).

  5. @stephenworsley added the ability to regrid derived coordinates with the PointInCell regridding scheme. (PR #4807)

  6. @trexfeathers made NetCDF loading more tolerant by enabling skipping of DimCoords, AuxCoords, CellMeasures and AncillaryVariables if they cannot be added to a Cube (e.g. due to CF non-compliance). This is done via a new error class: CannotAddError (subclass of ValueError). (PR #5054)

  7. @pp-mo implemented == and != comparisons for Constraint s. A simple constraint is now == to another one constructed in the same way. However, equality is limited for more complex cases : value-matching functions must be the same identical function, and for &-combinations order is significant, i.e. (c1 & c2) != (c2 & c1). (Issue #3616, PR #3749).

  8. @hsteptoe and @trexfeathers improved iris.pandas.as_data_frame()'s conversion of Cubes to DataFrames. This includes better handling of multiple Cube dimensions, auxiliary coordinates and attribute information. Note: the improvements are opt-in, by setting the iris.FUTURE.pandas_ndim flag (see iris.Future for more). (Issue #4526, PR #4909, PR #4669, PR #5059, PR #5074)

🐛 Bugs Fixed#

  1. @rcomer and @pp-mo (reviewer) factored masking into the returned sum-of-weights calculation from SUM. (PR #4905)

  2. @schlunma fixed a bug which prevented using iris.cube.Cube.collapsed() on coordinates whose number of bounds differs from 0 or 2. This enables the use of this method on mesh coordinates. (Issue #4672, PR #4870)

  3. @bjlittle and @lbdreyer (reviewer) fixed the building of the CF Standard Names module iris.std_names for the setup.py commands develop and std_names. (Issue #4951, PR #4952)

  4. @lbdreyer and @pp-mo (reviewer) fixed the cube print out such that scalar ancillary variables are displayed in a dedicated section rather than being added to the vector ancillary variables section. Further, ancillary variables and cell measures that map to a cube dimension of length 1 are now included in the respective vector sections. (PR #4945)

  5. @rcomer removed some old redundant code that prevented determining the order of time cells. (Issue #4697, PR #4729)

  6. @stephenworsley improved the accuracy of the error messages for coord() when failing to find coordinates in the case where a coordinate is given as the argument. Similarly, improved the error messages for cell_measure() and ancillary_variable(). (Issue #4898, PR #4928)

  7. @stephenworsley fixed a bug which caused derived coordinates to be realised after calling iris.cube.Cube.aggregated_by(). (Issue #3637, PR #4947)

  8. @rcomer corrected the standard_name mapping from UM stash code m01s30i311 to indicate that this is the upward, rather than northward part of the flow. (PR #5060)

  9. @bjlittle and @trexfeathers (reviewer) fixed an issue which prevented uncompressed PP fields with additional trailing padded words in the field data to be loaded and saved. (PR #5058)

  10. @lbdreyer and @trexfeathers (reviewer) fixed the handling of data when regridding with UnstructuredNearest or calling interpolate() such that the data type and mask is preserved. (Issue #4463, PR #5062)

💣 Incompatible Changes#

  1. @trexfeathers altered testing to accept new Dask copying behaviour from dask/dask#9555 - copies of a Dask array created using da.from_array() will all compute() to a shared identical array. So creating a Cube using Cube(data=da.from_array(..., then using Cube copy(), will produce two Cubes that both return an identical array when requesting Cube data. We do not expect this to affect typical user workflows but please get in touch if you need help. (PR #5041)

  2. @trexfeathers moved iris.experimental.animate.animate() to iris.plot.animate(), in recognition of its successful use over several years since introduction. (PR #5056)

🚀 Performance Enhancements#

  1. @rcomer and @pp-mo (reviewer) increased aggregation speed for SUM, COUNT and PROPORTION on real data. (PR #4905)

  2. @bouweandela made iris.coords.Coord.cells() faster for time coordinates. This also affects iris.cube.Cube.extract(), iris.cube.Cube.subset(), and iris.coords.Coord.intersect(). (PR #4969)

  3. @bouweandela improved the speed of iris.cube.Cube.subset() / iris.coords.Coord.intersect(). (PR #4955)

  4. @stephenworsley improved the speed of the PointInCell regridding scheme. (PR #4807)

🔥 Deprecations#

  1. @hsteptoe and @trexfeathers (reviewer) deprecated iris.pandas.as_series() in favour of the new iris.pandas.as_data_frame() - see ✨ Features for more details. (PR #4669)

🔗 Dependencies#

  1. @rcomer introduced the dask >=2.26 minimum pin, so that Iris can benefit from Dask’s support for NEP13 and NEP18. (PR #4905)

  2. @trexfeathers advanced the Cartopy pin to >=0.21, as Cartopy’s change to default Transverse Mercator projection affects an Iris test. See SciTools/cartopy@fcb784d and SciTools/cartopy@8860a81 for more details. (PR #4968)

  3. @trexfeathers introduced the netcdf4<1.6.1 pin to avoid a problem with segfaults. (PR #4968, PR #5075, Issue #5016)

  4. @trexfeathers updated the Matplotlib colormap registration in iris.palette in response to a deprecation warning. Using the new Matplotlib API also means a matplotlib>=3.5 pin. (PR #4998)

  5. See 💣 Incompatible Changes for notes about dask/dask#9555.

📚 Documentation#

  1. @ESadek-MO, @TTV-Intrepid and @trexfeathers added a gallery example for zonal means plotted parallel to a cartographic plot. (PR #4871)

  2. @Esadek-MO added a key-terms Glossary page into the user guide. (PR #4902)

  3. @pp-mo added a code example for converting ORCA-gridded data to an unstructured cube. (PR #5013)

  4. @Esadek-MO added links to relevant Gallery examples within the User Guide to improve understanding. (PR #5009)

  5. @trexfeathers changed the warning header for the latest documentation to reference Read the Docs’ built-in version switcher, instead of generating its own independent links. (PR #5055)

  6. @tkknight updated the links for the Iris documentation to v2.4 and earlier to point to the archive of zip files instead. (PR #5064)

  7. @Esadek-MO began adding notes at the bottom of functions to to clarify if the function preserves laziness or not. See Issue #3292 for the ongoing checklist. (PR #5066)

💼 Internal#

  1. @rcomer removed the obsolete setUpClass method from Iris testing. (PR #4927)

  2. @bjlittle and @lbdreyer (reviewer) removed support for python setup.py test, which is a deprecated approach to executing package tests, see pypa/setuptools#1684. Also performed assorted setup.py script hygiene. (PR #4948, PR #4949, PR #4950)

  3. @pp-mo split the module iris.fileformats.netcdf into separate loader and saver submodules, just to make the code easier to handle.

  4. @trexfeathers adapted the benchmark for importing iris.palette to cope with new colormap behaviour in Matplotlib v3.6. (PR #4998)

  5. @rcomer removed a now redundant workaround for an old matplotlib bug, highlighted by Issue #4090. (PR #4999)

  6. @rcomer added the show option to the documentation Makefiles, as a convenient way for contributors to view their built documentation. (PR #5000)