load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
begin
f = addfile("/cygdrive/d/hgt.nc","r")
print(f)
lat=f->latitude
lon=f->longitude
u=f->z(0,{500},:,:)
us=(u*u@scale_factor+u@add_offset)/9.8
copy_VarAtts(u,us)
us@units="gpm"
us!0="lat"
us!1="lon"
us&lat=lat
us&lon=lon
us&lat@units="degrees_north"
us&lon@units = "degrees_east"
wks = gsn_open_wks("png","UV_contour") ; send graphics to PNG file
plot = gsn_csm_contour_map(wks,us,False) ; contour the variable
end
输出:
dimensions:
longitude = 360
latitude = 181
level = 3
time = 92 // unlimited
variables:
float longitude ( longitude )
units : degrees_east
long_name : longitude
float latitude ( latitude )
units : degrees_north
long_name : latitude
integer level ( level )
units : millibars
long_name : pressure_level
integer time ( time )
units : hours since 1900-01-01 00:00:0.0
long_name : time
calendar : gregorian
short z ( time, level, latitude, longitude )
scale_factor : 0.8003769331863336
add_offset : 32780.72871778341
_FillValue : -32767
missing_value : -32767
units : m**2 s**-2
long_name : Geopotential
standard_name : geopotential
参考兰溪 NCL 学习 http://blog.sina.com.cn/s/blog_e7d0ac340102w0uo.html
some tips
http://blog.sina.com.cn/s/blog_e7d0ac340102w0uo.html