nc_inquire_format returns the file format for a given ncid.
Return Value
nFormat is one of the following values:
| NC_FORMAT_CLASSIC | 0 | netCDF-Format. |
| NC_FORMAT_PC | 0x10000 | netCDF-Format with PC byte order (little endian byte order). These files are faster then Standard-netCDF-Format. The files can only be used with UniPlot. |
| NC_FORMAT_UP | 0x20000 | UniPlot data format. The interface is compatible to netCDF. |
| NC_COMPRESSION | 0x40000 | A improved data compression is used. Reading and writing is slower, but the files are approx. 30 per cent smaller. |
| NC_REPACKING | 0x80000 | If attributes or channels are removed, the file will automatically shrink. If this flag is not set the free space will be used to new attributes and channels. |
Parameters
Identifies the netCDF file.
Example
nFormat = nc_inquire_format(ncid);
if (nFormat & NC_FORMAT_CLASSIC) {
print "netCDF format";
} else if (nFormat == NC_FORMAT_PC) {
print "data format with little endian byteorder";
} else if (nFormat & NC_FORMAT_UP) {
print "UniPlot data format";
}
History
| Version | Description |
|---|---|
| 5.6.0 | Flag renamed. |
| 5.3.2 | New. |
See also
id-896399