Science and engineering

Machine learning for weather forecasting

Machine learning now produces global weather forecasts from reanalysis data, corrects biases in numerical model output, and makes local forecasts for stations, such as temperature, wind or rainfall, for energy and agriculture.

How machine learning is used in weather forecasting

Global medium-range forecasts

Models trained on decades of reanalysis learn to step the global atmosphere forward in time. Once trained, they produce a forecast in minutes on a single accelerator.

Real exampleGraphCast (Lam et al., 2022)A machine learning model trained directly on reanalysis data that predicts hundreds of weather variables over 10 days at 0.25 degree resolution globally in under one minute.

Operational machine learning forecasts

Forecast centres now run machine-learned models alongside physics-based ones, giving forecasters a second, fast source of guidance.

Real exampleECMWF AIFSECMWF took its Artificial Intelligence Forecasting System into operations on 25 February 2025, running side by side with its physics-based Integrated Forecasting System.

Correcting forecasts for local stations

Post-processing learns the systematic errors of model output at particular sites, and turns ensembles into calibrated probabilistic forecasts for temperature, wind or rainfall.

Real exampleNeural networks for ensemble post-processing (Rasp and Lerch, 2018)In a case study of 2-metre temperature forecasts at surface stations in Germany, a neural network approach significantly outperformed benchmark post-processing methods.

Short-term rainfall nowcasting

Nowcasting predicts rain for the next hour or two from recent radar images. Generative models produce sharp, realistic rain fields rather than blurry averages.

Real exampleDeep generative nowcasting (Ravuri et al., Nature, 2021)Developed a deep generative model of radar for probabilistic precipitation nowcasting, which more than 50 expert meteorologists ranked first for accuracy and usefulness in a systematic evaluation.

Can you learn machine learning for weather forecasting?

Yes. Meteorologists and data scientists can both learn it. Start with Python and gridded data handling, forecast verification statistics and classical post-processing models, then deep learning for global and radar-based forecasting.

  1. PythonRead GRIB and NetCDF data with xarray and plot weather maps.Learn it in Python
  2. Forecast verificationRMSE, CRPS and reliability diagrams for deterministic and probabilistic forecasts.Learn it in Statistics
  3. Post-processing modelsRegression and gradient boosting for station forecasts, validated on later seasons.Learn it in Machine Learning
  4. Deep learning for gridded dataGraph networks and transformers in global models, and U-nets for nowcasting.Learn it in Deep Learning
  5. Atmospheric science basicsDynamics, reanalysis and data assimilation, so you know where the training data comes from.

Moving into machine learning for weather forecasting

If you already work in the field

Meteorologists already know the atmosphere, the observations and verification. Add Python and PyTorch, then train a post-processing model for local stations or run an open machine learning weather model on WeatherBench data. Met services, ECMWF, energy companies and agriculture technology firms are building these teams.

If you come from data science or ML

Machine learning practitioners should learn atmospheric dynamics basics, how reanalyses such as ERA5 are made and how forecasts are verified, including probabilistic scores. WeatherBench and ECMWF training material are good entry points.

Roles that do this workMeteorologistWeather data scientistMachine learning scientist, weather and climateForecast post-processing scientist

Tools you will use

ToolWhat you use it for
XarrayLoad and process gridded weather data in NetCDF and Zarr formats.
WeatherBench 2Evaluate global forecasts against standard metrics and baselines.
MeteostatFetch historical station observations from Python.
scikit-learnBuild station-level forecasting and bias-correction models.
PyTorchTrain neural networks on gridded atmospheric fields.

Public data to practise on

  • ERA5 reanalysis: Hourly global atmospheric reanalysis used to train most ML weather models; free registration required.
  • GHCN-Daily: Daily station temperature and precipitation records worldwide for local forecasting.

Your first project

Download GHCN-Daily records for one station, forecast next-day maximum temperature with gradient boosting on lagged values and day of year, and compare it with persistence and climatology using MAE, including during a heatwave.

Common questions

Is AI better than traditional weather forecasting?

On many standard scores, leading machine learning models now match or beat physics-based models for medium-range forecasts. They still start from physics-based analyses and are used alongside traditional models.

What is ERA5?

ERA5 is ECMWF's global reanalysis, which combines past observations with a model to give consistent hourly data on the atmosphere going back decades. It is the main training data for global machine learning weather models.

Can I run an AI weather model myself?

Several research and operational models have released code or weights, and running a trained model needs far less compute than training one. You still need initial conditions, usually from an operational analysis.

What is post-processing in weather forecasting?

Post-processing corrects systematic errors in raw model output using past forecasts and observations, for example at a particular station. It is one of the oldest and most established uses of statistics and machine learning in meteorology.

Courses for these skills

New to programming or maths? Start with Python, or follow the machine learning path in order. Published lessons are free to read; compare Free and Pro.