.. highlightlang:: us .. index:: nc_inquire_ngatts .. _nc_inquire_ngatts: nc_inquire_ngatts ================= .. us.tag nc_inquire_ngatts ENGLISH NC :ref:`nc_inquire_ngatts` returns the number of global attributes in a nc file. .. function:: ngatts = nc_inquire_ngatts(ncid) .. us.return **Return Value** If the function succeeds, the return value is the number of global attributes. 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` :sub:`id-2107885`