FengQing is a data-driven model for medium-range weather forecasting jointly developed by the China Meteorological Administration and School of Software at Tsinghua University. It leverages advanced machine-learning techniques to enhance weather forecasting and analysis for over 10 days. The runnable model and inference code are fully open-sourced, allowing users to set up and perform their weather predictions efficiently.
风清是中国气象局和清华大学软件学院联合开发的中期天气预报数据驱动模型。它利用先进的机器学习技术来增强 10 天以上的天气预报和分析。可运行的模型和推理代码是完全开源的,允许用户高效地设置和执行天气预报。
To begin working on this project, you need to download the sample input data and pre-trained models from this zenodo link or Google Cloud, which is organized according to the following directory structure:
要开始处理此项目,您需要从此 zenodo 链接或 Google Cloud 下载示例输入数据和预训练模型,该链接根据以下目录结构进行组织:
project_root/
├── data/
│ ├── YYYY
│ ├── MMDD
│ ├── pressure_060000.npy
│ ├── pressure_120000.npy
│ ├── surface_060000.npy
│ ├── surface_120000.npy
├── mean_std/
│ ├── upper_mean.npy
│ ├── surface_mean.npy
│ ├── upper_std.npy
│ ├── surface_std.npy
│ ├── res_upper_std.npy
│ ├── res_surface_std.npy
├── utils/
│ ├── constant_masks.npy
│ ├── cfg_15days.pt
├── onnx/
│ ├── weights.pb
│ ├── fengqing.onnx
project_root/ ├── data/ │ ├── YYYY │ ├── MMDD │ ├── pressure_060000.npy │ ├── pressure_120000.npy │ ├── surface_060000.npy │ ├── surface_120000.npy ├── mean_std/ │ ├── upper_mean.npy │ ├── surface_mean.npy │ ├── upper_std.npy │ ├── surface_std.npy │ ├── res_upper_std.npy │ ├── res_surface_std.npy ├── utils/ │ ├── constant_masks.npy│ ├── cfg_15days.pt ├── onnx/ │ ├── weights.pb │ ├── fengqing.onnx
You can customize the input data by modifying get_data
function in inference_fengqing.py. To ensure compatibility, please keep the exact input variable order and units as specified in the [details of data](#Details of Data).
Once downloading the model and sample data, follow these steps to install the necessary environment and run the inference script. When using onnxruntime-gpu, the model requires 26.5 GB of GPU memory to run effectively. Please ensure you have a GPU with sufficient memory for optimal performance.
-
Install dependencies
pip install -r requirements.txt
-
Run Inference (start time corresponds to the last input frame)
python inference_fengqing.py --dataset-path /project_root/data --datetime start_time --output_dir /path/to/output
The model takes in two main data types: upper-level and surface data. Each has its own shape and order, and any customized data should be preprocessed in the following format.
- upper-level data: [variable, level, lat, lon] rearrange to [variable * level, lat, lon]
upper variable | abbreviation | unit |
---|---|---|
Geopotential | Z | |
Specific humidity | Q | |
Temperature | T | |
U component of wind | U | |
V component of wind | V |
The pressure levels are arranged in the following sequence:
1000 hPa, 925 hPa, 850 hPa, 700 hPa, 600 hPa, 500 hPa, 400 hPa, 300 hPa, 250 hPa, 200 hPa, 150 hPa, 100 hPa, 50 hPa.
- Surface data: [variable, lat, lon]
surface variable | abbreviation | unit |
---|---|---|
Mean sea level pressure | MSLP | |
10 metre U wind component | U10 | |
10 metre V wind component | V10 | |
2 metre temperature | T2M |
- We are currently working on an updated version of the model that will include precipitation output as part of the FengQing model. Stay tuned for upcoming releases.