| Contents | Index |
MATLAB provides both high- and low-level access to NetCDF files:
High-level access functions make it easy to read a data set from a NetCDF file or write a variable from the MATLAB workspace into a NetCDF file
Low-level access functions provide interfaces to dozens of functions in the NetCDF library
Note For information about MATLAB support for the Common Data Format (CDF), which is a completely separate and incompatible format, see cdflib. |
These functions provide high-level access to NetCDF files.
| nccreate | Create variable in NetCDF file |
| ncdisp | Display contents of NetCDF data source in Command Window |
| ncinfo | Return information about NetCDF data source |
| ncread | Read data from variable in NetCDF data source |
| ncreadatt | Read attribute value from NetCDF data source |
| ncwrite | Write data to NetCDF file |
| ncwriteatt | Write attribute to NetCDF file |
| ncwriteschema | Add NetCDF schema definitions to NetCDF file |
The MATLAB low-level functions provide an API that you can use to enable reading data from and writing data to NetCDF files (known as data sets in NetCDF terminology). To use these functions, you should be familiar with the information about NetCDF contained in the NetCDF C Interface Guide.
MATLAB supports NetCDF version 4.1.2.
In most cases, the syntax of the MATLAB function matches the syntax of the NetCDF library function. The functions are implemented as a package called netcdf. To use these functions, prefix the function name with package name netcdf. For example, to call the NetCDF library routine used to open existing NetCDF files, use the following MATLAB syntax:
ncid = netcdf.open(ncfile, mode);
| netcdf.setChunkCache | Set default chunk cache settings for NetCDF library |
| netcdf | Summary of MATLAB Network Common Data Form (NetCDF) capabilities |
| netcdf.getChunkCache | Retrieve chunk cache settings for NetCDF library |
| netcdf.inqLibVers | Return NetCDF library version information |
| netcdf.setDefaultFormat | Change default netCDF file format |
| netcdf.abort | Revert recent netCDF file definitions |
| netcdf.close | Close netCDF file |
| netcdf.create | Create new NetCDF dataset |
| netcdf.endDef | End netCDF file define mode |
| netcdf.inq | Return information about netCDF file |
| netcdf.inqFormat | Determine format of NetCDF file |
| netcdf.inqGrps | Retrieve array of child group IDs |
| netcdf.inqUnlimDims | Return list of unlimited dimensions in group |
| netcdf.open | Open NetCDF data source |
| netcdf.reDef | Put open netCDF file into define mode |
| netcdf.setFill | Set netCDF fill mode |
| netcdf.sync | Synchronize netCDF file to disk |
| netcdf.defDim | Create netCDF dimension |
| netcdf.inqDim | Return netCDF dimension name and length |
| netcdf.inqDimID | Return dimension ID |
| netcdf.renameDim | Change name of netCDF dimension |
| netcdf.defVarFill | Define fill parameters for NetCDF variable |
| netcdf.inqVarDeflate | Determine compression settings for NetCDF variable |
| netcdf.defVar | Create NetCDF variable |
| netcdf.defVarChunking | Define chunking behavior for NetCDF variable |
| netcdf.defVarDeflate | Define compression parameters for NetCDF variable |
| netcdf.defVarFletcher32 | Define checksum parameters for NetCDF variable |
| netcdf.getVar | Return data from netCDF variable |
| netcdf.inqVar | Return information about variable |
| netcdf.inqVarChunking | Determine chunking settings for NetCDF variable |
| netcdf.inqVarFill | Determine values of fill parameters for NetCDF variable |
| netcdf.inqVarFletcher32 | Fletcher32 checksum setting for NetCDF variable |
| netcdf.inqVarID | Return ID associated with variable name |
| netcdf.putVar | Write data to netCDF variable |
| netcdf.renameVar | Change name of netCDF variable |
| netcdf.copyAtt | Copy attribute to new location |
| netcdf.delAtt | Delete netCDF attribute |
| netcdf.getAtt | Return netCDF attribute |
| netcdf.inqAtt | Return information about netCDF attribute |
| netcdf.inqAttID | Return ID of netCDF attribute |
| netcdf.inqAttName | Return name of netCDF attribute |
| netcdf.putAtt | Write netCDF attribute |
| netcdf.renameAtt | Change name of attribute |
| netcdf.getConstant | Return numeric value of named constant |
| netcdf.getConstantNames | Return list of constants known to netCDF library |

Explore how to use MATLAB to make advancements in engineering and science.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |