Dataset Viewer

The dataset viewer is not available because its heuristics could not detect any supported data files. You can try uploading some data files, or configuring the data files location manually.

MR-GNF 2024 Inference Graph Shards

This dataset contains model-ready monthly PyTorch graph shards for 2024 used for inference and evaluation with MR-GNF weather forecasting models.

The shards store normalized atmospheric states aligned to the fixed multi-resolution graph used by the project. They are intended to be loaded directly by the MR-GNF dataloader or inspected with standard PyTorch code.

The complete data-preparation, training, inference, and evaluation pipeline is available in the MR-GNF project repository.

The shard-creation process and the corresponding preprocessing code can also be reviewed in the MR-GNF project repository.

Associated paper:

Andrii Shchur and Inna Skarga-Bandurova, “MR-GNF: Multi-Resolution Graph Neural Forecasting on Ellipsoidal Meshes for Efficient Regional Weather Prediction.”
arXiv:2603.13563

Dataset contents

The dataset is organized as monthly .pt files:

graph_2024-01.pt
graph_2024-02.pt
...
graph_2024-12.pt

Each file contains one month of normalized graph-aligned weather states and all metadata required to reconstruct valid inference samples.

This release contains inference/evaluation data for 2024. It does not contain the 1980–2013 model-training shards.

Companion artifacts

The following artifacts are used to construct or interpret the graph shards:

Artifact Description
stats_1deg_1980_2013.npz Normalization statistics for the 1.0° source data, computed from the 1980–2013 training period.
stats_05deg_1980_2013.npz Normalization statistics for the 0.5° source data, computed from the 1980–2013 training period.
stats_025deg_1980_2013.npz Normalization statistics for the 0.25° source data, computed from the 1980–2013 training period.
UK_graph_static_from_stats_vgeo_aligned.npz Static graph data, geographic features, node ordering, graph connectivity, and resolution-zone information required by the model and dataloader.
UK_multiscale_jigsaw_ll.npz Multi-resolution mesh artifact used to construct the static graph.

The graph shard tensors are tied to the supplied static graph. Do not combine a shard with a different graph or node ordering unless all graph and metadata hashes match.

Shard-generation configuration

The 2024 inference shards were created from three source resolutions:

RAW_ROOTS = {
    "1deg":   "./data/raw/1deg",
    "05deg":  "./data/raw/05deg",
    "025deg": "./data/raw/025deg",
}

STATS_PATHS = {
    "1deg":   "./data/stats/stats_1deg_1980_2013.npz",
    "05deg":  "./data/stats/stats_05deg_1980_2013.npz",
    "025deg": "./data/stats/stats_025deg_1980_2013.npz",
}

STATIC_GRAPH_NPZ = "./data/graph/UK_graph_static_from_stats_vgeo_aligned.npz"
MESH_NPZ = "./data/mesh/UK_multiscale_jigsaw_ll.npz"

TIN = 2
TOUT = 4
STRIDE = 1
WRITE_DTYPE = "float16"

The geographic domain and graph-node coordinates are defined by the released static graph and mesh artifacts.

PyTorch shard structure

Each monthly file is saved with torch.save as a dictionary:

shard = {
    "values": values,
    "t0_unix": t0_unix,
    "dt_seconds": dt_seconds,
    "T": T,
    "Tin": Tin,
    "Tout": Tout,
    "stride": stride,
    "sample_starts": sample_starts,
    "N_samples": N_samples,
    "month_id": month_id,
    "N_mesh": N_mesh,
    "L": L,
    "level_offsets": level_offsets,
    "levels": levels,
    "vars_by_level": vars_by_level,
    "channel_names": channel_names,
    "mesh_hash": mesh_hash,
    "levels_hash": levels_hash,
    "vars_hash": vars_hash,
    "zone_id_counts": zone_id_counts,
    "data_sha256": data_sha256,
    "created_utc": created_utc,
    "dtype": dtype,
}

Field reference

Field Type or shape Description
values torch.Tensor [T, C, N_mesh] Normalized atmospheric states. T is the number of time steps, C the number of channels, and N_mesh the number of graph nodes.
t0_unix scalar int64 tensor Unix timestamp in seconds for values[0].
dt_seconds scalar int32 tensor Temporal interval, in seconds, between adjacent entries in values.
T scalar int32 tensor Number of stored time steps.
Tin scalar int16 tensor Number of input states in each sample. The released inference configuration uses Tin = 2.
Tout scalar int16 tensor Number of target states in each sample. The released inference configuration uses Tout = 4.
stride scalar int16 tensor Step spacing used when selecting input and target states.
sample_starts one-dimensional integer tensor Valid start indices for all samples in the shard.
N_samples scalar int32 tensor Number of valid samples in the shard.
month_id string Month represented by the shard, such as 2024-01.
N_mesh scalar int32 tensor Number of nodes in the static graph.
L scalar int16 tensor Number of represented vertical levels.
level_offsets integer tensor Offsets describing the level-wise layout used by the graph representation.
levels list or serialized metadata Ordered atmospheric levels represented in the shard.
vars_by_level serialized JSON or equivalent metadata Variables available at each atmospheric level.
channel_names serialized JSON, list, or equivalent metadata Authoritative channel order for the second dimension of values.
mesh_hash string Hash identifying the compatible graph mesh.
levels_hash string Hash identifying the atmospheric-level configuration.
vars_hash string Hash identifying the variable configuration and ordering.
zone_id_counts torch.Tensor [3] Number of graph nodes assigned to zone IDs 0, 1, and 2.
data_sha256 string SHA-256 checksum for the shard data payload.
created_utc string UTC creation timestamp in ISO 8601 format.
dtype string Stored tensor precision, normally float16 for this release.

Load a shard

Install PyTorch and NumPy:

pip install torch numpy

Load one monthly shard:

from pathlib import Path

import torch

shard_path = Path("graph_2024-01.pt")

# Use weights_only=False only for files obtained from a trusted source.
shard = torch.load(
    shard_path,
    map_location="cpu",
    weights_only=False,
)

values = shard["values"]

print("values:", tuple(values.shape))
print("month:", shard["month_id"])
print("samples:", int(shard["N_samples"]))
print("Tin:", int(shard["Tin"]))
print("Tout:", int(shard["Tout"]))
print("dtype:", shard["dtype"])

Expected tensor layout:

values: [time, channel, graph_node]

Extract one inference sample

A valid sample is defined by one entry in sample_starts.

import json

import numpy as np
import torch


def decode_metadata(value):
    """Decode metadata stored as JSON, bytes, NumPy arrays, or Python lists."""
    if isinstance(value, bytes):
        value = value.decode("utf-8")

    if isinstance(value, str):
        try:
            return json.loads(value)
        except json.JSONDecodeError:
            return value

    if isinstance(value, np.ndarray):
        return value.tolist()

    return value


def get_sample(shard: dict, sample_index: int):
    values = shard["values"]

    tin = int(shard["Tin"])
    tout = int(shard["Tout"])
    stride = int(shard["stride"])
    n_samples = int(shard["N_samples"])

    if sample_index < 0 or sample_index >= n_samples:
        raise IndexError(
            f"sample_index={sample_index} is outside [0, {n_samples - 1}]"
        )

    start = int(shard["sample_starts"][sample_index])

    input_indices = start + torch.arange(tin, dtype=torch.long) * stride
    target_indices = start + (
        tin + torch.arange(tout, dtype=torch.long)
    ) * stride

    if int(target_indices[-1]) >= values.shape[0]:
        raise IndexError("Sample metadata points outside the values tensor.")

    x = values[input_indices]       # [Tin, C, N_mesh]
    y = values[target_indices]      # [Tout, C, N_mesh]

    t0_unix = int(shard["t0_unix"])
    dt_seconds = int(shard["dt_seconds"])

    input_times_unix = t0_unix + input_indices * dt_seconds
    target_times_unix = t0_unix + target_indices * dt_seconds

    metadata = {
        "month_id": shard["month_id"],
        "channel_names": decode_metadata(shard["channel_names"]),
        "levels": decode_metadata(shard["levels"]),
        "vars_by_level": decode_metadata(shard["vars_by_level"]),
        "input_times_unix": input_times_unix,
        "target_times_unix": target_times_unix,
    }

    return x, y, metadata


x, y, metadata = get_sample(shard, sample_index=0)

print("Input shape:", tuple(x.shape))
print("Target shape:", tuple(y.shape))
print("Channels:", metadata["channel_names"])
print("Input times:", metadata["input_times_unix"].tolist())
print("Target times:", metadata["target_times_unix"].tolist())

With the released configuration, the principal sample shapes are:

x: [2, C, N_mesh]
y: [4, C, N_mesh]

The actual forecast interval must be read from dt_seconds. Do not assume a fixed interval when writing reusable loaders.

Convert Unix timestamps

from datetime import datetime, timezone


def to_utc_datetime(unix_seconds: int) -> datetime:
    return datetime.fromtimestamp(
        int(unix_seconds),
        tz=timezone.utc,
    )


input_datetimes = [
    to_utc_datetime(t)
    for t in metadata["input_times_unix"]
]

target_datetimes = [
    to_utc_datetime(t)
    for t in metadata["target_times_unix"]
]

print(input_datetimes)
print(target_datetimes)

Use with the MR-GNF dataloader

The recommended loader is provided in the full project repository:

unified_graph_weather_dataloader.py

The dataloader returns batches in the form:

(x_all, geo, pos2d), y_all

where:

x_all: [batch, Tin, C, N_mesh]
geo:   static geographic node features
pos2d: graph-node coordinates
y_all: [batch, Tout, C, N_mesh]

Example configuration:

from unified_graph_weather_dataloader import GraphWeatherDataModule

dm = GraphWeatherDataModule(
    shards_root_train="/path/to/2024/shards",
    shards_root_val="/path/to/2024/shards",
    years_train=range(2024, 2025),
    years_val=range(2024, 2025),
    static_graph_npz=(
        "/path/to/UK_graph_static_from_stats_vgeo_aligned.npz"
    ),
    force_tin_tout=None,
    dtype_out="float32",
    shuffle_within_file_train=False,
    shuffle_within_file_val=False,
    batch_size_train=1,
    batch_size_val=1,
    num_workers=0,
    pin_memory=True,
    persistent_workers=False,
    device="cuda",
)

dm.setup()

batch = next(iter(dm.val_dataloader()))
(x_all, geo, pos2d), y_all = batch

print("x_all:", tuple(x_all.shape))
print("y_all:", tuple(y_all.shape))

Refer to the full MR-GNF project repository for the current dataloader implementation and complete model-inference workflow.

Channel order and normalization

The values in each shard are normalized model inputs and targets.

Always use channel_names from the shard metadata as the authoritative channel order. Do not assume that channels are stored alphabetically or that a separately defined list has the same order.

Normalization statistics were computed from the 1980–2013 training period at three source resolutions:

1.0°  -> stats_1deg_1980_2013.npz
0.5°  -> stats_05deg_1980_2013.npz
0.25° -> stats_025deg_1980_2013.npz

Because the graph contains nodes associated with different resolution zones, physical-unit reconstruction must use the statistics associated with each node's zone. The static graph artifact provides the required zone information.

Do not apply the 0.25° statistics to every graph node.

For a channel and node belonging to one resolution zone, the generic inverse transform is:

physical_value = normalized_value * standard_deviation + mean

Precipitation represented as tp_log requires an additional inverse transformation after denormalization:

precipitation = np.maximum(np.expm1(tp_log), 0.0)

Use the normalization and denormalization utilities in the project repository for zone-aware conversion.

Integrity and compatibility checks

Before inference, verify the following:

assert shard["values"].shape[0] == int(shard["T"])
assert shard["values"].shape[2] == int(shard["N_mesh"])
assert len(shard["sample_starts"]) == int(shard["N_samples"])

For reproducible use, also compare:

  • mesh_hash with the static graph or mesh artifact;
  • levels_hash with the expected atmospheric-level configuration;
  • vars_hash with the expected variable and channel configuration;
  • data_sha256 with the published checksum, when available.

A matching filename alone does not guarantee that a shard is compatible with a model checkpoint.

Intended use

This dataset is intended for:

  • running MR-GNF inference on 2024 weather states;
  • reproducing model evaluation;
  • testing autoregressive forecast workflows;
  • inspecting normalized atmospheric graph tensors;
  • developing compatible graph-based weather loaders.

Limitations

  • The dataset contains processed, normalized graph tensors rather than raw gridded meteorological fields.
  • The shards depend on the released static graph, mesh, channel order, and normalization statistics.
  • The data should not be treated as an independent operational forecast product.
  • MR-GNF outputs produced from these shards are not official meteorological warnings.
  • Binary .pt files are not directly previewable with the Hugging Face Dataset Viewer.
  • Load .pt files only from trusted sources because PyTorch serialization may execute code when unsafe objects are present.

Citation

Please cite the associated paper when using this dataset:

@misc{shchur2026mrgnf,
  title         = {MR-GNF: Multi-Resolution Graph Neural Forecasting on Ellipsoidal Meshes for Efficient Regional Weather Prediction},
  author        = {Andrii Shchur and Inna Skarga-Bandurova},
  year          = {2026},
  eprint        = {2603.13563},
  archivePrefix = {arXiv},
  primaryClass  = {cs.LG},
  doi           = {10.48550/arXiv.2603.13563},
  url           = {https://arxiv.org/abs/2603.13563}
}

Paper: https://arxiv.org/abs/2603.13563

Full project repository: https://github.com/AndriiShchur/MR-GNF

License

The dataset card and accompanying project code are released under the MIT License. The underlying meteorological source data may be subject to separate provider terms and licenses.

Downloads last month
651

Paper for anshchkse/MR-GNF-SHARDS-Britain-Centric-Euro-Atlantic