Read netCDF files and display variable information

Loads netCDF files and displays info about variables. Tested for ERA and NCEP/NCAR reanalysis data.

You are now following this Submission

This script loads netCDF files into MATLAB and displays info about the dimensions and variables.

The code should at least work on ERA-40, ERA-interim and NCEP/NCAR reanalysis data.

I wrote the script since I can't find a function in the built-in set of netCDF functions included in MATLAB that displays all header info of the file, equivalent to the old 'ncdump' function.

Cite As

Christian Stranne (2026). Read netCDF files and display variable information (https://www.mathworks.com/matlabcentral/fileexchange/31284-read-netcdf-files-and-display-variable-information), MATLAB Central File Exchange. Retrieved .

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.8.0.0

Bug fix

1.5.0.0

Changed the info about the script

1.2.0.0

Bug fix

1.1.0.0

Just added in the description the fact that the code is only tested on ERA-40, ERA-interim and NCEP/NCAR reanalysis data.

The first part (the load and display part) should work for any netCDF-file I would imagine.

1.0.0.0