We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
File "D:\lss_code\micaps\1.py", line 39, in f = read_micaps_4(r'D:/lss_code/micaps/data27-19.2.28/ECMWF_HR/CAPE/19022708.000')
File "D:\Anaconda3\lib\site-packages\nmc_met_io\read_micaps.py", line 398, in read_micaps_4 data = (np.array(txt[22:])).astype(np.float)
ValueError: could not convert string to float: '1,124.25'
ec文件中有超过1000的值,其格式为*,*.,read_micaps_4无法正常读取
The text was updated successfully, but these errors were encountered:
在 nmcdev/nmc_met_io/blob/master/nmc_met_io/read_micaps.py 文件中 第350行修改为 txt = f.read().replace(',','').replace('\n', ' ').split()
Sorry, something went wrong.
方法有用,谢谢你的回答。另外请教一下nmc_met_io库是否有micaps各类格式写入的功能,或者别的什么库具有该功能
这个库里没有写操作,不过通过重新向新文件里按各自的格式写入这些读取函数的返回值即可实现写入功能。
谢谢flashlxy,已经更新程序,可以处理 '1,124.25' 类型的数据.
No branches or pull requests
File "D:\lss_code\micaps\1.py", line 39, in
f = read_micaps_4(r'D:/lss_code/micaps/data27-19.2.28/ECMWF_HR/CAPE/19022708.000')
File "D:\Anaconda3\lib\site-packages\nmc_met_io\read_micaps.py", line 398, in read_micaps_4
data = (np.array(txt[22:])).astype(np.float)
ValueError: could not convert string to float: '1,124.25'
ec文件中有超过1000的值,其格式为*,*.,read_micaps_4无法正常读取
The text was updated successfully, but these errors were encountered: