Interact directly with NetCDF Library
Functions in the MATLAB® netcdf
package
provide interfaces to dozens of functions in the NetCDF library. The MATLAB functions
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 NetCDF C Interface.
MATLAB supports NetCDF version 4.3.3.1.
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 the 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);
For copyright information, see the netcdfcopyright.txt
and mexnccopyright.txt
files.
Note:
For information about MATLAB support for the Common Data
Format (CDF), which is a completely separate and incompatible format,
see |
netcdf.getChunkCache | Retrieve chunk cache settings for NetCDF library |
netcdf.inqLibVers | Return NetCDF library version information |
netcdf.setChunkCache | Set default chunk cache settings for NetCDF library |
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.defGrp | Create group in NetCDF file |
netcdf.inqDimIDs | Retrieve list of dimension identifiers in group |
netcdf.inqGrpName | Retrieve name of group |
netcdf.inqGrpNameFull | Complete pathname of group |
netcdf.inqGrpParent | Retrieve ID of parent group. |
netcdf.inqNcid | Return ID of named group |
netcdf.inqVarIDs | IDs of all variables in group |
netcdf.defVar | Create NetCDF variable |
netcdf.defVarChunking | Define chunking behavior for NetCDF variable |
netcdf.defVarDeflate | Define compression parameters for NetCDF variable |
netcdf.defVarFill | Define fill parameters for NetCDF variable |
netcdf.defVarFletcher32 | Define checksum parameters for NetCDF variable |
netcdf.getVar | Read data from NetCDF variable |
netcdf.inqVar | Information about variable |
netcdf.inqVarChunking | Determine chunking settings for NetCDF variable |
netcdf.inqVarDeflate | Determine compression 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 |