Thanks to visit codestin.com
Credit goes to Github.com

Skip to content

tfeilyu/TelePiT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Physics-Informed Teleconnection-Aware Transformer for Global S2S Forecasting

License Python PyTorch

Official implementation of TelePiT: Physics-Informed Teleconnection-Aware Transformer for Global S2S Forecasting


🌟 Highlights

πŸ† State-of-the-art Performance

  • 57.7% reduction in RMSE for 2-meter temperature
  • Outperforms both AI models and operational systems
  • Consistent improvements across all variables

🌍 Global S2S Forecasting

  • Predicts weeks 3-4 (days 15-28) and weeks 5-6 (days 29-42)
  • 121Γ—240 global grid at 1.5Β° resolution
  • 63 atmospheric variables across 10 pressure levels

πŸ”¬ Physics-Informed Design

  • Multi-Scale Physics-Informed Neural ODEs
  • Incorporates atmospheric transport processes
  • Maintains physical consistency through spectral metrics

🌐 Teleconnection-Aware

  • Explicitly models teleconnection patterns
  • Captures long-range atmospheric interactions
  • Spherical harmonic embedding for Earth geometry

πŸ—οΈ Model Architecture

TelePiT Architecture TelePiT framework for global subseasonal-to-seasonal forecasting

Key Components

Component Description Key Innovation
πŸ—ΊοΈ Spherical Harmonic Embedding Encodes global atmospheric variables onto spherical geometry Learnable positional encoding for Earth's spherical structure
🌊 Multi-Scale Physics-Informed ODE Captures atmospheric dynamics across multiple frequency bands Physics-constrained neural ODEs with learnable decomposition
πŸ”— Teleconnection-Aware Transformer Models global climate interactions and cross-scale processes Attention mechanism biased by teleconnection patterns

πŸš€ Quick Start

πŸ”§ Installation

Click to expand installation steps
# Create conda environment
conda create -n telepit python=3.8 -y
conda activate telepit

# Install PyTorch (adjust CUDA version as needed)
conda install pytorch torchvision torchaudio pytorch-cuda=11.8 -c pytorch -c nvidia

# Install dependencies
pip install -r requirements.txt

Core Dependencies:

torch>=1.9.0, torchdiffeq>=0.2.3, xarray>=0.19.0, numpy>=1.21.0

πŸ“Š Dataset Setup

TelePiT uses the ERA5 reanalysis dataset via ChaosBench:

# Download ChaosBench dataset
git clone https://github.com/leap-stc/ChaosBench.git
cd ChaosBench

# Follow ChaosBench instructions to download ERA5 data
# Data will be automatically processed to the required format
Dataset Info Details
πŸ“ Source ERA5 reanalysis (ECMWF)
🌐 Resolution 1.5Β° (121 Γ— 240 grid)
πŸ“Š Variables 63 total (60 pressure-level + 3 surface)
⏰ Time Split Train: 1979-2016, Val: 2017, Test: 2018

⚑ Inference

You can download the checkpoints in this link: checkpoint

import torch
from S2S.models.TelePiT import Model

# Load pre-trained model
model = Model(
    img_size=[121, 240], input_size=63, output_size=63,
    embed_dim=256, depth=6, num_heads=8, wavelet_levels=3
)

# Load checkpoint and predict
checkpoint = torch.load('checkpoints/TelePiT/best.ckpt')
model.load_state_dict(checkpoint['state_dict'])
model.eval()

with torch.no_grad():
    # Input: [batch_size, 63, 121, 240]
    # Output: [batch_size, 2, 63, 121, 240] for weeks 3-4 and 5-6
    prediction = model(input_data)

🎯 Training & Evaluation

# Training
python train.py --config configs/telepit_config.yaml

# Evaluation
python step1_predict_to_npy.py --config_filepath configs/telepit.yaml
python step2_predict_with_wandb.py --config_filepath configs/telepit.yaml

πŸ† Results

πŸ“ˆ Performance Comparison

Performance Heatmap RMSE comparison across pressure levels and variables

🎯 Key Improvements

Variable Metric Previous Best TelePiT Improvement
🌑️ t2m (K) RMSE 28.526 (CirT) 12.057 πŸ”₯ 57.7% ↓
πŸŒ€ z500 (mΒ²/sΒ²) RMSE 53.807 (CirT) 48.671 ✨ 9.5% ↓
🌊 z850 (mΒ²/sΒ²) RMSE 34.006 (CirT) 31.082 ⚑ 8.6% ↓
🌑️ t2m (K) ACC 0.977 (CirT) 0.996 πŸ“ˆ 1.9% ↑

🌍 Global Performance Visualization

Global RMSE Distribution Global RMSE distribution for t850 at weeks 3-4. Darker blue indicates better performance.

πŸ“ˆ Temporal Performance

Daily Performance Daily RMSE performance for t850 throughout 2018 test period


πŸ”¬ Ablation Study

Component Impact Key Benefit
πŸ—ΊοΈ Spherical Harmonic Embedding Critical Largest impact on t2m: 27.2K β†’ 12.1K
🌊 Wavelet Decomposition Essential 7-8% improvement in geopotential heights
βš›οΈ Physics-Informed ODE Essential Enhanced wind component predictions
πŸ”— Teleconnection Attention Critical Increasingly valuable at longer lead times

βš™οΈ Technical Details

πŸ–₯️ Hardware Requirements

Component Training Inference
GPU 2Γ— RTX A40 (48GB total) 1Γ— A800 80G
Memory 32GB+ RAM 16GB+ RAM
Storage 1TB+ (for dataset) 100GB+

πŸ“Š Evaluation Metrics

  • RMSE: Root Mean Squared Error with latitude weighting
  • ACC: Anomaly Correlation Coefficient
  • MS-SSIM: Multi-Scale Structural Similarity
  • SpecDiv: Spectral Divergence (physics-based)
  • SpecRes: Spectral Residual (physics-based)

πŸ”— Related Work & Resources

ChaosBench ECMWF AI Models ERA5 Dataset


🌟 Many Thanks for Your Review! 🌟

Advancing atmospheric science through AI πŸŒβš‘πŸ€–

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages