-
Notifications
You must be signed in to change notification settings - Fork 3
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
bulletin-file receiver incorrectly detects text bulletin as a BUFR #20
Comments
It should only be looking for BUFR on the first few lines... basically there is an ahl... there may be a header, typically some numbers and carriage returns, and perhaps a control character... then the the data itself Starts with BUFR (or GRIB.) It should not be any occurrence of bufr at the beginning of any line in a bulletin. |
wait... this is in Sundew? wow... been there for 20 years, and nobody noticed? anyways... this stuff was ported to sr3, |
probably just doing splitline()[0:3] is enough to fix the problem in 99% of cases. |
Maybe it is looking at all lines because of collections? I don't really know much about collections or how Sundew handles them. |
collections are always of the same type of bulletin. they are either all TAC (traditional alphanumeric code) or all binary. The way to do collections with BUFR is just to catenate all the records together. |
When a text bulletin contains a line that starts with "BUFR" (or "GRIB" or "\211PNG"), Sundew incorrectly determines that it's a binary bulletin, and truncates the data.
Sundew/lib/bulletin.py
Lines 522 to 529 in efcb560
Example input:
The log entry:
The data that gets ingested is:
https://dd.weather.gc.ca/bulletins/alphanumeric/20240515/NO/CWAO/16/NOCN04_CWAO_081718___01878
The text was updated successfully, but these errors were encountered: