Repository navigation
ENH: Decode NEXRAD Level 2 message types 4 and 29 - #4151
Open
thaliamontreux wants to merge 1 commit into
Open
thaliamontreux wants to merge 1 commit into
thaliamontreux wants to merge 1 commit into
Conversation
|
|
||
| def test_level2_msg29_inline(): | ||
| """Check that an inline message 29 decodes to environmental grids.""" | ||
| f = Level2File(get_test_data('KICX_20170712_1458', as_file_obj=False)) |
thaliamontreux
force-pushed
the
nexrad-msg4-29
branch
2 times, most recently
from
October 9, 2026 00:24
1285036 to
7e72147
Compare
Add support for two more RDA->RPG message types in Level2File: * Message 4 (console message): operator-facing RDA console text per ICD 2620002 Table VI. Decoded into `console_msgs`, ignoring non-printable content. * Message 29 (metadata/model data): found both inline in volumes (e.g. KICX_20170712) and as the sole record in `_MDM` sidecar files. The body is a product header + description block (ICD 2620001) followed by a BZIP2-compressed symbology block holding an XDR-serialized grid component (Appendix E). Decoded into `model_data` as the 'Environmental Gridded Data' product: model fields (geopotential height, temperature, humidity, U/V wind) on a Lambert-conformal grid surrounding the radar, with self-describing attributes (projection, model name/run/valid times, bounds). Supports the size_hw==0xFFFF convention where the segment fields carry the total record size (ICD 2620002P), used by the standalone _MDM files. A small XDR reader replaces xdrlib, which was removed from the stdlib in Python 3.13 (PEP 594). Validated against a real KLSX _MDM file (166 grids across 34 pressure levels) and the existing KICX_20170712_1458 test volume, whose inline message 29 now decodes instead of warning. Closes Unidata#95.
thaliamontreux
force-pushed
the
nexrad-msg4-29
branch
from
October 9, 2026 03:29
7e72147 to
b051305
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #4147. Closes #95.
Adds decoding for two more RDA->RPG message types in
Level2File:Message 4 — RDA console message
Operator-facing console text per ICD 2620002 Table VI (u16 length + ASCII). Decoded into
console_msgs; non-printable bodies are ignored.Message 29 — metadata / model data
The long-undocumented type from #95. Found both inline in volumes (the existing
KICX_20170712_1458test file carries one — itsUnknown message: 29warning is now a decode) and as the sole record in_MDMsidecar files.The body is a product header + product description block (ICD 2620001) followed by a BZIP2-compressed symbology block holding an XDR-serialized grid component per Appendix E. Decoded into
model_data— in practice this is the 'Environmental Gridded Data' product: model fields (geopotential height, temperature, RH, U/V wind, pressure) on a 60x60 Lambert-conformal grid surrounding the radar, with self-describing attributes (projection, model name/run/valid times, corner coordinates).Implementation notes:
size_hw == 0xFFFFconvention where the segment fields carry the total record size (ICD 2620002P) — used by standalone_MDMfiles — plus normal segmented records via_buffer_segment.xdrlibwas removed in Python 3.13 (PEP 594).Validated against a real
KLSX20261008_205554_V06_MDMfile (166 grids across 34 pressure levels, 6 parameters) and synthetic unit tests for both messages (framed/segmented/malformed).