Skip to main content

A reproducible benchmarking framework for Indian monsoon onset prediction

Project description

MonsoonBench

A unified, reproducible benchmarking framework for Indian monsoon onset prediction.

MonsoonBench provides a standardized workflow for loading rainfall and forecast datasets, computing monsoon onset, and evaluating forecasting skill across space and time.
It is designed for climate researchers, forecasters, and data scientists aiming to compare deterministic, probabilistic, and climatology-based onset models using consistent methods.

The framework follows WeatherBench-style principles: clean APIs, reproducible configuration, modular components, and shareable outputs.


Documentation Overview

MonsoonBench includes detailed module-specific guides. Use the links below to navigate the documentation.

Core Package Overview & Pipeline

High-level explanation of the evaluation pipeline, CLI interface, onset metrics, and NetCDF outputs.
Path: monsoonbench/README.md
Open Metrics & Pipeline README


Data Loading Guide

How to load IMD rainfall, deterministic/probabilistic forecasts, and threshold datasets using the unified API.
Path: monsoonbench/data/dataloader_quickstart.md
Open DataLoader QuickStart


Visualization & Metric Export Tools

How to generate spatial scorecards and export skill metrics in NetCDF, CSV, Parquet, or JSON formats.
Path: monsoonbench/visualization/README.md
Open Visualization README


Examples (Configs, Scripts, Notebooks)

Example YAML configs, runnable scripts, and tutorial notebooks demonstrating end-to-end usage.
Path: examples/README.md
Open Examples README


Installation

MonsoonBench is available on TestPyPI for pre-release testing:

pip install -i https://test.pypi.org/simple/ \
    --extra-index-url https://pypi.org/simple/ \
    monsoonbench==0.1.0

Verify installation:

monsoonbench --help

Python API Example

from monsoonbench.metrics import DeterministicOnsetMetrics
from monsoonbench.visualization import create_model_comparison_table

# Initialize metrics calculator
metrics = DeterministicOnsetMetrics()

# Compute metrics for multiple years
df, onset_data = metrics.compute_metrics_multiple_years(
    years=[2019, 2020, 2021, 2022],
    model_forecast_dir="data/model_forecast_data/fuxi/...",
    imd_folder="data/imd_rainfall_data/4p0",
    thres_file="data/imd_onset_threshold/mwset4x4.nc4",
    tolerance_days=3,
    verification_window=1,
    forecast_days=15,
)

# Create spatial metrics
spatial = metrics.create_spatial_far_mr_mae(df, onset_data)

# Generate comparison table
comparison = create_model_comparison_table({"FuXi": spatial})
print(comparison)

Repository Structure

monsoon-bench/
│
├── monsoonbench/ # Core package
│ ├── data/ # Dataloaders
│ │ └── dataloader_quickstart.md
│ ├── metrics/ # Onset detection + evaluation pipeline
│ ├── visualization/ # Scorecards + metric downloaders
│ │ └── README.md
│ ├── README.md # Module-level pipeline documentation
│ └── ...
│
├── examples/ # Configs, scripts, tutorial notebooks
│ └── README.md
│
├── tests/ # Unit tests
├── Dockerfile
├── Makefile
└── pyproject.toml

Development Process with branches

Each team member created their own branch to implement specific fixes or features, such as the data loader, data downloader, and visualizations. We regularly merged these branches during TA meetings to ensure that the codebase stayed consistent and that everyone remained aligned on progress and design decisions.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

monsoonbench-0.1.2.tar.gz (16.7 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

monsoonbench-0.1.2-py3-none-any.whl (54.7 kB view details)

Uploaded Python 3

File details

Details for the file monsoonbench-0.1.2.tar.gz.

File metadata

  • Download URL: monsoonbench-0.1.2.tar.gz
  • Upload date:
  • Size: 16.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for monsoonbench-0.1.2.tar.gz
Algorithm Hash digest
SHA256 0012452e8bb03468e91f3d295a4056b7557c6f1a308442a375a4e88c79f974a5
MD5 1765313579fa6b7721b5e24bd6f6991b
BLAKE2b-256 0304c3bc14b2d1ede70e83d504b3cda41212448218175e1d08cfa675dd391c95

See more details on using hashes here.

File details

Details for the file monsoonbench-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: monsoonbench-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 54.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for monsoonbench-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0e1946119aa9d305938aec04d2b9554711636e0183ad6f09454bcae17ecfa8ed
MD5 c329159c8807973781eef6fe6c74d5f1
BLAKE2b-256 20946d4160f04e597e1390d15f9b16030d646a3705c2622c8f6dcfbab5ccf2a6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page