.. highlightlang:: us .. index:: nc_inquire_format .. _nc_inquire_format: nc_inquire_format ================= .. us.tag nc_inquire_format ENGLISH NC New532 Changed560 Changed5509 :ref:`nc_inquire_format` returns the file format for a given *ncid*. .. function:: nFormat = nc_inquire_format(ncid) .. us.return **Return Value** *nFormat* is one of the following values: .. list-table:: :header-rows: 0 * - 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. .. us.params **Parameters** .. uparam:: ncid Identifies the netCDF file. .. us.example **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"; } .. us.history **History** .. list-table:: :header-rows: 1 * - Version - Description * - R2013.9 - ``NC_LZ4_COMPRESSION`` added. * - 5.6.0 - Flag renamed. * - 5.3.2 - New. .. seealso:: :ref:`overview-netcdf-files`, :ref:`nc_create`, :ref:`nc_close` :sub:`id-896399`