MetForge Data
Obtain the smallest scientifically sufficient dataset, preserve the source product, and leave an auditable path from request to local files.
Workflow
- Define the data contract before downloading:
- scientific variable and accepted source variable names
- product, processing level, experiment/member, or reanalysis stream
- spatial domain, grid, vertical coordinate, time range, and frequency
- units, calendar, accumulation convention, and expected volume
- required credentials, license, and citation
- Inspect existing files and project conventions. Reuse valid local data instead of downloading duplicates.
- Select an authoritative source. Read references/source-selection.md when the source or access route is uncertain. Verify current API syntax against official documentation; do not invent product identifiers.
- Plan a restartable request:
- subset at the server when scientifically safe
- batch large requests by year, month, variable, or level
- keep credentials outside scripts and version control
- keep raw files immutable
- Download one representative batch first. Do not launch the full request until the sample passes the checks below.
- Validate the sample, then scale out. Use lazy xarray/dask operations for large collections and reduce before materializing arrays.
- Record provenance. Follow references/dataset-contract.md for the manifest and handoff fields.
Execution mode and processing record
Before downloading or preprocessing, inspect the current machine, available memory/storage, data volume, network/access constraints, whether sbatch/Slurm is available, whether the session is already inside a Slurm job, and existing project conventions.
- Run metadata inspection, one-file validation, and small downloads directly when they fit safely in the current session.
- Use the site's scheduler for expensive multi-file preprocessing or long transformations. Use a transfer/data node rather than a compute node when site policy or network access requires it.
- Do not guess Slurm account, partition, walltime, modules, or storage paths. Infer them from existing project scripts/configuration or request the missing value.
- For submitted work, capture the job script, job ID, resources, environment activation, stdout/stderr paths, and terminal status.
After every completed download, preprocessing call, or batch stage, append a record to the project's existing log/provenance location. If none exists, use output/logs/YYYYMMDD-HHMM-<task>.md. Record source and inputs, software environment, direct/Slurm decision, commands or request payload, parameters, outputs, checksums when appropriate, validation, deviations, and status. Redact credentials, tokens, cookies, and signed URLs. If files cannot be written, return the same record explicitly in the response.
Validation gate
Check at least:
- requested variables and actual units
- dimension names, sizes, and coordinate ordering
- latitude direction and longitude convention
- time coverage, cadence, calendar, and duplicated/missing timestamps
- pressure-level ordering or hybrid-coordinate metadata
- fill values, missing-data fraction, and plausible numeric range
- accumulation versus instantaneous fields
- sample spatial plot or summary statistics when they can reveal a wrong product
Treat a successful HTTP response as transport success, not scientific validation.
File behavior
- Follow existing project paths. If none exist, use
data/raw/ for source files, data/processed/ for derived products, and data/manifests/ for request/provenance records.
- Never overwrite source data in place.
- Prefer scripts or request manifests over one-off opaque commands for non-trivial acquisitions.
- Keep output chunks and compression compatible with the dominant access pattern.
- Do not silently regrid, interpolate, convert calendars, or change units. Record every such transformation.
Handoff
Return:
- files obtained or the exact executable request script
- source/product and stable documentation link
- contract fields and deviations
- sample validation results
- expected versus actual size
- any credentials, quota, or access blocker
- the next processing step only when requested
- processing record, including scheduler job IDs when used
1---2name: metforge-data3description: Acquire and prepare atmospheric, climate, and Earth-system datasets reproducibly. Use when the agent needs to find an authoritative dataset, choose among ERA5/CMIP/GPM/MERRA-2/NOAA or similar products, download or subset NetCDF/GRIB/Zarr data, write CDS/Earthdata/ESGF/OPeNDAP acquisition code, inspect coordinates and metadata, estimate request size, preserve raw inputs, or create a provenance manifest for later analysis. Also use for xarray/dask preprocessing when data acquisition and dataset integrity are central to the task.4license: MIT5---67# MetForge Data89Obtain the smallest scientifically sufficient dataset, preserve the source product, and leave an auditable path from request to local files.1011## Workflow12131. Define the data contract before downloading:14 - scientific variable and accepted source variable names15 - product, processing level, experiment/member, or reanalysis stream16 - spatial domain, grid, vertical coordinate, time range, and frequency17 - units, calendar, accumulation convention, and expected volume18 - required credentials, license, and citation192. Inspect existing files and project conventions. Reuse valid local data instead of downloading duplicates.203. Select an authoritative source. Read [references/source-selection.md](references/source-selection.md) when the source or access route is uncertain. Verify current API syntax against official documentation; do not invent product identifiers.214. Plan a restartable request:22 - subset at the server when scientifically safe23 - batch large requests by year, month, variable, or level24 - keep credentials outside scripts and version control25 - keep raw files immutable265. Download one representative batch first. Do not launch the full request until the sample passes the checks below.276. Validate the sample, then scale out. Use lazy xarray/dask operations for large collections and reduce before materializing arrays.287. Record provenance. Follow [references/dataset-contract.md](references/dataset-contract.md) for the manifest and handoff fields.2930## Execution mode and processing record3132Before downloading or preprocessing, inspect the current machine, available memory/storage, data volume, network/access constraints, whether `sbatch`/Slurm is available, whether the session is already inside a Slurm job, and existing project conventions.3334- Run metadata inspection, one-file validation, and small downloads directly when they fit safely in the current session.35- Use the site's scheduler for expensive multi-file preprocessing or long transformations. Use a transfer/data node rather than a compute node when site policy or network access requires it.36- Do not guess Slurm account, partition, walltime, modules, or storage paths. Infer them from existing project scripts/configuration or request the missing value.37- For submitted work, capture the job script, job ID, resources, environment activation, stdout/stderr paths, and terminal status.3839After every completed download, preprocessing call, or batch stage, append a record to the project's existing log/provenance location. If none exists, use `output/logs/YYYYMMDD-HHMM-<task>.md`. Record source and inputs, software environment, direct/Slurm decision, commands or request payload, parameters, outputs, checksums when appropriate, validation, deviations, and status. Redact credentials, tokens, cookies, and signed URLs. If files cannot be written, return the same record explicitly in the response.4041## Validation gate4243Check at least:4445- requested variables and actual units46- dimension names, sizes, and coordinate ordering47- latitude direction and longitude convention48- time coverage, cadence, calendar, and duplicated/missing timestamps49- pressure-level ordering or hybrid-coordinate metadata50- fill values, missing-data fraction, and plausible numeric range51- accumulation versus instantaneous fields52- sample spatial plot or summary statistics when they can reveal a wrong product5354Treat a successful HTTP response as transport success, not scientific validation.5556## File behavior5758- Follow existing project paths. If none exist, use `data/raw/` for source files, `data/processed/` for derived products, and `data/manifests/` for request/provenance records.59- Never overwrite source data in place.60- Prefer scripts or request manifests over one-off opaque commands for non-trivial acquisitions.61- Keep output chunks and compression compatible with the dominant access pattern.62- Do not silently regrid, interpolate, convert calendars, or change units. Record every such transformation.6364## Handoff6566Return:6768- files obtained or the exact executable request script69- source/product and stable documentation link70- contract fields and deviations71- sample validation results72- expected versus actual size73- any credentials, quota, or access blocker74- the next processing step only when requested75- processing record, including scheduler job IDs when used