- 积分
- 7243
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2015-5-21
- 最后登录
- 1970-1-1
|
楼主 |
发表于 2018-3-4 19:57:33
|
显示全部楼层
f = addfile('D:/MeteoInfo/1/fnl_20150727_18_00.grib2')
#f = addfile(fn)
tidx = 0
level = '100000:20000'
lat = '36:44'
lon = '113:120'
T = f['Temperature_isobaric'][tidx,level,lat,lon][::-1,:,:]
vort = T - 273.15
wd1 = vort[:,'40',:]
lev1 = wd1.dimvalue(0)/100
lev1 = lev1[::-1]
lev2 = meteo.pressure_to_height_std(lev1)
levels = []
for j in range(0, len(lev1)):
levels.append('%i' % lev1[j])
wd1.setdimvalue(0, lev2)
print 'Plot...'
#layer = contourf(wd1,40)
axesm()
ax1=axes()
#levs = arange(-20,20,1)
#layer = contourf(wd1, levs)
levs = [-2,-1,0,1,2]
cols = [(93,71,139),(72,61,139),(0,191,255),(112,128,144),(143,188,143),(255,255,255)]
layer = contourf(wd1,levs,colors=cols)
colorbar(layer)
yaxis(tickin=False,tickfontsize=17)
xaxis(tickin=False,tickfontsize=17)
yaxis(location='right',tickin=True,tickfontsize=18)
#yticks(wd1.dimvalue(0), lev1)
xlim(113,120)
ylim(4000,5500)
ylabel('Hight(km)',fontsize=18)
xlabel('')
colorbar(layer,orientation='horizontal',aspect=35)
antialias(True)
|
|