{"id":23649,"library":"earthkit-data","title":"earthkit-data","description":"A format-agnostic Python interface for geospatial data, providing unified access to GRIB, NetCDF, ODB, and other formats. Current version is 0.19.4, with a release cadence of approximately monthly. A release candidate for 1.0.0 (1.0.0rc1) is available.","status":"active","version":"0.19.4","language":"python","source_language":"en","source_url":"https://github.com/ecmwf/earthkit-data","tags":["geospatial","meteorology","GRIB","NetCDF","data-access"],"install":[{"cmd":"pip install earthkit-data","lang":"bash","label":"Install from PyPI"},{"cmd":"conda install -c conda-forge earthkit-data","lang":"bash","label":"Install via conda-forge"}],"dependencies":[{"reason":"Required for GRIB support","package":"eccodes","optional":true},{"reason":"Alternative GRIB engine","package":"cfgrib","optional":true},{"reason":"Required for NetCDF support","package":"netcdf4","optional":true}],"imports":[{"note":"Most examples use 'import earthkit.data as ekd'; 'from earthkit import data' also works but can cause confusion.","wrong":"from earthkit import data","symbol":"earthkit.data","correct":"import earthkit.data as ekd"},{"note":"Low-level core classes are not part of the public API; use from_source instead.","wrong":"from earthkit.data.core import Base","symbol":"realize","correct":"from earthkit.data import from_source"}],"quickstart":{"code":"import earthkit.data as ekd\n\n# Load GRIB data from a URL\nds = ekd.from_source(\"url\", \"https://get.ecmwf.int/repository/test-data/earthkit-data/example.grib\")\n\n# Inspect metadata\nprint(ds[0].metadata(\"param\"))\n\n# Convert to xarray\nxr_ds = ds.to_xarray()\nprint(xr_ds)","lang":"python","description":"Load a GRIB file from a URL and convert to xarray."},"warnings":[{"fix":"Refer to the upgrade guide at https://earthkit-data.readthedocs.io/en/latest/release-notes/version_1.0.0rc_updates.html","message":"Version 1.0.0rc1 introduces breaking changes: the API for metadata access and data conversion has been restructured. The old `.metadata()` method may not work as before.","severity":"breaking","affected_versions":">=1.0.0rc1"},{"fix":"Use `ekd.from_source('url', url)` or `ekd.from_source(url=url)` (preferred).","message":"Using `from_source` with positional arguments for source type is deprecated; use keyword arguments or switch to the new URL-based API.","severity":"deprecated","affected_versions":"<1.0.0"},{"fix":"Install required backend: `pip install eccodes` (or `cfgrib`) for GRIB, `netcdf4` for NetCDF.","message":"The library expects specific backends for different formats; missing eccodes will cause GRIB loading to fail silently or raise confusing errors.","severity":"gotcha","affected_versions":"all"},{"fix":"Use `ds.to_xarray(chunks={'time': 1})` to control chunking.","message":"`ds.to_xarray()` can be memory-intensive for large datasets; prefer lazy loading with `ds.to_xarray(chunks={})` or iterate in chunks.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"search_vec":"'0.19.4':26 '1.0.0':38,39 'access':15,49 'agnost':7 'approxim':32 'avail':42 'cadenc':30 'candid':36 'current':23 'data':3,12,48 'data-access':47 'earthkit':2 'earthkit-data':1 'format':6,22 'format-agnost':5 'geospati':11,43 'grib':17,45 'interfac':9 'meteorolog':44 'month':33 'netcdf':18,46 'odb':19 'provid':13 'python':8 'rc1':40 'releas':29,35 'unifi':14 'version':24","created_at":"2026-05-01T08:08:53.140390+00:00","updated_at":"2026-05-01T08:08:53.140390+00:00","problems":[{"fix":"pip install eccodes","cause":"Missing backend library for GRIB support.","error":"ModuleNotFoundError: No module named 'eccodes'"},{"fix":"First check the type of data: `print(type(ds[0]))` and use appropriate methods like `ds[0].keys()` for ODB.","cause":"Using a method not available in the current source type (e.g., ODB objects do not have a single metadata concept).","error":"AttributeError: 'Reader' object has no attribute 'metadata'"},{"fix":"Verify the URL or file path. For URLs, ensure network access and correct URL syntax.","cause":"URL not accessible or file does not exist.","error":"earthkit.data.core.DataError: Unable to open resource"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"0.20.0","cli_name":"","cli_version":null,"type":"library","homepage":"https://earthkit-data.readthedocs.io","github":"https://github.com/ecmwf/earthkit-data","docs":"https://earthkit-data.readthedocs.io/","changelog":null,"pypi":"https://pypi.org/project/earthkit-data/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["data","serialization"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-29","last_verified":"2026-06-29","next_check":"2026-07-29","install_tag":null}}