esmvalcore.io.protocol#
Protocols for accessing data.
This module defines the DataSource and DataElement protocols
for finding and loading data. A data source can be used to find data elements
matching specific facets. A data element represents some data that can be
loaded as Iris cubes.
To add support for a new data source, write two classes that implement these
protocols and configure the tool to use the newly implemented data source as
described in esmvalcore.io.
Classes:
|
A data element represents some data that can be loaded. |
|
A data source can be used to find data. |
- class esmvalcore.io.protocol.DataElement(*args, **kwargs)[source]#
Bases:
ProtocolA data element represents some data that can be loaded.
An
esmvalcore.local.LocalFileis an example of a data element.Attributes:
Attributes are key-value pairs describing the data.
Facets are key-value pairs that can be used for searching the data.
A unique name identifying the data.
Methods:
- facets: dict[str, str | Sequence[str] | int]#
Facets are key-value pairs that can be used for searching the data.
- class esmvalcore.io.protocol.DataSource(*args, **kwargs)[source]#
Bases:
ProtocolA data source can be used to find data.
Attributes:
A string containing debug information when no data is found.
A name identifying the data source.
The priority of the data source.
The project that the data source provides data for.
Methods:
find_data(**facets)Find data.