- 积分
- 5200
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2016-12-3
- 最后登录
- 1970-1-1
|
发表于 2017-10-24 15:06:43
|
显示全部楼层
本帖最后由 sun92 于 2017-10-24 15:09 编辑
老师您好 我在处理capliso数据时候 脚本如下
# Add file
folder = 'D:/Temp/hdf/'
fns = ' CAL_LID_L1-ValStage1-V3-40.2016-12-06T05-47-20ZD.hdf'
fn = folder + fns
# Read data
f = addfile(fn)
vname = 'Total_Attenuated_Backscatter_532'
var = f[vname]
data = var[:1000,:]
data = rot90(data)
lats = f['latitude'][:1000,0]
latstrs = []
for lat in lats:
latstrs.append('%.1f' % lat)
height = f['metadata'][None]
m = height.findMember('Lidar_Data_Altitudes')
h = array(height.getArray(0, m))
h = h[::-1]
hstrs = []
for hh in h:
hstrs.append('%.1f' % hh)
# Plot
levs = [0.0001,0.0002,0.0003,0.0004,0.0005,0.0006,0.0007,0.0008,0.0009,\
0.001,0.0015,0.002,0.0025,0.003,0.0035,0.004,0.0045,0.005,0.0055,0.006,\
0.0065,0.007,0.0075,0.008,0.01,0.02,0.03,0.04,0.05,0.06,0.07,0.08,0.09,01]
layer = imshow(data, levs, cmap='MPL_terrain')
xticks(data.dimvalue(1), latstrs)
yticks(data.dimvalue(0), hstrs)
xlabel('Latitude')
ylabel('Altitude (km)')
colorbar(layer, label=r'$\rm{km}^{-1}$ \rm{sr}$^{-1}')
basename = os.path.basename(fn)
title('{0}\n{1}'.format(basename, vname))
运行后报错 :
Traceback (most recent call last):
File "<string>", line 9, in <module>
NameError: name 'addfile' is not defined
用的软件是:
MeteoInfo Desktop Application
C# edition
MeteoInfo 1.1.3.5 - C#
请问我要怎么修改呢?
还有想问一下 竖坐标是海拔高度 能不能修改脚本只显示 我想要的海拔高度? 那么脚本该怎么修改呢? 谢谢老师 祝老师生活愉快
|
|