.. highlightlang:: us .. index:: nc_endef .. _nc_endef: nc_endef ======== .. us.tag nc_endef ENGLISH NC :ref:`nc_endef` takes an open nc file out of define mode. The changes made to the nc file while it was in define mode are checked and committed to disk if no problems occurred. In particular, non-record variables are filled with their fill-values unless :ref:`nc_setfill` has been called with the argument ``NC_NOFILL``. The nc file is then placed in data mode, so that variable data can be read or written. .. function:: r = nc_endef(ncid) .. us.return **Return Value** If the function succeeds, the return value is not equal to -1. If the function fails, the return value is -1. .. us.params **Parameters** .. uparam:: ncid Identifies the nc file. .. seealso:: :ref:`overview-netcdf-files`, :ref:`nc_create`, :ref:`nc_redef` :sub:`id-730951`