- 积分
- 511
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2014-10-31
- 最后登录
- 1970-1-1
|
楼主 |
发表于 2017-4-18 16:19:47
|
显示全部楼层
[/img]- <p>参考一些例子后做出了850hpa的等温线,想叠加风场和高度场,单独读写风场,如下</p><p>fn = 'F:/GRIB/fnl_20121005_12_00.grib2'
- f = addfile(fn)
- u = f['U'][0,'500','15:55','70:140']
- v = f['V'][0,'500','15:55','70:140']
- speed = sqrt(u*u+v*v)
- #Plot
- axesm()
- mlayer = shaperead('D:/BaiduNetdiskDownload/MeteoInfo/MeteoInfo_Java_1.4.2_Files/MeteoInfo/map/country1.shp')
- geoshow(mlayer)
- layer = quiverm(u, v, speed, 10, size=8)
- t = f.gettime(0)
- title(' Wind field 500hpa (' + t.strftime('%Y-%m-%d %H:00') + ')')
- colorbar(layer) </p><p>运行出错</p><p>Traceback (most recent call last):
- File "<iostream>", line 3, in <module>
- File "D:\BaiduNetdiskDownload\MeteoInfo\MeteoInfo_Java_1.4.2_Files\MeteoInfo\pylib\mipylib\dataset\dimvariable.py", line 72, in __getitem__
- if len(indices) != self.ndim:
- AttributeError: DimVariable instance has no attribute 'ndim'</p><p>王老师,这条语句不对,u = f['U'][0,'500','15:55','70:140'],应该怎么改呢?</p>
复制代码 |
-
|