Examples
Example 1
f = addfile("$NCARG_ROOT/lib/ncarg/data/cdf/Tstorm.cdf","r")
reftime = f->reftime
lat = f->lat
print(getvaratts(reftime)) ; should be (/"units","long_name"/)
print(getvaratts(lat)) ; should be a missing value
Example 2
This example pulls the global attributes off a file and prints out their values:
f = addfile("$NCARG_ROOT/lib/ncarg/data/cdf/fice.nc","r")
file_atts = getvaratts(f)
print(file_atts) ; should be (/"TITLE","history"/)
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
'tools > NCL' 카테고리의 다른 글
ncl에서 nan처리 (0) | 2024.08.27 |
---|---|
체중변화 그래프 (0) | 2013.05.07 |
retrieve colormap (0) | 2012.11.19 |
시작전 마음준비 (0) | 2012.11.11 |
NCL이란.. (0) | 2012.11.11 |
댓글