ncdata.iris module#
Interface routines for converting data between ncdata and Iris.
Convert NcData
to and from Iris Cube
\s.
This uses the ncdata.dataset_like
interface ability to mimic netCDF4.Dataset
objects, which are used like files to load and save Iris data.
This means that all we need to know of Iris is its netcdf load+save interfaces.
- ncdata.iris.from_iris(cubes, **iris_save_kwargs)#
Create an
NcData
from Iris cubes.Behaves like an Iris ‘save’ operation.
- Parameters:
cubes (
iris.cube.Cube
, or iterable of Cubes) – cube or cubes to “save” to an NcData object.iris_save_kwargs (dict) – additional keys passed to
iris.save()
operation.
- Returns:
ncdata – output data created from saving
cubes
- Return type:
- ncdata.iris.to_iris(ncdata, **iris_load_kwargs)#
Read Iris cubes from an
NcData
.Behaves like an Iris ‘load’ operation.
- Parameters:
ncdata (NcData) – object to be loaded, treated as equivalent to a netCDF4 dataset.
iris_load_kwargs (dict) – extra keywords, passed to
iris.fileformats.netcdf.load_cubes()
- Returns:
cubes – loaded results
- Return type:
CubeList