v1.10 (05 Sep 2016)#

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


  • Support has now been added for the iris_grib package, which provides GRIB format support in an optional package, separate from Iris.

    • If iris_grib is available, it will always be used in place of the older iris module iris.fileformats.grib.

    • The capabilities of iris_grib are essentially the same as the existing iris.fileformats.grib when used with iris.FUTURE.strict_grib_load=True, with only small detail differences.

    • The old iris.fileformats.grib module is now deprecated and may shortly be removed.

      • If you are already using the recommended iris.FUTURE setting iris.FUTURE.strict_grib_load=True this should not cause problems, as the new package is all-but identical.

        • However, the option iris.FUTURE.strict_grib_load is itself now deprecated, so you should remove code that sets it.

      • If, however, your code is still using the older “non-strict” grib loading, then you may need to make code changes.

        • In particular, the field object passed to load callbacks is different. See iris.fileformats.grib.message.GribMessage (the iris_grib.message.GribMessage class is the same as this, for now).

    • Please exercise your code with the new iris_grib module, and let us know of any problems you uncover, such as files that will no longer load with the new implementation.

  • iris.experimental.regrid.PointInCell.regridder() now works across coordinate systems, including non latlon systems. Additionally, the requirement that the source data X and Y coordinates be 2D has been removed. NB: some aspects of this change are backwards incompatible.

  • Plotting non-Gregorian calendars is now supported. This adds nc_time_axis as a dependency.

  • Promoting a scalar coordinate to a dimension coordinate with iris.util.new_axis() no longer loads deferred data.

  • The parsing functionality for Cell Methods from netCDF files is available as part of the iris.fileformats.netcdf module as iris.fileformats.netcdf.parse_cell_methods().

  • Support for the NameIII Version 2 file format has been added.

  • Loading netcdf data in Mercator and Stereographic projections now accepts optional extra projection parameter attributes (false_easting, false_northing and scale_factor_at_projection_origin), if they match the default values.

    • NetCDF files which define a Mercator projection where the false_easting, false_northing and scale_factor_at_projection_origin match the defaults will have the projection loaded correctly. Otherwise, a warning will be issued for each parameter that does not match the default and the projection will not be loaded.

    • NetCDF files which define a Steroegraphic projection where the scale_factor_at_projection_origin is equal to 1.0 will have the projection loaded correctly. Otherwise, a warning will be issued and the projection will not be loaded.

  • The iris.plot routines contour(), contourf(), outline(), pcolor(), pcolormesh() and points() now support plotting cubes with anonymous dimensions by specifying the numeric index of the anonymous dimension within the coords keyword argument.

    Note that the axis of the anonymous dimension will be plotted in index space.

  • NetCDF loading and saving now supports Cubes that use the LambertConformal coordinate system.

  • The experimental structured Fieldsfile loader load() has been extended to also load structured PP files.

    Structured loading is a streamlined operation, offering the benefit of a significantly faster loading alternative to the more generic iris.load() mechanism.

    Note that structured loading is not an optimised wholesale replacement of iris.load(). Structured loading is restricted to input containing contiguously ordered fields for each phenomenon that repeat regularly over the same vertical levels and times. For further details, see load()

  • iris.experimental.regrid_conservative is now compatible with ESMPy v7.

  • Saving zonal (i.e. longitudinal) means to PP files now sets the ’64s’ bit in LBPROC.

  • Loading of ‘little-endian’ PP files is now supported.

  • All appropriate iris.plot functions now handle an axes keyword, allowing use of the object oriented matplotlib interface rather than pyplot.

  • The ability to pass file format object lists into the rules based load pipeline, as used for GRIB, Fields Files and PP has been added. The iris.fileformats.pp.load_pairs_from_fields() and iris.fileformats.grib.load_pairs_from_fields() are provided to produce cubes from such lists. These lists may have been filtered or altered using the appropriate iris.fileformats modules.

  • Cubes can now have an ‘hour’ coordinate added with iris.coord_categorisation.add_hour().

  • Time coordinates from PP fields with an lbcode of the form 3xx23 are now correctly encoded with a 360-day calendar.

  • The loading from and saving to netCDF of CF cell_measure variables is supported, along with their representation within a Cube as cell_measures.

  • Cubes with anonymous dimensions can now be concatenated. This can only occur along a dimension that is not anonymous.

  • NetCDF saving of valid_range, valid_min and valid_max cube attributes is now allowed.

Bugs Fixed#

  • Altered Cell Methods to display coordinate’s standard_name rather than var_name where appropriate to avoid human confusion.

  • Saving multiple cubes with netCDF4 protected attributes should now work as expected.

  • Concatenating cubes with singleton dimensions (dimensions of size one) now works properly.

  • Fixed the grid_mapping_name and secant_latitudes handling for the LambertConformal coordinate system.

  • Fixed bug in iris.analysis.cartography.project() where the output projection coordinates didn’t have units.

  • Attempting to use iris.sample_data_path() to access a file that isn’t actually Iris sample data now raises a more descriptive error. A note about the appropriate use of sample_data_path has also been added to the documentation.

  • Fixed a bug where regridding or interpolation with the Nearest scheme returned floating-point results even when the source data was integer typed. It now always returns the same type as the source data.

  • Fixed a bug where regridding circular data would ignore any source masking. This affected any regridding using the Linear and Nearest schemes, and also iris.analysis.interpolate.linear().

  • The coord_name parameter to scalar_cell_method() is now checked correctly.

  • LBPROC is set correctly when a cube containing the minimum of a variable is saved to a PP file. The IA component of LBTIM is set correctly when saving maximum or minimum values.

  • The performance of iris.cube.Cube.extract() when a list of values is given to an instance of iris.Constraint has been improved considerably.

  • Fixed a bug with iris.cube.Cube.data() where an numpy.ndarray was not being returned for scalar cubes with lazy data.

  • When saving in netcdf format, the units of ‘latitude’ and ‘longitude’ coordinates specified in ‘degrees’ are saved as ‘degrees_north’ and ‘degrees_east’ respectively, as defined in the CF conventions for netCDF files: sections 4.1 and 4.2.

  • Fixed a bug with a class of pp files with lbyr == 0, where the date would cause errors when converting to a datetime object (e.g. when printing a cube).

    When processing a pp field with lbtim = 2x, lbyr == lbyrd == 0 and lbmon == lbmond, ‘month’ and ‘month_number’ coordinates are created instead of ‘time’.

  • Fixed a bug in curl() where the sign of the r-component for spherical coordinates was opposite to what was expected.

  • A bug that prevented cube printing in some cases has been fixed.

  • Fixed a bug where a deepcopy of a DimCoord would have writeable points and bounds arrays. These arrays can now no longer be modified in-place.

  • Concatenation no longer occurs when the auxiliary coordinates of the cubes do not match. This check is not applied to AuxCoords that span the dimension the concatenation is occurring along. This behaviour can be switched off by setting the check_aux_coords kwarg in iris.cube.CubeList.concatenate() to False.

  • Fixed a bug in iris.cube.Cube.subset() where an exception would be thrown while trying to subset over a non-dimensional scalar coordinate.

Incompatible Changes#

  • The source and target for iris.experimental.regrid.PointInCell.regridder() must now have defined coordinate systems (i.e. not None). Additionally, the source data X and Y coordinates must have the same cube dimensions.


  • Deprecated the iris.Future option iris.FUTURE.strict_grib_load. This only affected the module iris.fileformats.grib, which is itself now deprecated. Please see iris_grib package, above.

  • Deprecated the module iris.fileformats.grib. The new package iris_grib replaces this functionality, which will shortly be removed. Please see iris_grib package, above.

  • The use of iris.config.SAMPLE_DATA_DIR has been deprecated and replaced by the now importable iris_sample_data package.

  • Deprecated the module iris.analysis.interpolate. This contains the following public items, all of which are now deprecated and will be removed in a future release:

    • linear()

    • regrid()

    • regrid_to_max_resolution()

    • nearest_neighbour_indices()

    • nearest_neighbour_data_value()

    • extract_nearest_neighbour()

    • class Linear1dExtrapolator.

    Please use the replacement facilities individually noted in the module documentation for iris.analysis.interpolate

  • The method iris.cube.Cube.regridded() has been deprecated. Please use iris.cube.Cube.regrid() instead (see regridded() for details).

  • Deprecated iris.fileformats.grib.hindcast_workaround and iris.fileformats.grib.GribWrapper. The class iris.fileformats.grib.message.GribMessage provides alternative means of working with GRIB message instances.

  • Deprecated the module iris.fileformats.ff. Please use the replacement facilities in module iris.fileformats.um :

    All other public components are generally deprecated and will be removed in a future release.

  • The iris.fileformats.pp.as_pairs() and iris.fileformats.grib.as_pairs() are deprecated. These are replaced with iris.fileformats.pp.save_pairs_from_cube() and iris.fileformats.grib.save_pairs_from_cube().

  • iris.fileformats.pp_packing has been deprecated. Please install the separate mo_pack package instead. This provides the same functionality.

  • Deprecated logging functions (currently used only for rules logging): iris.config.iris.config.RULE_LOG_DIR, iris.config.iris.config.RULE_LOG_IGNORE and iris.fileformats.rules.log.

  • Deprecated all the remaining text rules mechanisms: iris.fileformats.rules.DebugString, iris.fileformats.rules.CMAttribute, iris.fileformats.rules.CMCustomAttribute, iris.fileformats.rules.CoordAndDims, iris.fileformats.rules.Rule, iris.fileformats.rules.FunctionRule, iris.fileformats.rules.ProcedureRule, iris.fileformats.rules.RulesContainer and iris.fileformats.rules.calculate_forecast_period().

  • Deprecated the custom pp save rules mechanism implemented by the functions iris.fileformats.pp.add_save_rules() and iris.fileformats.pp.reset_save_rules(). The functions iris.fileformats.pp.as_fields(), iris.fileformats.pp.as_pairs() and iris.fileformats.pp.save_fields() provide alternative means of achieving the same ends.