.. highlightlang:: us .. index:: nc_attinq_datatype .. _nc_attinq_datatype: nc_attinq_datatype ================== .. us.tag nc_attinq_datatype ENGLISH NC_Att :ref:`nc_attinq_datatype` returns the data type of an attribute when given its ID and name. .. function:: datatype = nc_attinq_datatype(ncid, varid, ssName) .. us.return **Return Value** *datatype* is the data type of the attribute with the ID *varid* and the name *ssName* and is one of the following: .. list-table:: :header-rows: 1 * - Value - Meaning * - NC_BYTE - Eight-bit data * - NC_CHAR - For representing text strings as arrays of ASCII characters * - NC_SHORT - 16-Bit integers * - NC_LONG - 32-Bit integers * - NC_FLOAT - 32-Bit IEEE floating-point * - NC_DOUBLE - 64-Bit IEEE floating-point If an error occurs, *datatype* is -1. .. us.params **Parameters** .. uparam:: ncid Identifies the netCDF file. .. uparam:: varid *varid* is the ID of the variable. .. uparam:: ssName *ssName* is the name of the attribute. .. seealso:: :ref:`overview-netcdf-files`, :ref:`nc_create`, :ref:`nc_attget` :sub:`id-1631870`