hdf5-pde-data-loading

hdf5-pde-data-loading is a skill for Claude Code, Codex from synthetic-sciences/openscience. It costs 82 tokens per session (1,795 once invoked), scanned A, original, Apache-2.0.

A set of Python patterns for loading partial differential equation (PDE) simulation data from HDF5 files. PDEs are equations used to model changing physical systems such as fluid flow.

In plain words
What is it for?
It helps prepare PDEBench, PhiFlow, JAX-CFD, and custom simulation data for PyTorch training, including systems with variables such as density, velocity, and pressure.
Why use it?
It handles common differences in how simulation variables are stored and lets you reduce spatial or time resolution when the full dataset is too large to use directly.

Skill for Claude CodeCodex

About the project

synthetic-sciences/openscience is an AI workbench that carries out scientific research by reading papers, forming hypotheses, writing and running code, conducting experiments, analyzing results, and preparing reports. Researchers use it for work in machine learning, biology, physics, and chemistry with remote or local models. Catalogue add-ons extend its scientific workflows through skills and instructions.

synthetic-sciences/openscience · 3,473 stars · on GitHub

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/synthetic-sciences/openscience/hdf5-pde-data-loading
Any agent
npx skills add synthetic-sciences/openscience --skill hdf5-pde-data-loading
Clone the repo
git clone --depth 1 https://github.com/synthetic-sciences/openscience

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for hdf5-pde-data-loading

README.md
[![agentmods](https://agentmods.dev/badge/skills/synthetic-sciences/openscience/hdf5-pde-data-loading.svg)](https://agentmods.dev/skills/synthetic-sciences/openscience/hdf5-pde-data-loading)
Your own site
<a href="https://agentmods.dev/skills/synthetic-sciences/openscience/hdf5-pde-data-loading"><img src="https://agentmods.dev/badge/skills/synthetic-sciences/openscience/hdf5-pde-data-loading.svg" alt="Measured on agentmods" height="20"></a>
Per session 82 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,795 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 2 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00082 $0.01795
Opus 5 $0.00041 $0.00898
Sonnet 5 $0.00016 $0.00359
Haiku 4.5 $0.00008 $0.00179

Measured 2d ago against content hash c213261d3c43, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

hdf5-pde-data-loading scanned grade A with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

import urllib.request

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

subprocess.run([
backend/cli/skills/data-engineering/hdf5-pde-data-loading/SKILL.md · 174 lines

How it starts

The opening of the file, as written. The whole thing — 174 lines — stays where its author put it; the contents beside it link to each section on GitHub.

HDF5 PDE Data Loading

When to Use

  • Loading PDE simulation datasets stored in HDF5 format
  • PDEBench, PhiFlow, JAX-CFD, or custom simulation outputs
  • Multi-variable systems (density, velocity, pressure, etc.)
  • Need to downsample spatial/temporal dimensions for memory

HDF5 Layout Detection

PDE datasets come in two common layouts:

Layout 1: Single "tensor" dataset

with h5py.File(path, "r") as f:
    if "tensor" in f:
        ds = f["tensor"]  # shape: [N, T, X, C] or [N, T, X]

Layout 2: Separate variable datasets

with h5py.File(path, "r") as f:
    # Keys like: "density", "Vx", "pressure", or "t", "x", "u"
    rho = f["density"][:]  # [N, T, X]
    vel = f["Vx"][:]
    prs = f["pressure"][:]
    data = np.stack([rho, vel, prs], axis=-1)  # [N, T, X, 3]

Robust loading (handles both):

def load_pde_hdf5(path, res_x=1, res_t=1):
    """Load PDE data from HDF5, handling multiple layouts."""
    with h5py.File(path, "r") as f:
        print(f"Keys: {list(f.keys())}")

        if "tensor" in f:
            ds = f["tensor"]
            raw_shape = ds.shape
            if len(raw_shape) == 4:
                N, T, X, C = raw_shape
            else:
                N, T, X = raw_shape; C = 1

            X_ds = X // res_x
            T_ds = T // res_t if res_t > 1 else T
            data = np.empty((N, X_ds, T_ds, C if len(raw_shape)==4 else 1), dtype=np.float32)

            for s in range(0, N, 500):  # Chunk to avoid OOM
                e = min(s + 500, N)
                chunk = ds[s:e, ::res_t, ::res_x]
                if len(chunk.shape) == 3:
                    data[s:e, :, :, 0] = np.transpose(chunk, (0, 2, 1))
                else:
                    data[s:e] = np.transpose(chunk, (0, 2, 1, 3))
        else:
            # Separate variables — find and stack them
            var_keys = []
            for k in sorted(f.keys()):
                if isinstance(f[k], h5py.Dataset) and len(f[k].shape) >= 3:
                    var_keys.append(k)

            arrays = [f[k][:, ::res_t, ::res_x] for k in var_keys]
            raw = np.stack(arrays, axis=-1)  # [N, T, X, C]
            data = np.transpose(raw, (0, 2, 1, 3)).astype(np.float32)

        # Load grid coordinates
        for grid_key in ["x-coordinate", "x", "X"]:
            if grid_key in f:
                grid = np.array(f[grid_key], dtype=np.float32)[::res_x]
                break
        else:
            grid = np.linspace(0, 1, data.shape[1], dtype=np.float32)

    return data, grid  # data: [N, X, T, C], grid: [X]

Read the full file on GitHub · 174 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 174 lines · 82 tokens per session scan A c213261d3c43

Subscribe to this mod's changes

hdf5-pde-data-loading is a skill published in the GitHub repository synthetic-sciences/openscience (3,473 stars, last pushed today), licensed Apache-2.0. It adds 82 tokens to every session and 1,795 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 2 findings (makes network calls, runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

physicsnemo-discover

Official NVIDIA-authored guidance for navigating PhysicsNeMo — pick the model, datapipe, or example for a SciML/AI4Science task (surrogates, forecasting, downscaling, physics-informed, inverse, generative). Points at existing files via live repo search; never writes code. Do NOT use for installation or environment…

NVIDIA/physicsnemo · 124 tokens

dbt-troubleshoot

Debug dbt errors — compilation failures, runtime database errors, test failures, wrong data, and performance issues. Use when something is broken, producing wrong results, or failing to build. Powered by altimate-dbt.

AltimateAI/altimate-code · 50 tokens

dbt-schema-verify

REQUIRED after building or modifying ANY dbt model that has columns declared in schema.yml / models.yml. Run altimate-dbt schema-verify --model to diff actual columns against the spec, and treat any mismatch verdict as "not done." The most common reason "the build is green but the tests still fail" is that the model…

AltimateAI/altimate-code · 216 tokens

ml-training-recipes

Battle-tested PyTorch training recipes for all domains — LLMs, vision, diffusion, medical imaging, protein/drug discovery, spatial omics, genomics. Covers training loops, optimizer selection (AdamW, Muon), LR scheduling, mixed precision, debugging, and systematic experimentation. Use when training or fine-tuning…

Orchestra-Research/AI-Research-SKILLs · 88 tokens

dbt-analyze

Analyze downstream impact of dbt model changes using column-level lineage and the dependency graph. Use when evaluating the blast radius of a change before shipping. Powered by altimate-dbt.

AltimateAI/altimate-code · 41 tokens

dbt-docs

Document dbt models and columns in schema.yml with business context — model descriptions, column definitions, and doc blocks. Use when adding or improving documentation for discoverability. Powered by altimate-dbt.

AltimateAI/altimate-code · 45 tokens