This repository contains the codebase of DLAMP.tw
, a pure data-driven regional forecasting model. This model's backbone design is based on Pangu-weather. We make a varient of it by adding DDPM diffusion process to strengthen the ability of predicting stochastic convections.
Demo for Typhoon Muifa (2022). From left to right are: (a). ground truth, (b). prediction of Swin-Transformer (Pangu-weather) model and (c). Swin-Transformer predicts the mean field plus DDPM predicts the convections.
activate a virtual envirionment, here use conda env
conda create --name [env name] python=3.11 -y
conda activate [env name]
install NVIDIA modulus package
git clone [email protected]:NVIDIA/modulus.git && cd modulus
make install
other packages
pip3 install -r requirements.txt
pip3 install hydra-core --upgrade
install onnxruntime according to your CUDA version, please check onnxruntime_official for more details.
pip install onnxruntime-gpu==1.18.0
step 1. set hyperparameters
config/**/*.yaml
Note: all the configurations are wrapped by@hydra.main
during training.src/const.py
step 2. start training
python train.py
step 3. start inference
python predict.py
Model Name | Total Params | Shape | Backbone | Reference |
---|---|---|---|---|
Swin-Transformer | 29M | (B, 21, 224, 224) | - | Pangu-weather |
Diffusion Model (DDPM) | 672M | (B, 21, 224, 224) | ResUNet | DDPM |
This project is sponsored by the Taiwan's Centeral Weather Administration and the Department of Atmospheric Sciences, NTU. Without the support of the governmental and educational institutions, this project is not possible. Also, big thanks to the co-author Tracy. She helps me make many plots and figures.