Skip to main content

Benchmarking weather and weather AI models using extreme events

Project description

Extreme Weather Bench (EWB)

Documentation Status

EWB is currently in limited pre-release. Bugs are likely to occur for now.

v1.0 to be published alongside EWB preprint.

Read our blog post here

As AI weather models are growing in popularity, we need a standardized set of community driven tests that evaluate the models across a wide variety of high-impact hazards. Extreme Weather Bench (EWB) builds on the successful work of WeatherBench and introduces a set of high-impact weather events, spanning across multiple spatial and temporal scales and different parts of the weather spectrum. We provide data to use for testing, standard metrics for evaluation by forecasters worldwide for each of the phenomena, as well as impact-based metrics. EWB is a community system and will be adding additional phenomena, test cases and metrics in collaboration with the worldwide weather and forecast verification community.

Events

EWB has cases broken down by multiple event types within src/extremeweatherbench/data/events.yaml between 2020 and 2024. EWB case studies are documented here.

Available:

Event Type Number of Cases
🌇 Heat Waves 46
🧊 Freezes 14
🌀 Tropical Cyclones 106
☔️ Atmospheric Rivers 56
🌪️ Severe Convection 115
Total Cases 337

EWB paper and talks

How do I suggest new data, metrics, or otherwise get involved?

We welcome your involvement! The success of a benchmark suite rests on community involvement and feedback. There are several ways to get involved:

  • Get involved in community discussion using the discussion board
  • Submit new code requests using the issues
  • Send us email at hello@brightband.com

Installing EWB

Currently, the easiest way to install EWB is using the pip command:

$ pip install git+https://github.com/brightbandtech/ExtremeWeatherBench.git

It is highly recommend to use uv if possible:

$ git clone https://github.com/brightbandtech/ExtremeWeatherBench.git
$ cd ExtremeWeatherBench
$ uv sync

How to Run EWB

Running EWB on sample data (included) is straightforward.

Using command line initialization:

$ ewb --default

Note: this will run every event type, case, target source, and metric for the individual event type as they become available for GFS initialized FourCastNetv2. It is expected a full evaluation will take some time, even on a large VM.

Using Jupyter Notebook or a Script:

from extremeweatherbench import cases, inputs, metrics, evaluate, utils

# Load in a forecast; here, we load in GFS initialized FCNv2 from the CIRA MLWP archive with a default variable built-in for convenience
fcnv2_heatwave_forecast = defaults.cira_fcnv2_heatwave_forecast

# Load in ERA5 with another default convenience variable 
era5_heatwave_target = defaults.era5_heatwave_target

# EvaluationObjects are used to evaluate a single forecast source against a single target source with a defined event type. Event types are declared with each case. One or more metrics can be evaluated with each EvaluationObject.
heatwave_evaluation_list = [
    inputs.EvaluationObject(
        event_type="heat_wave",
        metric_list=[
            metrics.MaximumMeanAbsoluteError(),
            metrics.RootMeanSquaredError(),
            metrics.MaximumLowestMeanAbsoluteError(),
        ],
        target=era5_heatwave_target,
        forecast=fcnv2_heatwave_forecast,
    ),
]
# Load in the EWB default list of event cases
case_metadata = cases.load_ewb_events_yaml_into_case_list()

# Create the evaluation class, with cases and evaluation objects declared
ewb_instance = evaluate.ExtremeWeatherBench(
    case_metadata=case_metadata,
    evaluation_objects=heatwave_evaluation_list,
)

# Execute a parallel run and return the evaluation results as a pandas DataFrame
heatwave_outputs = ewb_instance.run(
    parallel_config={'n_jobs':16} # Uses 16 jobs with the loky backend as default
)

# Save the results
heatwave_outputs.to_csv('heatwave_evaluation_results.csv')

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

extremeweatherbench-1.0.0.tar.gz (106.9 kB view details)

Uploaded Source

Built Distribution

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

extremeweatherbench-1.0.0-py3-none-any.whl (120.6 kB view details)

Uploaded Python 3

File details

Details for the file extremeweatherbench-1.0.0.tar.gz.

File metadata

  • Download URL: extremeweatherbench-1.0.0.tar.gz
  • Upload date:
  • Size: 106.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for extremeweatherbench-1.0.0.tar.gz
Algorithm Hash digest
SHA256 fc824fa7c18244a6b2c38e98cce6ff13c562fcd8b5543bff7149bba03b6e8bf1
MD5 44377faf515a99fb1d108f82604b9e8e
BLAKE2b-256 5fa10a61e278bcb2f10960dada6d7986b6fbab8252ab24d18280788ca43b7448

See more details on using hashes here.

Provenance

The following attestation bundles were made for extremeweatherbench-1.0.0.tar.gz:

Publisher: publish.yaml on brightbandtech/ExtremeWeatherBench

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file extremeweatherbench-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for extremeweatherbench-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2e574afaec587ba180b16d3f864a1d8851f7e15bc9e588634d3ecf29720cc1f2
MD5 3e79849ea4d1c6eabd5b41bd0ea102f4
BLAKE2b-256 a5b04cd3e9150ca6e390e544feb9cbd9a02502590e6c7981e1739febf51b0618

See more details on using hashes here.

Provenance

The following attestation bundles were made for extremeweatherbench-1.0.0-py3-none-any.whl:

Publisher: publish.yaml on brightbandtech/ExtremeWeatherBench

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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