nc_attput changes a variable attribute or global attribute of an open nc file. If the attribute is new, or if the space required to store the attribute is greater than before, the nc file must be in define mode.
r is -1, if an error occurred.
Identifies the netCDF file.
varid is the variable ID of the variable to which the attribute will be assigned or -1 for a global attribute. The variable ID starts with 0.
ssName is the name of the attribute. It must begin with an alphabetic character, followed by zero or more alphanumeric characters including the underscore (_). Case is significant.
nDataType is the data type of the attribute. The valid netCDF data types are:
|NC_CHAR||for representing text strings as arrays of ASCII characters|
|NC_FLOAT||32-Bit IEEE floating-point|
|NC_DOUBLE||64-Bit IEEE floating-point|
values is the data value of the appropriate type. values can be a column or row vector.
If bOverwrite is set to TRUE (1) the attribute value will be overwritten. If bOverwrite is set to FALSE (0), a new attribute will be created (Default). A unique name will be created by adding a number to the attribute name.
File must be in definition mode (see:ref:nc_redef).