- 积分
- 55941
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2011-6-21
- 最后登录
- 1970-1-1
|
发表于 2016-7-15 15:55:07
|
显示全部楼层
有点复杂,仔细看看下面的代码。
- f = addfile('D:/Temp/hdf/MOD08_M3.A2010032.005.2010062234836.hdf')
- v = f['Optical_Depth_Ratio_Small_Land_And_Ocean_Mean_Mean']
- data = v[::-1,:]
- data = data[[10,40],[90,130]]
- data[data==-9.999] = nan
- lon = [100,120]
- lat = [20,30]
- #Plot
- subplot(2,1,1)
- axesm()
- china = shaperead('D:/Temp/map/bou2_4p.shp')
- geoshow(china)
- world = shaperead('D:/Temp/map/country1.shp')
- geoshow(world, edgecolor='k')
- levels = arange(0, 1.0, 0.05)
- layer = imshowm(data, levels)
- geoshow(lat, lon, size=2, color='k')
- title('Ratio of small mode aerosol optical depth at 0.55 micron')
- colorbar(layer)
- subplot(2,1,2)
- slope, intercept, r = linregress(lon, lat)[:3]
- x = arange(100, 120, 1)
- y = polyval([slope, intercept], x)
- dd = data.tostation(x,y)
- plot(dd)
- xts = []
- for i in range(0, len(x)):
- xts.append('(%.1fE,%.1fN)' % (x, y))
- xticks(arange(len(x)), xts)
- title('Value between (100E, 20N) and (120E, 30N)')
|
|