WeatherNext 2 (model4)
Global Weather Forecasting Model by Google DeepMind
2 min readupdated
WeatherNext 2 is a global medium-range weather forecasting model developed by Google DeepMind and Google Research. It operates on a 0.25° grid and predicts temperature, geopotential, wind, humidity across 13 pressure levels, precipitation, and other meteorological parameters. The model uses a Functional Generative Network (FGN) architecture, where a random noise vector modulates normalization layers instead of standard diffusion samplers. The release is intended for meteorologists, climate researchers, and developers of specialized weather systems.
Key features
- Global coverage: calculation of atmospheric parameters on a 0.25° latitude-longitude grid using an icosahedral mesh.
- Ensemble forecasts: generation of multiple weather development scenarios using independent random noise vectors.
- Transformers integration: support for running via the Hugging Face library with convenient feature extraction.
- Optimization: support for optional kernels to speed up graph and convolution processing.
What you can do
- Forecast the state of the atmosphere several days ahead using ECMWF HRES initial data.
- Run ensemble modeling to assess uncertainty and the spread of weather scenarios.
- Combine forecasts from multiple independent checkpoints (model1-model4) to improve accuracy.
- Fine-tune the model on custom or standard target meteorological data with CRPS calculation.
Example
Running inference to forecast surface temperature:
import numpy as np
import torch
from transformers import WeatherNext2FeatureExtractor, WeatherNext2ForWeatherForecasting
repo = "kashif/weathernext2-model4"
model = WeatherNext2ForWeatherForecasting.from_pretrained(repo, device_map="auto").eval()
processor = WeatherNext2FeatureExtractor.from_pretrained(repo)
state = {
name: ...
for name in processor.input_variables
if name not in processor.forcing_variables
}
valid_time = np.array([np.datetime64("2024-10-07T06:00:00").astype("datetime64[s]").astype(np.int64)])
conditioning_times = valid_time[:, None] - (
processor.time_step_hours * 3600 * np.arange(processor.num_input_timesteps, 0, -1)
)
state.update(processor.compute_forcings(conditioning_times))
inputs = processor(
state, seconds_since_epoch=valid_time, generator=torch.Generator().manual_seed(0)
).to(device=model.device, dtype=model.dtype)
with torch.no_grad():
outputs = model(**inputs)
forecast = processor.postprocess_forecasts(outputs.prediction, state)
print(forecast["2m_temperature"].shape)Read more
DetailsParameters: 183.8M parameters, 24 transformer layers with a hidden dimension of 768.
Architecture: graph model projecting the grid onto an icosahedral mesh (40,962 nodes).
Limitations: research model, does not replace official warnings from meteorological services.
License: CC-BY-4.0 (weights from Google DeepMind).










Comments