run-gencast

run-gencast is a command for Claude Code from AMDResearch/ai4science-studio. It costs 0 tokens per session (697 once invoked), scanned A, original, MIT.

A guided runner for GenCast, a weather-forecasting model, on AMD clusters. It creates ensemble forecasts, meaning several forecasts with varied inputs or settings, using Copernicus climate data.

In plain words
What is it for?
Running GenCast forecasts with selected checkpoints, forecast dates, lead times, ensemble members, containers, and cluster settings.
Why use it?
It gathers credentials, model, date, forecast length, ensemble size, and cluster options before starting the run.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution.

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 commands/amdresearch/ai4science-studio/run-gencast
Clone the repo
git clone --depth 1 https://github.com/AMDResearch/ai4science-studio

Made for: Claude Code.

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 run-gencast

README.md
[![agentmods](https://agentmods.dev/badge/commands/amdresearch/ai4science-studio/run-gencast.svg)](https://agentmods.dev/commands/amdresearch/ai4science-studio/run-gencast)
Your own site
<a href="https://agentmods.dev/commands/amdresearch/ai4science-studio/run-gencast"><img src="https://agentmods.dev/badge/commands/amdresearch/ai4science-studio/run-gencast.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 697 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 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.1 $0.00000 $0.00697
Opus 5 $0.00000 $0.00349
Sonnet 5 $0.00000 $0.00139
Haiku 4.5 $0.00000 $0.00070

Measured 5d ago against content hash a38ab092c44b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

run-gencast scanned grade A with 0 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 5d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/run-gencast.md · 93 lines

How it starts

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

Run GenCast ensemble forecast on an AMD cluster

Guide the user through running GenCast end-to-end on an AMD cluster.

Step 0 — Cluster config check

Check if .cluster-config.yaml (repo root) or ~/.config/ai4science-studio/cluster.yaml exists. If neither exists, run the /init-cluster flow first. If a config exists, read it and pre-fill container runtime and SLURM partition/account from saved values.

Step 1 — Questionnaire (ask ALL questions before doing anything)

Ask the user the following questions. Do not assume any defaults. Wait for answers to all questions before proceeding.

Q0. CDS credentials Do you have a Copernicus CDS API key? If not, create a free account at cds.climate.copernicus.eu.

Q1. Model variant Which checkpoint?

  • gencast-0.25 — full 0.25° model (default)
  • gencast-0.25-Oper — operational variant
  • gencast-1.0 — faster, lower resolution
  • gencast-1.0-Mini — lightweight

Q2. Forecast start date What date to forecast from? (YYYYMMDD, default: yesterday)

Q3. Lead time How many hours ahead? (default: 240 = 10 days)

Q4. Ensemble members How many ensemble members? (must be a multiple of GPU count, default: 1)

Q5. Container runtime Which container runtime?

  • Docker (recommended — docker_run.sh builds and launches automatically)

Step 2 — Act on answers

Read earth_science/models/GenCast/model.yaml for full env var details.

Configure credentials

cd earth_science/models/GenCast/examples
cp env_file.template env_file
# Set CDSAPI_KEY in env_file

Launch container

bash docker_run.sh

Builds jaxweather:latest (shared with PanguWeather — skip if already built).

Run forecast (inside container)

MODEL_VARIANT=<variant> \
DATE=<YYYYMMDD> \
LEAD_TIME=<hours> \
NUM_ENSEMBLE_MEMBERS=<n> \
bash /examples/run_inference.sh

Step 3 — Monitor

Output is written to /predictions/<variant>.grib.

# Visualize
python3 /recipe/grib_visualizer.py --input /predictions/gencast-0.25.grib

Read the full file on GitHub · 93 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. 5d ago First seen · 93 lines · 0 tokens per session scan A a38ab092c44b

Subscribe to this mod's changes

run-gencast is a command published in the GitHub repository AMDResearch/ai4science-studio (4 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 697 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.