.. highlightlang:: us .. index:: NC_GetVarNames .. _nc_getvarnames: NC_GetVarNames ============== .. us.tag NC_GetVarNames ENGLISH nc.tools New422 :ref:`NC_GetVarNames` returns the variable names of a netCDF data file (NC file). .. function:: svVarNames = NC_GetVarNames(ssNCName) svVarNames = NC_GetVarNames(ncid) svVarNames = NC_GetVarNames(ssNCName, dimid) svVarNames = NC_GetVarNames(ncid, dimid) svVarNames = NC_GetVarNames(ssNCName, dimid, bOnlyRealChannels) svVarNames = NC_GetVarNames(ncid, dimid, bOnlyRealChannels) .. us.return **Return Value** Is a string vector with the variable names. If the function fails the return value is an empty string. .. us.params **Parameters** .. uparam:: ssNCName *ssNCName* is the name of the netCDF file. .. uparam:: ncid Identifies the netCDF file, see :ref:`nc_open`. .. uparam:: dimid *dimid* is the ID of a dimension. If the parameter is specified and contains the ID of a valid dimension, the functions returns only variable names of the specified dimension. If the value -1 is given, the function returns all variables. Default value is -1. .. uparam:: bOnlyRealChannels If *bOnlyRealChannels* is TRUE (1) variables of the type NC_CHAR will be ignored. Default value is ist FALSE (0). .. 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 special characters: ``.``, ``-``, ``+``, ``$``, ``#``, ``~``, ``!``, ``^``, ``&``, ``%`` Default value is FALSE (0). .. us.history **History** .. list-table:: :header-rows: 1 * - Version - Description * - 5.14.5 - New parameter bToUnderscore. .. seealso:: :ref:`overview-netcdf-files`, :ref:`nc_create`, :ref:`DialogBox`, :ref:`CreateListBoxText`, :ref:`NC_GetVarAttribs` :sub:`id-1601970`