# Nes Lter Data

> Query and analyze New England Shelf Long-term Ecological Research (NES-LTER) oceanographic data with the bundled command-line client or the optional NES-LTER MCP. Use for NES-LTER stations, cruises, casts, CTD profiles, underway or bottle data, nutrients, HPLC, chlorophyll, events, cruise tracks, schemas, variable resolution, and source-backed summaries.

- Skill: `blongworth/nes-lter-data` (Agent Skill, multi-file: 4 files)
- Install (CLI): `npx skillmds@latest add blongworth/nes-lter-data`
- Raw SKILL.md: https://api.skillmd.com/api/skills/blongworth/nes-lter-data/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: blongworth (https://skillmd.com/u/blongworth)
- Updated: 2026-09-22
- Page: https://skillmd.com/skills/blongworth/nes-lter-data

---


# NES-LTER Data

This skill bundles a working, dependency-free client for the NES-LTER API at `https://nes-lter-api.whoi.edu`. It converts the core workflows from [blongworth/nes-lter-mcp](https://github.com/blongworth/nes-lter-mcp) into a reusable skill. The MCP is also available as an optional connector when the agent has it configured.

## Use the bundled client

Run the script from this skill directory:

```bash
python3 scripts/nes_lter.py stations
python3 scripts/nes_lter.py cruises --year 2025 --season winter
python3 scripts/nes_lter.py query-ctd --station L8 --variable oxygen --year 2025 --season winter
```

The script uses only the Python standard library and prints JSON. Set `NES_LTER_API_BASE_URL` or pass `--base-url` for a compatible API deployment. Every response includes `source_url` and `retrieved_at` where the API operation has a source path.

## Workflow

1. Parse the request into explicit station, variable, year, season, cruise, dataset, depth, time, and output-size filters.
2. Discover identifiers before retrieving large data: use `stations`, then `cruises`, then `casts`.
3. Start CTD exploration with `query-ctd`, which returns compact profile summaries by default. Add `--include-points` only for a small, intentional result.
4. Use `profile CRUISE CAST` for a known profile, `rows DATASET CRUISE` for underway/bottle/nutrient/HPLC/chlorophyll/event tables, `schema DATASET CRUISE` for unfamiliar columns, and `track CRUISE` for mapping.
5. Use `--limit`, `--offset`, station/variable filters, and time bounds to keep responses bounded.
6. Report the exact filters, cruise/cast identifiers, selected variable column, units or a units caveat, and returned provenance.

## CTD conventions

Friendly variables include `oxygen`, `temperature`, `salinity`, `density`, `fluorescence`, `par`, and `transmissometer`. Raw CTD columns are accepted too. Common candidates are:

- oxygen: `sbox0mm_kg`, `sbox1mm_kg`
- temperature: `t090c`, `t190c`, `potemp090c`, `potemp190c`
- salinity: `sal00`, `sal11`
- density: `sigma_00`, `sigma_11`
- fluorescence: `fleco_afl`

Confirm units with `schema` or source metadata. The MCP describes `sbox*mm_kg` as commonly mmol/kg and `t*c` as commonly degrees C; do not present those as verified units without checking metadata.

Station matching defaults to a 3 km nearest-station tolerance. State any changed `--max-distance-km`. Seasons are meteorological; winter 2025 includes December 2024 through February 2025.

## Examples

Compact oxygen summaries for station L8:

```bash
python3 scripts/nes_lter.py query-ctd \
  --station L8 --variable oxygen --year 2025 --season winter --limit 25
```

Full points for one selected cast:

```bash
python3 scripts/nes_lter.py profile CRUISE_NAME CAST_NUMBER \
  --variable oxygen --include-points --depth-min 0 --depth-max 500
```

Nutrient rows with pagination:

```bash
python3 scripts/nes_lter.py rows nutrients CRUISE_NAME --limit 200 --offset 0
```

## Failure handling

- If discovery returns no records, relax one filter at a time and explain the change.
- If a variable is absent, run `resolve-variable NAME` and then `schema DATASET CRUISE`.
- If a response is truncated, continue with the returned pagination rather than silently dropping rows.
- If the API fails, report the operation and endpoint; do not fabricate a fallback.

For exact endpoint mappings, dataset names, environment variables, and optional MCP setup, read [references/api.md](references/api.md).

