Skip to content

Codebase for DLAMP.tw AI model. Includes Swin-Transformer and DDPM model structures in this repo.

License

Notifications You must be signed in to change notification settings

YaoChuDoSomething/DLAMP.TW

 
 

Repository files navigation

Data-driven Limited Area Mesoscale Prediction for Taiwan (DLAMP.tw)

Python PyTorch PyTorch Lightning

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.

Build Environment

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

Quick Start

step 1. set hyperparameters

  1. config/**/*.yaml
    Note: all the configurations are wrapped by @hydra.main during training.
  2. src/const.py

step 2. start training

python train.py

step 3. start inference

python predict.py

Model Zoo

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

Acknowledgement

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.

About

Codebase for DLAMP.tw AI model. Includes Swin-Transformer and DDPM model structures in this repo.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%