.. highlightlang:: us .. index:: nc_inquire_mode .. _nc_inquire_mode: nc_inquire_mode =============== .. us.tag nc_inquire_mode NOTREADYENGLISH NC New5400 :ref:`nc_inquire_mode` returns the mode of an open nc-file. .. function:: mode = nc_inquire_mode(ncid) .. us.return **Return Value** *mode* is one of the following values: .. list-table:: :header-rows: 0 * - NC_NOWRITE - 0 - no write access. * - NC_WRITE - 1 - read and write access. .. us.params **Parameters** .. uparam:: ncid Identifies the netCDF file. .. us.example **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" } } .. us.history **History** .. list-table:: :header-rows: 1 * - Version - Description * - R2012 (5.40.0) - New. .. seealso:: :ref:`overview-netcdf-files`, :ref:`nc_open`, :ref:`nc_create`, :ref:`nc_close` :ref:`nc_filename` :sub:`id-1802651`