- 积分
- 3995
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2016-3-4
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
f = addfile(r'F:/20210108.nc')
rdata = f['r'][:,::-1,'40.95','115.27']
r = rdata.T
#r = r [::-1,:]
lev1 = r.dimvalue(0)
lev1 = lev1[::-1]
lev2 = meteo.pressure_to_height_std(lev1)
lev2 = lev2[:]/1000
r.setdimvalue(0, lev2)
udata = f['u'][:,::-1,'40.95','115.27']
vdata = f['v'][:,::-1,'40.95','115.27']
u = udata.T
v = vdata.T
#u = u [::-1,:]
#v = v [::-1,:]
lev3 = u.dimvalue(0)
lev3 = lev3[::-1]
lev4 = meteo.pressure_to_height_std(lev3)
lev4 = lev4[:]/1000
u.setdimvalue(0, lev4)
lev5 = v.dimvalue(0)
lev5 = lev5[::-1]
lev6 = meteo.pressure_to_height_std(lev5)
lev6 = lev6[:]/1000
v.setdimvalue(0, lev6)
tdata = f['t'][:,::-1,'40.95','115.27']-273.15
t = tdata.T
#t = t [::-1,:]
lev7 = t.dimvalue(0)
lev7 = lev7[::-1]
lev8 = meteo.pressure_to_height_std(lev7)
lev8 = lev8[:]/1000
t.setdimvalue(0, lev8)
ax1=axes()
levs1 = arange(60,100,10)
cols = [(255,255,255),(0,229,238),(0,238,0),(0,205,0),(0,160,0),(0,110,0)]
layer1 = contourf(r, levs1, colors=cols)
layer2 = barbs(u , v, color='k',size=12)
levs2 = arange(-60,36,2)
bss2 = []
for i in range(len(levs2)):#温度样式
bs2={}
bs2['value'] = levs2
bs2['color'] = 'r'
bs2['size'] = 2
if levs2 < 0:
bs2['linestyle'] = '--'
bss2.append(bs2)
ls2 = plt.makesymbolspec('line',bss2)
layer3 = contour(t,symbolspec=ls2)
clabel(layer3)
xaxis(axistype='normal')
time=array(["18","19","20","21","22","23","00","01","02","03","04","05","06","07"])
#xlim(1610244.0, 1610290.8)
xlim(1609984.8,1610031.6)
ylim(lev2.min(),5.6)
xticks(r.dimvalue(1),time)
levy=array([875, 850, 825, 800, 775, 750, 700, 650, 600, 550, 500])
yticks(r.dimvalue(0), levy)
xaxis(tickin=False,tickfontsize=17)
yaxis(tickin=False,tickfontsize=17)
xlabel('Time(h)',fontsize=18)
ylabel('Pressure(hPa)',fontsize=18)
colorbar(layer1,fontsize=16,orientation='horizontal',aspect=50)
ax2 = twinx(ax1)
ylim(lev2.min(),5.6)
yaxis(location='right', tickfontsize=18)
ylabel('Hight(km)', fontsize=18, bold=False)
antialias(True)
|
-
|