Given a reference to a file, this procedure is used to define global attributes.
procedure fileattdef ( thefile[1] : file, variable )
This procedure is part of a set of procedures called filedimdef, filevarattdef, and filevardef.
ncf = addfile("myfile.nc","c") ; ; Define global attributes. ; ; globalAtt can be of any type. Here logical is used ; globalAtt=True 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 )
NG4.1 Home, Index, Examples, Glossary, Feedback, Ref Contents, Ref WhereAmI?