license: mit
pipeline_tag: time-series-forecasting
library_name: torch
OneForecast: A Universal Framework for Global and Regional Weather Forecasting
This repository contains the code for the model described in the paper OneForecast: A Universal Framework for Global and Regional Weather Forecasting.
Github repository: https://github.com/YuanGao-YG/OneForecast.
Accurate weather forecasts are important for disaster prevention, agricultural planning, etc. Traditional numerical weather prediction (NWP) methods offer physically interpretable high-accuracy predictions but are computationally expensive and fail to fully leverage rapidly growing historical data. In recent years, deep learning models have made significant progress in weather forecasting, but challenges remain, such as balancing global and regional high-resolution forecasts, excessive smoothing in extreme event predictions, and insufficient dynamic system modeling. To address these issues, this paper proposes a global-regional nested weather forecasting framework (OneForecast) based on graph neural networks. By combining a dynamic system perspective with multi-grid theory, we construct a multi-scale graph structure and densify the target region to capture local high-frequency features. We introduce an adaptive messaging mechanism, using dynamic gating units to deeply integrate node and edge features for more accurate extreme event forecasting. For high-resolution regional forecasts, we propose a neural nested grid method to mitigate boundary information loss. Experimental results show that OneForecast performs excellently across global to regional scales and short-term to long-term forecasts, especially in extreme event predictions.
Quick Start
Installation
- cuda 11.8
# git clone this repository
git clone https://github.com/YuanGao-YG/OneForecast.git
cd OneForecast
# create new anaconda env
conda env create -f environment.yml
conda activate oneforecast
Inference
- Global Forecasts Inference
(1) Preparing the test data as follows:
./data/
|--global
| |--test
| | |--2020.h5
| |--mean.npy
| |--std.npy
(2) Inference with 1-step supervised pretrained ckpt:
sh inference.sh
(3) Inference with finetuned pretrained ckpt:
sh inference_finetune.sh
- Regional Forecasts Inference
(1) Preparing the test data as follows:
./data/
|--global
| |--test
| | |--2020.h5
| |--mean.npy
| |--std.npy
|--regional
| |--test
| | |--2020.h5
(2) Inference with 1-step supervised pretrained ckpt:
sh inference_nng.sh