Filter invalid negative NOAA flood stages in gauge flood-event overlays#11
Conversation
Agent-Logs-Url: https://github.com/FIRO-Tethys/ciroh_plugins/sessions/0f553e01-181b-4fb4-8454-e2472d9d0e0e Co-authored-by: romer8 <43544549+romer8@users.noreply.github.com>
Agent-Logs-Url: https://github.com/FIRO-Tethys/ciroh_plugins/sessions/0f553e01-181b-4fb4-8454-e2472d9d0e0e Co-authored-by: romer8 <43544549+romer8@users.noreply.github.com>
Agent-Logs-Url: https://github.com/FIRO-Tethys/ciroh_plugins/sessions/0f553e01-181b-4fb4-8454-e2472d9d0e0e Co-authored-by: romer8 <43544549+romer8@users.noreply.github.com>
Agent-Logs-Url: https://github.com/FIRO-Tethys/ciroh_plugins/sessions/0f553e01-181b-4fb4-8454-e2472d9d0e0e Co-authored-by: romer8 <43544549+romer8@users.noreply.github.com>
Agent-Logs-Url: https://github.com/FIRO-Tethys/ciroh_plugins/sessions/0f553e01-181b-4fb4-8454-e2472d9d0e0e Co-authored-by: romer8 <43544549+romer8@users.noreply.github.com>
There was a problem hiding this comment.
no need for this test file
There was a problem hiding this comment.
Removed tests/test_gauges.py as requested in commit bd10601.
Agent-Logs-Url: https://github.com/FIRO-Tethys/ciroh_plugins/sessions/eecc3881-d38f-4193-9a54-b6ee23e3b9c7 Co-authored-by: romer8 <43544549+romer8@users.noreply.github.com>
| except (TypeError, ValueError): | ||
| continue | ||
|
|
||
| if stage_value == FLOOD_STAGE_PLACEHOLDER: |
There was a problem hiding this comment.
can we instead make that if ``
| if stage_value == FLOOD_STAGE_PLACEHOLDER: | |
| if stage_value < 0: | |
| continue |
There was a problem hiding this comment.
Implemented in commit f93e863: the flood-stage filter now skips any negative stage_value (if stage_value < 0: continue).
| # Set up logging | ||
| logging.basicConfig(level=logging.INFO) | ||
| logger = logging.getLogger(__name__) | ||
| FLOOD_STAGE_PLACEHOLDER = -9999.0 |
There was a problem hiding this comment.
Addressed via the suggested update in commit f93e863.
|
@copilot please address the reviewer's response |
Agent-Logs-Url: https://github.com/FIRO-Tethys/ciroh_plugins/sessions/69b04710-7ffc-41db-a425-79c88d4edd26 Co-authored-by: romer8 <43544549+romer8@users.noreply.github.com>
Addressed in |
create_flood_events()was plotting invalid NOAA flood-stage values as real flood stages when categories are undefined, which injected bogus threshold lines and distorted the stage axis. This change ensures only valid non-negative numeric flood stages are rendered.Flood stage validation in
create_flood_events()None-9999after parsing)Consistent rendering values
stage_valuefor shape coordinates (y0,y1) and annotation positioning/text, avoiding raw/unparsed stage values in overlays.