Home / Market / weather data reproducibility

weather data reproducibility

Record and verify provenance manifests for weather-data inputs and derived artifacts, including object identity, selections, software versions, transformations, and hashes.

skill★ 508360 dlgithubCC-BY-4.0 content; MIT code; upstream exceptions applyInstall in CosmosUpstream Source

Documentation & Preview

--- name: weather-data-reproducibility description: "Record and verify provenance manifests for weather-data inputs and derived artifacts, including object identity, selections, software versions, transformations, and hashes." category: data risk: safe source: self source_type: self date_added: "2026-09-24" author: ShianMike tags: [weather, reproducibility, provenance, checksums, grib2, netcdf] tools: [claude, cursor, gemini, codex]

---

Weather Data Reproducibility

Overview

Create a compact provenance manifest that identifies the exact weather inputs, subsets, software, transformations, and output artifacts used by a run. Verify the manifest before claiming that a result can be replayed or reproduced.

This skill records and checks lineage. It does not discover or download data by itself; pair it with the appropriate model, observation, radar, or satellite fetching skill.

When to Use This Skill

deleted after processing.

Do not claim bit-for-bit reproducibility merely because a source URL and run time were logged.

Reproducibility Contract

Decide which claim the workflow supports:

recorded procedure can be rerun.

a pinned environment.

same scientific conclusion within a stated tolerance.

Record the intended claim and its tolerance. Mutable remote objects, floating software versions, lossy images, parallel reductions, and platform-dependent code can make the stronger claims impossible.

Minimum Manifest

Use a versioned JSON document. Keep request intent separate from the source that was actually resolved.

{
  "schema_version": 1,
  "created_utc": "2026-09-18T09:00:00Z",
  "claim": {"level": "replayable", "tolerance": null},
  "request": {
    "dataset": "hrrr",
    "product": "prs",
    "requested_valid_time": "2026-09-18T12:00:00Z",
    "variables": ["temperature", "relative_humidity"]
  },
  "resolved": {
    "initialization": "2026-09-18T06:00:00Z",
    "forecast_hour": 6,
    "valid_time": "2026-09-18T12:00:00Z",
    "provider": "aws"
  },
  "inputs": [
    {
      "role": "pressure_fields",
      "uri": "s3://bucket/exact-object-key",
      "object_identity": {
        "etag": "opaque-identity",
        "last_modified": "2026-09-18T07:01:02Z",
        "size_bytes": 987654321
      },
      "selection": {
        "inventory_uri": "s3://bucket/exact-object-key.idx",
        "inventory_sha256": "HEX_DIGEST",
        "byte_ranges": [[1000, 1999], [5000, 6999]]
      },
      "materialized_sha256": "HEX_DIGEST"
    }
  ],
  "processing": {
    "software": {"application": "1.2.3", "python": "3.13.7"},
    "parameters": {"point": [35.22, -97.44], "nearest_method": "model-aware"},
    "transformations": ["decode GRIB2", "convert K to degC"]
  },
  "artifacts": [
    {
      "path": "sounding.png",
      "media_type": "image/png",
      "size_bytes": 123456,
      "sha256": "HEX_DIGEST"
    }
  ]
}

Use null for an intentionally absent value and omit fields whose meaning is unknown. Never fill a required-looking field with a guess.

Identify Every Input

For each remote object or API response, record as available:

An S3 ETag is not always an MD5 digest, particularly for multipart or encrypted objects. Store it for identity and compute a cryptographic content hash when the actual bytes must be verified.

Record the Selection

The source object alone is insufficient when only part of it was used. Record:

Preserve the order in which selected binary ranges were assembled. Hash the materialized subset separately from the full remote object's identity.

Record Weather Time Semantics

Use explicit UTC timestamps and name their meaning:

Do not replace these with one ambiguous timestamp field. Record the calendar and leap-second handling if the source or application requires it.

Record Processing and Environment

Capture only details that can change the result:

aggregation rules;

Do not dump an entire environment full of unrelated packages merely because it is easy. Prefer a lock file plus the versions of software that actually touched the data.

Hash and Write Atomically

The Python standard library is sufficient for local artifact hashes and a canonical, atomically replaced JSON manifest:

import hashlib
import json
import os
from pathlib import Path


def sha256_file(path, chunk_size=1024 * 1024):
    digest = hashlib.sha256()
    with Path(path).open("rb") as handle:
        for chunk in iter(lambda: handle.read(chunk_size), b""):
            digest.update(chunk)
    return digest.hexdigest()


def write_manifest(path, manifest):
    path = Path(path)
    temporary = path.with_suffix(path.suffix + ".tmp")
    payload = json.dumps(
        manifest, ensure_ascii=False, sort_keys=True, separators=(",", ":")
    ) + "\n"
    temporary.write_text(payload, encoding="utf-8", newline="\n")
    os.replace(temporary, path)

Hash artifacts only after their writers are closed. If the manifest itself must be signed, sign the canonical bytes using the project's established signing workflow rather than inventing a custom scheme.

Verify and Replay

Before replay:

  1. Validate the manifest schema version and required fields.
  2. Re-resolve every immutable object identity. Fail if an object changed unless

the reproducibility contract explicitly permits an equivalent replacement.

  1. Download or locate inputs and compare size plus a real checksum.
  2. Reapply the recorded selection and confirm the materialized subset hash.
  3. Recreate the pinned processing environment and transformations.
  4. Produce artifacts in a new output directory.
  5. Compare artifact hashes for bitwise claims or documented scientific metrics

and tolerances for scientific claims.

  1. Write a new run manifest that references, but does not overwrite, the

original.

Report the first mismatch with its role, expected value, and actual value.

Temporary Data Lifecycle

files.

GRIB2, NetCDF, radar, or observation files.

label the run traceable rather than replayable.

Verification Checklist

bytes were materialized.

recorded.

Security & Safety Notes

strings, private bucket names, or secret environment variables.

manifest.

writes outside the intended output directory.

Common Pitfalls

upload method. Store it as identity and compute a real local hash.

collapsed into valid time. Record all three.

version or checksum was pinned. Downgrade the claim or retain the input.

byte ranges were omitted.

but not bitwise, reproducible. Define and test a numerical tolerance.

Limitations

the input bytes or an immutable archive were retained.

captured in a public manifest.

skill, observational truth, or scientific validity.

Additional Resources