Local NASA/IBM Surya solar-disk forecasts on a DGX Spark, wrapped like spark-weather. Initial conditions are curated SDO AIA+HMI hours. A Flask UI shows the Surya rollout next to live NOAA SWPC solar wind, Kp, GOES, OVATION aurora, WSA-ENLIL, and NASA DONKI events.
This is not an SWPC product. Surya does not emit Kp or rain; it emits short-lead solar imagery and (later) flare/wind heads. Native grid is SDO 4096², not a magnetosphere model.
The Flask UI is on port 8089 so it can sit next to spark-weather on 8088. Both containers use --net=host and --gpus=all.
Surya is NASA + IBM’s open heliophysics foundation model. 366 million parameters. Spectral gating (2 layers) + long-short attention (8 layers). Trained on 9 years of SDO: 8 AIA channels + 5 HMI products.
| Surya 1.0 | |
|---|---|
| Grid | SDO native 4096 × 4096 |
| Time step | 12 min native; easy inference uses hourly bench files |
| State | 13 channels (AIA 94/131/171/193/211/304/335/1600 + HMI m/bx/by/bz/v) |
| Init used here | Live JSOC NRT synoptic AIA + HMI LOS (1k FITS, upsampled to 4096). Smoke still uses nasa-surya-bench. |
| What it outputs | Short-lead solar-disk fields (hours, not days) |
| What it does not output | Kp, Dst, aurora probability, CME arrival, inches of rain |
| Comparison layer | NOAA SWPC L1 / Enlil / GOES / OVATION / Kp + NASA DONKI |
| Memory vs FCN3 | Far less than FourCastNet 3 (~70 GiB). Cost is 4096² × 13 × 2 timesteps, not parameter count. Measure on first smoke and write the number here. |
| License | Apache 2.0 (upstream). This repo is Unlicense. |
v1 is zero-shot disk forecast only. Flare, solar-wind, and AR-segmentation heads are stubbed for later.
- Surya GitHub
- Easy inference
- Surya-1.0 weights
- Paper (arXiv:2508.14112)
- NASA writeup
- IBM writeup
- Surya Bench on AWS
You need Docker with the NVIDIA Container Toolkit. Same machine as spark-weather is fine: unified memory is ~120 GiB, spark-weather uses ~70 GiB when FCN3 is warm, and Surya should still fit in what is left. If a run OOMs, stop one of the two web workers.
git clone <this-repo> cd spark-spaceweather/code ./docker_run.sh setup # pull NGC pytorch, create container, clone/install Surya ./docker_run.sh web # http://<hostname>:8089
./docker_run.sh web is not enough on a blank box. setup is the long step: it starts nvcr.io/nvidia/pytorch:25.11-py3, clones NASA-IMPACT/Surya into vendor/Surya, and pip-installs inference deps without replacing NGC’s torch. Flask is included.
setup does not download Surya weights. The first forecast pulls nasa-ibm-ai4science/Surya-1.0 from Hugging Face into ~/.cache/huggingface (bind-mounted). A second run reuses that cache. Each SDO hour is ~570 MB in data/sdo/.
Optional GPU sanity check before the website (canned 2014-10-23 hour that exists in the bench bucket):
./docker_run.sh smoke
The site runs inside the spark-spaceweather container (that is where the GPU lives).
./docker_run.sh web # http://<host>:8089
./docker_run.sh web-logs
./docker_run.sh web-stopTwo columns:
- Left — local AI. Surya status, lead time (1 / 2 / 6 / 12 h), optional UTC window, disk previews from
prediction.nc. - Right — operational. NOAA G/S/R scales, Kp, L1 plasma + Bz, GOES X-ray, F10.7, OVATION, WSA-ENLIL (labeled not Surya), DONKI flares/CMEs, SWPC alerts. Origin fetches match product cadence (L1/GOES ~90 s, alerts/OVATION ~5 min, Enlil/DONKI ~15 min) and pause when no tab is open. Works if Surya is cold.
One GPU job at a time (file lock + worker queue). spark-weather on 8088 is a different container and a different model; do not put Earth2Studio and Surya in the same image.
./docker_run.sh setup ./docker_run.sh smoke # 2014-10-23, 1-hour lead ./docker_run.sh forecast # live JSOC NRT, 2-hour lead ./docker_run.sh forecast --lead-hours 6 ./docker_run.sh forecast --source bench # 2024 archive, not today
Or inside the container:
python run_surya.py --smoke python extract_surya.py --outdir outputs/latest python probe_imports.py python probe_memory.py python swpc.py
--lead-hours is hourly Surya steps: 1, 2, 6, or 12. Easy inference rollout_steps is lead_hours - 1.
Outputs land in outputs/ (gitignored):
| file | what |
|---|---|
prediction.nc |
Surya disk rollout + GT frames when present |
*_pred.png / *_gt.png |
AIA 171/193/304 and HMI magnetogram previews |
result.json |
init time, model, leads, image paths, timing |
run_meta.json |
runner metadata |
swpc_cache.json |
last NOAA/DONKI snapshot |
Channel names in prediction.nc are aia94, aia131, aia171, aia193, aia211, aia304, aia335, aia1600, hmi_m, hmi_bx, hmi_by, hmi_bz, hmi_v. The extractor looks those up and documents whatever it actually finds.
- Live NRT is 1k synoptic, not Surya L1.5. Default runs pull today’s JSOC AIA synoptic + HMI LOS and upsample 1024→4096. Vector B and Doppler are zero. Full 4096 13-channel L1.5 from DRMS export is still a later option (
JSOC_EMAIL). - Smoke is archive.
./docker_run.sh smokestill uses the 2014-10-23nasa-surya-benchhour. - Surya ≠ Kp. Disk evolution is not a geomagnetic forecast. SWPC is the comparison layer, the same role GFS QPF plays in spark-weather.
- Hours, not days. Pretrain is 1-hour-ahead plus autoregressive rollout. 12 h is a scenario.
- One job at a time inside this app. Running it with spark-weather is the point of the extra port and the lighter model; still watch unified memory.
- Throughput is unknown on this Spark until the first smoke. Put the number in this README when you have it.
spark-spaceweather/
README.md
LICENSE
.gitignore
code/
docker_run.sh
setup_inside_container.sh
run_surya.py
extract_surya.py
ingest_sdo.py
surya_core.py
swpc.py
probe_imports.py
probe_memory.py
web/