Guides fetching weather/climate data via Earth2Studio data sources, producing xarray DataArrays or pandas DataFrames for specified variables and times.
Ships in earth2studio. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Guide a user through fetching weather/climate data with Earth2Studio data sources: pick a source that provides the requested variables and times, verify support from the lexicon, and produce a working script that returns an xarray DataArray (or a pandas DataFrame for observations).
earth2studio-install; it owns the Python
version, extras, and environment setup)~/.cdsapirc); the source's docstring says what it needsUse the selected version's fetch specification, time-statistics specification and grid specification for behavior requirements. Consult these directly rather than recreating their contracts in this skill.
Sources, variables, and lexicons change every release. Any list in this skill would go stale, so look things up and cite what you used.
| Need | Where to look (repo path first, live page as a fallback) |
|---|---|
| Available sources (analysis, forecast, dataframe) | docs/modules/datasources_analysis.md, datasources_forecast.md, datasources_dataframe.md |
| Source constructor args, auth, and caveats | the class in earth2studio/data/ and its docstring |
| Variables a source supports | its lexicon in earth2studio/lexicon/ (VOCAB keys) |
| Temporal statistics a source supports | TIME_STATISTICS in its lexicon, and the "Temporal statistics" section of the class docstring |
| Variable naming | docs/userguide/advanced/lexicon.md, E2STUDIO_VOCAB in earth2studio/lexicon/base.py |
Fetch helpers (fetch_data, fetch_dataframe, regridding, local stores) | earth2studio/data/utils.py and docs/userguide/components/datasources.md |
| Source interfaces (call signatures) | earth2studio/data/base.py |
| Cache locations and env vars | docs/userguide/about/install.md |
| Changes from 0.x | MIGRATION.md ("Data sources and fetching") |
Live pages (note the /main/ segment; URLs without it return 404):
https://nvidia.github.io/earth2studio/main/modules/datasources_analysis/
https://nvidia.github.io/earth2studio/main/modules/datasources_forecast/
https://nvidia.github.io/earth2studio/main/modules/datasources_dataframe/
https://nvidia.github.io/earth2studio/main/userguide/components/datasources/
https://nvidia.github.io/earth2studio/main/userguide/advanced/lexicon/
If working in a local clone, read the files directly. Otherwise fetch from
https://github.com/NVIDIA/earth2studio or the live pages. Fetch only what the
request needs.
Ask at most 3 questions, skipping what is already known:
t2m, u500, z850, tp, msl).
Map plain language ("500 hPa geopotential height") using E2STUDIO_VOCAB.Match the data type to the right docs page (analysis, forecast, or dataframe),
then filter by temporal coverage (operational sources keep limited history,
reanalyses go back decades), region and resolution, and access (some need keys or
extras). Check each candidate's lexicon: a variable that is not a VOCAB key
cannot be fetched from that source.
Present viable options and tradeoffs briefly and let the user pick. If one choice is clearly best, recommend it and ask for confirmation.
Use the source's own docstring for constructor arguments. Match the source type:
| Source type | Call | Returns |
|---|---|---|
| Analysis | ds(time, variable) | DataArray [time, variable, ...] |
| Forecast | ds(time, lead_time, variable) | DataArray [time, lead_time, variable, ...] |
| DataFrame | ds(time, variable, fields=None) | pandas DataFrame |
| Forecast DataFrame | ds(time, lead_time, variable, fields=None) | pandas DataFrame |
For gridded data, prefer fetch_data from earth2studio.data. It works with
both analysis and forecast sources and is what inference pipelines use:
import numpy as np
from earth2studio.data import fetch_data, <SourceClass>
ds = <SourceClass>()
x = fetch_data(
ds,
time=np.array([np.datetime64("YYYY-MM-DDTHH:00")]),
variable=np.array(["t2m", "u10m"]),
lead_time=np.array([np.timedelta64(0, "h")]), # forecast sources: the lead times
)
# x is one xr.DataArray with dims [time, lead_time, variable, ...]
print(x.dims, x.shape)
print(x.coords)
Rules that fetch_data enforces, and the reasons behind them:
time and lead_time are non-empty 1D NumPy datetime64 / timedelta64
arrays without NaT, and variable is a non-empty 1D array. Plain
datetime.datetime lists work when calling a source directly, but not here.tensor, coords tuple and
the legacy= option are gone from 1.0).device="cuda" to get CuPy-backed data; the default is NumPy on CPU.Calling a source directly (ds(time, variable)) is fine for a simple one-off and
gives the same kind of DataArray without the extra handling.
"t2m:mean:24h" (methods such as mean, sum, min, max). Only
sources whose lexicon declares TIME_STATISTICS support it; others raise
ValueError. Windows include the left endpoint and exclude the right. For
forecast sources the requested lead time must cover the window.target_grid (for example
infer_grid(model.input_coords())) to return data on a given grid. Without a
regridder it passes through, crops exactly, or uses nearest neighbor, and it
raises if the target extends beyond the source. For a chosen method, pass a
regridder from earth2studio.grids (see list_regridders).fetch_dataframe(source, time, variable, fields=...),
or fetch_dataframes to pull several sources concurrently. DataFrame sources
expose a SCHEMA; use fields to select columns. Some require constructor
arguments (for example ISD needs stations=[...]) and have a
time_tolerance for matching observations to requested times.CompositeSource / CompositeForecastSource map
variables to different sources behind one interface. A source can only be
one type in a call; do not mix analysis and forecast in one fetch_data.datasource_to_file(...) writes NetCDF or Zarr, which can
be read back with DataArrayFile, DataSetFile, or DataArrayDirectory.
Prefer this over repeated network fetches in later runs.Include in the script: imports, short comments, and how to inspect the result
(print(x), x.shape, x.coords).
EARTH2STUDIO_CACHE sets the
cache root, EARTH2STUDIO_DATA_CACHE overrides it for data sources only.earth2studio-discover
and earth2studio-deterministic-forecast.Owns: choosing data sources for a variable/time request, verifying variable support via the lexicon, and generating fetch scripts.
Does not own: installation (earth2studio-install), model selection
(earth2studio-discover), inference pipelines, writing a new data source
(see earth2studio-create-datasource), or credential setup beyond what the
docs describe.
"I need 500 hPa geopotential height and 2m temperature from ERA5 for January 1, 2020 at 00Z."
z500, t2m.earth2studio/lexicon/.fetch_data script for the chosen source.| Error | Cause | Solution |
|---|---|---|
KeyError: '<var>' | Not in the source's lexicon | Check VOCAB; try another source |
ValueError mentioning a statistic | Source lacks that temporal statistic | Check TIME_STATISTICS; use a supporting source or compute it yourself |
ValueError on time / lead_time | Not a 1D datetime64 / timedelta64 array | Build the arrays with np.array([np.datetime64(...)]) |
FileNotFoundError / 404 | Time outside the source's coverage | Check the source's temporal coverage |
| Timeout on a CDS source | Queue congestion | Retry later or use a source without a queue |
ModuleNotFoundError | Missing extra or install | See earth2studio-install |
| Empty result | Time/variable mismatch | Recheck timestamp (UTC) and variable name |
| Target grid error | target_grid extends beyond the source | Choose a source covering the region or a smaller grid |
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
/earth2studio:earth2studio-data-fetchfrom earth2studio
npx claudepluginhub nvidia/earth2studio --plugin earth2studio6 skills in this plugin
/earth2studio-create-datasourceCreate and validate Earth2Studio data source wrappers (DataSource, ForecastSource, DataFrameSource, ForecastFrameSource) from remote stores. Use for local Python projects or contributions to Earth2Studio. Do NOT use for fetching data with existing sources, model inference, or Earth2Studio installation/setup tasks. The user may optionally supply a URL, file path, or description of the remote data store to start from.
/earth2studio-create-prognosticUse when creating or migrating Earth2Studio prognostic time-stepping model wrappers, including explicit-state, forced, coupled, stochastic and multi-output forecasts. Not for diagnostic models, data sources, or installation.
/earth2studio-deterministic-forecastUse when building Earth2Studio single-member forecast scripts, including diagnostic postprocessing of forecast fields with Pipeline. Do NOT use for ensembles, standalone diagnostics, data-only fetch, or installation.
/earth2studio-discoverFind Earth2Studio models, data sources, and examples for a weather/climate use case. Do NOT use for writing inference code, downloading data, or installation.
/earth2studio-installGuide installing Earth2Studio with uv or pip, selecting versions and model extras, and configuring the environment. Do NOT use for writing inference code, choosing models, or PhysicsNeMo questions.
Other plugins' skills for the same job