.. highlightlang:: us .. _nc_makevalidname: nc_makevalidname ================ .. index:: nc_makevalidname .. us.tag nc_makevalidname ENGLISH NC_Var Changed5145 :ref:`nc_makevalidname` returns a valid netCDF variable name for a given name. .. function:: ssNewName = nc_makevalidname(ncid, ssName) ssNewName = nc_makevalidname(ncid, ssName, bToUnderscore) .. us.return **Return Value** *ssNewName* is a valid NC name.Special characters will be replaced by an underscore (_). Umlauts will be replaced as following: Ä->A, ä->a, Ö->O, ö->o, Ü->U, ü->u, ß->s. In UniPlot 5.14.5 channel names may contain the following special characters: ``.``, ``-``, ``+``, ``$``, ``#``, ``~``, ``!``, ``^``, ``&``, ``%``. If an error occurs, *ssNewName* is empty (""). .. us.params **Parameters** .. uparam:: ncid Identifies the netCDF file. If *ncid* is -1 a valid name will be returned. .. uparam:: ssName *ssName* is the name 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 special characters: ``.``, ``-``, ``+``, ``$``, ``#``, ``~``, ``!``, ``^``, ``&``, ``%``. Default value is -1. If set to -1 the settings set with :ref:`nc_set_option` are used. .. us.comment **Comment** If *ncid* is a valid NC-handle the function returns a unique name. If the same variable name already exists an underscore followed by a number will be added to the name. .. 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:`nc_varid`, :ref:`nc_set_option`, :ref:`nc_vardef` :sub:`id-1001849`