Skip to content
Novus Examples
nc1.3 KB

NetCDF 64-bit Offset Format — CDF-2 (.nc)

The same 4x5x6 temperature grid written in the 64-bit offset variant of NetCDF-3, whose only visible difference from the classic file is the fourth magic byte and the width of the header offsets. Use it to check that format sniffing looks at the version byte instead of stopping at the 'CDF' signature.

Preview — schema + first 5 rowsnc
FieldValue
Magic bytes43 44 46 02 ('CDF' + version 2)
Classic equivalent43 44 46 01 ('CDF' + version 1)
Difference64-bit file offsets in the header, identical data layout
Dimensionstime=4, lat=5, lon=6
Valuesbyte-for-byte the same 120 float32 temperatures as the CDF-1 file
Same numbers, different container version — the fourth magic byte is the whole story.

Specifications

Format
NetCDF 64-bit offset (CDF-2)
Magic
CDF\x02
Classic Magic
CDF\x01
Dims
time=4, lat=5, lon=6
Variable
tas float32 (K)
Same Values As
sci-nc-cf-grid

Testing contract

Expected to pass
Scenario
Sniff the format from the first four bytes and then read tas from both this file and the classic CDF-1 grid.
Expected result
The magic is 'CDF' followed by 0x02 (against 0x01 for the classic file) and the decoded tas arrays are numerically identical between the two.

What is a .nc file?

NetCDF (.nc, Network Common Data Form) is a binary, self-describing format for array-oriented scientific data. It stores multidimensional variables (like temperature over latitude, longitude, and time) with named dimensions, units, and metadata attributes, and is a standard in climate, ocean, and geoscience.

How to use this file

Use an example .nc file to test NetCDF readers (netCDF4, xarray, Panoply), CF-convention validators, and gridded-data pipelines, or to verify dimension and variable extraction.

How to use this file for testing

“NetCDF 64-bit Offset Format — CDF-2 (.nc)” is a deterministic Novus Examples fixture for Scientific data, Serialization testing. Citation catalogs (BibTeX, RIS), chemistry structures (MDL Molfile, PDB), and gridded binary data (NetCDF, FITS) — for testing reference managers, molecule viewers, and scientific-data loaders.

Documented properties for this file: NetCDF 64-bit offset (CDF-2). Compare results against paired or grouped companions on this page when present (clean↔damaged, searchable↔scanned, or format twins) so scores stay reproducible across runs.

Download the file once, keep the path stable in CI or local scripts, and treat the spec table as the contract: dimensions, seeds, field lists, and roles are intentional. Corrupt or invalid samples are labelled as such — expect parsers to fail loudly rather than silently accept them.

Scientific fixtures are small, valid, and fully synthetic — no real organism, patient, sample, or observation. Point your parser or loader at the file and check it reads the documented records, variables, or headers; binary formats ship a readable twin or metadata listing for comparison.

Generated by generation/scientific.py. Free for any use, no attribution required — license.