- 积分
- 1385
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2014-12-16
- 最后登录
- 1970-1-1
|
发表于 2019-7-14 15:59:04
|
显示全部楼层
本帖最后由 jack_ln 于 2019-7-14 18:00 编辑
@eeeee 老师好,
用您的这个程序处理SC雷达数据时,提示下面的错误。
File "C:\Program Files\Python37-32\lib\site-packages\cinrad-1.3.3-py3.7-win32.egg\cinrad\io\io.py"
, line 144, in __init__
self._CD_handler(f)
File "C:\Program Files\Python37-32\lib\site-packages\cinrad-1.3.3-py3.7-win32.egg\cinrad\io\io.py"
, line 237, in _CD_handler
header['obs']['ssecond'][0]) - utc_offset
ValueError: year 13886 is out of range
提示日期处理错误。
io.py中这段提示出错
def _CD_handler(self, f:Any):
header = np.frombuffer(f.read(CD_dtype.itemsize), CD_dtype)
el_num = header['obs']['stype'][0] - 100 # VOL
if el_num == 5:
self.task_name = 'VCP31'
elif el_num == 9:
self.task_name = 'VCP21'
elif el_num == 14:
self.task_name = 'VCP11'
self.scantime = datetime.datetime(header['obs']['syear'][0], header['obs']['smonth'][0], header['obs']['sday'][0],
header['obs']['shour'][0], header['obs']['sminute'][0],
header['obs']['ssecond'][0]) - utc_offset
尝试修改了一下cinrad-1.3.3-py3.7-win32.egg\cinrad\io\_radar_struct\CD.py中
observation_param = [("stype", "B"),
("syear", "u2"),
("smonth", "B"),
("sday", "B"),
("shour", "B"),
("sminute", "B"),
("ssecond", "B"),
("Timep", "B"),
("smillisecond", "u4"),
("calibration", "B"),
("intensityI", "B"),
("VelocityP_1", "B"),
("layerparam", layer_param_dtype, 30),
("RHIA", "u2"),
("RHIL", "i2"),
("RHIH", "i2"),
("Eyear", "u2"),
("Emonth", "B"),
("Eday", "B"),
("Ehour", "B"),
("Eminute", "B"),
("Esecond", "B"),
("Etenth", "B")]
u2修改为B之后,又出现month 必须在1-12之间。不知道是不是这里的错误。
数据名称Z_RADR_I_Z****_20190703091841_O_DOR_SC_CAP.bin,望指点下这个错误怎么修改。谢谢
|
|