.. highlightlang:: us .. _nc_varinq_natts: nc_varinq_natts =============== .. index:: nc_varinq_natts .. us.tag nc_varinq_natts ENGLISH NC_Var The :ref:`nc_varinq_natts` function returns the number of attributes for a variable, given its ID. .. function:: natts = nc_varinq_natts(ncid, varid) .. us.return **Return Value** *natts* is the number of attributes for the variable with the ID *varid*. If an error occurs *natts* is -1. .. us.params **Parameters** .. uparam:: ncid Identifies the netCDF file. .. uparam:: varid *varid* is the ID of a variable. .. seealso:: :ref:`overview-netcdf-files`, :ref:`nc_create`, :ref:`nc_inquire_ngatts` :sub:`id-1291545`