This document details the extraction and transformation algorithms applied to Météo-France data. The pipeline utilizes a modular architecture to decouple high-frequency time series (observations) from static metadata (stations), ensuring geospatial consistency and optimizing the storage footprint.
This module manages the acquisition of SYNOP data (the global standard code for reporting surface synoptic weather observations). It implements a state-aware ingestion engine designed to handle historical backfilling and incremental updates.
- Provider: Météo-France (Données Publiques).
- Dataset: Essential SYNOP Data (Données du réseau SYNOP essentiel).
- Protocol: HTTP/HTTPS with support for compressed archives (
.csv.gz). - Format: WMO Codes (World Meteorological Organization, Manual No. 306).
- License: Etalab Open License {cite:p}
MeteoFrance:Synop.
The pipeline strictly separates station metadata from observations to prevent redundant data storage.
- Static Local Reference: Station metadata (
station_id,station_name,latitude,longitude,altitude,region_raw) is sourced from a local reference list (FRENCH_SYNOP_STATIONSinsynop_stations_reference.py) rather than queried from the network on each run, since it changes far less often than the observations themselves. - Atomic Upsert: The reference table is updated via a transaction block (
INSERT OR REPLACE). This updates metadata for existing IDs and creates new ones, ensuring foreign keys in the observation table remain valid.
Raw SYNOP data utilizes scientific units (Kelvin, Pascals) and specific WMO encoding. The pipeline converts these to energy-sector standards suitable for load forecasting.
| Variable | Raw WMO Code | Raw Unit | Transformation Logic | Final Unit |
|---|---|---|---|---|
| Temperature | t |
Kelvin ( |
Celsius ( |
|
| Dew Point | td |
Kelvin ( |
Celsius ( |
|
| Pressure |
pmer, pres
|
Pascal ( |
Hectopascal ( |
|
| Nebulosity | n |
Octas (0-8) or % | Heuristic Decoding (See below) | Percent (%) |
| Humidity | u |
Percent | Preserved | Percent (%) |
| Precipitation |
rr1, rr3
|
mm | Preserved | Millimeters ( |
| Air Density |
t, pres
|
K, Pa | kg/m³ |
Air density is not a raw SYNOP column but a derived variable. It is computed from station pressure and temperature using the ideal gas law for dry air ($R_d = 287.058$ J·kg⁻¹·K⁻¹). It is added as a feature to support the wind power equation $P \propto \rho v^3$.
Nebulosity Heuristic Algorithm:
The n column in SYNOP files is historically ambiguous, mixing percentages with octas (a meteorological unit where 0/8 is a clear sky and 8/8 is completely overcast). The collector implements a heuristic check per month:
-
Code 101: Maps to
$100%$ (WMO Code for "Obscured Sky" / Fog). -
Range Detection:
- If
$\text{Max}(n) > 9$ : Treats the column as a percentage ($0-100%$ ). - Else: Treats the column as octas (
$0-8$ ) and normalizes it to a percentage:$n_{%} = (n_{octas} / 8) \times 100$ .
- If
Raw Météo-France files often contain the string 'mq' (missing quality) instead of empty values when a sensor fails. The collector explicitly parses these artifacts ('mq', 'mq ', 'MQ') as NaN to prevent numeric casting errors.
To capture late data corrections or consolidations, the collector forces a re-fetch of the current year (
The database implements a standard star schema.
| Column Name | Type | Description |
|---|---|---|
station_id |
INTEGER |
Primary Key (WMO Station ID). |
station_name |
VARCHAR |
Human-readable name. |
latitude |
DOUBLE |
WGS84 latitude. |
longitude |
DOUBLE |
WGS84 longitude. |
altitude |
DOUBLE |
Elevation in meters. |
region_raw |
VARCHAR |
Original region string. |
| Column Name | Type | Description |
|---|---|---|
date |
TIMESTAMPTZ |
Timestamp of observation (UTC). |
station_id |
INTEGER |
Foreign Key to synop_stations. |
temperature_celsius |
DOUBLE |
Air temperature ( |
dew_point_celsius |
DOUBLE |
Dew point ( |
pressure_msl_hpa |
DOUBLE |
Pressure at mean sea level ( |
pressure_station_hpa |
DOUBLE |
Pressure at station level ( |
wind_speed_ms |
DOUBLE |
Mean wind speed ( |
wind_direction_deg |
DOUBLE |
Wind direction ( |
wind_gust_10min_ms |
DOUBLE |
Max gust ( |
nebulosity |
DOUBLE |
Cloud cover (Normalized %). |
humidity_percent |
DOUBLE |
Relative humidity (%). |
precip_1h_mm |
DOUBLE |
Precipitation last hour ( |
precip_3h_mm |
DOUBLE |
Precipitation last 3 hours ( |
(Tables C and D for PVGIS and ERA5 Solar Radiation are maintained separately and documented in RADIATION.md.)
This module transforms point-source observations into regional, usage-specific indicators. Unlike standard aggregations that use geometric centroids, this pipeline implements a multi-barycenter strategy to reflect the spatial heterogeneity of energy assets.
In power systems, the "center of gravity" for weather impact varies by technology. A region's temperature effectively felt by the grid depends on where people live, while the effective wind speed depends on where turbines are located.
The pipeline computes three distinct spatial centroids (
-
$G_{load}$ (Population Barycenter): Weighted geometric center of major urban units (static configuration). -
$G_{wind}$ (Wind Capacity Barycenter): Centroid of installed wind turbines (dynamically queried from ODRÉ). -
$G_{solar}$ (Solar Capacity Barycenter): Centroid of installed photovoltaic panels (dynamically queried from ODRÉ).
Meteorological variables are mapped to one or more "usages" based on physical causality. This results in multiple feature variants for a single physical variable:
| Variable | Mapped Usages | Scientific Rationale |
|---|---|---|
temperature_celsius |
load |
Thermosensitivity of demand (heating/cooling). |
solar |
Photovoltaic efficiency degrades at high temperatures. | |
wind_speed_ms |
load |
Wind-chill effect on building thermal inertia. |
wind |
Cubic relationship with turbine power output ( |
|
wind_direction_deg |
wind |
Turbine yaw alignment and wake effects. |
nebulosity |
load, solar
|
Impacts lighting demand and solar irradiance. |
For variables like temperature or wind speed, we apply a modified Inverse Distance Weighting (IDW) relative to the usage barycenter. To prevent mathematical instability (division by zero) if a station sits exactly on the barycenter, a 1 km softening factor is added to the distance.
For wind direction (
-
Decompose: Convert angles to Cartesian components (
$u, v$ ):
- Aggregate: Compute IDW-weighted sums of components:
- Reconstruct: Calculate the resultant angle using the four-quadrant arctangent:
- Ingestion: Joins observations with station metadata.
-
Imputation (Three-Stage Repair): To guarantee completeness without compromising physical realism, gaps are repaired in stages:
- Stage 1 (Temporal): Linear interpolation bridges micro-gaps, restricted by volatility (1 hour limit for wind/rain, 4 hour limit for temperature/pressure).
- Stage 2 (Spatial): For larger gaps, a lapse-rate aware k-Nearest Neighbors (k-NN) regression selects the 3 best estimators, prioritizing vertical altitude similarity to respect adiabatic lapse rates.
-
Stage 3 (Time-of-Day Fallback): If spatial imputation fails, missing values at time
$t$ are interpolated using data from the exact same time slot on adjacent days.
- Aggregation: Executes the vectorized barycentric aggregation.
-
Resolution Upsampling: Interpolates 30-min SYNOP data to 15-min resolution using linear interpolation limited strictly to 1 step. This calculates the intermediate timestamp (
$t+15$ ) but prevents the upsampler from inventing data over large structural gaps.
Full-network outages: On dates where every station is simultaneously absent from the raw SYNOP feed for several consecutive native readings, Stage 2 (spatial k-NN) cannot contribute since no neighboring station has data either; repair falls through entirely to Stage 3 (cross-day TOD interpolation). Applying the national weighting scheme (Part 3) to these reconstructed values, rather than to direct measurements, is the source of the largest point-in-time deviations from the legacy dataset, since the legacy static weights and this pipeline's dynamic weights diverge most on interpolated data. This is expected given the two weighting methodologies and is not an imputation defect.
This module synthesizes regional indicators into a unified national meteorological signal.
A simple spatial average is insufficient because a cold wave in a high-population area impacts the grid significantly more than in a rural area. The pipeline computes a weight matrix
(Where volume is either annual net consumption, wind generation, or solar generation in TWh).
For forecasting horizons extending beyond the available RTE training data, the pipeline projects weights forward from the penultimate complete year. This enforces strict separation between the training set and testing set, preventing data leakage.
The output is stored in transformed_meteo_france_15min, containing 16 canonical features representing the "reference weather" for the French power grid.
| Feature Name | Physical Interpretation |
|---|---|
meteo_temperature_celsius_france_load |
Thermosensitive temperature felt by the population. |
meteo_nebulosity_france_load |
Effective cloud cover. Proxy for artificial lighting demand. |
meteo_wind_speed_ms_france_load |
Wind chill factor affecting building heat loss. |
meteo_humidity_percent_france_load |
Latent heat influencing perceived temperature (Humidex). |
meteo_precip_1h_mm_france_load |
Rain tends to increase indoor activity and lighting. |
meteo_precip_3h_mm_france_load |
3-hour precipitation total, from the SYNOP 3-hourly cadence. |
meteo_pressure_msl_hpa_france_load |
Weather regime proxy (high pressure correlates with extreme temperatures). |
meteo_pressure_station_hpa_france_load |
Station-level (non mean-sea-level) atmospheric pressure. |
meteo_dew_point_celsius_france_load |
Moisture content for Heating, Ventilation, and Air Conditioning (HVAC) modeling. |
| Feature Name | Physical Interpretation |
|---|---|
meteo_wind_speed_ms_france_wind |
Average wind speed hitting turbine blades across France. |
meteo_air_density_kgm3_france_wind |
Air mass per volume, critical for power density ( |
meteo_wind_gust_10min_ms_france_wind |
Tracks gusts that may trigger high-speed safety shutdowns. |
meteo_wind_direction_deg_france_wind |
Average vector direction of the wind flux. |
| Feature Name | Physical Interpretation |
|---|---|
meteo_nebulosity_france_solar |
Cloud cover over solar farms. |
meteo_temperature_celsius_france_solar |
Temperature at solar sites (high temps reduce PV efficiency). |
meteo_radiation_poa_pvgis_wm2_france_solar |
Plane-of-array solar radiation. |