ncdata.iris module#

Interface routines for converting data between ncdata and Iris.

Convert NcDatas to and from Iris Cubes.

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 into the iris.save() call.

Returns:

ncdata – output data created from saving cubes

Return type:

NcData

Notes

The keys “compute” and “saver” must not appear in iris_save_kwargs, as these these are already used.

ncdata.iris.to_iris(ncdata, **iris_load_kwargs)#

Read Iris cubes from an NcData.

Behaves like an Iris ‘load’ operation.

Parameters:
  • ncdata (NcData or list(NcData)) – object(s) to be loaded into Iris, treated as equivalent to netCDF4 datasets.

  • iris_load_kwargs (dict) – extra keywords, passed into the iris.load() call.

Returns:

cubes – loaded results

Return type:

iris.cube.CubeList