Logo Iris 1.10

Table Of Contents

Previous topic

What’s New in Iris 1.9

Next topic

What’s new in Iris 1.7

This Page

What’s new in Iris 1.8

Release:1.8.1
Date:3rd June 2015

This document explains the new/changed features of Iris in version 1.8. (View all changes.)

Iris 1.8 features

Showcase: Rotate winds

Iris can now rotate and unrotate wind vector data by transforming the wind vector data to another coordinate system.

For example:

>>> from iris.analysis.cartography import rotate_winds
>>> u_cube = iris.load_cube('my_rotated_u_wind_cube.pp')
>>> v_cube = iris.load_cube('my_rotated_v_wind_cube.pp')
>>> target_cs = iris.coord_systems.GeogCS(6371229.0)
>>> u_prime, v_prime = rotate_winds(u_cube, v_cube, target_cs)

Showcase: Nearest-neighbour scheme

A nearest-neighbour scheme for interpolation and regridding has been added to Iris. This joins the existing Linear and AreaWeighted interpolation and regridding schemes.

For example:

>>> result = cube.interpolate(sample_points, iris.analysis.Nearest())
>>> regridded_cube = cube.regrid(target_grid, iris.analysis.Nearest())

Showcase: Slices over a coordinate

You can slice over one or more dimensions of a cube using iris.cube.Cube.slices_over(). This provides similar functionality to slices() but with almost the opposite outcome.

Using slices() to slice a cube on a selected dimension returns all possible slices of the cube with the selected dimension retaining its dimensionality. Using slices_over() to slice a cube on a selected dimension returns all possible slices of the cube over the selected dimension.

To demonstrate this:

>>> cube = iris.load(iris.sample_data_path('colpex.pp'))[0]
>>> print(cube.summary(shorten=True))
air_potential_temperature / (K)     (time: 6; model_level_number: 10; grid_latitude: 83; grid_longitude: 83)
>>> my_slice = next(cube.slices('time'))
>>> my_slice_over = next(cube.slices_over('time'))
>>> print(my_slice.summary(shorten=True))
air_potential_temperature / (K)     (time: 6)
>>> print(my_slice_over.summary(shorten=True))
air_potential_temperature / (K)     (model_level_number: 10; grid_latitude: 83; grid_longitude: 83)
  • A cube’s lazy data payload will still be lazy after saving; the data will not be loaded into memory by the save operation.
  • Cubes with data payloads larger than system memory can now be saved to NetCDF through biggus streaming the data to disk.
  • ocean sigma coordinate,
  • ocean s coordinate,
  • ocean s coordinate, generic form 1, and
  • ocean s coordinate, generic form 2.

Bugs fixed

1.8.0

  • Fix in netCDF loader to correctly determine whether the longitude coordinate (including scalar coordinates) is circular.
  • iris.cube.Cube.intersection() now supports bounds that extend slightly beyond 360 degrees.
  • Lateral Boundary Condition (LBC) type FieldFiles are now handled correctly by the FF loader.
  • Making a copy of a scalar cube with no data now correctly copies the data array.
  • Height coordinates in NAME trajectory output files have been changed to match other NAME output file formats.
  • Fixed datatype when loading an integer_constants array from a FieldsFile.
  • FF/PP loader adds appropriate cell methods for lbtim.ib = 3 intervals.
  • An exception is raised if the units of the latitude and longitude coordinates of the cube passed into iris.analysis.cartography.area_weights() are not convertible to radians.
  • GRIB1 loader now creates a time coordinate for a time range indicator of 2.
  • NetCDF loader now loads units that are empty strings as dimensionless.

1.8.1

  • The PP loader now carefully handles floating point errors in date time conversions to hours.
  • The handling fill values for lazy data loaded from NetCDF files is altered, such that the _FillValue set in the file is preserved through lazy operations.
  • The risk that cube intersections could return incorrect results due to floating point tolerances is reduced.
  • The new GRIB2 loading code is altered to enable the loading of various data representation templates; the data value unpacking is handled by the GRIB API.
  • Saving cube collections to NetCDF, where multiple similar aux-factories exist within the cubes, is now carefully handled such that extra file variables are created where required in some cases.

1.8.2

  • A fix to prevent the error: AttributeError: ‘module’ object has no attribute ‘date2num’. This was caused by the function netcdftime.date2num() being removed from the netCDF4 package in recent versions.

Deprecations

  • The original GRIB loader has been deprecated and replaced with a new template-based GRIB loader.
  • Deprecated default NetCDF save behaviour of assigning the outermost dimension to be unlimited. Switch to the new behaviour with no auto assignment by setting iris.FUTURE.netcdf_no_unlimited to True.
  • The former experimental method “iris.experimental.regrid.regrid_bilinear_rectilinear_src_and_grid” has been removed, as iris.analysis.Linear now includes this functionality.

Documentation Changes