Registry / data / ecmwf-opendata

ecmwf-opendata

JSON →
library0.3.30pypypi✓ verified 86d ago

ecmwf-opendata is a Python package designed to simplify the download of ECMWF open data. It provides a request-based interface similar to ECMWF's MARS language for selecting meteorological fields. The library is actively maintained (current version 0.3.26) and receives frequent updates, with new releases typically addressing data source changes, bug fixes, and supporting new data streams. It allows users to retrieve data from ECMWF's direct servers as well as cloud replicas on AWS, Azure, and Google Cloud Platform.

pip install ecmwf-opendata
INSTALL
IMPORT
SIG · ECMWF-OPENDATA
E
ecmwf-opendata
datapythonv0.3.30
Install
2.5s avg
Import
662ms
Disk
24MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.3.30 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.910 runs
installs and imports cleanly · install 0.0s · import 0.698s · 25.7MB
glibc
py 3.103.910 runs
installs and imports cleanly · install 2.5s · import 0.626s · 26MB
24MB installed
● package 24MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Client
from ecmwf.opendata import Client

This quickstart demonstrates how to instantiate the Client and use its `retrieve` method to download meteorological data. It highlights the importance of specifying a data `source` for optimal performance and reliability, especially given potential connection limits to the ECMWF portal. The parameters for `retrieve` follow the MARS request language to define the desired dataset.

from ecmwf.opendata import Client # Initialize the client, specifying a source for reliability (e.g., 'aws', 'azure', 'google' or 'ecmwf') # Using a cloud source is often recommended due to connection limits on ECMWF's direct portal. client = Client(source="aws") # Example: Download the latest available 10-day forecast for mean sea level pressure (msl) # into a local file named 'data.grib2'. # Parameters like 'step', 'type', 'param' are based on MARS language. try: client.retrieve( step=240, # Forecast step in hours (e.g., 240 for 10 days) type="fc", # Type of data (e.g., 'fc' for forecast) param="msl", # Parameter to retrieve (e.g., 'msl' for mean sea level pressure) target="data.grib2", # Output file name ) print("Data downloaded successfully to data.grib2") except Exception as e: print(f"An error occurred during data retrieval: {e}")
ecmwf-opendata --version
Debug
Known issues
gotchaThe ECMWF open-data portal imposes a limit of 500 simultaneous connections, which can lead to 'Too many requests' errors, especially during peak demand. Using cloud-based sources (AWS, Azure, Google Cloud) is often more reliable.
fix
Initialize the client with a specific cloud source: `client = Client(source='aws')`, `client = Client(source='azure')`, or `client = Client(source='google')`.
affects: All versions
gotchaThis package is optimized for downloading subsets of data. If you intend to download a large percentage or entire data files, it may be more efficient to download whole files directly and filter the data locally, rather than using the request-based interface.
fix
For bulk downloads, consider alternative methods or adjust your workflow to download broader files and process them with tools like `earthkit-data` locally.
affects: All versions
breakingThe GRIB2 encoding for ECMWF Open Data products changed to use CCSDS compression starting July 2023. While `ecmwf-opendata` is designed to handle this, older tools or custom processing pipelines that expect pre-July 2023 GRIB2 formats might encounter issues.
fix
Ensure your data processing tools and libraries are updated to handle GRIB2 files with CCSDS compression. Verify compatibility if using custom decoders or older versions of data analysis software.
affects: Data retrieved after July 2023
gotchaAll ECMWF Open Data is governed by the Creative Commons Attribution 4.0 International license (CC-BY-4.0) and the ECMWF Terms of Use. This requires appropriate attribution when using or redistributing the data.
fix
Always include appropriate attribution to ECMWF when using or disseminating data obtained through this library.
affects: All versions
Errors
Common errors & fixes
HTTPError: 404 Client Error: Not Found for url: ...
The requested URL or product name is incorrect, or the combination of parameters does not correspond to available data.
fix
Verify all `retrieve` parameters (e.g., `date`, `time`, `step`, `stream`, `type`, `param`) against the official ECMWF Open Data catalogue and documentation. Small typos or incorrect parameter values are common causes.
HTTPError: 400 Bad Request / HTTPError: 500 Internal Server Error
Your request parameters were syntactically incorrect or resulted in an unprocessable request on the server side.
fix
Carefully review the `retrieve` arguments, especially complex ones like `number` for ensemble members or `levelist`. Ensure correct data types and formats. Consult the ECMWF Open Data documentation for specific parameter requirements.
Download is extremely slow or hangs, or I'm stuck in a long queue.
High demand on the ECMWF Open Data Portal or exceeding its connection limits. This is a common issue, particularly during peak hours.
fix
Switch the data `source` to one of the cloud providers: `client = Client(source="aws")`, `client = Client(source="azure")`, or `client = Client(source="google")`. These replicas offer better reliability and performance during high demand.
Upgrade
Version history
0.3.30latest on PyPI · released Jun 15, 2026
Audit
Dependencies
multiurlrequiredRequired for URL handling and multi-part downloads.
Agent activity
69 hits · last 30 days
node
62
OpenAI (training)
1
Resources
ecmwf-opendata — pip install ecmwf-opendata · libregistry