NC_GetVarNames returns the variable names of a netCDF data file (NC file).
Return Value
Is a string vector with the variable names. If the function fails the return value is an empty string.
Parameters
ssNCName is the name of the netCDF file.
Identifies the netCDF file, see nc_open.
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.
If bOnlyRealChannels is TRUE (1) variables of the type NC_CHAR will be ignored. Default value is ist FALSE (0).
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).
History
| Version | Description |
|---|---|
| 5.14.5 | New parameter bToUnderscore. |
id-1601970