- 积分
- 53679
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2012-10-8
- 最后登录
- 1970-1-1
|
楼主 |
发表于 2016-12-30 12:07:34
|
显示全部楼层
好的,王老师,脚本如下:
- obsdir = 'F:/test'
- #Get forecasting data files
- f = addfile('E:/gongzuo/3.8.1/summer0801.ctl')
- st = datetime.datetime(2008,06,01,00)
- #Plot
- axesm()
- lchina = shaperead('F:/11/MeteoInfo/map/bou2_4p.shp')
- ltibet = shaperead('F:/11/MeteoInfo/map/DBATP/DBATP_Polygon.shp')
- geoshow(lchina, edgecolor='k')
- geoshow(ltibet, edgecolor='r',size=2)
- #Loop
- tnum = f.timenum()
- t = 0
- for t in range(0, tnum-1):
- #tt = f.gettime(t)
- cll()
- u = f['U'][t,[500],::4,::4]
- v = f['V'][t,[500],::4,::4]
- speed = sqrt(u*u+v*v)
- levs = [10,20,30,40,50]
- layer = quiverm(u,v,speed,levs,size=8,proj=f.proj)
- colorbar(layer,fontsize=17)
- xlim(70,110)
- ylim(25,45)
- sbjt = st + datetime.timedelta(hours=3*(t+1))
- title('UV ' + sbjt.strftime('%Y-%m-%d %H:00') ,bold=False)
- savefig(os.path.join(obsdir, 'UV' + sbjt.strftime('%y%m%d%H') + '--loop-.png'))
- t += 1
复制代码 |
|