NetCDF Files
You can interact with netCDF files in several ways:
The Import Tool app (in MATLAB® Online™) and the Import Data Live Editor task provide intuitive, graphical interfaces for exploring and reading data from netCDF files.
The MATLAB high-level netCDF functions provide a simplified, text-based interface for reading data from netCDF files and writing variables from the MATLAB workspace into netCDF files.
The netCDF library package of low-level functions provides the most control over the reading and writing process of netCDF files by providing access to the routines in the netCDF C library.
MATLAB supports netCDF version 4.9.1.
Live Editor Tasks
Import Data | Import data from a file in the Live Editor (Since R2023a) |
Apps
Import Tool | Import data from file |
Functions
Topics
- Import NetCDF Files and OPeNDAP Data
Read data from a netCDF file using the high-level functions, the low-level functions, and the Import Data Live Editor task.
- Export to NetCDF Files
Create, merge, and write NetCDF files using high-level functions and the
netcdf
package low-level functions. - Map NetCDF API Syntax to MATLAB Syntax
The MATLAB
netcdf
package of low-level functions map to the corresponding routines and data types in the NetCDF C library.
Troubleshooting
Resolve Errors Reading OPeNDAP Data
When you have trouble reading OPeNDAP data, consider these factors.