$npx -y skills add jinwx/weather-data-skills --skill cds-downloadDownload climate/weather data from the Copernicus Climate Data Store (CDS) using the CDS API. Use this skill whenever the user wants to download ERA5, ERA5-Land, seasonal forecasts, or any other CDS dataset. Also use it when the user mentions CDS, Climate Data Store, ECMWF reanal
| 1 | # CDS Data Download Skill |
| 2 | |
| 3 | This skill helps users download data from the Copernicus Climate Data Store (CDS) efficiently. It covers setup, dataset selection, and writing optimized Python download scripts. |
| 4 | |
| 5 | ## Quick Orientation |
| 6 | |
| 7 | The CDS (https://cds.climate.copernicus.eu) is the main portal for Copernicus climate data. |
| 8 | |
| 9 | **Reference files** — read the relevant one when you need dataset-specific details: |
| 10 | - `references/api-setup.md` — Account setup, .cdsapirc configuration, cdsapi installation. Read this when the user needs help getting started or has authentication issues. |
| 11 | - `references/era5.md` — ERA5 and ERA5-Land datasets: identifiers, variables, storage types, efficiency strategies, and download script usage. Read this for any ERA5/ERA5-Land download task. |
| 12 | - `references/seasonal.md` — Seasonal forecast datasets: identifiers, parameters, system versioning, efficiency strategies, and download script usage. Read this for seasonal prediction downloads. |
| 13 | |
| 14 | A `scripts/` directory contains reusable download scripts for ERA5 and seasonal forecasts — see the reference files for usage. These scripts cover the common ERA5/ERA5-Land and C3S seasonal forecast workflows. For other CDS datasets, unsupported parameter combinations, or custom post-processing, read the relevant script source as a reference and write a tailored script. |
| 15 | |
| 16 | ## Workflow |
| 17 | |
| 18 | When a user asks to download CDS data, follow this sequence: |
| 19 | |
| 20 | ### 1. Check Setup |
| 21 | |
| 22 | Before writing any download script, confirm the user has CDS access configured: |
| 23 | - Do they have a CDS account? If not, direct them to register at https://cds.climate.copernicus.eu |
| 24 | - Is their `.cdsapirc` file configured? If unsure, read `references/api-setup.md` for the current format and walk them through it. |
| 25 | - Is `cdsapi` installed (`pip install "cdsapi>=0.7.7"`)? The version matters — older versions use incompatible syntax. |
| 26 | |
| 27 | If the user seems experienced (they mention specific dataset names, already have scripts), skip the hand-holding and go straight to their request. |
| 28 | |
| 29 | ### 2. Identify the Right Dataset |
| 30 | |
| 31 | If the user isn't sure which dataset they need, help them narrow it down. The CDS catalog (https://cds.climate.copernicus.eu/datasets) has hundreds of datasets organized by these dimensions: |
| 32 | |
| 33 | **Product type** — What kind of data? |
| 34 | - **Reanalysis** — Gridded historical reconstruction of the atmosphere/land/ocean. Best for "what actually happened" questions. (e.g., ERA5, ERA5-Land) |
| 35 | - **Seasonal forecasts** — Multi-month predictions from coupled models. Best for "what is expected" questions. |
| 36 | - **Climate projections** — Long-term future scenarios (CMIP-based). |
| 37 | - **Satellite observations** — Remotely sensed measurements. |
| 38 | - **In-situ observations** — Ground station and radiosonde data. |
| 39 | - **Derived reanalysis** — Post-processed products like climate indicators, agrometeorological indices. |
| 40 | |
| 41 | **Variable domain** — What part of the Earth system? |
| 42 | - Atmosphere (surface / upper air / composition) |
| 43 | - Land (physics / hydrology / biosphere / cryosphere) |
| 44 | - Ocean (physics / biology / biochemistry) |
| 45 | |
| 46 | **Spatial coverage** — Global or regional (Europe, Arctic, Antarctic)? |
| 47 | |
| 48 | **Temporal coverage** — Past, present, or future? |
| 49 | |
| 50 | Walk the user through these questions to narrow down the right dataset. If they already know the general category (e.g., "I need reanalysis surface temperature"), you can go straight to the reference file. If the search is open-ended, browse the CDS catalog together or fetch the catalog page to find matching datasets. |
| 51 | |
| 52 | For datasets not covered by the reference files, go to `https://cds.climate.copernicus.eu/datasets/<dataset-identifier>` to check the dataset description and download form. The "Show API request code" button on the download form generates correct API syntax — use this as the authoritative source for variable names and parameter formats. |
| 53 | |
| 54 | ### 3. Write an Efficient Download Script |
| 55 | |
| 56 | This is where most of the value lies. **Read the relevant dataset reference file first** — each one contains dataset-specific efficiency strategies. The optimal request structure varies significantly between datasets because they use different storage backends and archival layouts. |
| 57 | |
| 58 | General principles that apply to all CDS downloads: |
| 59 | - **Use `area` to subset geographically** when the user doesn't need global data |
| 60 | - **Use `grid` to request coarser resolution** if full resolution isn't needed |
| 61 | - * |