[ncl-talk] getting global attributes of nc files
Will Hobbs
Will.Hobbs at utas.edu.au
Fri Jul 25 00:34:42 MDT 2014
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<mailto:deliajxm at gmail.com>>
Date: Friday, 25 July 2014 4:27 PM
To: ncl-talk <ncl-talk at ucar.edu<mailto: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/20140725/ab996100/attachment.html
More information about the ncl-talk
mailing list