Skip to main content

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 PyPI:

pip install monsoonbench

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
│ ├── utils/ # Notebook-facing reusable helpers (e.g., onset_timeseries)
│ │ └── README.md
│ ├── 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.

Release files for monsoonbench 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for monsoonbench 0.1.3
File Size Uploaded
monsoonbench-0.1.3.tar.gz 17.2 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for monsoonbench 0.1.3
File Interpreter ABI Platform
monsoonbench-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 17.3 MB

Release files / monsoonbench-0.1.3.tar.gz

Download URL monsoonbench-0.1.3.tar.gz
Size 17.2 MB
Tags Source
SHA-256 checksum
How to use checksums
e189993f0d11522bd204a504beff66b628cda04138ea48c898c499109aa1c80e
BLAKE2b-256 checksum
How to use checksums
554bcfa20b51c200b6f2521691cfe7fe0083d9878dccfb4272db7b3d019fb637
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / monsoonbench-0.1.3-py3-none-any.whl

Download URL monsoonbench-0.1.3-py3-none-any.whl
Size 111.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e6acde2b7967e12fc403b547996ef7d2d5ca95412b81d6797881a5b5da235337
BLAKE2b-256 checksum
How to use checksums
1b18d188b48fa77d095590aa06b5e3350e4188071eacb759e99a8103f3aad187
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page