Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

NetCDF ncdump

$ ncdump Foundation Low Risk
Unidata · Database & Data · BSD-3-Clause · macos / linux / windows

ncdump is Unidata's standard CLI utility for NetCDF-3 and NetCDF-4 (.nc) scientific datasets. It prints Common Data form Language (CDL) metadata headers (-h), file format kind (-k), selected variable slices (-v), or XML NcML (-x).

FCRS-1.0 Score
67 /100
Usable w/ Caveats
Medium Confidence
Zero-Friction Install
brew install netcdf
CLI vs MCP Decision CLI Only

Inspects NetCDF dimensions, coordinate variables, and CF attributes (ncdump -h) locally without loading multi-GB climate/ocean arrays.

Agent-Readiness Checklist

— JSON Output
✓ Field Filtering
✓ Non-Interactive
— Dry-Run
— Read-Only Mode
— NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 13 / 25

Non-interactive stdout tool, but outputs CDL text or -x XML (no JSON), lacks built-in row/index slicing on -v, and dumps entire arrays if -h is forgotten.

  • CDL text or NcML -x XML output only (no JSON)
  • No --head limit flag; requires -h to avoid massive dumps
Trust & Safety 24 / 25

Pure read-only inspection command that writes only to stdout.

  • Strictly read-only stdout utility
Setup & Portability 10 / 15

Available via Homebrew (netcdf), conda-forge, and Linux package managers with C/HDF5 shared library dependencies.

  • Native C package (brew install netcdf)
Utility & Efficiency 9 / 15

Essential for inspecting .nc metadata headers (-h), though nco (ncks) or Python xarray is needed for array slicing or JSON export.

  • Fast CDL metadata inspection (-h, -k)
Maintenance & Lineage 7 / 10

Maintained by UCAR/Unidata (Unidata/netcdf-c) under permissive BSD-style license.

  • Official Unidata/netcdf-c repository
Docs & Verifiability 4 / 10

Traditional manpage and Unidata guide with sparse machine-automation examples.

  • Manpage-style reference in Unidata utilities guide

Security, Auth & Guardrails

Auth Modes
No Auth
Credential Storage

None for local .nc files; optional OPeNDAP URLs use .netrc or URL tokens if enabled.

Side Effects
Read-Only
Cost & Quotas

Permissive Unidata BSD-style open-source license; completely free.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# NetCDF ncdump Agent Rules
- ALWAYS pass `-h` (header-only) or `-c` (coordinate vars only) first; running `ncdump file.nc` bare dumps every multidimensional array to stdout.
- Check variable sizes with `ncdump -h` before passing `-v <var>`.

Agent-Ready Command Recipes

Safe Read-Only Queries

Inspect NetCDF header metadata without data arrays
ncdump -h data.nc

Prints dimensions, variable declarations, units, and global attributes in CDL format without dumping array values.

Check NetCDF format variant and dump one variable
ncdump -k data.nc && ncdump -v lat data.nc

Reports whether the file is classic or netCDF-4 and prints only the lat coordinate variable.

Strengths for Agents

  • + ncdump -h cleanly summarizes dimensions, CF attributes, and variable types in seconds.
  • + Strictly read-only across NetCDF-3 and NetCDF-4 files.

Caveats & Pitfalls

  • ! No JSON output and no slice/limit flag (ncdump -v temp dumps the entire array for temp).
  • ! Omitting -h on large climate/ocean .nc files immediately overflows stdout.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI