-
Opening a new issue, based on a question from @melovato I am getting the same "error: unpack requires a buffer of 48 bytes" when reading CSU-CHILL CHL data. I have tried both pyart.io.read(filename) and pyart.io.ready_chl(filename) and the same error occurs. I am using Python 3.9 and arm_pyart 1.14.1 that I installed via conda. I can provide the package list and any other information if needed. Thank you, Originally posted by @melovato in #826 (comment) Can you share a data file that we can troubleshoot with? |
Beta Was this translation helpful? Give feedback.
Replies: 7 comments
-
Hello @mgrover1 and others, Sorry for not opening up my own issue, I have been busy continuing my code (with nexrad data instead). I've included code to reproduce the issue and the error message below. I have also tried attaching the CHL file directly but GitHub complains that it doesn't support the file type. I've then tried attaching it as a zip folder and it complains the size is too big "25 MB are allowed, 217 MB were attempted". If you have any suggestions for transferring the data, I'm all ears. Thank you for getting back to me, I'll leave this page open and try to respond faster. Code to duplicate the issue: main_path = # path to some directory for my testing and training data for a CNN numfile = 0; Error message I received: |
Beta Was this translation helpful? Give feedback.
-
Can you upload to google drive, and share with my email mgroverwx@gmail.com? |
Beta Was this translation helpful? Give feedback.
-
Done, let me know if you have any issues. |
Beta Was this translation helpful? Give feedback.
-
Thank you! |
Beta Was this translation helpful? Give feedback.
-
@melovato is this happening with all of the chill files you are working with, or just a single file? |
Beta Was this translation helpful? Give feedback.
-
It looks like there is a mismatch in the ray header within the file. For Chill files, that part of the dataset should include the following structure: (('azimuth', 'f'),
('elevation', 'f'),
('azimuth_width', 'f'),
('elevation_width', 'f'),
('gates', 'H'),
('beam_index', 'H'),
('ns_time', 'I'),
('time', 'Q'),
('bit_mask', 'Q'),
('ray_number', 'I'),
('num_pulses', 'I'))` Which corresponds to a buffer size of 48 bytes. Within the file you provided, that part of the dataset (the ray header section) is 64 bytes, indicating there is additional information included, but without knowing what additional fields are there, we cannot determine the expected buffer size. As mentioned in this thread on stack overflow, without knowing the structure of the bytes data, we cannot unpack the data. I suspect this is either a corrupt file, or the data is not conforming to the CHILL standard. |
Beta Was this translation helpful? Give feedback.
It looks like there is a mismatch in the ray header within the file. For Chill files, that part of the dataset should include the following structure:
Which corresponds to a buffer size of 48 bytes.
Within the file you provided, that part of the dataset (the ray header section) is 64 bytes, indicating there is additional information included, but without knowing what additional fields are there, we cannot determine the expected buffer size.
As mentioned in this …