本帖最后由 MeteoInfo 于 2017-3-31 22:29 编辑
可以不用addfiles,利用循环来做平均:
- datadir = 'F:/OMI'
- st = datetime.datetime(2017,1,1)
- et = datetime.datetime(2017,1,2)
- vname = 'ColumnAmountO3'
- ave = None
- n = 0
- while st <= et:
- fn = os.path.join(datadir, ' OMI-Aura_L3-OMTO3e_' + st.strftime('%Y%m%d') + '.he5')
- f = addfile(fn)
- data = f[vname]['32:55', '95:128']
- if ave is None:
- ave = data
- else:
- ave = ave + data
- n += 1
- st = st + datetime.timedelta(days=1)
- data = ave / n
- #Plot
- axesm()
- lhuabei=shaperead('D:/BaiduNetdiskDownload/MeteoInfo/MeteoInfo_Java_1.4.2_Files/MeteoInfo/map/huabei.shp ')
- geoshow(lhuabei, edgecolor='k')
- layer = imshowm(data)
- colorbar(layer)
|