.nc

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.

Category
Data
Type
Binary
Is a .nc file safe to open? Safe. NetCDF is a scientific data container read by libraries. It stores arrays and metadata, not code.

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.

How to open 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. For a step-by-step walkthrough, see how to open a .nc file.

Windows

  • Panoply
  • Python (xarray, netCDF4)
  • ncview

macOS

  • Panoply
  • Python (xarray, netCDF4)
  • ncview

Linux

  • ncview
  • Python (xarray)
  • Panoply

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.

.nc file signature (magic bytes)

Programs recognise a .nc file by the bytes at the start of the file, not by its name. These are the signatures for NetCDF. For a full breakdown, see the NetCDF file signature page.

Hex signatureOffsetNote
43 44 46 010'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: