Read netCDF files and display variable information

Loads netCDF files and displays info about variables. Tested for ERA and NCEP/NCAR reanalysis data.
1.4K Downloads
Updated 26 Aug 2013

View License

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 (2024). 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 .

MATLAB Release Compatibility
Created with R2010a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
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