nc_inquire_format

nc_inquire_format erfragt das Format einer offenen NC-Datei.

nFormat = nc_inquire_format(ncid)

Returnwert

nFormat ist einer der folgenden Werte:

NC_FORMAT_CLASSIC 0 netCDF-Format.
NC_FORMAT_PC 0x10000 netCDF-Format mit PC-Byteorder (little endian byteorder). Diese Dateien sind etwas schneller zu Lesen und zu Schreiben als Dateien im Standard-netCDF-Format, die Dateien sind aber nur von UniPlot verwendbar.
NC_FORMAT_UP 0x20000 UniPlot Daten Format mit netCDF-kompatiblen Funktionen (siehe nc_create).
NC_COMPRESSION 0x40000 Flag tritt nur in Kombination mit NC_FORMAT_UP auf (siehe nc_create).
NC_ZLIB_COMPRESSION 0x40000 Gleiches Flag wie NC_COMPRESSION.
NC_LZ4_COMPRESSION 0x100000 Flag tritt nur in Kombination mit NC_FORMAT_UP auf (siehe nc_create). Sehr schnelle Kompression, siehe https://code.google.com/p/lz4/. Wird zur Zeit noch nicht verwendet, da die Dateien zu älteren UniPlots nicht kompatibel wären.
NC_REPACKING 0x80000 Flag tritt nur in Kombination mit NC_FORMAT_UP auf (siehe nc_create).

Parameter

ncid

ncid identifiziert die netCDF-Datei.

Beispiel

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 Beschreibung
R2013.9 NC_LZ4_COMPRESSION, siehe oben.
5.6.0 Flag umbenannt und zusätzliche Flags NC_COMPRESSION und NC_REPACKING.
5.3.2 Neu.

id-896399