- 积分
- 118
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2016-7-19
- 最后登录
- 1970-1-1
|
发表于 2016-8-3 22:46:15
|
显示全部楼层
王老师,还要请教下
脚本如下:
#Add data file
folder = 'E:/TRMM/'
fns = '3B43.20010801.7A.HDF'
fn = folder + fns
f = addfile(fn)
vname = 'precipitation'
t = f[vname]
rain = t[0,:,:]
rain = transpose(rain)
rain[rain==0] = -9999.0
rain.fill_value = -9999.0
lat = arange(-49.875, 49.875, 0.249375)
lon = arange(-179.875, 179.876, 0.25)
#Plot
axesm()
mlayer = shaperead('E:/TRMM/LYFW.shp')
geoshow(mlayer)
layer = imshowm(lon, lat, rain, 20)
colorbar(layer, orientation='horizontal')
title(vname + 'at scan=0')
axism()
显示结果是:
run script...
indices must be 2 dimensions!
Traceback (most recent call last):
File "<iostream>", line 10, in <module>
File "D:\MeteoInfo_Java_1.3.4R2_Files\MeteoInfo\pylib\mipylib\minum.py", line 1264, in transpose
r = ArrayMath.transpose(a.asarray(), dim1, dim2)
AttributeError: 'NoneType' object has no attribute 'asarray'
请问如何处理。谢谢 |
|