filevarattdef

Given a reference to a file, this procedure copies attributes from an input variable to one or more file variables.


Synopsis

	procedure filevarattdef (
		thefile[1] : file,
		varnames : string,
		variable
	)

Arguments

thefile
The reference to the file that you want to write the variable attributes to.
varnames
A list of file variable names to which you want to copy attributes.
variable
A variable, of any type, which contains one or more attributes to assign to the file variables listed in varnames.

Description

This procedure copies attributes from the input variable to the output file variables, named by varnames. The variables in varnames must already be defined either through the procedure filevardef or through normal assignment.

This procedure is part of a set of procedures called filedimdef, fileattdef, and filevardef.


Example

  ncf = addfile("myfile.nc","c")
;
; Define variable attributes.
;
  filedimdef(ncf , "lat", 73 , False)
  filevardef( ncf, "lat", "float", "lat" )
  latAtt=0
  latAtt@units     = "degrees_north"
  latAtt@long_name = "latitude"
  filevarattdef( ncf, "lat", latAtt )

  filevardef( ncf, "gw", "float", "lat" )
  gwAtt=0
  gwAtt@long_name  = "gauss weights"
  filevarattdef( ncf, "gw", gwAtt )

Reference Manual Control Panel

NG4.1 Home, Index, Examples, Glossary, Feedback, Ref Contents, Ref WhereAmI?


$Revision: 1.7 $ $Date: 1999/02/02 18:46:10 $