Given a reference to a file, this procedure is used to define global attributes.


	procedure fileattdef (
		thefile[1] : file,


The reference to the file that you want to write the attributes to.
A variable of any type whose attributes will be copied to thefile as global attributes


Given a reference to a file, fileattdef is used to define attributes applicable to the file as a whole. These are sometimes known as global file attributes. Using this procedure is much more efficient than writing a file's attributes one at a time.

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


  ncf = addfile("","c")
; Define global attributes.
; globalAtt can be of any type. Here logical is used
  nl = integertochar(10)  ; newline character
  globalAtt@history     = nl+\
      systemfunc("date") + ": ncl < TQ_NCEP2nc.ncl"
  globalAtt@sigma_level = nl+\
      "Pressure at a grid point (lon(i),lat(j),lev(k)) is computed    "+nl+\
      "using the formula:                                             "+nl+\
      "           p(i,j,k) = B(k)*PS(i,j)                             "+nl+\
      "where B and PS are contained in the variables whose names      "+nl+\
      "are given respectively by the attributes B_var and PS_var      "+nl+\
      "of the vertical coordinate variable.                             "
  globalAtt@center      = ps@center
  globalAtt@model       = ps@model
  globalAtt@title       = "T, Q, and PS from NCEP/NCAR reanalysis data"
  globalAtt@source      = "NCEP/NCAR reanalysis data"
  globalAtt@Conventions = "NCAR-CSM"
  fileattdef( ncf, globalAtt )

Reference Manual Control Panel

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

$Revision: 1.5 $ $Date: 1998/07/06 19:37:51 $