nc_makevalidname

nc_makevalidname returns a valid netCDF variable name for a given name.

ssNewName = nc_makevalidname(ncid, ssName)
ssNewName = nc_makevalidname(ncid, ssName, bToUnderscore)

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 (“”).

Parameters

ncid

Identifies the netCDF file. If ncid is -1 a valid name will be returned.

ssName

ssName is the name of the netCDF variable.

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 nc_set_option are used.

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.

History

Version Description
5.14.5 New parameter bToUnderscore.

id-1001849