[ncl-talk] getting global attributes of nc files
Delia
deliajxm at gmail.com
Fri Jul 25 19:21:33 MDT 2014
Hi, Will
Thank you so much! I haven't realised that getvaratts can be applied to
files. This really helps.
Delia
2014-07-25 14:34 GMT+08:00 Will Hobbs <Will.Hobbs at utas.edu.au>:
> Delia
>
> You can get the global atts. directly from a file, opened using add
> file():
>
> > 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
>
> Will
>
>
> 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:
> fileattdef
> <http://www.ncl.ucar.edu/Document/Functions/Built-in/fileattdef.shtml> Defines
> global (file) attributes associated with a supported file
> <http://www.ncl.ucar.edu/Document/Manuals/Ref_Manual/NclFormatSupport.shtml>
> .
>
> 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...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20140726/1d08233d/attachment-0001.html
More information about the ncl-talk
mailing list