esmvalcore.io.xcube#
Access data using xcube.
Run the command esmvaltool config copy data-xcube-esacci.yml to update
your configuration to use this module. This will
create a file with the following content in your configuration directory:
# Read data from the ESA Climate Data Centre (ESA CCI) using xcube.
# More information available at
# https://xcube.readthedocs.io/en/latest/dataaccess.html#esa-climate-data-centre-esa-cci-cciodp-ccizarr-esa-cci-kc.
projects:
ESACCI:
data:
ccizarr:
type: "esmvalcore.io.xcube.XCubeDataSource"
data_store_id: "ccizarr"
priority: 1
values: &values
# Use this to define the mapping between the short_name used by
# ESMValCore and the variable name in the source dataset.
short_name:
prw: tcwv
esa-cci-kc:
type: "esmvalcore.io.xcube.XCubeDataSource"
data_store_id: "esa-cci-kc"
priority: 2
values: *values
cciodp:
type: "esmvalcore.io.xcube.XCubeDataSource"
data_store_id: "cciodp"
priority: 3
values: *values
Classes:
|
Data source for finding files on a local filesystem. |
|
A dataset that can be used to load data found using xcube. |
- class esmvalcore.io.xcube.XCubeDataSource(name: str, project: str, priority: int, data_store_id: str, values: dict[str, dict[str, str]] = <factory>, data_store_params: dict[str, ~typing.Any] = <factory>, open_params: dict[str, ~typing.Any] = <factory>)[source]#
Bases:
DataSourceData source for finding files on a local filesystem.
Attributes:
Name of the data store.
Parameters to use when creating the data store.
A string containing debug information when no data is found.
A name identifying the data source.
Parameters to use when opening the data.
The priority of the data source.
The project that the data source provides data for.
Mapping between the ESMValCore and xcube facet values.
Methods:
find_data(**facets)Find data.
- Parameters:
- data_store_id: str#
Name of the data store.
A list of available data stores can be found in the xcube documentation.
- find_data(**facets: FacetValue) list[XCubeDataset][source]#
Find data.
- Parameters:
**facets (FacetValue) – Find data matching these facets.
- Returns:
A list of data elements that have been found.
- Return type:
- class esmvalcore.io.xcube.XCubeDataset(name: str, facets: Facets, store: xcube.core.store.store.DataStore, open_params: dict[str, Any] = <factory>)[source]#
Bases:
DataElementA dataset that can be used to load data found using xcube.
Attributes:
Attributes are key-value pairs describing the data.
Facets are key-value pairs that were used to find this data.
A unique name identifying the data.
Parameters to use when opening the data.
The store containing the data.
Methods:
- Parameters:
- facets: Facets#
Facets are key-value pairs that were used to find this data.
- store: xcube.core.store.store.DataStore#
The store containing the data.
- to_iris() iris.cube.CubeList[source]#
Load the data as Iris cubes.
- Returns:
The loaded data.
- Return type: