老师您好~~~又有问题要请教了,我打算要求取3笔Modis卫星数据的平均,所以撰写了下述的脚本,执行结果如图,但不知道这样是否正确敬请老师指导一下,谢谢您
- #Read data1
- f = addfile('C:/MeteoInfo_Java_1.3.4_Files/MeteoInfo/sample/HDF/Modis/MOD08_D3.A2014017.051.2014018224401.hdf')
- v = f['Optical_Depth_Ratio_Small_Land_And_Ocean_Mean']
- data = v[::-1,:]
- data = data[[15,35],[105,135]]
- data[data==-9.999] = nan
- #Read data-2
- f1 = addfile('C:/MeteoInfo_Java_1.3.4_Files/MeteoInfo/sample/HDF/Modis/MOD08_D3.A2014018.051.2014019101002.hdf')
- v1 = f['Optical_Depth_Ratio_Small_Land_And_Ocean_Mean']
- data1 = v1[::-1,:]
- data1 = data1[[15,35],[105,135]]
- data1[data1==-9.999] = nan
- #Read data-3
- f2 = addfile('C:/MeteoInfo_Java_1.3.4_Files/MeteoInfo/sample/HDF/Modis/MOD08_D3.A2014019.051.2014020090624.hdf')
- v2 = f['Optical_Depth_Ratio_Small_Land_And_Ocean_Mean']
- data2 = v2[::-1,:]
- data2 = data2[[15,35],[105,135]]
- data2[data2==-9.999] = nan
- lon = [100,120]
- lat = [20,30]
- #Calculate
- dataavg=(data+data1+data2)/3
- #Plot
- #subplot(2,1,1)
- axesm()
- china = shaperead('C:/MeteoInfo_Java_1.3.4_Files/MeteoInfo/map/bou2_4p.shp')
- geoshow(china)
- world = shaperead('C:/MeteoInfo_Java_1.3.4_Files/MeteoInfo/map/country1.shp')
- geoshow(world, edgecolor='k')
- levels = arange(0, 1., 0.05)
- layer = imshowm(dataavg, levels)
- #geoshow(lat, lon, size=2, color='k')
- #title('Ratio of small mode aerosol optical depth at 0.55 micron')
- title('Ratio of small mode aerosol optical depth at 0.55 micron(19)')
- colorbar(layer)
复制代码
|