Compare
FITS vs netCDF
FITS is a standard for exchanging, analyzing, and archiving astronomy data, with image arrays and tables in Header/Data Units (HDUs). netCDF describes scientific data using dimensions, variables, and attributes and is used in fields such as meteorology and Earth science.
Which format should you choose?
Choose FITS for astronomy observations, archives, and FITS-aware tools. Consider netCDF when sharing scientific arrays through named dimensions, variables, and attributes with netCDF-based analysis tools. Check coordinate, unit, and time conventions in either.
Good fit for FITS
Storing and exchanging astronomical and scientific images, spectra, and tables
- Combining multiple data units and metadata in one dataset
- Exchanging observational data between FITS-aware tools
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
Basic information
| Field | FITS | netCDF |
|---|---|---|
| Extension | .fits, .fit, .fts | .nc, .nc4, .cdf |
| MIME type | application/fits | |
| Common uses | Storing and exchanging astronomical and scientific images, spectra, and tables | Storing and exchanging array-based climate, weather, and Earth-science data |
| How to open | Use an astronomy viewer, analysis program, or scientific library that supports FITS. If the file contains several HDUs, inspect extensions as well as the primary HDU, and verify coordinates, units, data type, and missing-value handling. | 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. |
| Export or convert | When converting to an image, table, or another scientific format, check whether coordinate systems, units, observation metadata, and extra HDUs are preserved. Keep the original FITS and compare scientific values and positions after conversion. | 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. |
Choose by use case
Combining multiple data units and metadata in one dataset
Storing and exchanging astronomical and scientific images, spectra, and tables
FITSExchanging observational data between FITS-aware tools
Storing and exchanging astronomical and scientific images, spectra, and tables
FITSDescribing 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
netCDFKey point 1
FITS defines a header and data section for each HDU, which can contain images, spectra, and tables. netCDF variables are N-dimensional arrays associated with named dimensions and attributes.
More on the differencesKey point 2
FITS is a widely used astronomy interchange and archive standard. netCDF has classic and enhanced data models and classic-family and netCDF-4 file formats.
More on the differencesMore on the differences
Prefer FITS for astronomy data exchange and established archives. Consider netCDF for scientific arrays organized by dimensions and variables in compatible analysis workflows. Verify conventions and tools rather than relying on file extensions.
- FITS organizes data into HDUs with headers and data, supporting images, spectra, and tables. netCDF organizes N-dimensional variables with named dimensions and attributes.
- FITS is standardized for astronomy interchange and archives. netCDF supports classic and enhanced models and multiple underlying file formats.
- On conversion, validate coordinate systems and WCS, time, units, scaling, missing values, table columns, extra HDUs, and attributes. An extension alone does not identify the variant or conventions.
Frequently asked questions
Are FITS and netCDF interchangeable without loss?
Not automatically. Validate coordinates, units, time, missing values, scaling, tables, and metadata conventions after conversion.