An intake plugin for parsing an Earth System Model (ESM) catalog and loading netCDF files and/or Zarr stores into Xarray datasets.
Computer simulations of the Earth’s climate and weather generate huge amounts of data. These data are often persisted on HPC systems or in the cloud across multiple data assets of a variety of formats (netCDF, zarr, etc...). Finding, investigating, loading these data assets into compute-ready data containers costs time and effort. The data user needs to know what data sets are available, the attributes describing each data set, before loading a specific data set and analyzing it.
Finding, investigating, loading these assets into data array containers such as xarray can be a daunting task due to the large number of files a user may be interested in. Intake-esm aims to address these issues by providing necessary functionality for searching, discovering, data access/loading.
Opening an ESM catalog definition file: An Earth System Model (ESM) catalog file is a JSON file that conforms to the ESM Collection Specification. When provided a link/path to an esm catalog file,
intake-esmestablishes a link to a database (CSV file) that contains data assets locations and associated metadata (i.e., which experiment, model, the come from). The catalog JSON file can be stored on a local filesystem or can be hosted on a remote server.
In : import intake In : import intake_esm In : cat_url = intake_esm.tutorial.get_url("google_cmip6") In : cat = intake.open_esm_datastore(cat_url) In : cat Out: <GOOGLE-CMIP6 catalog with 4 dataset(s) from 261 asset(s>
Search and Discovery:
intake-esmprovides functionality to execute queries against the catalog:
In : cat_subset = cat.search( ...: experiment_id=["historical", "ssp585"], ...: table_id="Oyr", ...: variable_id="o2", ...: grid_label="gn", ...: ) In : cat_subset Out: <GOOGLE-CMIP6 catalog with 4 dataset(s) from 261 asset(s)>
Access: when the user is satisfied with the results of their query, they can load data assets (netCDF and/or Zarr stores) into xarray datasets:
In : dset_dict = cat_subset.to_dataset_dict() --> The keys in the returned dictionary of datasets are constructed as follows: 'activity_id.institution_id.source_id.experiment_id.table_id.grid_label' |███████████████████████████████████████████████████████████████| 100.00% [2/2 00:18<00:00]
See documentation for more information.
Intake-esm can be installed from PyPI with pip:
python -m pip install intake-esm
It is also available from
conda-forge for conda installations:
conda install -c conda-forge intake-esm
Release history Release notifications | RSS feed
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Hashes for intake_esm-2023.11.10-py3-none-any.whl