- 积分
- 55960
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2011-6-21
- 最后登录
- 1970-1-1
|
楼主 |
发表于 2017-4-25 13:30:05
|
显示全部楼层
参考这个脚本,MeteoInfo做了更新,需要下载最新版本:
- fn = 'D:/Temp/grads/wrfout_d02.ctl'
- f = addfile(fn)
- print 'Calculate vertical vort...'
- tidx = 0
- level = '500:200'
- lat = '39:49'
- lon = '120:130'
- u = f['UMET'][tidx,level,lat,lon]
- v = f['VMET'][tidx,level,lat,lon]
- toproj = projinfo()
- u = u.project(toproj=toproj)
- v = v.project(toproj=toproj)
- vort = hcurl(u, v)
- wd1 = vort[:,:,'125']
- lev1 = wd1.dimvalue(0)
- lev2 = meteo.p2h(lev1)
- levels = []
- for j in range(0, len(lev1)):
- levels.append('%i' % lev1[j])
- wd1.setdimvalue(0, lev2)
- print 'Plot...'
- layer = contourf(wd1*100000,cmap='BlueRed')
- title(u'Vertical vort (Longitude: 125°E)')
- colorbar(layer,fontsize=15)
- layer = contour(wd1*100000,colors='k')
- clabel(layer)
- #xticks(arange(29,40,2),fontsize=15)
- yticks(lev2, levels,fontsize=15)
- xlabel('Latitude')
- ylabel('Pressure (hPa)')
|
|