WindGNN is a machine learning project that uses Graph Neural Networks (GNNs) to predict wind fields by combining CARRA (Copernicus Arctic Regional ReAnalysis) data with Sentinel-1 SAR (Synthetic Aperture Radar) satellite observations. The model aims to provide accurate wind field predictions by leveraging the spatial relationships between different data points.
- Preprocessing pipeline for CARRA and Sentinel-1 data
- Graph Neural Network architecture for wind field prediction
- Custom loss function for wind speed prediction
- Training and evaluation framework
- Data visualization tools
- PyTorch
- PyTorch Geometric
- NumPy
- Pandas
- Scikit-learn
- Matplotlib
- tqdm
- haversine
WindGNN/
├── data/
│ ├── data_loader.py # Data loading and processing utilities
│ └── preprocessing/
│ ├── preprocessing_main.py # Main preprocessing pipeline
│ ├── preprocessing_functions.py # Preprocessing utility functions
│ └── preprocessing_variables.py # Configuration variables
├── models/
│ └── windnet.py # GNN model architecture
├── training/
│ ├── trainer.py # Training loop implementation
│ └── metrics.py # Custom loss functions
└── main.py # Main training script
- Clone the repository:
git clone https://github.com/yourusername/WindGNN.git
cd WindGNN- Install dependencies:
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu124pip install -r requirements.txtThe project requires two types of data:
- CARRA reanalysis data (.csv format)
- Sentinel-1 SAR observations (.csv format)
Place your data files in the following directory structure:
WindGNN/
└── csv/
├── carra/ # CARRA reanalysis files
└── s1/ # Sentinel-1 observation files
Run the preprocessing pipeline:
python preprocessing/preprocessing_main.pyThis will:
- Create graph data from raw input files
- Identify suitable timestamps where data overlaps
- Create output edges for the graph structure
- Find global min/max values for normalization
- Perform interpolation for each suitable timestamp
The WindNet model consists of:
- CARRA node processing layers
- CARRA to output grid message passing
- Output grid processing layers
- Skip connections (optional)
Key components:
- GCN layers for node feature processing
- Graph convolution for message passing
- Custom scaled MSE loss function
To train the model:
python main.pyThe training script will:
- Load and preprocess the data
- Initialize the WindNet model
- Train for the specified number of epochs
- Save the model and training history
- Evaluate on the test set
- Batch size: 32
- Learning rate: 0.001
- Number of epochs: 100
- Gradient clipping: 10.0
- Loss function: Scaled MSE Loss with ε=4.0, τ=0.425
The training script will generate:
- Model checkpoint (
windnet_model.pth) - Training history plot (
training_history.png) - Test set evaluation metrics
Contributions are welcome! Please feel free to submit a Pull Request.
[Your chosen license]
If you use this code in your research, please cite: [Your citation information]
- CARRA data provided by Copernicus Climate Change Service
- Sentinel-1 data provided by European Space Agency