nc_inquire_formatΒΆ

nc_inquire_format returns the file format for a given ncid.

nFormat = nc_inquire_format(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_ZLIB_COMPRESSION

0x40000

Same as NC_COMPRESSION.

NC_LZ4_COMPRESSION

0x100000

Fast compression, see https://code.google.com/p/lz4/

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

ncid

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

R2013.9

NC_LZ4_COMPRESSION added.

5.6.0

Flag renamed.

5.3.2

New.

id-896399