nc_attcopy

nc_attcopy copies a given attribute into a different NC file.

ret = nc_attcopy(ncid_in, varid_in, name, ncid_out, varid_out)
ret = nc_attcopy(ncid_in, varid_in, name, ncid_out, varid_out, bInternal)

Return Value

ret is -1 if an error occurs, otherwise ret is 1.

Parameters

ncid_in

ncid_in is the handle of the source NC file returned by nc_create or nc_open.

varid_in

varid_in is a variable Id or -1 for a global attribute.

name

name is the attribute name. If an empty string (“”) is specified, all attributes of varid_in will be copied to varid_out.

ncid_out

ncid_out is the handle of the output NC file.

varid_out

varid_out is the target variable Id or -1 for a global attribute.

bInternal

bInternal.

History

Version Description
5.6.0 New parameter bInternal.
5.3.2 New.

id-1245074