What is a .nc file?
Network Common Data Form · Data · Unidata (UCAR) · 1990
NetCDF stores large, multidimensional scientific arrays such as climate, ocean and atmospheric data, together with the metadata that describes them. It is a staple of geoscience and modelling.
What is a .nc file used for?
A classic .nc file starts with the magic CDF and a version byte, and stores gridded arrays (for example temperature over latitude, longitude and time) with named dimensions and units. The newer netCDF-4 format is built on HDF5.
It is designed for self-describing, portable data that any tool can read the same way, which is why it dominates climate science. Tools include Panoply, the netCDF libraries and Python's xarray.
What opens a .nc file?
The .nc format opens in the following apps, grouped by operating system. If one app does not work, try another from the same list.
Windows
- Panoply
- Python (xarray, netCDF4)
- ncview
macOS
- Panoply
- Python (xarray, netCDF4)
- ncview
Linux
- ncview
- Python (xarray)
- Panoply
Open a .nc file step by step
- Confirm the file really is a .nc. Drop it into the WhatFileType identifier, which reads its signature in your browser without uploading anything.
- On Windows, open it with Panoply or Python (xarray, netCDF4).
- On Mac, use Panoply or Python (xarray, netCDF4).
- On Linux, try ncview or Python (xarray).
- Still stuck? Convert the .nc to csv, which opens more widely.
Why can't I open my .nc file?
Almost always because no installed app understands NetCDF. Install one of the apps above, or convert the file to a format your existing software already reads. If double-clicking opens the wrong program instead of nothing at all, the file association is set to the wrong app rather than the file being broken.
The other possibility is that the file is not really a .nc at all. Drop it into the file identifier to check it by its bytes instead of its name. Nothing is uploaded.
How to convert a .nc file
You can convert a .nc file to csv, hdf5, geojson using a conversion tool or the export menu of an app that opens it.
What is the .nc file signature (magic bytes)?
A .nc file starts with the hex bytes 43 44 46 01, which read as CDF. in ASCII. Programs identify NetCDF by those bytes, not by the filename, so a renamed file still gives itself away.
These are the documented signatures for NetCDF. For a full breakdown, see the NetCDF (classic) file signature page.
| Hex signature | Offset | ASCII | Note |
|---|---|---|---|
| 43 44 46 01 | 0 | CDF. | 'CDF' + version (classic); netCDF-4 is HDF5 |
See the full magic-numbers reference for every format.
Frequently asked questions
What is a .nc file?
NetCDF stores large, multidimensional scientific arrays such as climate, ocean and atmospheric data, together with the metadata that describes them. It is a staple of geoscience and modelling.
How do I open a .nc file?
Use Panoply for a visual view, or read it in Python with xarray or the netCDF4 library. ncview gives a quick look on Linux and Mac.
What is NetCDF used for?
Storing large multidimensional scientific arrays, especially climate, weather and ocean data, with the dimensions, units and metadata that describe them.
What is the difference between NetCDF and HDF5?
Both store big scientific arrays. NetCDF adds conventions for labelled dimensions and geoscience metadata; netCDF-4 is in fact built on top of HDF5.
Related formats
Sources
Details on this page were checked against authoritative references. How sources are ranked and what is deliberately left out is set out in the methodology.