← Back to work

Barcelona Supercomputing Center · Jan 2025 – Jun 2026

Climate Data Pipeline

Dask Zarr OpenMPI FDB anemoi-datasets Slurm MareNostrum 5

Training an ML weather model is not primarily a modeling problem — it is a data problem. ERA5 and climate model output comes in formats optimized for archival and retrieval, not for feeding thousands of training steps per hour. Getting the pipeline fast enough that it stopped being the bottleneck was the first real engineering challenge at BSC.

The pipeline went from 3 hours to 10 minutes — an 18× speedup — which made multi-node training on MareNostrum 5 actually viable. Without it, the GPUs would have sat idle waiting for data.

Three routes to the same training dataset

The pipeline has three ingestion routes depending on where the source data lives and how much intermediate storage is acceptable. All three converge at the same join step: the anemoi-datasets config that assembles the final training dataset alongside external forcings like greenhouse gas concentrations and ozone.

Classic route stages data as Zarr on HPC — highest throughput for large historical reanalyses. Direct FDB skips the intermediate Zarr entirely, reading from ECMWF's Fields DataBase in-place for smaller experiments. The bridge route handles data arriving from EUMETSAT via an edge VM, which then syncs across to the HPC filesystem.

Full DE393 data pipeline flowchart: from local setup through parallel build/download/generate phases into the anemoi-datasets pipeline
The full DE393 pipeline. Each vertical phase fans out across parallel chunks (one per data variable or time range) before converging at the next stage. Colors: blue = setup, green = build requests, yellow = Zarr creation, purple = sync, light blue = downloads, pink = dataset generation, teal = anemoi pipeline. Final output is a cleaned anemoi dataset ready for training.

Why I/O, not compute, was the constraint

ERA5 is stored in GRIB format, which is excellent for archiving atmospheric fields but not for the random-access patterns that training requires. Converting to chunked Zarr with the right chunk shape — tuned to match Dask's task graph and the HPC's parallel filesystem stripe width — was most of the speedup. The remaining gains came from switching from row-major to column-major chunking on the time axis and from tuning the Blosc compression codec (which eventually became a contribution to zarr-python).

The 98% evaluation speedup on MareNostrum 5's WeatherBench2 benchmark came from similar reasoning: the evaluation loop was re-reading data it had already seen, so caching the processed tensors and parallelizing the metric computation across nodes addressed it.