How to Setup DDS API client to Retrieve Data
The DDS API Client is a Python client to access and download data from the CMCC Data Delivery System (DDS).
Requirements
Python 3.11 or greater is required.
Installation
The base client is lightweight (HTTP only). The libraries needed to open the retrieved datasets (xarray, zarr, netCDF4, …) are optional — install them only if you need to work with the downloaded data.
conda
From the cmcc-dds channel:
$ conda install -c cmcc-dds ddsapi
To also open the downloaded datasets, add the data stack (from conda-forge):
$ conda install -c conda-forge xarray zarr netcdf4 h5netcdf dask cf-xarray
pip
$ pip install ddsapi
To also open the downloaded datasets, install the optional data extra:
$ pip install 'ddsapi[data]'
Configuration
Once you register, an API key will be generated. You can check your API key in the profile section.
Create a config file $HOME/.ddsapirc as following:
url: https://ddshub.cmcc.it/api/v2
key: <api-key>