.. highlightlang:: us .. _nc_attcopy: nc_attcopy ========== .. index:: nc_attcopy .. us.tag nc_attcopy ENGLISH NC_Att New532 Changed560 :ref:`nc_attcopy` copies a given attribute into a different NC file. .. function:: 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) .. us.return **Return Value** *ret* is -1 if an error occurs, otherwise *ret* is 1. .. us.params **Parameters** .. uparam:: ncid_in *ncid_in* is the handle of the source NC file returned by :ref:`nc_create` or :ref:`nc_open`. .. uparam:: varid_in *varid_in* is a variable Id or -1 for a global attribute. .. uparam:: name *name* is the attribute name. If an empty string ("") is specified, all attributes of *varid_in* will be copied to *varid_out*. .. uparam:: ncid_out *ncid_out* is the handle of the output NC file. .. uparam:: varid_out *varid_out* is the target variable Id or -1 for a global attribute. .. uparam:: bInternal *bInternal*. .. us.history **History** .. list-table:: :header-rows: 1 * - Version - Description * - 5.6.0 - New parameter *bInternal*. * - 5.3.2 - New. .. seealso:: :ref:`overview-netcdf-files`, :ref:`nc_create` :sub:`id-1245074`