|Date:||12 September 2013|
This document explains the new/changed features of Iris in version 1.5. (View all changes.)
The functions iris.plot.plot() and iris.quickplot.plot() now take up to two arguments, which may be cubes or coordinates, allowing the user to have full control over what is plotted on each axis. The coords keyword argument is now deprecated for these functions. This now also gives extended 1D plotting capability.
# plot a 1d cube against a given 1d coordinate, with the cube # values on the x-axis and the coordinate on the y-axis iris.plot.plot(cube, coord)
iris.analysis.SUM is now a weighted aggregator, allowing it to take a weights keyword argument.
GRIB2 translations added for standard_name ‘soil_temperature’.
iris.cube.Cube.slices() can now handle passing dimension index as well as the currently supported types (string, coordinate), in order to slice in cases where there is no coordinate associated with a dimension (a mix of types is also supported).
# Get cube slices corresponding to the dimension associated with longitude # and the first dimension from a multi-dimensional cube. for sub_cube in cube.slices(['longitude', 0]): print(sub_cube)
iris.experimental.animate now provides experimental animation support.
# Create an iterable of cubes (generator, lists etc.) cube_iter = cubes.slices(('grid_longitude', 'grid_latitude')) ani = animate(cube_iter, qplt.contourf) plt.show()
Support for UM ancillary files truncated with the UM utility ieee
Complete support for Transverse Mercator with saving to NetCDF also.
import cartopy.crs as ccrs import iris import iris.quickplot as qplt import matplotlib.pyplot as plt fname = iris.sample_data_path('air_temp.pp') temperature = iris.load_cube(fname) plt.axes(projection=ccrs.TransverseMercator()) qplt.contourf(temperature) plt.gca().coastlines() plt.gca().gridlines() plt.show()
Support for loading NAME files (gridded and trajectory data).
Multi-dimensional coordinate support added for iris.analysis.cartography.cosine_latitude_weights()
Added limited packaged GRIB support (bulletin headers).
Performance gains for PP loading of the order of 40%.
iris.quickplot now has a show() function to provide convenient access to matplotlib.pyplot.show().
Iris can now cope with a missing bounds variable from NetCDF files.
Added support for bool array indexing on a cube.
fname = iris.sample_data_path('air_temp.pp') temperature = iris.load_cube(fname) temperature[temperature.coord('latitude').points > 0] # The constraints mechanism is still the preferred means to do such a query. temperature.extract(iris.Constraint(latitude=lambda v: v>0)))
Added support for loading fields defined on regular Gaussian grids from GRIB files.
iris.analysis.interpolate.extract_nearest_neighbour() now works without needing to load the data (especially relevant to large datasets).
New PP stashcode translations added including ‘dewpoint’ and ‘relative_humidity’.
Added implied heights for several common PP STASH codes.
GeoTIFF export capability enhanced for supporting various data types, coord systems and mapping 0 to 360 longitudes to the -180 to 180 range.