- 积分
- 3995
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2016-3-4
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
f = addfile("F:/download.nc")
gh= f['z'][0,"500","20":"60","80":"120"]/100
udata = f['u'][0,"500","20":"60","80":"120"]
vdata = f['v'][0,"500","20":"60","80":"120"]
rmdata=f['r'][0,"500","20":"60","80":"120"]
tmdata=f['t'][0,"500","20":"60","80":"120"]-273.15
lon = f['longitude']["80":"120"]
lat = f['latitude']["20":"60"]
udata=udata[::9,::9]*2.5
vdata=vdata[::9,::9]*2.5
speed = sqrt(udata*udata+vdata*vdata)
lon, lat = meshgrid(lon, lat)
levgh=arange(518,574,6)
layergh = contourm(gh,levgh,size=2,color='black')#绘制高度场等值线
clabel(layergh,drawshadow=True,fontsize=15,bold=True)#标注值
#风场
layerw = barbsm(udata,vdata,size=14,color="black")
#风速阴影
levss = arange(50,max(speed),5)
colss = [(255,255,255),(32,178,170),(50,205,50),(179,238,58),(218,165,32),(205,104,57),(255,69,0),(255,20,147)]
#layers= contourfm(speed,levss,colors=colss)
#colorbar(layers)
#相对湿度阴影
levsrh = arange(60,100,10)
colsrh = [(255,255,255),(0,229,238),(0,238,0),(0,205,0),(0,160,0),(0,130,0)]
layerrh = contourfm(rmdata,levsrh,colors=colsrh)
colorbar(layerrh,fontsize=15)
#温度
levs = arange(-80,80,4)
bss2 = []
for i in range(len(levs)):#温度样式
bs2={}
bs2['value'] = levs[i]
bs2['label'] ='r'
bs2['color'] = 'r'
bs2['size'] = 2
if levs[i] < 0:
bs2['linestyle'] = '--'
bss2.append(bs2)
ls2 = plt.makesymbolspec('line',bss2)
layert = contourm(tmdata,symbolspec=ls2)
clabel(layert,color='r')
mlayer1 = shaperead('E:\MeteoInfo\map\cn_province.shp')
geoshow(mlayer1, edgecolor='black',size=1)
xlim(90,130)
ylim(30,50)
xticks([80,90,100,110,120,130],fontsize=15,bold=True)
yticks([10,20,30,40,50,60],fontsize=15,bold=True)
|
|