nc_inquire_modeΒΆ
nc_inquire_mode returns the mode of an open nc-file.
-
mode = nc_inquire_mode(ncid)
Return Value
mode is one of the following values:
NC_NOWRITE | 0 | no write access. |
NC_WRITE | 1 | read and write access. |
Parameters
-
ncid
Identifies the netCDF file.
Example
def test_nc_inquire_mode()
{
ncid = nc_create(GetUserDirectory() + "test.nc");
mode = nc_inquire_mode(ncid);
nc_close(ncid);
if (mode == -1) {
print "error";
return;
}
if (mode & NC_WRITE) {
print "NC_WRITE"
} else {
print "NC_NOWRITE"
}
}
History
Version | Description |
---|---|
R2012 (5.40.0) | New. |
See also
Overview UniPlot Data Files, nc_open, nc_create, nc_close nc_filename
id-1802651