Space weather, read by AI: an early warning for Europe's power grids

The Challenge

Solar storms are an operational risk for electricity networks. Rapid changes in Earth's magnetic field drive geomagnetically induced currents (GICs) into high-voltage lines. These currents can saturate transformers, trip protection relays and damage assets built to last for decades. The May 2024 superstorm was a reminder that modern, renewable-heavy grids are exposed.

Public space weather services issue broad, regional forecasts, and solar flare warnings typically come around six hours ahead. Grid operators have no localised GIC information and no decision support that fits their control room. ESA commissioned a feasibility study to design a commercial service for transmission system operators (TSOs), starting in Hungary and Central and Eastern Europe. The service aims to extend flare warnings toward 24 to 32 hours.

Longer warnings start at the Sun. Most forecasting methods read only the solar surface, while eruptions build up in the atmosphere above it. Our task in the study (WP220) was to find out whether AI could give a more accurate picture of the Sun's three-dimensional magnetic field, the structure that decides when and how violently an active region erupts.

Solar active region with the surface magnetic field in red and blue under the bright loops of the corona
A solar active region seen two ways: the surface magnetic field and the coronal loops in AIA 171 Å. NLFFF/NF2 learns from both. Data: NASA/SDO, HMI and AIA science teams. Image: HSPF

The Solution

Our role in the consortium. Smart-Inno Expert leads the study as prime contractor. Astro42 led the Machine Learning Feasibility Assessment and helped shape the technical architecture of the future service. The Hungarian Solar Physics Foundation (HSPF) and the HUN-REN Centre for Energy Research bring the solar physics and geophysics. Every partner is credited at the end of this page.

Building on open science. We started from NF2, the open-source physics-informed neural network by Robert Jarolim and colleagues. It is the most widely used neural tool in solar physics for reconstructing the coronal magnetic field from surface measurements. NF2 enforces the laws of physics, force-free and divergence-free fields, while it fits the observations. We reused its loaders, datasets and workflow, so our extension stays compatible with the original code.

A second view, from the corona. We turned NF2 into NLFFF/NF2, a two-head neural network. One head reads SDO/HMI SHARP vector magnetograms of the solar surface, the way NF2 does. The second head reads SDO/AIA 171 Å extreme-ultraviolet images, which show glowing coronal loops in the lower solar atmosphere. A modified terminal block fuses both streams into one 3D reconstruction on a 252-layer grid that reaches about 90,720 km above the surface, at 360 km resolution.

A data pipeline that respects the geometry. Our Python pipeline downloads SHARP magnetograms from the Joint Science Operations Center, finds the nearest AIA image for each timestamp and reprojects it onto the magnetogram grid. It keeps only active regions within 45° of the central meridian, where projection errors stay small.

From a 3D field to a forecast. HSPF slices the reconstructed field into 2D maps at different heights and tracks predictor parameters such as magnetic gradients, helicity and free energy. When these cross critical thresholds at several heights, a major eruption is likely. Seeing the lower atmosphere, and not only the surface, is what lets the service warn earlier.

Three-dimensional magnetic field lines arching above a solar active region
A 3D magnetic field skeleton of an active region, reconstructed with our AI magnetic field extrapolation tool. Image: HSPF
Three greyscale magnetic field maps of the same active region at 1.8, 3.6 and 7.2 megametres above the surface
Horizontal slices of the reconstructed field at 1,800, 3,600 and 7,200 km above the surface, used as inputs for eruption prediction. Image: HSPF

Architecting the future platform

The feasibility study also defined the service that follows it. In the demonstration project, Astro42 designs the software architecture and delivers the entire platform, from data ingestion to the dashboard grid operators use.

Four layers. Space-based, ground-based and grid data feed an ingestion layer that validates, time-aligns and harmonises every stream. An analytics and modelling layer turns them into forecasts, nowcasts and risk indicators. A delivery layer serves them through a dashboard, alerts and a machine-readable API. Shared storage keeps raw data, features, historical events and model outputs for real-time use and later analysis.

Eight building blocks, two branches. One branch watches the Sun: solar observation and 3D magnetic field reconstruction, then eruption detection and prediction. The other follows an event down to the ground: propagation through space, regional geomagnetic activity, geoelectric fields and GIC impact on the grid, and finally customer-specific risk assessment. Both meet in a single delivery layer, so forecasts, nowcasts and impact estimates stay consistent.

Built to degrade gracefully. The ingestion layer tracks the health of every source. When the ground-based solar telescope is unavailable because of daylight, weather or maintenance, the pipeline switches to space-based fallback data and tells downstream models and users which mode is active.

AI models under control. New data never updates a model automatically. Reference evidence is versioned, training and evaluation data are kept apart, and every release needs quantitative criteria and an accountable approval. Production monitoring supports rollback to the last approved model.

A first increment operators can test. The roadmap starts with a regional geomagnetic and geoelectric nowcast and conditional GIC risk, delivered through a read-only dashboard and notifications. Solar eruption prediction joins the operational baseline once its added value is demonstrated. API and SCADA integration follow after the dashboard workflow and the cybersecurity boundary are validated.

Service architecture diagram: external data sources, pre-processing, analytics and modelling, service delivery and users, with shared data storage
Service architecture outline: from space-based, ground-based and grid data to dashboards, alerts and an API for grid operators. Image: SME SWS feasibility study

The Result

Our work package is complete and accepted. A proof-of-concept training run showed that the two-head NLFFF/NF2 reconstructs the 3D magnetic field more accurately than the magnetogram-only NF2 baseline on identical inputs, measured as a reduction of the overall per-voxel 3D inaccuracy. On that basis, the consortium decided to continue with the data-richer NLFFF/NF2 approach in the next stages.

The proof of concept was sized to support an architecture decision. A definitive, region-by-region characterisation needs a full training run on around 200 to 300 active regions, which is planned for the follow-on work.

The study has delivered its final service definition: a TSO-focused service concept, a technical architecture and a phased path to a pilot with grid operators. The consortium is now preparing a follow-on ESA demonstration project, where Astro42 is responsible for the AI models and the full software platform.

Project tech stack

Python

PyTorch

NumPy

Long-term wins

NLFFF/NF2, an extension of open-source NF2 that adds coronal observations to 3D magnetic field reconstruction
A positive architecture decision backed by a reproducible proof of concept and code that stays compatible with the original NF2
A layered, fault-tolerant architecture for the operational service, with governed AI model releases
A clear path from research-grade AI to a production space weather platform, with Astro42 delivering the software in the demonstration phase
Foundations for longer solar eruption warnings, so grid operators can act before a storm instead of reacting to it

Project partners

European Space Agency (ESA): customer. Commissioned the feasibility study for a commercial space weather service for the power sector.

Smart-Inno Expert Ltd.: prime contractor and consortium lead. Study management, market and user analysis, service definition and business case.

Hungarian Solar Physics Foundation (HSPF): pre-flare forecasting based on multi-height solar magnetic field measurements from the SAMM-SOLEY telescope, the scientific brief and physics review for the NF2 extension, and the figures on this page.

HUN-REN Centre for Energy Research: gap analysis of space weather datasets and user requirements, and the proof of concept for reconstructing geoelectric fields from observatory data.

Astro42: the Machine Learning Feasibility Assessment, the NLFFF/NF2 model and data pipeline, and the software architecture of the future platform.

NF2: the open-source neural magnetic field extrapolation code by Robert Jarolim and colleagues (Jarolim et al. 2023), published under the GPL-3.0 licence at github.com/RobertJaro/NF2. NLFFF/NF2 is built on this work.

Solar data: NASA's Solar Dynamics Observatory, courtesy of the HMI and AIA science teams, accessed through the Joint Science Operations Center (JSOC) at Stanford University.

Magnetic field figures: HSPF, from SDO data. Service architecture diagram: SME SWS feasibility study.