Help us improve
Share bugs, ideas, or general feedback.
From earth2studio
Guides users through building deterministic (single-member) weather forecast inference scripts with Earth2Studio, covering model, data source, IO, and nsteps.
npx claudepluginhub nvidia/earth2studio --plugin earth2studioHow this skill is triggered — by the user, by Claude, or both
Slash command
/earth2studio:earth2studio-deterministic-forecastThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Guide users through building deterministic (single-member) weather forecast
Helps users identify Earth2Studio models, data sources, and examples for weather/climate tasks by fetching live documentation and filtering by GPU/VRAM, region, and forecast class.
Forecasts univariate time series zero-shot using Google's TimesFM model. Supports CSV/DataFrame/array inputs with point forecasts and prediction intervals. Includes preflight system checker for RAM/GPU.
Packages and builds custom AI models with Cog for Replicate deployment. Creates cog.yaml and predict.py, builds Docker images, handles GPU/CUDA setup, and ports Hugging Face models.
Share bugs, ideas, or general feedback.
Guide users through building deterministic (single-member) weather forecast
inference scripts with Earth2Studio. Covers model selection, data source
compatibility, IO backend choice, nsteps calculation, and generating a
complete script following earth2studio.run.deterministic.
pip install earth2studio or uv add earth2studio)You are helping a user build a deterministic forecast inference script
using Earth2Studio. The script follows the structure of
earth2studio.run.deterministic — a pipeline that takes a prognostic
model, fetches initial conditions from a data source, steps the model
forward, and writes output to an IO backend.
Model availability, data source APIs, and IO backends change between releases. Before recommending any component, fetch the relevant live doc page to confirm it exists and check its current interface.
Live doc references (fetch only what the current step requires):
| Component | URL |
|---|---|
| Prognostic models | https://nvidia.github.io/earth2studio/modules/models_px.html |
| Data sources (analysis) | https://nvidia.github.io/earth2studio/modules/datasources_analysis.html |
| Data sources (forecast) | https://nvidia.github.io/earth2studio/modules/datasources_forecast.html |
| IO backends | https://nvidia.github.io/earth2studio/modules/io.html |
run.deterministic source | https://github.com/NVIDIA/earth2studio/blob/main/earth2studio/run.py |
| Lexicon (variable compat) | https://github.com/NVIDIA/earth2studio/tree/main/earth2studio/lexicon |
Ask the user (cap at 3 questions, skip what's already answered):
Fetch the prognostic models page. Filter candidates by:
input_coords/output_coords against what the user needsPresent 2–4 candidate models with tradeoffs (resolution, speed, accuracy, VRAM). Let the user choose.
Once selected, note the model's:
input_coords["variable"])output_coords["lead_time"])nsteps and constrain which data sources workThe data source must provide the model's required input variables. Fetch the analysis data source page (or forecast source page if comparing against operational forecasts).
Verify compatibility:
earth2studio/lexicon/<source>.pyinput_coords["variable"]
exist as keys in the source's VOCABPresent viable options. Common pairings:
Let the user choose. Confirm the initialization time(s) they want to forecast from.
Present the available IO backends (fetch the IO page to confirm current list):
| Backend | Best for |
|---|---|
| ZarrBackend | Large outputs, chunked storage, recommended default |
| AsyncZarrBackend | Same as Zarr but async writes for performance |
| NetCDF4Backend | Compatibility with legacy tools |
| XarrayBackend | In-memory, small runs, interactive exploration |
| KVBackend | Key-value dict, debugging |
Recommend ZarrBackend unless the user has a specific reason for another. Ask where they want output saved.
Calculate nsteps from:
nsteps = forecast_hours / model_step_hoursConfirm with the user: "For a 5-day forecast with a 6-hour time step, that's 20 steps. Correct?"
Write a complete Python script following the earth2studio.run.deterministic pattern. The script structure:
import datetime
from collections import OrderedDict
import numpy as np
import torch
from earth2studio.models.px import <ModelClass>
from earth2studio.data import <DataSourceClass>
from earth2studio.io import <IOBackendClass>
from earth2studio.run import deterministic
# 1. Initialize model
model = <ModelClass>.load_model(<ModelClass>.load_default_package())
# 2. Initialize data source
data = <DataSourceClass>()
# 3. Initialize IO backend
io = <IOBackendClass>("<output_path>")
# 4. (Optional) Subselect output variables/coords
output_coords = OrderedDict({
"variable": np.array(["t2m", "u10m", ...]), # only save these
})
# 5. Run deterministic forecast
io = deterministic(
time=["YYYY-MM-DDTHH:MM:SS"],
nsteps=<N>,
prognostic=model,
data=data,
io=io,
output_coords=output_coords, # optional
device=torch.device("cuda"),
)
# 6. Post-run: inspect results
print("Forecast complete. Output at: <output_path>")
Before writing the script, fetch the specific model's doc page to confirm:
load_model + load_default_package()
is the standard pattern but verify)Also fetch the data source's doc page to confirm constructor arguments (some need cache paths, tokens, etc.).
After delivering the script, explain:
time list)time)output_coordsxr.open_zarr(...))diagnostic workflow patternOwns: prognostic model selection for deterministic forecasts, data
source compatibility verification, IO backend selection, nsteps
calculation, generating the complete inference script following
earth2studio.run.deterministic structure.
Does not own: ensemble workflows, diagnostic model chaining, data-only fetch (earth2studio-data-fetch), installation (earth2studio-install), model training or fine-tuning, custom model development.
Typical invocation:
"Run a 5-day global forecast with Pangu-Weather starting from today's GFS analysis, saving output to Zarr."
The skill walks through Steps 1-7: confirms requirements, selects Pangu24, pairs with GFS data source, picks ZarrBackend, calculates nsteps=5 (24h steps), generates the script, and explains how to inspect results.
| Error | Cause | Solution |
|---|---|---|
KeyError on variable | Lexicon missing variable | Check compat; pick different source |
OutOfMemoryError | VRAM exceeded | Use smaller model or free cache |
FileNotFoundError package | Weights not cached | Call load_default_package() first |
TimeoutError data fetch | API slow/unreachable | Retry or use cached source |
ValueError: nsteps | Horizon < model step | Increase horizon or finer model |