File size: 2,277 Bytes
7d033ba
 
 
 
 
 
 
 
 
 
 
276ecd7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7d033ba
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
---
title: ECMWF Wind Particle Visualization
emoji: 🌪️
colorFrom: blue
colorTo: purple
sdk: docker
sdk_version: "4.44.0"
app_file: app.py
pinned: false
---

# 🌪️ ECMWF Wind Particle Visualization

A Gradio application that downloads real ECMWF 10m wind data and creates windy-style particle animations using Folium maps with Leaflet-Velocity plugin.

## Features

- 🌍 **Real ECMWF Data**: Downloads operational 10m wind forecasts (U/V components)
- 🎨 **Windy-style Animation**: Canvas-based particle system using Leaflet-Velocity
- ⏱️ **Time Controls**: TimestampedGeoJson animation with interactive time slider
- 🗺️ **Interactive Maps**: Multiple tile layers and regional views
- 🎯 **Particle Physics**: RK4 integration for accurate wind field advection

## How It Works

### Data Processing
1. Downloads ECMWF 10m wind data (U/V components) in GRIB2 format
2. Converts GRIB to grib2json-compatible velocity JSON format
3. Implements bilinear interpolation for smooth wind field sampling

### Particle Animation
1. **Canvas Rendering**: Uses Leaflet-Velocity for real-time particle advection
2. **TimestampedGeoJSON**: Pre-computed particle trajectories with time controls
3. **RK4 Integration**: Accurate particle movement through wind field
4. **Color Coding**: Particles colored by wind speed magnitude

## Technical Details

### Data Source
- **ECMWF Open Data**: Free operational forecasts updated every 6 hours
- **Parameters**: 10m U-wind and V-wind components
- **Resolution**: 0.25° (~25km spacing)
- **Format**: GRIB2 converted to velocity JSON

### Algorithms
- **Bilinear Interpolation**: Smooth wind field sampling between grid points
- **RK4 Integration**: 4th-order Runge-Kutta for particle advection
- **Coordinate Conversion**: Proper handling of geographic projections

### Libraries
- **Gradio**: Web interface framework
- **Folium**: Python-Leaflet bridge for interactive maps
- **Leaflet-Velocity**: Canvas-based particle rendering
- **xarray/cfgrib**: GRIB data processing
- **ecmwf-opendata**: ECMWF data access

## Attribution

Weather data provided by ECMWF under their Open Data initiative:
- Data source: https://www.ecmwf.int/en/forecasts/datasets/open-data
- Data license: https://creativecommons.org/licenses/by/4.0/