TornadoGCM
TornadoGCM is a pure-PyTorch reimplementation of NeuralGCM (Google Research) featuring a novel Precision-Zoned Hybrid Architecture (PZHA) with automated mixed-precision scheduling for GPU-accelerated global weather forecasting.
Disclaimer: This project is an independent research port. It is not affiliated with or endorsed by Google Research or DeepMind. All trademarks belong to their respective owners.
Features
- Pure PyTorch — full GPU support, DDP/FSDP distributed training,
torch.compilecompatibility - PZHA mixed-precision — four precision zones (Z0 FP64, Z1 TF32, Z2 FP64, Z3 BF16) matched to physical/neural computation roles
- SDA control plane — Self-adaptive Dynamic Accuracy scheduler automatically adjusts precision zones during training
- JAX checkpoint loader — load pre-trained NeuralGCM JAX weights directly, no manual conversion script needed
- Triton acceleration — optional fused spherical-harmonic transform kernels for A100/H100
- Multiple resolutions — tested configs for 0.7°, 1.4°, and 2.8° grids
Architecture Overview
An end-to-end system flow diagram — covering distributed training, the PZHA model step, production inference, and the SDA precision-governance plane — is in the documentation.
┌─────────────────────────────────────────────────────────────────────────┐
│ AtmosphereModel (facade) │
├───────────────┬─────────────────────────┬───────────────────────────────┤
│ Encoder │ NeuralGCMModel (step) │ Decoder │
│ Z3 (BF16) │ ┌──────────────────┐ │ Z3 (BF16) │
│ │ │ Dycore Z1 (TF32)│ │ │
│ │ │ Neural Z3 (BF16)│ │ │
│ │ │ Fixer Z2 (FP64)│ │ │
│ │ └──────────────────┘ │ │
└───────────────┴─────────────────────────┴───────────────────────────────┘
↕ SDA Controller (precision scheduler)
| Zone | Role | Default dtype |
|---|---|---|
| Z0 | Conservation math, initialization | FP64 |
| Z1 | Spectral dycore (SHT, primitive equations) | TF32 |
| Z2 | Energy/mass/hydrology fixers | FP64 |
| Z3 | Neural parameterizations (MLP/CNN/Transformer) | BF16 |
Installation
# Core (CPU/GPU)
pip install tornado-gcm
# With data I/O (xarray, zarr)
pip install "tornado-gcm[data]"
# With Triton GPU kernels
pip install "tornado-gcm[gpu]"
# Development
pip install "tornado-gcm[dev]"
pre-commit install
Requirements: Python ≥ 3.9, PyTorch ≥ 2.1, CUDA 11.8+ (for GPU).
Quick Start (5 minutes)
1. Load a pre-trained JAX checkpoint and run a forecast
import torch
from tornado_gcm.model.jax_checkpoint_loader import load_jax_checkpoint
from tornado_gcm.inference.runner import MPInference
from tornado_gcm.precision.sda import SDAConfig
# Load SDA config (choose resolution)
sda_cfg = SDAConfig.from_yaml("configs/sda_neuralgcm_2.8deg_full.yaml")
# Convert JAX weights → PyTorch
model = load_jax_checkpoint("path/to/neuralgcm_checkpoint", device="cuda")
# Build mixed-precision inference runner
runner = MPInference(model=model, device="cuda")
# Run 10-day (40-step × 6h) forecast
# initial_state: a State dataclass on GPU
trajectory = runner.rollout(initial_state, steps=40)
2. CLI
# Inference
tornado-gcm infer \
--config configs/sda_neuralgcm_1.4deg.yaml \
--checkpoint model.pt \
--input era5_20200101.zarr \
--output forecast.zarr \
--steps 40
# Benchmark
tornado-gcm benchmark \
--config configs/sda_neuralgcm_2.8deg_full.yaml \
--steps 20 \
--report bench.txt
# Training (requires ERA5 data)
tornado-gcm train \
--config configs/sda_neuralgcm_1.4deg.yaml \
--jax-weights neuralgcm_checkpoint \
--steps 50000 \
--checkpoint output/run1.pt
Performance
Tested on a single NVIDIA A100 80 GB (CUDA 12.1, PyTorch 2.2):
| Resolution | Memory (GB) | Steps/s | vs JAX (TPU v4) |
|---|---|---|---|
| 2.8° | 8.2 | 4.1 | ~0.9× |
| 1.4° | 24.7 | 1.3 | ~0.85× |
| 0.7° | 68.4 | 0.35 | ~0.75× |
Note: JAX numbers from original paper on TPU v4-8 pod.
Project Structure
tornado_gcm/
├── core/ # Spectral dynamics, coordinates, time integration (Z0/Z1)
├── neural/ # NN parameterizations, encoders/decoders, towers (Z3)
├── model/ # Model assembly, JAX checkpoint loader
├── precision/ # PZHA policy, SDA controller, Triton accelerator
├── training/ # Trainers, losses, evaluation, data loading
├── inference/ # MPInference, SDAInference, production runner
├── distributed/ # DDP / DTensor sharding
├── configs/ # Ready-to-use SDA YAML configs (0.7°/1.4°/2.8°)
└── cli.py # Click CLI entry point
Attribution
This project is a PyTorch port of NeuralGCM by Kochkov et al.:
Kochkov, D., Yuval, J., Langmore, I., Norgaard, P., Smith, J., Mooers, G., ... & Hoyer, S. (2024). Neural general circulation models for weather and climate. Nature, 632, 1060–1066. https://doi.org/10.1038/s41586-024-07744-y
Original JAX code: https://github.com/google-research/neuralgcm (Apache 2.0)
The PZHA mixed-precision framework, SDA control plane, and PyTorch-specific optimizations are original contributions of this project.
Contributing
See CONTRIBUTING.md.
License
- Source code: Apache License 2.0
- Pre-trained weights (if distributed): CC BY-SA 4.0
Metadata
Release files for tornado-gcm 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| tornado_gcm-0.1.1.tar.gz | 304.4 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| tornado_gcm-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 652.5 kB
Release files / tornado_gcm-0.1.1.tar.gz
| Download URL | tornado_gcm-0.1.1.tar.gz |
|---|---|
| Size | 304.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7e30e9680b32bcc7bfc458e14c0a2a2298601e9f5928ead9a6e84b428922f92a
|
|
BLAKE2b-256 checksum How to use checksums |
f0ba1ec567739e93277d9229976cc121438eaf6ce49cb9633282a5dec121acb0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.
Transparency logRelease files / tornado_gcm-0.1.1-py3-none-any.whl
| Download URL | tornado_gcm-0.1.1-py3-none-any.whl |
|---|---|
| Size | 348.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
65ebef9ed37b01fb06e30419758bde625da62a8771fff87d754bf48c0d6c5685
|
|
BLAKE2b-256 checksum How to use checksums |
af82ff56d5b3b33dd6ff5193c84db5457e7e46366e7aba87750f17fb6c1d805b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.
Transparency logSecurity for tornado-gcm 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for tornado_gcm-0.1.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.