Generated banner for Earth2studio Create Datasource
Generated logo for Earth2studio Create Datasource

Earth2studio Create Datasource

NVIDIAOfficialCreated by NVIDIA Earth-2 Team

  • Skill
  • Workflow
  • Software development
  • Apache-2.0
  • Medium risk
  • Has scripts

From the author

Create and validate Earth2Studio data source wrappers (DataSource, ForecastSource, DataFrameSource, ForecastFrameSource) from remote stores. Do NOT use for fetching data with existing sources, model inference, or installation tasks.
— the description by NVIDIA Earth-2 Team

AutoGineer summary

Written by AutoGineer from the skill’s own files, not by the author

This skill provides a structured, 14-step procedure for developers to integrate new remote data sources into the Earth2Studio framework. It covers the entire lifecycle from initial analysis of the remote store, through implementation of the appropriate source wrapper (DataSource, ForecastSource, DataFrameSource, or ForecastFrameSource), to testing, documentation, and PR submission. The workflow emphasizes asynchronous data fetching patterns, proper lexicon mapping, and rigorous validation using sanity-check plots to ensure data integrity before final submission.

What it does

  • Determines the correct Earth2Studio source wrapper type based on data characteristics.
  • Guides the implementation of asynchronous data fetching logic using fsspec.
  • Facilitates the creation of lexicon mappings to standardize variable names.
  • Automates the generation of skeleton files for source code and unit tests.
  • Provides templates for variable validation and sanity-check visualization.
  • Assists with PR creation and automated code review triage.

When to use it

  • When you need to connect a new remote data store (S3, GCS, Azure, HTTP, HuggingFace) to Earth2Studio.
  • When implementing custom data ingestion logic for gridded or sparse climate data.
  • When you need to ensure your new data source meets project standards for testing, linting, and documentation.
  • When you require a systematic approach to validate variable coverage and data quality.

Advantages

  • Ensures consistency across all Earth2Studio data source implementations.
  • Promotes high code quality through mandatory linting, formatting, and 90% test coverage.
  • Reduces development time by providing standardized skeletons and async utility patterns.
  • Prevents common errors by enforcing a clear validation and sanity-check process.

Usage examples

“Add a new data source for the NOAA GFS analysis stored on S3.”
The agent will initiate the 14-step workflow, starting by analyzing the S3 bucket, determining the appropriate DataSource type, and guiding you through the implementation, testing, and PR submission process.

Install

  1. Download the skill as a ZIP:

    https://autogineer.com/agent-skills/nvidia/earth2studio-create-datasource/download
  2. Unzip it into the cross-client skills folder of your project:

    mkdir -p .agents/skills && unzip earth2studio-create-datasource.zip -d .agents/skills

Documentation by NVIDIA Earth-2 Team

Create and Validate Data Source

Purpose

End-to-end workflow for implementing a new Earth2Studio data source wrapper that connects a remote data store (S3, GCS, Azure, HTTP, HuggingFace) to Earth2Studio's async data fetching infrastructure — from analysis through implementation, testing, validation, and PR submission.

Prerequisites

  • Earth2Studio dev environment with uv (uv run python must work)

  • Git configured with fork (origin) and upstream (upstream) remotes

  • Access to the target remote data store (credentials if private)

  • Python 3.10+

Workspace

Use the directory containing pyproject.toml. For Harbor evals, write to /workspace/output/ preserving paths. Never read evals/targets/.

Instructions

Python Environment: Always use uv run python or the local .venv. Never use the system Python directly.

Follow every step in order.

[CONFIRM] gates: Only Step 1 (Source Type) and Step 12 (Sanity-Check Plots) require explicit user approval. All other [CONFIRM] markers are advisory — present decisions inline and proceed without blocking.

Deliverables first: Write the source file and test file (Steps 6–7) before extended exploration, documentation, registration, CHANGELOG, or PR work. Skip Steps 8–14 when the user asks for implementation only.

Before you finish: Run verification commands in the repo root so results appear in the session log:

uv run pytest test/data/test_<source>.py -x
make format && make lint

Be concise: Avoid long architecture reports; summarize decisions in a few sentences and move on to file writes.

Hangs or User Feedback If agent becomes stuck or user provides a correction during this skills use, conservatively review relevant part of the skill and improve. Be concise.

One source type per invocation. Invoke again for companion types.

Reference Files

Load these on demand during the relevant steps:

FileContentLoad at
references/implementation-guide.pySkeleton source with FILL commentsSteps 3–10
references/testing-guide.pyTest skeleton with FILL commentsStep 11
references/validation-guide.mdPlot templates, PR body template, Greptile handlingSteps 12–14 (optional, for templates)

Workflow Overview
Step 0: Obtain reference → Step 1: Determine type → Step 2: Dependencies
→ Step 3: Add deps → Step 4: Create lexicon → Step 5: Update vocab/schema
→ Step 6: Create skeleton → Step 7: Implement source → Step 8: Register
→ Step 9: Documentation → Step 10: CHANGELOG → Step 11: Tests
→ Step 12: Validate & plots (user confirms) → Step 13: PR + sanity comment
→ Step 14: Greptile review

Step 0 — Obtain Remote Data Store Reference

If $ARGUMENTS is provided, use it (URL → WebFetch; file path → read).

If empty, ask:

Please provide a URL, API documentation link, or description of the remote data store. This will be used to understand storage format, access pattern, variable inventory, temporal/spatial resolution.


Step 1 — Determine Source Type
ProtocolReturnsHas lead_time?Use
DataSourcexr.DataArrayNoGridded analysis/reanalysis
ForecastSourcexr.DataArrayYesGridded forecast
DataFrameSourcepd.DataFrameNoSparse/station obs
ForecastFrameSourcepd.DataFrameYesSparse forecast obs

Key factors: gridded vs sparse → DataArray vs DataFrame; analysis vs forecast → Source vs ForecastSource.

[CONFIRM — Source Type]

Present recommended type with justification. Ask for confirmation.


Step 2 — Examine Remote Store & Propose Dependencies

Analyze: storage backend, file format, authentication, access pattern, temporal/spatial resolution, variable inventory.

Prefer fsspec:

BackendPreferredAvoid
AWS S3s3fs (core dep)boto3 directly
GCSgcsfs (core dep)google-cloud-storage
Azureadlfsazure-storage-blob
HTTPfsspec (core dep)requests
HuggingFacehuggingface_hub (core dep)custom scripts

Only fall back to dedicated libraries when fsspec cannot access the store.

Check pyproject.toml — only propose packages not already present. Core deps include: s3fs, gcsfs, fsspec, zarr, netCDF4, h5py, pygrib, huggingface-hub, pandas, pyarrow.

[CONFIRM — Dependencies & Access Pattern]

Present: backend, fsspec filesystem, new packages (with license), auth method.


Step 3 — Add Dependencies

Load references/implementation-guide.py from here through Step 10.

If new packages needed:

  1. uv add --extra data <package>

  2. uv lock

  3. Add optional dependency imports using OptionalDependencyFailure pattern


Step 4 — Create Lexicon Class

Create earth2studio/lexicon/<source_name>.py with:

  • metaclass=LexiconType

  • VOCAB: dict[str, str] mapping E2S names → remote keys

  • get_item(cls, val) returning tuple[str, Callable]

  • Use :: separator for structured keys

Map remote variables against E2STUDIO_VOCAB (282 entries in earth2studio/lexicon/base.py).

[CONFIRM — Lexicon & Variable Mapping]

Present: class name, key format, full mapping table, modifiers, reference URL.


Step 5 — Update E2STUDIO_VOCAB / SCHEMA (if needed)
  • New vocab: surface = descriptive abbrev; pressure = {name}{level}

  • New schema fields: DataFrame sources only, check E2STUDIO_SCHEMA

[CONFIRM — Vocabulary & Schema Updates]

Skip if no updates needed.


Step 6 — Create Skeleton Data Source File

Follow canonical method ordering:

  1. Class constants

  2. SCHEMA

  3. __init__

  4. _async_init

  5. __call__

  6. fetch

  7. _create_tasks

  8. fetch_wrapper

  9. fetch_array

  10. _validate_time

  11. Helpers

  12. cache property

  13. available classmethod

Use async task dataclass pattern for parallel execution.

[CONFIRM — Skeleton]

Present: class name, file path, skeleton code, task dataclass.


Step 7 — Implement the Data Source & Tests

The test file is a co-equal deliverable. Create test/data/test_<filename>.py alongside the source. Add test_<source>_call_mock for async sources.

Sync sources: Use prep_data_inputs/prep_forecast_inputs, direct __call__.

Async sources: See references/implementation-guide.py for required patterns: _sync_async, managed_session, gather_with_concurrency, async_retry, pure async I/O, try/finally cleanup. Constructor params: cache=True, verbose=True, async_timeout=600, async_workers=16, retries=3. DataFrame sources add time_tolerance.


Step 8 — Register the Source
  • earth2studio/data/__init__.py — alphabetical import

  • earth2studio/lexicon/__init__.py — alphabetical import

  • Verify pyproject.toml deps


Step 9 — Update Documentation
  • Add to correct RST file (datasources_analysis.rst / _forecast.rst / _dataframe.rst)

  • Class docstring: Parameters, Warning (download size), Note (reference URLs), Badges (last)

  • All public methods: NumPy-style docstrings


Step 10 — Update CHANGELOG.md

Add entry under the current unreleased version. See references/implementation-guide.py REGISTRATION CHECKLIST for the format.

One line per source. Do NOT add separate lexicon entries.


Step 11 — Verify Style & Expand Tests

Run make format && make lint && make license. Load references/testing-guide.py for test skeletons. Required tests: test_<source>_fetch (slow), _cache (slow), _call_mock, _exceptions, _available. Target 90%+ coverage with --slow.

[CONFIRM — Tests]

Present test file, functions, coverage.


Step 12 — Validate Variables & Sanity-Check
  1. Validate all lexicon vars against real data (run script, do NOT commit)

  2. Remove variables with < 10% valid data

  3. Create sanity-check plot (gridded or sparse template)

  4. Tell user the plot path and ask for visual confirmation

[CONFIRM — Sanity-Check Plots]

User MUST visually inspect plots. Do not proceed without confirmation.


Step 13 — Branch, Commit & Open PR
  1. Create branch feat/data-source-<name>

  2. Commit (do NOT add sanity-check script/images)

  3. Push to fork

  4. gh pr create --repo NVIDIA/earth2studio

  5. Immediately post sanity-check validation as PR comment with:

    • Variable coverage table (name, count, range, unit)

    • Data validation summary (regions, storms/stations, time range)

    • Key findings (physically reasonable values, conversions verified)

    • Full validation script in <details> block

    • Image placeholder: <!-- Drag and drop sanity-check image here -->

[CONFIRM — Ready to Submit]

Verify all steps complete before creating PR.


Step 14 — Automated Code Review
  1. Poll for Greptile review (5 min timeout)

  2. Categorize feedback (bug/style/perf/docs/suggestion/false-positive)

  3. Present triage table to user

  4. Implement accepted fixes

  5. Respond to PR comments

  6. Push

[CONFIRM — Review Triage]

User approves which comments to address.


Examples

User: Add a data source for the NOAA GFS analysis on S3
Agent: [loads skill, proceeds through Steps 0–14]

Limitations

  • One source type per invocation

  • Requires network access for validation (Step 12)

  • SPDX license headers required in all files


Reminders

DO: uv run python, loguru.logger, alphabetical order in __init__.py/RST/CHANGELOG, canonical method ordering, async utilities (managed_session, gather_with_concurrency, async_retry), pure async I/O, reference URLs in docstrings, try/finally cleanup.

AVOID: asyncio.to_thread, bare tqdm.gather, xarray for loading, full file downloads.

NEVER: loop.set_default_executor(), commit secrets, commit sanity-check scripts/images.

Files

references/implementation-guide.py

# SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES.
# SPDX-FileCopyrightText: All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""Implementation reference skeleton for new Earth2Studio data sources.

This file is a TEMPLATE. Copy it, rename the class, and fill in every
section marked with ``# FILL:``.  Each ``# FILL:`` comment describes
exactly what to replace.

See real examples:
- Gridded DataSource / ForecastSource: earth2studio/data/cfs.py
- DataFrame DataFrameSource: earth2studio/data/nnja.py
- HTTP-based: earth2studio/data/gdas.py

Conventions:
- File lives at earth2studio/data/<source_name>.py
- Class name: PascalCase (e.g. GFS, ARCO, CFS_FX, HimawariAHI)
- File name: lowercase with underscores (e.g. gfs.py, cfs.py)
"""

from __future__ import annotations

import os
import pathlib
import shutil
import uuid
from collections.abc import Callable
from dataclasses import dataclass
from datetime import datetime

import numpy as np
import s3fs
import xarray as xr
from loguru import logger

from earth2studio.data.utils import (
    _sync_async,
    async_retry,
    datasource_cache_root,
    gather_with_concurrency,
    managed_session,
    prep_data_inputs,
    # FILL: Use prep_forecast_inputs instead if ForecastSource
    # prep_forecast_inputs,
)

# FILL: Import your lexicon class
# from earth2studio.lexicon import SourceNameLexicon
# ---------------------------------------------------------------------------
# Optional dependency imports (only if you need packages in the `data` extra)
# ---------------------------------------------------------------------------
from earth2studio.utils.imports import (
    OptionalDependencyFailure,
    check_optional_dependencies,
)

from earth2studio.utils.type import TimeArray, VariableArray

try:
    pass
    # FILL: Import optional packages here, e.g.:
    # import special_decoder
except ImportError:
    OptionalDependencyFailure("data")
    # FILL: Assign None fallbacks:
    # special_decoder = None  # type: ignore[assignment]


# ---------------------------------------------------------------------------
# Constants
# ---------------------------------------------------------------------------

# FILL: Bucket/URL, path prefix, grid dimensions, time constraints
SOURCE_BUCKET = "my-bucket-name"
SOURCE_PREFIX = "path/to/data"
MIN_DATE = datetime(2020, 1, 1)
# FILL: Time step interval in seconds (e.g. 6h = 21600)
INTERVAL_SECONDS = 21600


# ---------------------------------------------------------------------------
# Async task dataclass
# ---------------------------------------------------------------------------


@dataclass
class SourceNameAsyncTask:
    """A single async fetch unit.

    Each task represents one (time, variable) pair to be fetched in parallel.
    """

    # FILL: Index into the output array/dataframe where this result goes
    data_array_indices: tuple[int, ...]
    # FILL: Full URI to the remote file/object
    remote_uri: str
    # FILL: Transform to apply after reading (from lexicon get_item)
    modifier: Callable


# ---------------------------------------------------------------------------
# Data source class
# ---------------------------------------------------------------------------


@check_optional_dependencies()
class SourceName:
    """Short description of the data source.

    Extended description: what data this provides, spatial/temporal resolution,
    grid type, etc.

    Parameters
    ----------
    cache : bool, optional
        Cache data source on local memory, by default True.
    verbose : bool, optional
        Print download progress, by default True.
    async_timeout : int, optional
        Total timeout in seconds for the entire fetch operation, by default 600.
    async_workers : int, optional
        Max concurrent async fetch tasks, by default 16.
    retries : int, optional
        Number of retry attempts per failed fetch with exponential backoff,
        by default 3.

    Warning
    -------
    This is a remote data source and can potentially download a large amount
    of data to your local machine for large requests.

    Note
    ----
    FILL: Reference URL for the data store / documentation.
    """

    # FILL: If this is a DataFrameSource, define SCHEMA here:
    # SCHEMA = pa.schema([
    #     E2STUDIO_SCHEMA.field("time"),
    #     E2STUDIO_SCHEMA.field("lat"),
    #     E2STUDIO_SCHEMA.field("lon"),
    #     E2STUDIO_SCHEMA.field("observation"),
    #     E2STUDIO_SCHEMA.field("variable"),
    # ])

    def __init__(
        self,
        # FILL: Add source-specific params first (e.g. member, satellite, etc.)
        cache: bool = True,
        verbose: bool = True,
        async_timeout: int = 600,
        async_workers: int = 16,
        retries: int = 3,
    ) -> None:
        self._cache = cache
        self._verbose = verbose
        self._async_workers = async_workers
        self._retries = retries
        self.async_timeout = async_timeout
        self._tmp_cache_hash: str | None = None
        self.fs: s3fs.S3FileSystem | None = None

    # ------------------------------------------------------------------
    # Async initialization
    # ------------------------------------------------------------------
    async def _async_init(self) -> None:
        """Initialize the async filesystem connection."""
        # FILL: Choose the right filesystem for your backend:
        # S3 (anonymous):
        self.fs = s3fs.S3FileSystem(
            anon=True,
            client_kwargs={},
            asynchronous=True,
            skip_instance_cache=True,
        )
        # FILL: Or HTTP:
        # from fsspec.implementations.http import HTTPFileSystem
        # self.fs = HTTPFileSystem(asynchronous=True)
        # FILL: Or GCS:
        # import gcsfs
        # self.fs = gcsfs.GCSFileSystem(token="anon", asynchronous=True)

    # ------------------------------------------------------------------
    # Synchronous entry point
    # ------------------------------------------------------------------
    def __call__(
        self,
        time: datetime | list[datetime] | TimeArray,
        variable: str | list[str] | VariableArray,
        # FILL: ForecastSource adds: lead_time: timedelta | list[timedelta] | LeadTimeArray,
        # FILL: DataFrameSource adds: fields: str | list[str] | pa.Schema | None = None,
    ) -> xr.DataArray:
        """Retrieve data for given times and variables.

        Parameters
        ----------
        time : datetime | list[datetime] | TimeArray
            Date times to fetch.
        variable : str | list[str] | VariableArray
            Variable names from the source's lexicon.

        Returns
        -------
        xr.DataArray
            Fetched data array with dims (time, variable, lat, lon).
        """
        # FILL: For ForecastSource return shape is (time, lead_time, variable, lat, lon)
        try:
            xr_array = _sync_async(
                self.fetch, time, variable, timeout=self.async_timeout
            )
        finally:
            if not self._cache:
                shutil.rmtree(self.cache, ignore_errors=True)
        return xr_array

    # ------------------------------------------------------------------
    # Async fetch
    # ------------------------------------------------------------------
    async def fetch(
        self,
        time: datetime | list[datetime] | TimeArray,
        variable: str | list[str] | VariableArray,
    ) -> xr.DataArray:
        """Async function to get data.

        Parameters
        ----------
        time : datetime | list[datetime] | TimeArray
            Date times to fetch.
        variable : str | list[str] | VariableArray
            Variable names from the source's lexicon.

        Returns
        -------
        xr.DataArray
            Data array with dims (time, variable, lat, lon).
        """
        if self.fs is None:
            await self._async_init()

        time_list, variable_list = prep_data_inputs(time, variable)
        # FILL: For ForecastSource use:
        # time_list, lead_list, variable_list = prep_forecast_inputs(
        #     time, lead_time, variable
        # )

        self._validate_time(time_list)
        pathlib.Path(self.cache).mkdir(parents=True, exist_ok=True)

        # FILL: Create output array with correct shape and coordinates
        # For DataSource:
        xr_array = xr.DataArray(
            data=np.empty(
                (len(time_list), len(variable_list), 181, 360),  # FILL: grid dims
                dtype=np.float32,
            ),
            dims=["time", "variable", "lat", "lon"],
            coords={
                "time": time_list,
                "variable": variable_list,
                # FILL: lat/lon coordinate arrays
                "lat": np.linspace(90, -90, 181),
                "lon": np.linspace(0, 359, 360),
            },
        )

        tasks = self._create_tasks(time_list, variable_list)

        # Use managed_session for guaranteed cleanup of the async connection
        async with managed_session(self.fs):
            coros = [self.fetch_wrapper(task, xr_array=xr_array) for task in tasks]
            await gather_with_concurrency(
                coros,
                max_workers=self._async_workers,
                task_timeout=60.0,
                desc="Fetching SourceName data",  # FILL: source name
                verbose=(not self._verbose),
            )

        return xr_array

    # ------------------------------------------------------------------
    # Task creation
    # ------------------------------------------------------------------
    def _create_tasks(
        self,
        time_list: list[datetime],
        variable_list: list[str],
    ) -> list[SourceNameAsyncTask]:
        """Build list of async tasks for all (time, variable) pairs."""
        tasks = []
        for i, t in enumerate(time_list):
            for j, v in enumerate(variable_list):
                # FILL: Import your lexicon class at the top
                # try:
                #     remote_key, modifier = SourceNameLexicon[v]
                # except KeyError:
                #     logger.warning(f"Variable {v} not in lexicon, skipping")
                #     continue
                remote_key = v  # FILL: replace with lexicon lookup
                modifier: Callable = lambda x: x  # FILL: from lexicon

                # FILL: Build the remote URI from time + remote_key
                uri = f"s3://{SOURCE_BUCKET}/{SOURCE_PREFIX}/{t:%Y%m%d}/{remote_key}.nc"

                tasks.append(
                    SourceNameAsyncTask(
                        data_array_indices=(i, j),
                        remote_uri=uri,
                        modifier=modifier,
                    )
                )
        return tasks

    # ------------------------------------------------------------------
    # Fetch wrapper (retry + write into output)
    # ------------------------------------------------------------------
    async def fetch_wrapper(
        self, task: SourceNameAsyncTask, xr_array: xr.DataArray
    ) -> None:
        """Fetch a single task with retry and write result into the array."""
        out = await async_retry(
            self.fetch_array,
            task,
            retries=self._retries,
            backoff=1.0,
            task_timeout=60.0,
            exceptions=(OSError, IOError, TimeoutError, ConnectionError),
        )
        i, j = task.data_array_indices
        xr_array[i, j] = task.modifier(out)

    # ------------------------------------------------------------------
    # Fetch single array (pure async I/O)
    # ------------------------------------------------------------------
    async def fetch_array(self, task: SourceNameAsyncTask) -> np.ndarray:
        """Download and decode a single data chunk.

        FILL: This is where the actual I/O happens. Use pure async calls:
        - await self.fs._cat_file(uri) for full file
        - await self.fs._cat_file(uri, start=offset, end=offset+length)
          for byte-range reads
        Then decode the bytes into a numpy array.
        """
        if self.fs is None:
            raise ValueError("Filesystem not initialized")

        # FILL: Pure async read — never use blocking I/O here
        data_bytes = await self.fs._cat_file(task.remote_uri)

        # FILL: Decode bytes into numpy array
        # Example for NetCDF: write to cache, open with netCDF4/h5py
        # Example for GRIB: write to cache, open with pygrib
        # Example for zarr: use async zarr store
        array = np.frombuffer(data_bytes, dtype=np.float32).reshape(181, 360)

        return array

    # ------------------------------------------------------------------
    # Time validation
    # ------------------------------------------------------------------
    @classmethod
    def _validate_time(cls, times: list[datetime]) -> None:
        """Validate that requested times are within range and on-grid.

        FILL: Adjust the interval and date range for your source.
        """
        for t in times:
            if (t - datetime(1900, 1, 1)).total_seconds() % INTERVAL_SECONDS != 0:
                raise ValueError(
                    f"Requested {t} must align to "
                    f"{INTERVAL_SECONDS // 3600}h intervals"
                )
            if t < MIN_DATE:
                raise ValueError(f"Requested {t} is before minimum date {MIN_DATE}")

    # ------------------------------------------------------------------
    # Cache property
    # ------------------------------------------------------------------
    @property
    def cache(self) -> str:
        """Local cache directory for downloaded data."""
        # FILL: Replace "source_name" with your source's short id
        cache_location = os.path.join(datasource_cache_root(), "source_name")
        if not self._cache:
            if self._tmp_cache_hash is None:
                self._tmp_cache_hash = uuid.uuid4().hex[:8]
            cache_location = os.path.join(cache_location, f"tmp_{self._tmp_cache_hash}")
        return cache_location

    # ------------------------------------------------------------------
    # Available classmethod
    # ------------------------------------------------------------------
    @classmethod
    def available(cls, time: datetime | np.datetime64) -> bool:
        """Check if given date time is fetchable.

        Parameters
        ----------
        time : datetime | np.datetime64
            Date time to check.

        Returns
        -------
        bool
            If date time is available.
        """
        if isinstance(time, np.datetime64):
            time = time.astype("datetime64[ns]").astype("datetime64[us]").item()
        try:
            cls._validate_time([time])
        except ValueError:
            return False
        return True


# ===========================================================================
# LEXICON TEMPLATE (put in earth2studio/lexicon/<source_name>.py)
# ===========================================================================
#
# from collections.abc import Callable
# import numpy as np
# from earth2studio.lexicon.base import LexiconType
#
#
# class SourceNameLexicon(metaclass=LexiconType):
#     """Lexicon for SourceName data source.
#
#     Note
#     ----
#     Variable documentation: FILL: URL
#     """
#
#     VOCAB = {
#         # FILL: Map Earth2Studio variable names -> remote keys
#         # Surface variables: descriptive abbreviation
#         "t2m": "2m_temperature",
#         "u10m": "10m_u_component_of_wind",
#         # Pressure-level: {short_name}{level_hPa}
#         "t500": "temperature::500",
#         "z500": "geopotential::500",
#     }
#
#     @classmethod
#     def get_item(cls, val: str) -> tuple[str, Callable]:
#         """Return remote key and modifier function for a variable.
#
#         Parameters
#         ----------
#         val : str
#             Earth2Studio variable name.
#
#         Returns
#         -------
#         tuple[str, Callable]
#             Remote key string and post-processing function.
#         """
#         remote_key = cls.VOCAB[val]
#         # FILL: Add unit conversions or transforms as needed, e.g.:
#         # if val.startswith("z"):
#         #     return remote_key, lambda x: x * 9.81  # geopotential -> height
#         return remote_key, lambda x: x


# ===========================================================================
# REGISTRATION CHECKLIST
# ===========================================================================
#
# 1. earth2studio/data/__init__.py
#    Add in alphabetical order:
#      from .source_name import SourceName
#
# 2. earth2studio/lexicon/__init__.py
#    Add in alphabetical order:
#      from .source_name import SourceNameLexicon
#
# 3. docs/modules/datasources_analysis.rst (or _forecast.rst, _dataframe.rst)
#    Add class to the .. autosummary:: directive in alphabetical order.
#
# 4. CHANGELOG.md
#    Under the current unreleased version, add:
#      ### Added
#      - Added SourceName DataSource for <description> (`SourceName`)

Requirements and compatibility

Written for: Claude Code

Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta

“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.

Needs: Claude Code frontmatter, Names Claude Code tools, Needs Python

Security

What our scanner noticed· Medium risk

  • Large base64-encoded blobs
  • Scripts that your agent may run

This skill includes scripts that your agent may run. Read them before you use it.

A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.

Attribution and licence

Created by
NVIDIA Earth-2 Team
Publisher
NVIDIA (Official)
Source
NVIDIA/skills · skills/earth2studio-create-datasource · commit fce3cca
Licence
Apache License 2.0 (redistribution allowed)
  • LICENSE (added by AutoGineer from LICENSE-APACHE)
  • ATTRIBUTION.md (written by AutoGineer)
Synced

AutoGineer is not affiliated with or endorsed by NVIDIA Earth-2 Team or NVIDIA.

Download ZIP

The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download earth2studio-create-datasource.zip