| Contents | Index |
ncid = netcdf.open(source, mode)
[chosen_chunksize, ncid] = netcdf.open(source, mode,
chunksize)
ncid = netcdf.open(source, mode) opens source, which can be the name of a NetCDF file or the URL of an OPeNDAP NetCDF data source, with the type of access specified by mode. Returns a NetCDF ID in ncid.
mode can have any of the following values.
| Value | Description |
|---|---|
| 'NC_WRITE' | Read-write access |
| 'NC_SHARE' | Synchronous file updates |
| 'NC_NOWRITE' | Read-only access |
You can also specify mode as a numeric value that can be retrieved usingnetcdf.getConstant. Use these numeric values when you want to specify a bitwise-OR of several modes.
[chosen_chunksize, ncid] = netcdf.open(source, mode, chunksize) opens source, an existing netCDF data source , specifying the additional I/O performance tuning parameter, chunksize. The actual value used by the NetCDF library might not correspond to the input value you specify.
This function corresponds to the nc_open and nc__open functions in the netCDF library C API. To use this function, you should be familiar with the netCDF programming paradigm. See netcdf for more information.
This example opens the example NetCDF file included with MATLAB, example.nc.
ncid = netcdf.open('example.nc','NC_NOWRITE');
netcdf.close(ncid);netcdf.create | netcdf.getConstant

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 |