Getting Started
This page describes the prerequisites, installation steps, and initial setup required to run CPFA on a Windows environment.
Prerequisites
To use CPFA, you need:
Windows operating system
Anaconda (Python distribution)
Python 3.9.2
An active internet connection to download ERA5 data
Download the Repository
Open your web browser and navigate to the CPFA GitHub repository.
Download the project folder (for example, as a ZIP file).
Extract or move the downloaded folder to the
C:drive.
After extraction, the folder will be similar to:
C:\CPFA\
Install Anaconda
Visit the Anaconda website.
Download the installer for Windows.
Install Anaconda (installation in the
C:drive is recommended).
Install Python 3.9.2
Although Anaconda provides its own Python distribution, CPFA is documented and tested with Python 3.9.2.
Visit the official Python website.
Download the installer for Python 3.9.2.
Complete the installation.
Creating a Conda Environment
Open Anaconda Prompt as Administrator.
Move to the
C:drive by enteringcd..repeatedly until the prompt shows:C:\>
Navigate to the CPFA project folder, for example:
cd CPFA
Create a new virtual environment with Python 3.9.2:
conda create -n cpfa_env python=3.9.2
Activate the environment:
conda activate cpfa_env
Installing Required Libraries
With the environment activated, install the required packages:
pip install numpy pandas matplotlib xarray cartopy
pip install onnx==1.13.1
pip install onnxruntime==1.14.0
After installation, the environment is ready to run CPFA.
Download model
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’
Folder Structure
The project 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
Make sure the ONNX model files and scripts are placed at the project root as shown above.