Skip to main content

10.1) NetCDF Files


NetCDF (Network Common Data Form) is a set of software libraries and self-describing machine-independent data formats that support the creation, access and sharing of scientific array data. It is a commonly used data format for storing and distributing climatological data.

  • A NetCDF file contains header information and array data.
  • A single file can simultaneously contain arrays of different sizes.

There is a NetCDF software package that can help you explore NetCDF files.

  • As a minimum, you may need to use the function "ncdump" to discover the structure of a NetCDF file. This function's syntax includes an "-h" switch: including this ensures that only the header information is returned, rather than the data.
  • The header information from "ncdump" can be used to guide the loading of header information and data into Matlab.

Much of Matlab's NetCDF functionality mirrors the functionality present within the NetCDF software. Matlab offers high-level (simple commands but limited control) and low-level (more control but more complex commands) access to NetCDF files. Here we will look at high-level access. Details of low-level access can be found in the Matlab help pages.