- 积分
- 55946
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2011-6-21
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
本帖最后由 MeteoInfo 于 2018-1-11 09:36 编辑
CALIPSO卫星载激光雷达数据被广泛用于气候和大气物理大气环境的研究中,但其数据格式和处理过程都比较复杂,这里只是给出两个简单的数据处理绘图例子。
- # Add file
- fn = 'CAL_LID_L2_VFM-ValStage1-V3-02.2011-12-31T23-18-11ZD.hdf'
- f = addfile('D:/Temp/hdf/' + fn)
- # Read data
- vname = 'Feature_Classification_Flags'
- var = f[vname]
- data = var[:,1256]
- lon = f['Longitude'][:,0]
- lat = f['Latitude'][:,0]
- lon = lon[::10]
- lat = lat[::10]
- data = data[::10]
- # Extract Feature Type only through bitmask.
- data = data & 7
- # Plot
- axesm()
- lworld = shaperead('D:/Temp/map/country1.shp')
- geoshow(lworld, edgecolor='k')
- levs = arange(8)
- cols = [(0,0,0),(0,0,255),(255,255,0),(0,255,0),(255,0,0), \
- (200,100,255),(100,50,255),(127,127,127)]
- ls = makesymbolspec('point', levels=levs, colors=cols)
- layer = scatterm(lon, lat, data, size=5, edge=False, symbolspec=ls)
- colorbar(layer, ticklabels=['invalid', 'clear', 'cloud', 'aerosol', \
- 'strato', 'surface', 'subsurf', 'no signal'])
- xlim(-180, 180)
- ylim(-90, 90)
- title([fn, 'Feature Type at Altitude = 2500m'])
- # Add file
- fn = 'D:/Temp/hdf/CAL_LID_L2_VFM-ValStage1-V3-02.2011-12-31T23-18-11ZD.hdf'
- f = addfile(fn)
- # Read data
- vname = 'Feature_Classification_Flags'
- var = f[vname]
- data = var[:,:]
- lat = f['Latitude'][:,0]
- # Extract Feature Type only through bitmask.
- data = data & 7
- # Subset latitude values for the region of interest (40N to 62N).
- lat = lat[3500:4000]
- size = lat.shape[0]
- data2d = data[3500:4000, 1165:] # -0.5km to 8.2km
- data3d = reshape(data2d, (size, 15, 290))
- data = data3d[:,0,:]
- # Focus on cloud (=2) data only.
- data[data > 2] = 0
- data[data < 2] = 0
- data[data == 2] = 1
- # Generate altitude data according to file specification [1].
- alt = zeros(290)
- # -0.5km to 8.2km
- for j in range (0, 290):
- alt[j] = -0.5 + j*0.03
- # Plot
- levs = arange(2)
- cols = ['w','b']
- ls = makesymbolspec('image', levels=levs, colors=cols)
- layer = imshow(lat, alt, rot90(data, 3), symbolspec=ls)
- colorbar(layer, ticklabels=['Others','Cloud'])
- basename = os.path.basename(fn)
- title([basename, 'Feature Type (Bits 1-3) in Feature Classification Flag'])
- xlabel('Latitude (degrees north)')
- ylabel('Altitude (km)')
|
|