NCDF_ATTCOPY
Syntax | Return Value | Arguments | Keywords | Examples | Version History
The NCDF_ATTCOPY function copies an attribute from one netCDF file to another. Note that Incdf and Outcdf can be the same netCDF ID.
Syntax
Result = NCDF_ATTCOPY( Incdf [, Invar ] , Name, Outcdf [, Outvar] [, /IN_GLOBAL] [, /OUT_GLOBAL] )
Return Value
NCDF_ATTCOPY returns the attribute number of the copied attribute in the new file, or -1 if the copy was not successful.
Arguments
Incdf
The netCDF ID, returned from a previous call to NCDF_OPEN or NCDF_CREATE.
Invar
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.
Name
A scalar string containing the name of the attribute to be copied.
Outcdf
The netCDF ID of a netCDF file opened for writing, returned from a previous call to NCDF_OPEN or NCDF_CREATE.
Outvar
The netCDF variable ID to be written, returned from a previous call to NCDF_VARDEF or NCDF_VARID, or the name of the variable. If the OUT_GLOBAL keyword is set, this argument must be omitted.
Keywords
IN_GLOBAL
Set this keyword to read a global attribute.
OUT_GLOBAL
Set this keyword to create a global attribute.
Examples
See example from NCDF_ATTINQ.
Version History