
Given a reference to a file, this procedure copies attributes from an input variable to one or more file variables.
procedure filevarattdef ( thefile[1] : file, varnames : string, variable )
This procedure is part of a set of procedures called filedimdef, fileattdef, and filevardef.
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 )
NG4.1 Home, Index, Examples, Glossary, Feedback, Ref Contents, Ref WhereAmI?