- 积分
- 55945
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2011-6-21
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
本帖最后由 MeteoInfo 于 2017-5-11 22:39 编辑
读取CloudSAT HDF Swath数据,绘图分上下两部分,上面是时间和高度维的Radar Reflectivity Factor二维图,下面是卫星轨迹图。
示例程序:
- # Add file
- f = addfile('D:/Temp/hdf/2010128055614_21420_CS_2B-GEOPROF_GRANULE_P_R04_E03.hdf')
- # Read data
- vname = 'Radar_Reflectivity'
- v_data = f[vname]
- data = v_data[:,:]
- v_height = f['Height']
- height = v_height[0,:]
- time = f['Profile_time'][:]
- lon = f['Longitude'][:]
- lat = f['Latitude'][:]
- # Read attributes
- long_name = v_data.attrvalue('long_name')[0]
- scale_factor = v_data.attrvalue('factor')[0]
- valid_min = v_data.attrvalue('valid_range')[0]
- valid_max = v_data.attrvalue('valid_range')[1]
- units = v_data.attrvalue('units')[0]
- units_h = v_height.attrvalue('units')[0]
- # Apply scale factor
- valid_max = valid_max / scale_factor
- valid_min = valid_min / scale_factor
- data = data / scale_factor
- data[data>valid_max] = nan
- data[data<valid_min] = nan
- data = transpose(data)
- data = data[::-1,:]
- # Make a split window plot
- subplot(2, 1, 1)
- # Contour the data
- levs = arange(-38, 50, 2)
- layer = imshow(time, height[::-1], data, levs)
- colorbar(layer)
- title('Radar Reflectivity Factor')
- xlabel('Seconds since the start of the granule. (seconds)')
- ylabel('Height (m)')
- # The 2nd plot is the trajectory
- subplot(2, 1, 2)
- axesm(newaxes=False)
- lworld = shaperead('D:/Temp/map/country1.shp')
- geoshow(lworld, edgecolor='k')
- plotm(lon, lat, '-b', linewidth=4)
- #scatterm(lon, lat, lon, size=4, edge=False, facecolor='b')
- scatterm(lon[0], lat[0], size=6, facecolor='r')
- xlim(-180, 180)
- ylim(-90, 90)
- title('Trajectory of Flight Path (starting point in red)')
|
|