earthkit

repository·develop·Indexed 42 days ago

https://github.com/ecmwf/earthkit

An open-source Python ecosystem led by ECMWF for weather and climate science workflows. It provides a suite of tools for data access, processing, analysis, and visualization through specialized components including earthkit-data for format-agnostic geospatial data interfaces, earthkit-geo for geospatial computations, earthkit-hydro for river networks, earthkit-meteo for meteorological computations, earthkit-plots for visualization, and earthkit-transforms for data aggregation.

Tokens
6.2K
Snippets
29
Records
35
Agent score
56%

What's inside earthkit

  1. Overview of the earthkit ecosystem

    develop

    earthkit is an open-source Python ecosystem led by ECMWF designed to accelerate weather and climate science workflows. It provides tools for simplifying various stages of the scientific pipeline, including:

    • Data Access: Simplifying how users retrieve meteorological and climate data.
    • Processing & Analysis: Tools for manipulating and analyzing scientific datasets.
    • Visualisation: Capabilities for rendering and presenting scientific data.

    For an interactive overview of the ecosystem, visit the earthkit website.

  2. Overview of the earthkit ecosystem components

    develop

    The earthkit ecosystem is composed of several specialized components designed for geospatial, meteorological, and hydrological workflows. Depending on your task, you may need one or more of the following packages:

    • earthkit-data: A format-agnostic Python interface for geospatial data, specifically optimized for meteorology and climate science.
    • earthkit-geo: Provides tools for geospatial computations.
    • earthkit-hydro: Provides operations specifically for river networks.
    • earthkit-meteo: Provides specialized meteorological computations.
    • earthkit-plots: Provides visualization tools and templates.
    • earthkit-transforms: Provides tools for the aggregation and transformation of geospatial data.
  3. Understanding the earthkit ecosystem

    develop

    earthkit is a collection of multiple interoperable software components designed for earth sciences. It is built on top of established open-source Python libraries such as numpy, pandas, and matplotlib.

    Key characteristics include:

    • Interoperability: Components are designed to work together seamlessly.
    • Operational Readiness: It leverages the robust software stack used in ECMWF production systems, including ecCodes and FDB.
    • High-level Interface: Provides common tools to support diverse activities across research and operations.
    • Scalability: Designed to be efficient for researchers while facilitating an easier transition to operational environments.
  4. Install earthkit via pip

    develop

    To install the full earthkit ecosystem, use pip with Python 3.10 or higher. Note that installing the earthkit package will install all available components by default. If you only require specific components, you can install them individually instead.

    python3 -m pip install earthkit
  5. Install pre-commit hooks for earthkit development

    develop

    Earthkit uses pre-commit hooks to perform quality control checks on every commit. If a check fails, the commit will be rejected. To install these hooks, run the following commands from the root of the repository:

    pip install pre-commit
    pre-commit install
    pip install pre-commit
    pre-commit install
  6. Build the documentation locally

    develop

    To build the earthkit documentation locally, you must first install the necessary Python dependencies and then use make to generate the HTML files.

    1. Navigate to the docs directory.
    2. Install dependencies using pip install -r requirements.txt.
    3. Run make html to build the site.
    4. Open docs/_build/html/index.html in your browser to view the generated documentation.
    cd docs
    pip install -r requirements.txt
    make html
  7. Run documentation code snippet tests

    develop
    Python files (.py) within the docs folder that contain example code snippets are automatically run as part of the test suite. Many snippets are skipped via a SKIP list in tests/documentation/test_examples.py, which can be modified to include or exclude specific snippets.
  8. Run notebook example tests

    develop

    Notebook examples located in docs/examples are automatically included in the test suite. Some notebooks are skipped (e.g., those using remote data sources) based on a SKIP list defined in tests/documentation/test_notebooks.py. You can modify this list to change which notebooks are tested.

    To run only the notebook tests:

    pytest -v -m notebook