- 积分
- 454
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2012-12-20
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
王老师您好~最新版的MeteoInfo解决了截面图的bug问题,在此表示感谢,但是MeteoInfo里截面图无法设置经纬度等范围,
所以我尝试用MeteoInfoLab做截面图,但是如图,画出的图Y轴不能像MeteoInfo里一样反向,而且没有图例和ylabel,程序还返回了一条信息
Traceback (most recent call last):
File "<iostream>", line 16, in <module>
File "F:\MeteoInfo\pylib\mipylib\miplot.py", line 2185, in yticks
axis.setTickLocations(locs)
TypeError: setTickLocations(): 1st arg can't be coerced to java.util.List, double[]
脚本如下:
- print 'Open data files...'
- f = addfile('F:/0630t0706/FNL630t706.grib2')
- time = [5]
- level = [10000,100000]
- lat = [15,40]
- lon = [118]
- vvel = f['Vertical_velocity_pressure_isobaric'][time,level,lat,lon]
- print 'Plot...'
- layer = contourf(vvel, 20)
- title('Vertical velocity')
- yticks(vvel,level)
- xlabel('Latitude')
- ylabel('Vertical velocity (Pa/s)')
- colorbar(layer)
复制代码
我又尝试参考http://www.meteothinker.com/examples/meteoinfolab/meteo_analysis/vert_heli.html的例子,但是出来的图直接就是空的了,但是有有图例和ylabel
脚本如下:
- print 'Open data files...'
- f = addfile('F:/0630t0706/FNL630t706.grib2')
- time = [5]
- level = [100000.0,10000.0]
- lat = [15,40]
- lon = [118]
- vvel = f['Vertical_velocity_pressure_isobaric'][time,level,lat,lon]
- lev1 = vvel.dimvalue(0)
- lev2 = p2h(lev1)
- levels = []
- for i in range(0, len(lev1)):
- levels.append('%i' % lev1[i])
- vvel.setdimvalue(0, lev2)
- print 'Plot...'
- layer = contourf(vvel, 20)
- title('Vertical velocity')
- yticks(lev2,levels)
- xlabel('Latitude')
- ylabel('Vertical velocity (Pa/s)')
- colorbar(layer)
复制代码
我用的是FNL1*1的数据,和这个有关么?
|
|