You are viewing the latest unreleased documentation 3.10.0.dev41. You can switch to a stable version.

v3.3 (1 Sep 2022)#

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

v3.10.0.dev41 v3.3.0 Release Highlights

The highlights for this minor release of Iris include:

  • We’ve added support for datums, loading them from NetCDF when the iris.FUTURE.datum_support flag is set.

  • We’ve greatly improved the speed of linear interpolation.

  • We’ve added the function iris.pandas.as_cubes() for richer conversion from Pandas.

  • We’ve improved the functionality of iris.util.mask_cube().

  • We’ve improved the functionality and performance of the iris.analysis.PERCENTILE aggregator.

  • We’ve completed implementation of our Benchmarking infrastructure.

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

v3.3.1 (29 Sep 2022)#

v3.3.1 Patches

The patches in this release of Iris include:

  1. @pp-mo fixed the Jupyter notebook display of CubeList. (Issue #4973, PR #4976)

  2. @pp-mo fixed a bug in NAME loaders where data with no associated statistic would load as a cube with invalid cell-methods, which cannot be printed or saved to netcdf. (Issue #3288, PR #4933)

  3. @pp-mo ensured that iris.cube.Cube.cell_methods must always be an iterable of iris.coords.CellMethod objects (PR #4933).

  4. @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 #4992)

  5. @trexfeathers introduced the netcdf4!=1.6.1 pin to avoid a problem with segfaults. (PR #4992)

📢 Announcements#

  1. Welcome to @krikru who made their first contribution to Iris 🎉

✨ Features#

  1. @schlunma added weighted aggregation over “group coordinates”: aggregated_by() now accepts the keyword weights if a WeightedAggregator is used. (Issue #4581, PR #4589)

  2. @wjbenfold added support for false_easting and false_northing to Mercator. (Issue #3107, PR #4524)

  3. @rcomer and @wjbenfold (reviewer) implemented lazy aggregation for the iris.analysis.PERCENTILE aggregator. (PR #3901)

  4. @pp-mo fixed cube arithmetic operation for cubes with meshes. (Issue #4454, PR #4651)

  5. @wjbenfold added support for CF-compliant treatment of standard_parallel and scale_factor_at_projection_origin to Mercator. (Issue #3844, PR #4609)

  6. @wjbenfold added support datums associated with coordinate systems (e.g. GeogCS other subclasses of CoordSystem). Loading of datum information from a netCDF file only happens when the iris.FUTURE.datum_support flag is set. (Issue #4619, PR #4704)

  7. @wjbenfold and @stephenworsley (reviewer) added a maximum run length aggregator (MAX_RUN). (PR #4676)

  8. @wjbenfold and @rcomer (reviewer) added a climatological keyword to aggregated_by() that causes the climatological flag to be set and the point for each cell to equal its first bound, thereby preserving the time of year. (Issue #1422, Issue #4098, Issue #4665, PR #4723)

  9. @wjbenfold and @pp-mo (reviewer) implemented the PolarStereographic CRS. (Issue #4770, PR #4773)

  10. @rcomer and @wjbenfold (reviewer) enabled passing of the numpy.percentile() keywords through the PERCENTILE aggregator. (PR #4791)

  11. @wjbenfold and @bjlittle (reviewer) implemented iris.plot.fill_between() and iris.quickplot.fill_between(). (Issue #3493, PR #4647)

  12. @rcomer and @bjlittle (reviewer) re-wrote iris.util.mask_cube() to provide lazy evaluation and greater flexibility with respect to input types. (Issue #3936, PR #4889)

  13. @stephenworsley and @lbdreyer added a new kwarg expand_extras to iris.util.new_axis() which can be used to specify instances of AuxCoord, CellMeasure and AncillaryVariable which should also be expanded to map to the new axis. (PR #4896)

  14. @stephenworsley updated to the latest CF Standard Names Table v79 (19 March 2022). (PR #4910)

  15. @trexfeathers and @lbdreyer (reviewer) added iris.pandas.as_cubes(), which provides richer conversion from Pandas Series / DataFrames to one or more Cubes. This includes: n-dimensional datasets, AuxCoords, CellMeasures, AncillaryVariables, and multi-dimensional coordinates. (PR #4890)

🐛 Bugs Fixed#

  1. @rcomer reverted part of the change from PR #3906 so that iris.plot.plot() no longer defaults to placing a “Y” coordinate (e.g. latitude) on the y-axis of the plot. (Issue #4493, PR #4601)

  2. @rcomer enabled passing of scalar objects to plot() and scatter(). (PR #4616)

  3. @rcomer fixed aggregated_by() with mdtol for 1D cubes where an aggregated section is entirely masked, reported at Issue #3190. (PR #4246)

  4. @rcomer ensured that a matplotlib.axes.Axes’s position is preserved when Iris replaces it with a cartopy.mpl.geoaxes.GeoAxes, fixing Issue #1157. (PR #4273)

  5. @rcomer fixed nearest_neighbour_index() for edge cases where the requested point is float and the coordinate has integer bounds, reported at Issue #2969. (PR #4245)

  6. @rcomer modified bounds setting on DimCoord instances so that the order of the cell bounds is automatically reversed to match the coordinate’s direction if necessary. This is consistent with the Bounds for 1-D coordinate variables subsection of the Cell Boundaries section of the CF Conventions and ensures that contiguity is preserved if a coordinate’s direction is reversed. (Issue #3249, Issue #423, Issue #4078, Issue #3756, PR #4466)

  7. @wjbenfold and @evertrol prevented an AttributeError being logged to stderr when a CFReader that fails to initialise is garbage collected. (Issue #3312, PR #4646)

  8. @wjbenfold fixed plotting of circular coordinates to extend kwarg arrays as well as the data. (Issue #466, PR #4649)

  9. @wjbenfold and @rcomer (reviewer) corrected the axis on which masking is applied when an aggregator adds a trailing dimension. (PR #4755)

  10. @rcomer and @pp-mo ensured that all methods to create or modify a iris.cube.CubeList check that it only contains cubes. According to code comments, this was supposedly already the case, but there were several bugs and loopholes. (Issue #1897, PR #4767)

  11. @rcomer modified cube arithmetic to handle mismatches in the cube’s data array type. This prevents masks being lost in some cases and therefore resolves Issue #2987. (PR #3790)

  12. @krikru and @rcomer updated iris.quickplot such that the colorbar is added to the correct axes when specified as a keyword argument to a plotting routine. Otherwise, by default the colorbar will be added to the current axes of the current figure. (PR #4894)

  13. @rcomer and @bjlittle (reviewer) modified iris.util.mask_cube() so it either works in place or returns a new cube (Issue #3717, PR #4889)

💣 Incompatible Changes#

  1. @rcomer and @bjlittle (reviewer) updated Iris’s calendar handling to be consistent with cf-units version 3.1. In line with the Calendar section in version 1.9 of the CF Conventions, we now use “standard” rather than the deprecated “gregorian” label for the default calendar. Units may still be instantiated with calendar="gregorian" but their calendar attribute will be silently changed to “standard”. This may cause failures in code that explicitly checks the calendar attribute. (PR #4847)

🚀 Performance#

  1. @wjbenfold added caching to the calculation of the points array in a DimCoord created using from_regular(). (PR #4698)

  2. @wjbenfold introduced caching in _lazy_data._optimum_chunksize() and iris.fileformats.pp_load_rules._epoch_date_hours() to reduce time spent repeating calculations. (PR #4716)

  3. @pp-mo made add_aux_factory() faster. (PR #4718)

  4. @wjbenfold and @rcomer (reviewer) permitted the fast percentile aggregation method to be used on masked data when the missing data tolerance is set to 0. (Issue #4735, PR #4755)

  5. @wjbenfold improved the speed of linear interpolation using iris.analysis.trajectory.interpolate() (PR #4366)

  6. NumPy v1.23 behaviour changes mean that iris.experimental.ugrid.utils.recombine_submeshes() now uses ~3x as much memory; testing shows a ~16-million point mesh will now use ~600MB. Investigated by @pp-mo and @trexfeathers. (Issue #4845)

🔥 Deprecations#

  1. @trexfeathers and @lbdreyer (reviewer) deprecated iris.pandas.as_cube() in favour of the new iris.pandas.as_cubes() - see ✨ Features for more details. (PR #4890)

🔗 Dependencies#

  1. @rcomer introduced the nc-time-axis >=1.4 minimum pin, reflecting that we no longer use the deprecated nc_time_axis.CalendarDateTime when plotting against time coordinates. (PR #4584)

  2. @wjbenfold and @bjlittle (reviewer) unpinned pillow. (PR #4826)

  3. @rcomer introduced the cf-units >=3.1 minimum pin, reflecting the alignment of calendar behaviour in the two packages (see Incompatible Changes). (PR #4847)

  4. @bjlittle introduced the sphinx-gallery >=0.11.0 minimum pin. (PR #4885)

  5. @trexfeathers updated the install process to work with setuptools >=v64, making v64 the minimum compatible version. (PR #4903)

  6. @stephenworsley and @trexfeathers introduced the shapely !=1.8.3 pin, avoiding a bug caused by its interaction with cartopy. (PR #4911, PR #4917)

📚 Documentation#

  1. @tkknight added a page to show the issues that have been voted for. See Voted Issues. (Issue #3307, PR #4617)

  2. @wjbenfold added a note about fixing proxy URLs in lockfiles generated because dependencies have changed. (PR #4666)

  3. @lbdreyer moved most of the User Guide’s iris.Constraint examples from Loading Iris Cubes to Cube Extraction and added an example of constraining on bounded time. (PR #4656)

  4. @tkknight adopted the PyData Sphinx Theme for the documentation. (Discussion #4344, PR #4661)

  5. @tkknight updated our developers guidance to show our intent to adopt numpydoc strings and fixed some API documentation rendering. See Docstrings. (Issue #4657, PR #4689)

  6. @trexfeathers and @lbdreyer added a page with examples of converting various mesh formats into the Iris Mesh Data Model. (PR #4739)

  7. @rcomer updated the “Load a Time Series of Data From the NEMO Model” gallery example. (PR #4741)

  8. @wjbenfold added developer documentation to highlight some of the utilities offered by iris.IrisTest and how to update CML and other output files. (Issue #4544, PR #4600)

  9. @trexfeathers and @abooton modernised the Iris logo to be SVG format. (PR #3935)

💼 Internal#

  1. @trexfeathers and @pp-mo finished implementing a mature benchmarking infrastructure (see Benchmarking), building on 2 hard years of lessons learned 🎉. (PR #4477, PR #4562, PR #4571, PR #4583, PR #4621)

  2. @wjbenfold used the aforementioned benchmarking infrastructure to introduce deep (large 3rd dimension) loading and realisation benchmarks. (PR #4654)

  3. @wjbenfold made iris.tests.stock.simple_1d() respect the with_bounds argument. (PR #4658)

  4. @lbdreyer replaced nose with pytest as Iris’ test runner. (PR #4734)

  5. @bjlittle and @trexfeathers (reviewer) migrated to GitHub Actions for Continuous-Integration. (PR #4503)

  6. @pp-mo made tests run certain linux executables from the Python env, specifically ncdump and ncgen. These could otherwise fail when run in IDEs such as PyCharm and Eclipse, which don’t automatically include the Python env bin in the system PATH. (PR #4794)

  7. @trexfeathers and @pp-mo improved generation of stock NetCDF files. (PR #4827, PR #4836)

  8. @rcomer removed some now redundant testing functions. (PR #4838, PR #4878)

  9. @bjlittle and @jamesp (reviewer) and @lbdreyer (reviewer) extended the GitHub Continuous-Integration to cover testing on py38, py39, and py310. (PR #4840)

  10. @bjlittle and @trexfeathers (reviewer) adopted setuptools-scm for automated iris package versioning. (PR #4841)

  11. @bjlittle and @trexfeathers (reviewer) added building, testing and publishing of iris PyPI sdist and binary wheels as part of our GitHub Continuous-Integration. (PR #4849)

  12. @rcomer and @wjbenfold (reviewer) used pytest parametrization to streamline the gallery test code. (PR #4792)

  13. @trexfeathers improved settings to better working with setuptools_scm. (PR #4925)