grbs = pygrib.open(self.filepath)
Pygrib库不能识别'Total cloud cover' and 'Total precipitation'等变量名
for grb in grbs:
print(grb)
1:Total precipitation:kg m-2 (instant):regular_ll:surface:level 0:fcst time 0 hrs:from 202410300000
re = grbs.select(name="Total precipitation")
出现错误:ValueError: no matches found
re = grbs.select(typeOfLevel='surface')
扩展:
select是选择的意思,如果变量名不是"Total precipitation"等,可以综合使用
re = grbs.select(name="precipitation", typeOfLevel='surface')