This repo is the official PyTorch implementation of Turb-L1.
| Dataset | Geometry | Link | Original Data shape |
|---|---|---|---|
| Decaying Isotropic Turbulence | Regular Grid | [Hugging Face] | (1280, 100, 128, 128) |
| Forced Isotropic Turbulence | Regular Grid | [Google Cloud] | (1200, 64, 64, 20) |
Here's a brief description of the datasets:
Dataset 1
- Original dimensions: 1,280 samples × 100 timesteps
- Spatial resolution: 128×128
- Training strategy: 1-step prediction (1→1)
- Inference strategy: Multi-step prediction (1→99)
- Variable: Vorticity (single variable)
Dataset 2
- Original dimensions: 1,200 samples × 20 timesteps
- Spatial resolution: 64×64
- Training strategy: 1-step prediction (1→1)
- Inference strategy: Multi-step prediction (1→19)
- Variable: Vorticity (single variable)
The expected output dimensions of the dataloader are as follows (Mode details can be found in dataloader_McWilliams.py):
# --- Testing DataLoader Output ---
# Train DataLoader
train_input_shape = (32, 1, 1, 64, 64) # (B, T_input, C, H, W)
train_target_shape = (32, 1, 1, 64, 64) # (B, T_target, C, H, W)
batch_size = 32 # B
input_timesteps = 1 # T_input
channels = 1 # C
height = 64 # H
width = 64 # W
# Validation DataLoader
val_input_shape = (32, 1, 1, 64, 64) # (B, T_input, C, H, W)
# Test DataLoader
test_input_shape = (32, 1, 1, 64, 64) # (B, T_input, C, H, W)-
Core code: see ./turb_l1.py
-
Decaying Isotropic Turbulence Task:
- Train file: see train_McWilliams.py
- Inference file: see inference_McWilliams.py
- Parameters setting: see config_McWilliams.yaml
-
Forced Isotropic Turbulence Task:
- Train file: see train_Forced_Li.py
- Inference file: see inference_Forced_Li.py
- Parameters setting: see config_Forced_Li.yaml
you can run train code using this command:
torchrun --nnodes=1 --nproc_per_node=8 train_McWilliams.pyyou can run inference code using this command:
python inference_McWilliams.pyTrub-L1 achieves consistent state-of-the-art perfermance.
Table 1. Performance comparison on isotropic turbulence datasets.
Figure 1. Long-term prediction on 2D Decaying Isotropic Turbulence.
Figure 2. Evolution of spectral error and visual prediction improvement for Turb-L1 during training.
We appreciate the following github repos a lot for their valuable code base or datasets:
