科研 Skill
Copernicus气候数据下载
cds-download
Downloads climate/weather data from the Copernicus Climate Data Store (ERA5, seasonal forecasts) via cdsapi, covering API setup and request splitting. Use for any CDS/ECMWF download.
SKILL.md
CDS Data Download Skill
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.
Quick Orientation
The CDS (https://cds.climate.copernicus.eu) is the main portal for Copernicus climate data.
Reference files — read the relevant one when you need dataset-specific details:
references/api-setup.md— Account setup, .cdsapirc configuration, cdsapi installation. Read this when the user needs help getting started or has authentication issues.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.references/seasonal.md— Seasonal forecast datasets: identifiers, parameters, system versioning, efficiency strategies, and download script usage. Read this for seasonal prediction downloads.
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.
Workflow
When a user asks to download CDS data, follow this sequence:
1. Check Setup
Before writing any download script, confirm the user has CDS access configured:
- Do they have a CDS account? If not, direct them to register at https://cds.climate.copernicus.eu
- Is their
.cdsapircfile configured? If unsure, readreferences/api-setup.mdfor the current format and walk them through it. - Is
cdsapiinstalled (pip install "cdsapi>=0.7.7")? The version matters — older versions use incompatible syntax.
If the user seems experienced (they mention specific dataset names, already have scripts), skip the hand-holding and go straight to their request.
2. Identify the Right Dataset
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:
Product type — What kind of data?
- Reanalysis — Gridded historical reconstruction of the atmosphere/land/ocean. Best for "what actually happened" questions. (e.g., ERA5, ERA5-Land)
- Seasonal forecasts — Multi-month predictions from coupled models. Best for "what is expected" questions.
- Climate projections — Long-term future scenarios (CMIP-based).
- Satellite observations — Remotely sensed measurements.
- In-situ observations — Ground station and radiosonde data.
- Derived reanalysis — Post-processed products like climate indicators, agrometeorological indices.
Variable domain — What part of the Earth system?
- Atmosphere (surface / upper air / composition)
- Land (physics / hydrology / biosphere / cryosphere)
- Ocean (physics / biology / biochemistry)
Spatial coverage — Global or regional (Europe, Arctic, Antarctic)?
Temporal coverage — Past, present, or future?
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.
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.
3. Write an Efficient Download Script
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.
General principles that apply to all CDS downloads:
- Use
areato subset geographically when the user doesn't need global data - Use
gridto request coarser resolution if full resolution isn't needed - Make scripts resumable — check if output files already exist before requesting
- Put configuration at the top of the script so users can modify parameters without reading the download logic
- Handle errors gracefully — wrap API calls in try/except so one failed request doesn't kill the whole batch
- Never mix atmospheric, wave, and ensemble data in one NetCDF request (different grids cause conversion errors)
For dataset-specific efficiency (request splitting, parallelization, grouping strategies), always consult the reference file. What works for ERA5 (split by month) can be counterproductive for seasonal forecasts (combine into fewer, larger requests).
4. Format Choice: NetCDF vs GRIB
Help the user choose if they're unsure:
| NetCDF | GRIB | |
|---|---|---|
| Best for | Analysis in Python (xarray), sharing | Operational meteorology, WRF input |
| Ecosystem | xarray, netCDF4, pandas | cfgrib, eccodes, wgrib2 |
| File size | Larger | Smaller (packed) |
| Readability | Self-describing, easy to inspect | Requires specialized tools |
| CDS default | No (must specify) | Yes |
Default recommendation: NetCDF for most research users, GRIB for operational/NWP workflows. Note that some datasets (e.g., seasonal forecasts) work better in their native GRIB format — NetCDF conversion can be lossy or slow.
5. Verify Before Downloading
Before finalizing any script, verify key details. The CDS API will reject requests with invalid parameter names, so accuracy matters:
- For seasonal forecasts — use the constraints API: System versions, temporal coverage, and product type availability vary greatly across centres. Always query the CDS constraints API to check what's available before writing a download script. See
references/seasonal.mdfor details and code examples. This is far more reliable than hardcoding system versions. - For other datasets — check the download form: Go to the dataset page on CDS (e.g.,
https://cds.climate.copernicus.eu/datasets/<dataset-identifier>) and use the download form. The "Show API request code" button at the bottom generates correct, verified API syntax. - Check temporal coverage: Different datasets have different start dates.
- Check available levels/variables: Available options vary by dataset.
Common Issues
- Authentication errors: User likely has an outdated
.cdsapircor old cdsapi version. Seereferences/api-setup.md. - Very slow downloads: Check the dataset's storage type. Read the relevant reference file for dataset-specific efficiency strategies.
- Request failures: Often caused by invalid variable names or parameter combinations. Verify against the CDS download form's "Show API request code" button.
- License errors: User needs to accept the dataset license on the CDS web interface (bottom of the download form) before API downloads work. This is a one-time step per dataset.
示例提示词
帮我用cdsapi下载ERA5-Land再分析数据用于区域气候分析。
所属插件
安装该插件会一并获得同领域的 18 个 Skill / MCP。
同插件的其他科研 Skill
- OpenAQ空气质量分析Accesses OpenAQ air quality data (PM2.5, O3, NO2), runs spatial interpolation, health exposure indices, city comparisons. Use for air pollution monitoring and exposure analysis.
- 气候趋势检验分析Runs climate trend analysis: Mann-Kendall test, Sen’s slope, extreme indices (RX1day, R10mm), percentile thresholds, IPCC-style figures. Use to detect and visualize climate trends.
- 生态多样性群落分析Computes community-ecology diversity metrics and ordination: Shannon/Simpson indices, rarefaction, NMDS/PCoA, PERMANOVA. Use when analyzing species-by-site community composition data.
- ERA5再分析气候数据Downloads and analyzes ERA5 reanalysis data via the Copernicus CDS API: anomalies, trends, publication-quality climate maps. Use for ERA5-specific climate analysis end to end.
- GBIF物种分布建模Queries GBIF occurrence records, applies spatial thinning, and fits species distribution models (MaxEnt, BRT) with pygbif/geopandas/elapid. Use for occurrence and habitat-suitability analysis.
- 综合地理空间科学分析Covers broad geospatial workflows: satellite imagery, vector/raster GIS, spatial ML, point clouds, cloud-native formats (STAC, COG). Use as a general entry point for remote sensing or GIS tasks.
- GeoPandas矢量GIS分析Performs vector GIS analysis with GeoPandas: spatial joins, overlays, buffer/dissolve, choropleth maps, rasterio integration. Use for vector spatial analysis and raster-vector workflows.
- DEM水文地貌分析Runs DEM-based hydrological analysis with pysheds: watershed delineation, flow direction/accumulation, stream networks, runoff estimation. Use for terrain-driven hydrology modeling.
- 海洋碳酸盐化学Computes seawater carbonate chemistry with PyCO2SYS: pH, pCO2, aragonite/calcite saturation, air-sea CO2 flux. Use for ocean carbon-cycle and acidification analysis.
- MetPy大气探空分析Performs atmospheric analysis with MetPy/Siphon: downloads NWP data, plots skew-T log-P diagrams, computes CAPE/CIN, builds synoptic composites. Use for weather-sounding meteorology analysis.
- 地震波形数据处理Analyzes seismological data with ObsPy: waveform download, filtering, P/S phase picking, moment magnitude, spectral analysis. Use for earthquake and seismic-waveform analysis.
- 海洋再分析数据分析Downloads and analyzes oceanographic data from Copernicus Marine Service and Argo floats with gsw/xarray: mixed layer depth, eddy kinetic energy, T-S diagrams. Use for physical oceanography.
- 物理海洋学论文绘图绘制物理海洋学论文图:区域/全球/极地地图、多面板、垂向剖面、Hovmöller图、cmocean配色与期刊版式。投稿级海洋学图件排版和配色时使用。
- 种群动态建模Models population dynamics with logistic/exponential growth, Lotka-Volterra, matrix population models, mark-recapture abundance estimation. Use for quantitative population ecology.
- QGIS自动化地理处理Drives QGIS (PyQGIS, processing, GDAL) for GIS/remote sensing tasks: raster/vector ops, spectral indices, reprojection, zonal statistics, map layouts. Use for any QGIS-based geospatial task.
- 多光谱遥感影像处理Reads, reprojects, and analyzes multispectral GeoTIFF imagery with rioxarray/rasterio: NDVI/EVI, cloud masking, mosaicking, Cloud-Optimized GeoTIFF export. Use for raster remote-sensing processing.
- Google Earth Engine卫星分析Runs Google Earth Engine satellite analysis with geemap/ee: NDVI time series, land-cover classification, change detection, GeoTIFF export. Use for cloud-based large-scale satellite analysis.
常见问题
Copernicus气候数据下载能做什么?
Downloads climate/weather data from the Copernicus Climate Data Store (ERA5, seasonal forecasts) via cdsapi, covering API setup and request splitting. Use for any CDS/ECMWF download。
如何安装Copernicus气候数据下载?
在科搭 Codar 左侧点击「插件」,在「组件」页签搜索「Copernicus气候数据下载」并安装;在 Claude Code 或 Codex 中可以发送本页的安装提示词,或下载 Skill 包后解压到 ~/.claude/skills 或 ~/.codex/skills。
Copernicus气候数据下载需要哪些权限?
该科研 Skill没有声明额外权限;执行具体操作时仍由 Agent 按自身规则请求确认。
Copernicus气候数据下载经过官方审核吗?
是。SpeedSkills 收录的每个版本都会记录内容摘要与权限声明,当前版本已通过安全审核。