nc_open opens an existing data file.
Return Value
If the function succeeds, the return value is the handle of the netCDF file. If the function fails, the return value is -1.
Parameters
ssFileName is the complete file name.
nOpenMode is NC_WRITE or NC_NOWRITE.
| Value | Meaning |
|---|---|
| NC_WRITE | Opens the file for writing. |
| NC_NOWRITE | Opens the file read-only. |
Example
ncid = nc_open("d:\\dat\\test.nc", NC_NOWRITE);
if (ncid == -1) {
error();
}
...
nc_close(ncid);
History
| Version | Description |
|---|---|
| R2012 (5.40.0) |
See also
id-1781578