New issue
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
Level2File() cannot open NEXRAD Level II chunk files available on AWS S3 #1470
Comments
Thanks for the sample code, that cut my time in half to test this out. Here's the solution to go in try:
self._read_volume_header()
except ValueError:
self._buffer._offset = 0 (My real version is a bit nicer, but that requires changing more lines than are easy to communicate here...) So if you can bear to edit your MetPy source, you can have this work today. I was already working on a much larger update for our NEXRAD code, and this will go in with it. Expect it to appear with the 1.0 release. |
Made the source code change, and the fix works like a charm. I'm now able to plow through the real-time level 2 chunk files with ease. Thank you! |
This, for instance, makes it possible to use Level2File with the realtime chunks available on AWS.
This, for instance, makes it possible to use Level2File with the realtime chunks available on AWS.
This, for instance, makes it possible to use Level2File with the realtime chunks available on AWS.
This, for instance, makes it possible to use Level2File with the realtime chunks available on AWS.
This, for instance, makes it possible to use Level2File with the realtime chunks available on AWS.
As part of the NOAA Big Data project, NEXRAD level2 data is available on Amazon's AWS S3 service. There are 2 buckets with NEXRAD data. The main one is the 'noaa-nexrad-level2' bucket containing full volume files. However, a second bucket called 'unidata-nexrad-level2-chunks' contains near real time radar data, but it is not yet assembled into full volumes.
MetPy has functionality to read full level II files with metpy.io.Level2File, however when this same function is applied to the chunk data, Level2File does not work well.
According to Appendix B in this NEXRAD Interface Control Document (https://www.roc.noaa.gov/wsr88d/PublicDocs/ICDs/2620010H.pdf), the chunk files have an indicator in their filenames of either S, I, or E. S indicates Start, I indicates Intermediate, and E indicated End of the complete volume. When Level2File is applied to files ending in S, these files open normally, but both I and E files fail with a value error saying the year is not within the expected range. Since the S file is the first of the volume sequence, the file likely includes Level II header information that the other files lack, allowing Level2File to initialize properly.
Here is example code showing the problem:
-----Code-----
-----Output-----
Desired behavior would be to be able to read the data from the individual chunks in the 'unidata-nexrad-level2-chunks' S3 bucket once they become available such that near real time data can be utilized rather than having to wait for full volume assembly and the data to appear in the 'noaa-nexrad-level2' S3 bucket sometime up to 20-30 minutes delayed.
The text was updated successfully, but these errors were encountered: