- 积分
- 26013
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2011-10-8
- 最后登录
- 1970-1-1
|
发表于 2020-6-11 11:11:09
|
显示全部楼层
王老师,我读取grib2的FNL数据,准备得到某一格点的HPBL,程序如下:
datadir = 'D:/Temp'
st = datetime.datetime(2019,3,1,0)
et = datetime.datetime(2019,3,1,18)
fns = []
while st <= et:
fn = os.path.join(datadir, 'fnl_' + st.strftime('%Y%m%d_%H') + '_00.grib2')
print fn
fns.append(fn)
st = st + datetime.timedelta(hours=6)
fs = addfiles(fns)
#读取北纬35度,东经117度的数据
pblh = fs['Planetary_Boundary_Layer_Height_surface'][:,'35','117']
错误提示如下:
Traceback (most recent call last):
File "<string>", line 15, in <module>
File "D:\ProgramData\MeteoInfo_2.2\MeteoInfo\pylib\mipylib\dataset\dimvariable.py", line 624, in __getitem__
aa.addtdim(self.dataset.gettime(si))
AttributeError: 'float' object has no attribute 'addtdim'
请问王老师,应该如何修改?
|
|