[ncl-talk] getting global attributes of nc files
deliajxm at gmail.com
Fri Jul 25 19:21:33 MDT 2014
Thank you so much! I haven't realised that getvaratts can be applied to
files. This really helps.
2014-07-25 14:34 GMT+08:00 Will Hobbs <Will.Hobbs at utas.edu.au>:
> You can get the global atts. directly from a file, opened using add
> > f = addfile(<filename>,"r") ;f can be treated as variable, with
> attributes the same as the files global atts
> > fAtts = getvaratts(f) ; all the global attribute names
> ;print the attribute names
> > do i = 0, dimsizes(fAtts)-1
> > print(f@$fAtts(i)$)
> > end do
> Hope that helps
> From: Delia <deliajxm at gmail.com>
> Date: Friday, 25 July 2014 4:27 PM
> To: ncl-talk <ncl-talk at ucar.edu>
> Subject: [ncl-talk] getting global attributes of nc files
> HI NCL users,
> I'm wondering if NCL has fuctions to get global attributes of nc files.
> I have found the following function to add global attributes:
> <http://www.ncl.ucar.edu/Document/Functions/Built-in/fileattdef.shtml> Defines
> global (file) attributes associated with a supported file
> Are there any functions to or other methods to deal with the problems?
> Thanks a lot!
> Xiaoman Jiang
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the ncl-talk