Skip to content

AI Weather Modeling: Engineering Analysis from FourCastNet to Pangu ​

Bottom line: AI weather models train neural networks on reanalysis data to directly predict future atmospheric states, cutting inference from "hours on a supercomputer" to "seconds on a single GPU", with accuracy now rivaling traditional numerical weather prediction (NWP). This article reviews the five engineering mainlines — data, architecture, training, inference, and verification. No first-hand experimental data; code snippets are examples.

Experiment Goal ​

Traditional NWP has a high accuracy ceiling but an equally high cost: a global 0.25° model runs for hours on a supercomputer. AI weather models (FourCastNet, Pangu, GraphCast, GenCast, etc.) take a different route:

Reanalysis data (ERA5: historical observations + model fusion)
  → data preprocessing (variables/levels/grid/normalization)
  → model training (supervised learning "current state → future state")
  → rollout inference (generate multi-day forecasts)
  → verification (RMSE/ACC skill scores, benchmarked against NWP)

Unlike NWP's "solving physics equations", AI weather models are data-driven end-to-end mappings. Goal of this article: explain the engineering essentials of this chain, including "why data normalization is so critical" and "why verification must benchmark against NWP".

Code Walkthrough (Example Configurations, Not Real Experiments) ​

1. Data: ERA5 Reanalysis Preprocessing ​

python
# ERA5 preprocessing example (schematic):
# Input: multiple variables × multiple pressure levels (e.g., 5 vars × 5 levels = 25 channels)
# Grid: global 0.25°/1.40625° etc., per-grid training

# Key: normalize per variable with global statistics
#   (weather fields span wildly different dynamic ranges:
#    temperature 200~320K, humidity 0~1, wind -50~50 m/s)
norm = (field - VAR_MEAN) / VAR_STD     # global statistics, never batch statistics

# Time step: prediction interval (e.g., 6h/24h) defines task form and difficulty

2. Model Architecture: ViT Class as Example (Schematic) ​

python
# FourCastNet/Pangu class: Vision Transformer over global fields (schematic structure)
# Input (B, C, H, W) → Patch Embedding → Swin/ViT layers → predicted fields
# Graph network route (GraphCast): spherical mesh → graph → GNN encode-process-decode

# Training objective: same as Chapter 14 Article 2 — regression MSE + periodic scientific validation
criterion = torch.nn.MSELoss()

3. Inference: Rollout Forecasting ​

python
# Inference (schematic): iterative rollout generates multi-day forecasts
state = init_from_analysis()          # initialize from reanalysis/observations
for step in range(forecast_steps):    # predict the next interval each step
    state = model(state)              # one step at training; errors accumulate at inference
    log(state)                        # record intermediate forecasts for evaluation

Key points:

  • Normalization is the first engineering concern: weather fields span huge magnitude ranges; choosing the wrong normalization statistics directly causes training divergence — global statistics are the rule;
  • Rollout error accumulation: at inference the model bootstraps (feeds its own output as input), and errors accumulate daily — this is the essential difference between AI weather and single-step prediction, and why training should use multi-step rollout to mitigate it;
  • Variable/level selection: the prediction target (e.g., 5 vars × 5 levels) balances accuracy and cost and defines the model's generalization boundary.

Principles: Five Key Engineering Decisions ​

Decision 1: Data — The Correct Way to Use Reanalysis Data ​

StageKey points
Data sourceERA5-style reanalysis (observation + model fusion), 40+ years of history
Variables & levelsSurface variables + pressure-level variables; channel count = input dimension
NormalizationGlobal statistics; per variable per level
Temporal resolutionPrediction interval (6h common); training samples sliced from rolling windows

Key insight: reanalysis data itself is a "model + observation" fusion with systematic errors — the "truth" learned by AI models is imperfect; verification must benchmark against NWP and observations.

Decision 2: Architecture — Trade-offs Across Three Mainstream Routes ​

RouteRepresentativesTraits
Transformer (ViT/Swin)FourCastNet, PanguRegular grids, stable training, parallel-friendly
Graph networksGraphCastSphere-geometry friendly, data-efficient
Diffusion/generativeGenCast et al.Probabilistic (ensemble) forecasts, express uncertainty

Selection mainline: deterministic forecasting → ViT/graph networks; probabilistic/ensemble needs → generative routes. Engineering-wise the Transformer route has the most mature ecosystem and easiest debugging.

Decision 3: Training Engineering ​

  • Memory: global 0.25° multi-channel fields are huge tensors; need gradient checkpointing/mixed precision/large-memory GPUs;
  • Multi-step training: unfold multiple rollout steps during backprop to mitigate inference error accumulation (computational cost rises significantly; balance the step count);
  • Verification metrics: RMSE + ACC (anomaly correlation coefficient) are the industry standard; must benchmark against NWP baselines (e.g., IFS) and climatology — training loss alone is meaningless;
  • Checkpoints: long training + science-grade reproducibility (linking Article 4's workflow).

Decision 4: Inference and Deployment ​

  • Inference cost: seconds/minutes on a single GPU for global multi-day forecasts — orders of magnitude faster than NWP; this is the core value of AI weather;
  • Ensemble forecasting: generative models produce ensembles at low cost; probabilistic forecasting is a new capability of AI relative to traditional NWP;
  • Hybrid mode: production systems often use "AI model + NWP post-processing/calibration"; full AI replacement is still debated on interpretability and extreme events;
  • Serving: inference services must handle input initialization (initial values from analysis fields) and output post-processing (derived quantities like precipitation).

Decision 5: Credibility and Verification ​

  • Per-variable evaluation: temperature/precipitation/wind/extreme events reported separately, never just a global average;
  • Skill over lead time: the per-day skill curve over forecast lead (1–10 days) is the core chart;
  • Extreme events: typhoon tracks, heatwaves, heavy rain — AI model performance on extremes is what reviewers and users care about most;
  • Interpretability: attribution (which inputs dominate predictions) is an engineering means to bolster credibility.

Domain Observations ​

Note: these are review-level observations with no first-hand experimental data; refer to original literature for concrete numbers.

  1. Catch-up speed: published work shows AI weather models matching top NWP systems on RMSE/ACC for medium-range forecasts (1–10 days), with inference orders of magnitude faster;
  2. Paradigm shift: from deterministic single models (FourCastNet/Pangu) to probabilistic generative ones (GenCast class), moving from "one answer" to "a distribution of answers";
  3. Engineering reality: reanalysis data quality, extreme-event extrapolation, and interpretability differences vs NWP remain the main obstacles to operational deployment;
  4. Compute demand: training a global AI weather model once approaches mid-to-large LLM pretraining in compute; cluster selection can reference the Chapter 11/14 solutions.

Engineering Takeaways ​

AI weather project landing checklist:

  • [ ] Data: full ERA5 preprocessing pipeline; global-statistics normalization; clear prediction interval and variable/level set;
  • [ ] Architecture: Transformer for deterministic (mature ecosystem); generative for probabilistic; graph networks if sphere geometry is sensitive;
  • [ ] Training: mixed precision + gradient checkpointing for memory; multi-step rollout training to mitigate error accumulation; per-variable RMSE/ACC reporting;
  • [ ] Inference: single-GPU second-level serving; ensembles for uncertainty; combine with NWP calibration/post-processing;
  • [ ] Verification: benchmark against NWP and climatology; per-day skill curves; extreme-event special tests;
  • [ ] Reproducibility: data version/model weights/evaluation scripts into provenance (Article 4).

Next: Parallel Genomics Computing: The AI×HPC Pipeline from Alignment to Variants, entering the life-science scale.

AI-HPC Expert · Contact: openaihpc@gmail.com