Closed aladinor closed 10 months ago
@aladinor Sorry for the delay here. The issue is with a broken sweep inside this multisweep dataset. The 8th sweep contains broken data, which leads to this error you are seeing. The structure header looks like:
OrderedDict([('structure_header', OrderedDict([('structure_identifier', 1), ('format_version', 1), ('bytes_in_structure', 65537), ('flag', 1)])), ('sweep_start_time', datetime.datetime(1, 1, 1, 18, 12, 17, 1000)), ('sweep_number', 1), ('number_rays_per_sweep', 1), ('first_ray_index', 1), ('number_rays_file_expected', 1), ('number_rays_file_written', 1), ('fixed_angle', 0.0054931640625), ('bits_per_bin', 1), ('data_type', 1)])
which doesn't make any sense to me. I've no idea if that is just missing some bytes in between or whats going on there.
If you just omit the broken sweep the data is imported as usual.
# do not read 8th sweep
dt2 = xd.io.open_iris_datatree("TAB230716015003.RAW7HD3", sweep=[0,1,2,3,4,5,6,8])
Thanks @kmuehlbauer for your help. I will close this issue since this is not a xradar
bug. However, I'd like to know if there is a chance to add sort of more information about this error (like sweep n is corrupted). This is just an idea.
@aladinor I have a fix which I can submit the next days.
With this fix the broken sweep is loaded somehow as single empty ray. But it might only work for this particular error.
In that case, everything will be fine. Thanks @kmuehlbauer!
Hi Everyone,
I am trying to open a Sigmet file using Xradar; however, I got a KeyError. This is the code I am using
And this is the output:
Not sure if this is a corrupted file or a bug.
Please let me know what you think.
Cheers,