.. highlightlang:: us .. _nc_varinq_name: nc_varinq_name ============== .. index:: nc_varinq_name .. us.tag nc_varinq_name ENGLISH NC_Var Changed5145 The :ref:`nc_varinq_name` function returns the name of a netCDF variable when given its ID. .. function:: ssName = nc_varinq_name(ncid, varid) ssName = nc_varinq_name(ncid, varid, bToUnderscore) .. us.return **Return Value** *ssName* is the name of a netCDF variable with the ID *varid*. If an error occurs, *ssName* is an empty string. .. us.params **Parameters** .. uparam:: ncid Identifies the netCDF file. .. uparam:: varid *varid* is the ID of the netCDF variable. .. uparam:: bToUnderscore If *bToUnderscore* is TRUE (1) the special characters in the channel name are replaced by underscores. For the value 0 the special characters remain in the channel name. Allowed spezial characters: ``.``, ``-``, ``+``, ``$``, ``#``, ``~``, ``!``, ``^``, ``&``, ``%`` Defaul value is FALSE (0). .. us.history **History** .. list-table:: :header-rows: 1 * - Version - Description * - 5.14.5 - Optional third parameter. .. seealso:: :ref:`overview-netcdf-files`, :ref:`nc_attname`, :ref:`nc_create` :sub:`id-522741`