- 积分
- 1901
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2015-1-6
- 最后登录
- 1970-1-1
|
楼主 |
发表于 2016-4-25 17:08:18
|
显示全部楼层
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
begin
f = addfile("../data/wind.2015031000.nc", "r")
wks = gsn_open_wks("png","wind-timeq")
ts= f->time
t = ispan(0,64,1)
u = short2flt(f->uwnd(:,{30},{130}))
v = short2flt(f->vwnd(:,{30},{130}))
; printVarSummary(ts)
wind = sqrt(u*u+v*v)
strT = new(65,string)
do n=0,64,1
strT(n)=str_concat(charactertostring(ts(n,:)))
end do
print(strT)
res = True
res@tiMainString = "wind filetime=2015031000"
res@tiXAxisString = "DateTime"
res@tiYAxisString = "Wind"
res@tmXBMode = "Explicit"
res@tmXBValue = t
res@tmXBLables = strT
plot = gsn_xy(wks, t, wind, res)
end
|
|