varunayan: Download and Process ERA5 Climate Data

A Python package for downloading and processing ERA5 climate data with support for custom geographical regions:

PyPI version Python versions License

Overview

varunayan provides a simple and powerful interface to download and process ERA5 climate data from the Copernicus Climate Data Store. It supports:

  • Custom geographical regions: Use GeoJSON files, bounding boxes, or point coordinates

  • Multiple variables: Download any ERA5 variable (temperature, precipitation, wind, etc.)

  • Flexible time periods: From hourly to yearly data aggregation

  • Automatic processing: Spatial filtering, temporal aggregation, and CSV output

  • Chunking support: Handle large requests efficiently with automatic time-based chunking

Quick Start

Installation

pip install varunayan

Basic Usage

from varunayan import era5ify_geojson, era5ify_bbox, era5ify_point

# Download data for a GeoJSON region
era5ify_geojson(
    request_id="my_request",
    variables=["2m_temperature", "total_precipitation"],
    start_date="2020-01-01",
    end_date="2020-01-31",
    json_file="my_region.geojson"
)

# Download data for a bounding box
era5ify_bbox(
    request_id="bbox_request",
    variables=["2m_temperature"],
    start_date="2020-01-01",
    end_date="2020-01-02",
    north=40.0, south=35.0, east=-120.0, west=-125.0
)

Command Line Interface

# Process with GeoJSON file
varunayan geojson --request-id "my_request" --variables "2m_temperature,total_precipitation" \
  --start "2020-01-01" --end "2020-01-31" --geojson "region.geojson"

# Process with bounding box
varunayan bbox --request-id "bbox_request" --variables "2m_temperature" \
  --start "2020-01-01" --end "2020-01-02" \
  --north 40.0 --south 35.0 --east -120.0 --west -125.0

# Process for a single point
varunayan point --request-id "point_request" --variables "2m_temperature" \
  --start "2020-01-01" --end "2020-01-02" --lat 37.7749 --lon -122.4194

Jupyter Notebooks

Interactive notebooks with hands-on examples:

API Reference

Release History

Indices and tables