weathernext

Dataset & Model

google-deepmind/weathernext

AI-powered global weather forecasting model from Google DeepMind.

Overview

WeatherNext is a collection of state-of-the-art AI models for global medium-range weather forecasting and cyclone tracking. It includes WeatherNext 2, the operational model, as well as earlier GraphCast and GenCast models. The repository provides code, pretrained weights, and documentation for running forecasts.

README Preview

# WeatherNext\n\n## WeatherNext 2\n\nThis repo contains the code for WeatherNext 2 (WN2), the global, medium-range\natmospheric and cyclone forecasting model developed by Google DeepMind and\nGoogle Research.\n\nIt also contains code for prior generation models\n[GraphCast](https://deepmind.google/blog/graphcast-ai-model-for-faster-and-more-accurate-global-weather-forecasting/)\nand\n[GenCast](https://deepmind.google/blog/gencast-predicts-weather-and-the-risks-of-extreme-conditions-with-sota-accuracy/).\n\n### Accessing Forecast Data Feeds\nIf you are interested in directly accessing daily data feeds of WN2 model\noutputs rather than running the model yourself, we provide them across multiple\nplatforms:\n\n*   [Google Cloud](https://developers.google.com/weathernext/guides/access-forecast)\n(including Earth Engine, BigQuery, and Vertex AI).\n*   [WeatherLab](https://deepmind.google.com/science/weatherlab) (including cyclone tracks).\n*   [OpenMeteo](https://open-meteo.com/en/docs/google-weathernext-api) (including an API and interactive builder).\n\n### Learn More\n\n*   **Model Guide & Documentation:** [Google Developers WeatherNext Guide](https://developers.google.com/weathernext/guides/models)\n*   **WeatherNext Cyclones Paper:** [Operational tropical cyclone forecasting\n    with AI](https://www.nature.com/articles/s41586-026-10953-2)\n*   **FGN/WN2 Technical Report:** [Skillful joint probabilistic weather\n    forecasting from marginals\n    (arXiv:2506.10772)](https://arxiv.org/abs/2506.10772)\n*   **WeatherNext 2 Blog Post:** [WeatherNext 2: Our most advanced weather forecasting model](https://blog.google/innovation-and-ai/models-and-research/google-deepmind/weathernext-2/)\n*   **WeatherNext Cyclones Blog Post:** [WeatherNext: AI model achieves breakthrough in forecasting cyclones](https://deepmind.google/blog/weathernext-ai-model-achieves-breakthrough-in-forecasting-cyclones/)\n\n### Older Models\n\nThis repository serves as the primary home for the Weathe

FAQ (5)

Troubleshooting
How to remove the batch coordinate from an xarray variable while keeping the batch dimension?

Use drop_vars() to remove the dimension coordinate without removing the dimension:

xr_dataset = xr_dataset.drop_vars("batch")

This keeps batch as a dimension for Temp and datetime, but it becomes a dimension without a coordinate, matching the example NetCDF file.

Alternatively, omit batch when creating the Dataset:

coords = {
    "time": ("time", times),
    "channel": [0],
    "lon": ("lon", lons),
    "lat": ("lat", lats),
    "datetime": (("batch", "time"), [datetimes]),
}

The batch dimension is still inferred from the variable shapes even though it is not defined in coords.

GitHub Issue #90
informational
What target dataset is used for GraphCast operational fine-tuning?

For GraphCast_operational fine-tuning, precipitation targets come from ERA5, while all other variables use HRES-fc0 fields. The loss is calculated between GraphCast outputs and these mixed targets—not ERA5 for every variable.

GitHub Issue #190
Troubleshooting
How to fix "AttributeError: module 'jax.stages' has no attribute 'OutInfo'" when installing Graphcast?

This was caused by an incompatible Graphcast/JAX version in the master.zip snapshot and has been fixed in recent Graphcast commits. Reinstall the latest source, then restart the Python/Colab runtime:

pip install --upgrade --no-cache-dir https://github.com/google-deepmind/graphcast/archive/master.zip

Alternatively, install directly from Git:

pip install --upgrade --no-cache-dir git+https://github.com/google-deepmind/graphcast.git

After installation, restart the kernel/runtime and import Graphcast again. If your environment pins JAX, make sure it is compatible with the latest Graphcast release rather than using a separately upgraded JAX version.

GitHub Issue #189
Troubleshooting
How can I run GraphCast with the latest ERA5 data while keeping preprocessing and normalization consistent with pretrained checkpoints?

You do not have to use only the officially provided historical GraphCast-formatted data. Build an ERA5 conversion pipeline and validate it against the official sample data first: (1) download raw ERA5 data for dates already covered by the provided GraphCast example dataset; (2) convert it using the same variable selection, pressure levels, grid, units, time handling, and normalization used for the pretrained model; (3) compare your output with the official sample until it matches exactly; (4) once the converter is validated, run the same unchanged code on newer ERA5 analysis data. This exact-match validation is the recommended way to ensure recent inputs are scientifically and technically compatible with the pretrained checkpoint.

GitHub Issue #200
Troubleshooting
How do I run GraphCast high-resolution inference on multiple GPUs or a TPU v3-8 without running out of memory?

GraphCast does not currently support model-parallel inference for a single forecast. xarray_jax.pmap can distribute work across devices only at the batch dimension, so each device still loads the full model; it does not shard the GNN or reduce memory for one high-resolution sample. Use a GPU with at least 24 GB memory or a TPU v4, which provides 32 GB per chip. A TPU v3 has only 16 GB per chip and may OOM even on a v3-8. For lower-memory inference, try the community graphcast-lite project, which reports running 0.25° resolution with 37 pressure levels on an RTX 2080 using float32: https://github.com/VectorElectron/graphcast-lite. Use pmap only when you have multiple independent forecasts to run as a batch.

GitHub Issue #33