Installation¶
Stable release¶
A conda environment is recommended, because several of climdata's geospatial
dependencies (cartopy, rasterio, geopandas) are considerably easier to
install that way:
1 2 3 4 | |
From source¶
1 2 3 | |
Or directly:
1 | |
Optional extras¶
Most providers work with the base install. These add capability:
| Extra | Command | Enables |
|---|---|---|
| Regridding (Dask) | pip install climdata[grid] |
Parallel reprojection via odc-geo |
| Conservative regridding | conda install -c conda-forge xesmf |
Area-weighted regridding, and BCSD |
| Plotting | conda install -c conda-forge cartopy matplotlib |
plot_map and extractor.plot |
| CMIP6 cloud | pip install intake intake-esm |
dataset=cmip |
| ISIMIP | pip install isimip-client |
w5e5, cmip_w5e5, agri_isimip |
| DWD stations | pip install wetterdienst |
dataset=dwd |
| ERA5 | pip install cdsapi |
climdata.ERA5 |
| Bias correction | conda install -c conda-forge iris |
climdata.sdba |
Imputation backends¶
Gap filling with the matrix-completion methods (SoftImpute, CDRec) works out
of the box. The neural methods need PyTorch, which climdata does not install by
default because it is large and platform-specific:
1 2 3 4 5 6 7 8 | |
For GPU builds see the PyTorch installation guide.
pip install climdata[full] pulls the remaining ML backends (scikit-learn,
xgboost, lightgbm, optuna and friends) but deliberately not PyTorch or
pycatch22 — install those as above.
Credentials¶
Three providers need an account. The rest need nothing.
MSWX — Google Drive service account¶
MSWX is distributed from a shared Google Drive folder, so downloads go through the Drive API with a service-account key. The MSWX guide walks through creating one, and covers the CC BY-NC 4.0 licence terms.
Once you have the key:
1 2 3 | |
1 2 3 4 | |
The key is only required for data not already on disk.
ERA5 — Copernicus CDS¶
- Register at the Copernicus Climate Data Store.
- Open your user profile and reveal your API key.
-
Write
~/.cdsapirc:1 2
url: https://cds.climate.copernicus.eu/api key: <your-api-key> -
Restrict the permissions:
chmod 600 ~/.cdsapirc
You must also accept each dataset's licence once, in the CDS web interface, before the API will serve it.
ISIMIP¶
No account is needed, only the client:
1 | |
Checking the install¶
1 2 3 4 | |
If that prints eleven providers, the configuration was found and you are ready.
Development¶
1 2 3 4 | |
The test suite is offline by default. tests/test_datasets_extraction.py and
tests/test_point_workflow.py need real data paths and credentials and skip
themselves when CI is set.