CPFA is an open-source project designed to make climate prediction data easy to analyze and visualize using the Pangu-Weather model.
Traditional climate models often require complex data preparation, difficult environment setup, and extensive expertise to interpret the results.
This project reduces such barriers and focuses on the following goals:
- Enable fast and simple execution of Pangu-Weather-based predictions
- Provide beginner-friendly data preparation steps
- Deliver a complete analysis workflow, from prediction to visualization and model performance evaluation
- Offer detailed Windows-based setup and execution instructions
This project follows a four-stage workflow:
- Data collection
- Future climate prediction (using Pangu-Weather)
- Visualization of predicted data
- Model performance evaluation (comparison with ERA5 data)
- Download the project folder from GitHub.
- Move the downloaded folder to the C: drive.
- Visit https://www.anaconda.com/
- Install Anaconda (installation in the C: drive is recommended).
- Visit https://www.python.org/
- Download and install Python 3.9.2.
Please download the four pre-trained models (~1.1GB each) from Google drive or Baidu netdisk:
- The 1-hour model (pangu_weather_1.onnx): 'https://drive.google.com/file/d/1fg5jkiN_5dHzKb-5H9Aw4MOmfILmeY-S/view'
- The 3-hour model (pangu_weather_3.onnx): 'https://drive.google.com/file/d/1EdoLlAXqE9iZLt9Ej9i-JW9LTJ9Jtewt/view'
- The 6-hour model (pangu_weather_6.onnx): 'https://drive.google.com/file/d/1a4XTktkZa5GCtjQxDJb_fNaqTAUiEJu4/view'
- The 24-hour model (pangu_weather_24.onnx): 'https://drive.google.com/file/d/1lweQlxcn9fG0zKNW8ne1Khr9ehRTI6HP/view'
The downloaded files should be organized as follows:
root
├── download_data
│ └── ...
├── input_data
│ └── ...
├── output_data
│ └── ...
├── pangu_weather_1.onnx
├── pangu_weather_3.onnx
├── pangu_weather_6.onnx
├── pangu_weather_24.onnx
├── prediction.py
├── transform_nc_to_npy.py
├── visualization.py
└── evaluation.py
- Search for Anaconda Prompt and run as Administrator.
- Navigate to the C: drive by entering
cd..repeatedly until the path becomesC:\>. - Move into the GitHub project folder: cd CPFA_Folder
- Create a virtual environment: conda create -n <env_name> python=3.9.2 (Example: conda create -n myenv python=3.9.2)
- Activate the environment: conda activate <env_name> (When activation is successful, the environment name appears to the left of the prompt.)
- Install dependencies:
-
pip install numpy, pandas, matplotlib, xarray, cartopy,
-
pip install onnx==1.13.1
-
pip install onnxruntime==1.14.0
-
- Shape: (4, 721, 1440)
- Order:
[MSLP, U10, V10, T2M]
- Shape: (5, 13, 721, 1440)
- Order:
[z, q, t, u, v]
- Visit https://cds.climate.copernicus.eu/
- Sign up and log in.
- Navigate to:
input_surface.npy → ERA5 hourly data on single levels from 1940 to present
input_upper.npy → ERA5 hourly data on pressure levels from 1940 to present
-
input_surface.npy
-
Product type: Reanalysis
-
Variables (in this order):
- Mean sea level pressure
- 10m u-component of wind
- 10m v-component of wind
- 2m temperature
-
Year / Month / Day / Time: select the desired range
-
Geographical area: global coverage
-
Data format: NetCDF4 (experimental)
-
Download format: unarchived file
-
-
input_upper.npy
- Product type: Reanalysis
- Variables (in this order):
- Geopotential
- Specific humidity
- Temperature
- U-component of wind
- V-component of wind
- Pressure level: 1000hPa, 925hPa, 850hPa, 700hPa, 600hPa, 500hPa, 400hPa, 300hPa, 250hPa, 200hPa, 150hPa, 100hPa and 50hPa in the exact order
- Year / Month / Day / Time: select the desired range
- Geographical area: global coverage
- Data format: NetCDF4 (experimental)
- Download format: unarchived file
- Ensure Terms of Use is set to Accepted.
- Click Submit form.
- Download the generated file and place it inside the
download_datafolder.
(VSCode recommended)
-
Run the transform_nc_to_npy.py
-
Run the prediction.py
-
Run the visualization.py.
-
Run the evaluation.py.
-
If you have questions, bug reports, or feature requests, please use GitHub Issues.
This helps us keep discussions transparent and accessible to all users. -
For urgent matters or private communication, you may contact the maintainers:
- hyeok719 — jjh10197@gmail.com
- woobin723-cmd — woobin723@gmail.com
- Apache License 2.0
If you encounter unexpected behavior, broken functionality, or issues during installation or execution, please follow the steps below:
-
Check the Documentation Review the troubleshooting section in the official documentation to verify whether your issue is already addressed.
-
Verify Your Environment Ensure that your Python version, required libraries, and OS environment match the supported configurations described in the docs.
-
Reproduce the Issue Try to reproduce the bug in a clean environment (e.g., a new virtual environment) to confirm that the issue is project-related.
-
Submit a Bug Report If the problem persists, please open an issue in the GitHub repository with the following information:
- Steps to reproduce
- Error logs and stack traces
- System details (OS, Python version, hardware)
- Expected behavior vs. actual behavior
→ GitHub Issues: https://github.com/hyeok719/CPFA/issues
Below is a list of key resources and research materials referenced in the CPFA project:
-
Pangu-Weather: Forecasting With Advanced Deep Learning Models
A foundational model used for climate prediction within this project. -
ERA5 Reanalysis Data (ECMWF)
The primary climate reanalysis dataset used for input and evaluation. -
Xarray Documentation
For handling multidimensional climate data structures. -
Cartopy Documentation
Used for geographic visualization and map projections. -
NumPy & SciPy Libraries
Essential for numerical computing and data preprocessing. -
Matplotlib
Used for generating climate maps, vector field plots, and statistical figures.