[ncl-talk] Attributes
Muhammad Omer Mughal
m.mughal1 at postgrad.curtin.edu.au
Thu Dec 8 20:59:34 MST 2016
Hi
This example pulls the global attributes off a file and prints out their values:
f = addfile("$NCARG_ROOT/lib/ncarg/data/cdf/uv300.nc","r")
file_atts = getvaratts(f)
print(file_atts)
if(.not.any(ismissing(file_atts))) then
do i=0,dimsizes(file_atts)-1
print("Attribute " + file_atts(i) + " = " + f@$file_atts(i)$)
end do
end if
How can one pull out a specific attribute from the file f and use it ?
Muhammad Omer Mughal
MSc BSc Mechanical Engineering
PhD Research Scholar
Remote Sensing and Satellite Research Group
Department of Imaging and Applied Physics
Curtin University
Curtin University
Tel | +61 8 9266 7962
Fax | +61 8 9266 2377
Mobile | 0470 237 525
Email | m.mughal1 at postgrad.curtin.edu.au<mailto:m.lynch at curtin.edu.au>
Web | http://curtin.edu.au<http://curtin.edu.au/>
Curtin University is a trademark of Curtin University of Technology.
CRICOS Provider Code 00301J (WA), 02637B (NSW)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20161209/c5116285/attachment.html
More information about the ncl-talk
mailing list