nexrad: --pad-deg was accepted and silently ignored - #6
Merged
Conversation
Every nexrad grid path (intensity_stack, reflectivity_composite, reflectivity_field/lowest_tilt_grid, beam_blockage) called load_aoi(aoi) bare, so the CLI's --pad-deg never reached the grid — outputs were clipped to the bare AOI bounds with no warning. Found gridding the Hidden Valley 19 Jun 2026 storm: three wet gauges just outside the AOI (incl. Six Mile Canyon, a debris-flow core gauge) fell off the grid, and a --pad-deg 0.06 re-run produced byte-identical bounds. The AOI-level functions now take pad_deg (default 0.05, mirroring mrms.i15_storm_day) and forward it to load_aoi; the radar-object-level helpers take pad_deg=0.0 as a pass-through; the CLI passes args.pad_deg at all three call sites. nearest_radar stays unpadded (a symmetric pad cannot move the centroid). Tests: plumbing probes pin the pad each function hands load_aoi (and the 0.05 default); CLI tests pin the flag reaching intensity_stack. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Summary
nexradgrid path (intensity_stack,reflectivity_composite,reflectivity_field/lowest_tilt_grid,beam_blockage) calledload_aoi(aoi)bare, so the CLI's--pad-degnever reached the grid — outputs were silently clipped to the bare AOI bounds.--pad-deg 0.06re-run produced byte-identical bounds.pad_deg(default 0.05, mirroringmrms.i15_storm_day) and forward it toload_aoi; the radar-object-level helpers (lowest_tilt_grid,beam_blockage) takepad_deg=0.0as a pass-through; the CLI passesargs.pad_degat all three call sites.nearest_radarstays unpadded (a symmetric pad cannot move the centroid).Behavior change
Default-flag
nexradgrids now extend ~0.05° past the AOI, like the MRMS products always have. Since the AEQD grid is anchored to the padded extent, changing the pad shifts cell alignment — single-cell point samples in convective gradients can move ~2× (measured at HV; field statistics unchanged to two digits).Test plan
tests/test_nexrad.pypin thepad_degeach function handsload_aoi, plus the 0.05 defaulttests/test_cli.pypin--pad-deg(and its default) reachingintensity_stackpytest -m "not network")--pad-deg 0.06now covers all 12 wet gauges🤖 Generated with Claude Code