The NCDF_ATTCOPY function copies an attribute from one netCDF file to another. Note that Incdf and Outcdf can be the same netCDF ID. NCDF_ATTCOPY returns the attribute number of the copied attribute in the new file, or -1 if the copy was not successful.
The netCDF variable ID to be read, returned from a previous call to NCDF_VARDEF or NCDF_VARID, or the name of the variable. If the IN_GLOBAL keyword is set, this argument must be omitted.
See example from NCDF_ATTINQ .