Skip to main content

nc-check

nc-check banner

Prepare xarray.Dataset objects for CF-1.12-ready NetCDF output.

What It Does

  • Validates metadata and conventions with ds.check.compliance().
  • Applies safe non-destructive metadata fixes with ds.check.make_cf_compliant().
  • Runs ocean-grid and time-slice coverage checks with ds.check.ocean_cover() and ds.check.time_cover().
  • Provides both Python and CLI workflows (nc-check, nc-comply).

Install

uv add nc-check
# or
pip install nc-check

Optional full CF checker support:

uv add "nc-check[cf]"
# or
pip install "nc-check[cf]"

Quickstart

import xarray as xr
import nc_check  # Registers ds.check accessor

ds = xr.Dataset(
    data_vars={"temp": (("time", "lat", "lon"), [[[280.0]]])},
    coords={"time": [0], "lat": [10.0], "lon": [20.0]},
)

compliance = ds.check.compliance(report_format="python")
fixed = ds.check.make_cf_compliant()
ocean = ds.check.ocean_cover(report_format="python")
time = ds.check.time_cover(report_format="python")
full = ds.check.all(report_format="python")

CLI quickstart:

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

Docs

Local docs site:

uv run --with mkdocs-material mkdocs serve

Development Test Run

uv sync --group dev
uv run --group dev python -m pytest

Metadata

Release files for nc-check 0.2.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nc-check 0.2.5
File Size Uploaded Provenance
nc_check-0.2.5.tar.gz 50.2 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for nc-check 0.2.5
File Interpreter ABI Platform
nc_check-0.2.5-py3-none-any.whl Python 3 none any Details

Total release size: 110.7 kB

Release files / nc_check-0.2.5.tar.gz

Download URL nc_check-0.2.5.tar.gz
Size 50.2 kB
Tags Source
SHA-256 checksum
How to use checksums
317fb73085fb2151b314f66bfcb38ff8027c23702815ce949c076dbae9ffbf23
BLAKE2b-256 checksum
How to use checksums
16b6c9de874d3d42d5e8835e14d22f2dff9c29c65c848d9e5afe280c77fe94f8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.9 {"installer":{"name":"uv","version":"0.9.9"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / nc_check-0.2.5-py3-none-any.whl

Download URL nc_check-0.2.5-py3-none-any.whl
Size 60.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bd70ef997df2fef82c573eb050f12cb4656460847667622ca04fde99afb3554f
BLAKE2b-256 checksum
How to use checksums
eba0a4d16a329b2091695858c66dbabb6435ca20b6f6cd6819a1f12cb1f8400f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.9 {"installer":{"name":"uv","version":"0.9.9"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for nc-check 0.2.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page