| Release: | 1.8.1rc1 |
|---|---|
| Date: | 21st May 2015 |
This document explains the new/changed features of Iris in version 1.8. (View all changes.)
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.