Compare
netCDF vs Zarr
netCDF provides a scientific data model with dimensions, variables, and attributes across several file formats. Zarr specifies chunked multidimensional arrays stored in key-value systems. The better fit depends on tools, storage, and access patterns.
Which format should you choose?
Prefer netCDF for existing datasets and compatible scientific software; consider Zarr for chunk-wise access in distributed or object-store workflows. Check metadata conventions and implementation support.
Good fit for netCDF
Storing and exchanging array-based climate, weather, and Earth-science data
- Describing multidimensional data with dimensions, variables, and attributes
- Portable scientific data workflows using netCDF-aware tools
Good fit for Zarr
Storing large multidimensional arrays in chunks · Working with scientific data in cloud object storage
- Reading selected regions of large arrays
- Sharing sharded datasets between compatible tools
Basic information
| Field | netCDF | Zarr |
|---|---|---|
| Extension | .nc, .nc4, .cdf | .zarr |
| MIME type | ||
| Common uses | Storing and exchanging array-based climate, weather, and Earth-science data | Storing large multidimensional arrays in chunks · Working with scientific data in cloud object storage |
| How to open | Use netCDF-aware visualization or analysis software or a library. Inspect variables, dimensions, attributes, and the file variant. Check coordinate variables, units, calendar, missing values, and any CF conventions against what your reader expects. | Use a Zarr-capable library or analysis tool. Check version, array shape, chunk grid, codecs, and attributes. Keep the whole local directory or required object-store keys and consult producer documentation. |
| Export or convert | When converting to CSV, HDF5, Zarr, or another format, check whether dimensions, variable types, attributes, coordinates, and time calendars are preserved. Conversion to the classic model may lose extended features; CSV cannot fully represent hierarchy, types, and attributes. | When converting from netCDF or HDF5, check dimensions, types, chunks, attributes, and coordinate conventions. Preserve the source and validate values after conversion. |
Choose by use case
Describing multidimensional data with dimensions, variables, and attributes
Storing and exchanging array-based climate, weather, and Earth-science data
netCDFPortable scientific data workflows using netCDF-aware tools
Storing and exchanging array-based climate, weather, and Earth-science data
netCDFReading selected regions of large arrays
Storing large multidimensional arrays in chunks · Working with scientific data in cloud object storage
ZarrSharing sharded datasets between compatible tools
Storing large multidimensional arrays in chunks · Working with scientific data in cloud object storage
ZarrKey point 1
Classic netCDF is commonly a single file; netCDF-4 is based on HDF5. Zarr separates array chunks and metadata for directory or object-store storage.
More on the differencesKey point 2
netCDF focuses on a scientific dataset model; Zarr focuses on chunked arrays and storage. Coordinate, unit, and convention interoperability must be checked.
More on the differencesMore on the differences
Choose netCDF when established files and software interoperability are central. Consider Zarr when chunk-level reads and writes over object storage suit the workflow. Test the exact library, Zarr version, and codecs.
- netCDF classic-family files are generally single files, while netCDF-4 uses HDF5. Zarr stores chunked arrays and metadata as separate keys or objects.
- netCDF defines dimensions, variables, and attributes; Zarr specifies array and storage structures. Coordinate and unit conventions may require additional conventions and tooling.
- During conversion validate chunk shape, codecs, data types, missing values, time, and coordinate metadata. Version and codec support vary across implementations and stores.
Frequently asked questions
Does converting netCDF to Zarr preserve all metadata automatically?
Not necessarily. Validate dimensions, coordinates, units, missing values, conventions, and codec support with the target tools.