.. highlightlang:: us .. index:: nc_attget .. _nc_attget: nc_attget ========= .. us.tag nc_attget ENGLISH NC_Att :ref:`nc_attget` returns the value(s) of a netCDF attribute. .. function:: values = nc_attget(ncid, varid, ssName) .. us.return **Return Value** *values* is a string, a number or a vector or -1 in case the attribute does not exists. .. us.params **Parameters** .. uparam:: ncid Identifies the netCDF file. .. uparam:: varid *varid* is the identification number of the variable or -1 for a global attribute. .. uparam:: ssName *ssName* is the name of the attribute. .. us.comment **Comment** The :ref:`nc_attinq_datatype` function can be used to check if the specified attribute exists. :ref:`nc_attinq_datatype` returns -1 if the attribute does not exist. .. seealso:: :ref:`overview-netcdf-files`, :ref:`data-channel-attributes`, :ref:`nc_attput`, :ref:`nc_create`, :ref:`nc_attinq_datatype` :sub:`id-628025`