Metadata-Version: 2.4
Name: import-cmip6-data-utils
Version: 3.1
Summary: Utilitary package, based on intake-esgf, for building notebooks and scripts that downloads CMIP6 data thanks to csv facets files and toml config files.
Project-URL: Homepage, https://gricad-gitlab.univ-grenoble-alpes.fr/gibonil/import-cmip6-data-utils
Project-URL: Issues, https://gricad-gitlab.univ-grenoble-alpes.fr/gibonil/import-cmip6-data-utils/-/issues
Author-email: Lucas Giboni <lucas.giboni@univ-grenoble-alpes.fr>
License-Expression: GPL-3.0-or-later
License-File: LICENSE
Keywords: CMIP6,data,download,intake-esgf,notebook,script,utilities
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Scientific/Engineering
Requires-Python: >=3.10
Requires-Dist: intake-esgf
Requires-Dist: ipython
Requires-Dist: pandas
Provides-Extra: dev
Requires-Dist: pytest; extra == 'dev'
Requires-Dist: pytest-cov; extra == 'dev'
Requires-Dist: ruff; extra == 'dev'
Description-Content-Type: text/markdown

# import-cmip6-data-utils

## Description

This package is used in order to download CMIP6 data thanks to a *.csv search criteria file*, filled with the facets for the search. The process from the search to the download is highly customisable thanks to a *.toml config file*, holding the parameters and options of the package. This can be done through a jupyter notebook for tuning the search and then in a python script to make your research reproducible by anyone.

It downloads individual *.nc* files of the requested variables and combines them to produce an importable dictionary of **xarray Datasets** of the same **entry**. An entry being an **experiment_id, source_id and member_id** tuple. This allows to confront experiments outputs from an ensemble.

Here are some of the options allowed by this package :

- The CMIP6 data can be preprocessed in-place with the computation of a climatological mean for a provided frequency.

- The results can be filtered to ensure that the downloaded outputs are from a provided ensemble (thanks to *.csv filtering ensemble file*) or that all the expected variables where found for the whole ensemble.

- The reference information of the downloaded CMIP6 ensemble can be printed into a *.csv file* to give proper credit to the modellers.

It relies on the [intake-egsf library](https://github.com/esgf2-us/intake-esgf?tab=readme-ov-file) to interact with the ESGF CMIP6 data nodes. You may consult their [beginner guide](https://intake-esgf.readthedocs.io/en/latest/beginner.html).

It is decomposed into several sub-packages. In order to use it easily, you may check the **raw notebook and python script associated to it**. It is maintained in this [repository](https://gricad-gitlab.univ-grenoble-alpes.fr/gibonil/import_cmip6_data).

### Installation

You can install this package via the following command :

`pip install import_cmip6_data_utils`

You can then import it :

`import import_cmip6_data_utils`

### CMIP6 data

This project allows for the downloading of data from the CMIP6. You may consult this [documentation of the CMIP6 iniative](https://wcrp-cmip.org/cmip-model-and-experiment-documentation).

### Dependencies

This project uses the [intake-egsf library](https://github.com/esgf2-us/intake-esgf?tab=readme-ov-file). You may consult their [beginner guide](https://intake-esgf.readthedocs.io/en/latest/beginner.html).

### License

Copyright (C) 2026, IGE (France, UMR 5001), Lucas GIBONI.

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

A copy of the GNU General Public License is available at the root folder of this repository in the LICENSE file. Here is an online version.

### Authors and acknowledgment

This work was devised by Lucas Giboni, PhD Student at IGE, CNRS in Grenoble, France.

## Interacting with the project

### Contributing

Do not hesitate to contribute to this project by raising issues and associated branches. I'll check them for merging. The project can be found in this [repository](https://gricad-gitlab.univ-grenoble-alpes.fr/gibonil/import-cmip6-data-utils).

### Roadmap

This is a package that now satisfying to me as it can be usede into a downloading script or a jupyter notebook. But it can always be improved I guess.

### Support

You can get some help by sending me an email at : <lucas.giboni@univ-grenoble-alpes.fr>.
