v3.8 (29 Feb 2024)#
This document explains the changes made to Iris for this release (View all changes.)
v3.8 Release Highlights
The highlights for this major/minor release of Iris include:
We have significantly improved
AreaWeightedregridding performance, and added improved regridding documentation (see Which Regridder to Use).We have improved
Cubeattributeshandling to better preserve local and global attribute metadata.We have implemented the
iris.fileformats.netcdf.loader.CHUNK_CONTROLcontext manager to offer greater control to NetCDF chunking (see NetCDF I/O Handling in Iris).We have added functionality to mask cubes using shapefiles via
iris.util.mask_cube_from_shapefile()(see Masking from a shapefile).We have added
ignore_axisto allow for preventingguess_coord_axis()acting on desired coordinates.We have begun adding improvements to Iris’ warnings, to prevent warning duplication.
And finally, get in touch with us on GitHub if you have any issues or feature requests for improving Iris. Enjoy!
v3.8.1 (04 Mar 2024)#
v3.8.1 Patches
The patches in this release of Iris include:
@stephenworsley fixed a potential memory leak for Iris uses of
dask.array.map_blocks(); known specifically to be a problem in theiris.analysis.AreaWeightedregridder. (PR #5767)
📢 Announcements#
@HGWright, @bjlittle and @trexfeathers (reviewers) added a CITATION.cff file to Iris and updated the citation documentation , to help users cite Iris in their work. (PR #5483)
✨ Features#
@pp-mo, @lbdreyer and @trexfeathers improved
Cubeattributeshandling to better preserve the distinction between dataset-level and variable-level attributes, allowing file-Cube-file round-tripping of NetCDF attributes. SeeCubeAttrsDict, NetCDFsave()andFuturefor more. (PR #5152, split attributes project)@rcomer rewrote
broadcast_to_shape()so it now handles lazy data. (PR #5307)@trexfeathers and @HGWright (reviewer) sub-categorised all Iris’
UserWarnings for richer filtering. The full index of sub-categories can be seen here:iris.warnings. (PR #5498, PR #5760)@trexfeathers added the
ObliqueMercatorandRotatedMercatorcoordinate systems, complete with NetCDF loading and saving. (PR #5548)@trexfeathers added the
use_year_at_season_startparameter toiris.coord_categorisation.add_season_year(). Whenuse_year_at_season_start==True: seasons spanning the year boundary (e.g. Winter - December to February) will be assigned to the preceding year (e.g. the year of December) instead of the following year (the default behaviour). (PR #5573)@HGWright added
ignore_axisto allow manual intervention preventingguess_coord_axis()from acting on a coordinate. @trexfeathers documented this. (PR #5551, PR #5744)@pp-mo, @trexfeathers and @ESadek-MO added more control over NetCDF chunking with the use of the
iris.fileformats.netcdf.loader.CHUNK_CONTROLcontext manager. (PR #5588)@acchamber and @trexfeathers (reviewer) added
iris.util.mask_cube_from_shapefile(). This builds on the original work of @ckmo, @david-bentley, @jmendesmetoffice, @evyve and @pelson for the UK Met Office ASCEND library. See Masking from a shapefile for documentation. (PR #5470)@trexfeathers updated to the latest CF Standard Names Table v84 (19 January 2024). (PR #5761)
🐛 Bugs Fixed#
@scottrobinson02 fixed the output units when dividing a coordinate by a cube. (Issue #5305, PR #5331)
@ESadek-MO has updated
iris.tests.graphics.idiffto stop duplicated file names preventing acceptance. (Issue #5098, PR #5482)@acchamber and @rcomer modified 2D plots so that time axes and their ticks have more sensible default labels. (Issue #5426, PR #5561)
@rcomer and @trexfeathers (reviewer) added handling for realization coordinates when saving pp files (Issue #4747, PR #5568)
@ESadek-MO has updated
iris.fileformats._nc_load_rules.helpersto lessen warning duplication. (Issue #5536, PR #5685)@bjlittle fixed coordinate construction in the NetCDF loading pipeline to ensure that bounds have the same units as the associated points. (Issue #1801, PR #5746)
💣 Incompatible Changes#
@bouweandela and @trexfeathers (reviewer) updated
Cubecomparison so equality is now possible between cubes with data containing anumpy.nan. e.g.Cube([np.nan, 1.0]) == Cube([np.nan, 1.0])will now evaluate toTrue, while previously this would have beenFalse. (PR #5713)
🚀 Performance Enhancements#
@stephenworsley improved the speed of
AreaWeightedregridding. (PR #5543)@bouweandela made
iris.util.array_equal()faster when comparing lazy data from file. This will also speed up coordinate comparison. (PR #5610)@bouweandela changed
iris.coords.Coord.cell()so it does not realize all coordinate data and only loads a single cell instead. (PR #5693)@rcomer and @trexfeathers (reviewer) modified
pearsonr()so it preserves lazy data in all cases and also runs a little faster. (PR #5638)@bouweandela made comparing coordinates and arrays to themselves faster. (PR #5691)
@bouweandela and @trexfeathers (reviewer) made comparing cubes to themselves faster. (PR #5713)
🔥 Deprecations#
N/A
🔗 Dependencies#
@bjlittle enforced the minimum pin of
numpy>1.21in accordance with the NEP29 Drop Schedule. (PR #5525)@bjlittle enforced the minimum pin of
numpy>1.22in accordance with the NEP29 Drop Schedule. (PR #5668)@bjlittle updated
ubuntuandmambaforgeto the latest versions forreadthedocs(PR #5702)
📚 Documentation#
@trexfeathers documented the intended use of warnings filtering with Iris. See Filtering Warnings. (PR #5509)
@rcomer updated the Global Average Annual Temperature Maps to show how a colourbar may steal space from multiple axes. (PR #5537)
@tkknight improved the top navgation bar alignment and amount of links shown. Also improved how the warning banner is implemented. (PR #5505 and PR #5508)
@ESadek-MO added a phrasebook for synonymous terms used in similar packages. (PR #5564)
@ESadek-MO and @trexfeathers created a technical paper for NetCDF saving and loading, NetCDF I/O Handling in Iris with a section on chunking, and placeholders for further topics. (PR #5588)
@bouweandela updated all hyperlinks to https. (PR #5621)
@ESadek-MO created an index page for Further Topics, and relocated all ‘Technical Papers’ into Further Topics. (PR #5602)
@trexfeathers made drop-down icons visible to show which pages link to ‘sub-pages’. (PR #5684)
@trexfeathers improved the documentation of acceptable
Cubestandard names iniris.analysis.calculus.curl(). (PR #5680)@tkknight added ruff documentation in the Continuous Integration (CI) Testing of the Developers Guide. (PR #5701)
@tkknight configured the API documentation to show 2 levels for the ToC (Table of Contents) for each page. (PR #5714)
💼 Internal#
@trexfeathers and @ESadek-MO (reviewer) performed a suite of fixes and improvements for benchmarking, primarily to get on demand pull request benchmarking working properly. (Main pull request: PR #5437, more detail: PR #5430, PR #5431, PR #5432, PR #5434, PR #5436)
@trexfeathers set a number of memory benchmarks to be on-demand, as they were vulnerable to false positives in CI runs. (PR #5481)
@acchamber and @ESadek-MO resolved several deprecation to reduce number of warnings raised during tests. (PR #5493, PR #5511)
@trexfeathers replaced all uses of the
logging.WARNINGlevel, in favour of using Python warnings, following team agreement. (PR #5488)@trexfeathers adapted benchmarking to work with ASV
>=v0.6by no longer using the--strictargument. (PR #5496)@fazledyn-or replaced
NotImplementedErrorwithNotImplementedas a proper method call. (PR #5544)@bjlittle corrected various comment spelling mistakes detected by codespell. (PR #5546)
@rcomer reduced the size of the conda environment used for testing. (PR #5606)
@trexfeathers and @pp-mo improved how the conda-forge feedstock release candidate branch is managed, via: Release Do-Nothing Script. (PR #5515)
@bjlittle adopted and configured the ruff linter. (PR #5623)
@bjlittle configured the
line-length = 88for black, isort and ruff. (PR #5632)@tkknight and @bjlittle (reviewer) updated codebase to be compliant with almost all of the rules for ruff pydocstyle. (SciTools/iris#5625)
@tkknight and @bjlittle (reviewer) updated codebase to ensure docstrings that are not covered by the ruff checks, are consistent with numpydocstyle. (Issue #4721)