ai4sci-climate-emulation

AI for ScienceClimSimrigorous codebase

Description

Climate Physics Emulation: Neural Network Architecture

Research Question

Design an improved neural network architecture for emulating sub-grid atmospheric physics processes in climate models. Your architecture should achieve lower Normalized MSE (NMSE) than the default MLP baseline on the ClimSim low-resolution dataset.

Background

Global climate models divide the atmosphere into grid cells, but many critical physical processes (radiation, convection, cloud formation) occur at scales smaller than these grid cells. Traditionally, these sub-grid processes are approximated by parameterization schemes -- handcrafted physics-based approximations. Neural network emulators can learn these mappings from high-resolution simulation data, potentially improving both accuracy and computational efficiency.

ClimSim provides data from the E3SM multi-scale climate model, where each sample maps an atmospheric column state to the corresponding sub-grid physics tendencies computed by the high-resolution physics module.

Task

Modify the Custom model class (lines 86-118 in custom_emulator.py) to implement a better neural network architecture. The model must:

  • Accept input_dim and output_dim in __init__
  • Implement forward(x) where x has shape (batch_size, input_dim)
  • Return predictions of shape (batch_size, output_dim)

Interface

Input structure (556-dim vector per atmospheric column):

  • 9 multi-level variables x 60 vertical levels = 540 features: temperature (state_t), specific humidity (state_q0001), cloud ice (state_q0002), cloud liquid (state_q0003), zonal wind (state_u), meridional wind (state_v), ozone (pbuf_ozone), methane (pbuf_CH4), nitrous oxide (pbuf_N2O)
  • 16-17 single-level (surface/TOA) scalar variables: surface pressure, solar insolation, heat fluxes, wind stress, albedos, surface type fractions, snow depths

Output structure (368-dim vector):

  • 6 multi-level tendency variables x 60 levels = 360 features: temperature tendency (ptend_t), humidity tendencies (ptend_q0001-q0003), wind tendencies (ptend_u, ptend_v)
  • 8 single-level diagnostic outputs: net shortwave, longwave down, snow/rain precipitation, direct/diffuse solar

Evaluation

  • Primary metric: Normalized MSE (NMSE = MSE / Var(target), lower is better)
  • Secondary metrics: R-squared (R2, higher is better), RMSE
  • Training budgets: 10 epochs (fast convergence), 30 epochs (standard), 60 epochs (extended)
  • All three training budgets run in parallel; improvements should be consistent across all three

Code

custom_emulator.py
EditableRead-only
1"""Custom Climate Physics Emulator
2Trained on ClimSim low-resolution E3SM data to predict sub-grid physics tendencies.
3
4Input: 556-dim atmospheric state vector (V2 variables)
5Output: 368-dim sub-grid physics tendencies
6"""
7
8import math
9import os
10import time
11from dataclasses import dataclass
12
13import numpy as np
14import torch
15import torch.nn as nn

Additional context files (read-only):

  • ClimSim/climsim_utils/data_utils.py

Results

ModelTypenmse short-10ep rmse short-10ep ml nmse short-10ep sl nmse short-10ep nmse medium-30ep rmse medium-30ep ml nmse medium-30ep sl nmse medium-30ep nmse long-60ep rmse long-60ep ml nmse long-60ep sl nmse long-60ep r2 short-10ep r2 medium-30ep r2 long-60ep
cnnbaseline0.4370.5040.4470.0920.3790.4630.3880.0650.3590.4480.3680.0570.5630.6210.641
edbaseline0.5350.5520.5410.3380.4870.5260.4920.3260.4640.5130.4690.3210.4650.5130.535
hsrbaseline0.5040.5350.5100.3230.4480.5030.4520.3110.4230.4890.4270.3070.4950.5520.577
mlpbaseline0.4060.4760.4090.3020.3810.4580.3830.2950.3740.4530.3760.2930.5940.6190.626
unetbaseline0.3490.4420.3470.3930.3420.4320.3410.3850.3430.4330.3420.3850.6510.6580.657