Skip to content

Checks And Reports

Compliance Check

ds.check.compliance() combines:

  • CF checks via cfchecker when available (or when requested explicitly)
  • heuristic checks
  • extra convention checks (cf and/or ferret)

If CF checker cannot run and fallback is enabled, output includes checker_error and uses heuristic results.

Ocean Cover Check

ds.check.ocean_cover() includes:

  • edge_of_map: persistent missing longitude columns (sliver/edge detection)
  • land_ocean_offset: land/ocean reference-point sanity check on global grids

Ocean cover is returned as a suite report:

  • suite: suite name ("ocean_cover")
  • checks: list of atomic checks (id, name, status, detail, result)
  • summary: suite totals and overall status

Internally this is built by passing a list of atomic checks to the shared Suite class.

When var_name is omitted, it checks all variables containing inferred lon/lat dims and returns a multi-variable report.

Time Cover Check

ds.check.time_cover() detects missing time slices by variable and reports contiguous missing ranges.

Time cover is returned as a suite report:

  • suite: suite name ("time_cover")
  • checks: list of atomic checks (currently time.missing_slices)
  • summary: suite totals and overall status

If a variable has no resolved time dim, the time-missing subcheck is marked as skipped (skipped_no_time).

Combined Check

ds.check.all() aggregates compliance, ocean, and time checks into one report.

The summary includes:

  • checks_run
  • failing_checks
  • warnings_or_skips
  • overall_status (pass, warn, fail)
  • overall_ok (boolean)

Report Formats

All check methods support:

  • python: return machine-friendly dict
  • tables: print rich tables to stdout
  • html: return HTML
  • auto: environment-aware default

auto resolution:

  • Jupyter notebook -> html
  • interactive terminal -> tables
  • non-interactive script/test -> python

HTML Reports

For Python calls:

html = ds.check.all(report_format="html", report_html_file="all-report.html")

For CLI calls:

nc-check all input.nc --save-report