Solver interfaces

eofs uses different interfaces to work with different types of input data Descriptions of each interface are below, and summarised in the following table:

Interface

Type of input/output data

cdms

Data read from a self-describing data format stored in a cdms2 variable.

iris

Data read from a self-describing data format stored in an iris cube.

xarray

Data stored in an xarray.DataArray.

standard

Other data, stored in a numpy.ndarray, a numpy.ma.MaskedArray, or a dask.array.Array.

cdms interface

The eofs.cdms interface works with cdms variables, which are the core data container used by UV-CDAT. A cdms variable has meta-data associated with it, including dimensions, which are understood by the eofs.cdms.Eof solver interface. The outputs of the eofs.cdms.Eof solver are cdms variables with meta-data, which can be written straight to a netCDF file using cdms, or used with other parts of the UV-CDAT framework.

Iris interface

The iris interface works with Cube objects, which are the data containers used by the iris data analysis package. The meta-data, including coordinate dimensions, associated with iris Cube objects is understood by the eofs.iris.Eofs solver interface. The outputs of the eofs.iris.Eof solver are also contained in Cube objects, meaning they can be used with tools in the iris package, and easily written to a file.

xarray interface

The xarray interface works with DataArray objects, which are the data containers used by the xarray package. The meta-data, including coordinate dimensions, associated with DataArray objects is understood by the eofs.xarray.Eofs solver interface. The outputs of the eofs.xarray.Eof solver are also contained in DataArray objects, allowing their use within other xarray tools including serialization to netCDF.

Standard interface

The standard interface works with numpy arrays or dask arrays, which makes the standard interface the general purpose interface. Any data that can be stored in a numpy.ndarray, numpy.ma.MaskedArray or dask.array.Array can be analysed with the eofs.standard.Eof solver interface.