Skip to content

Convert negative precipitation rates to 0 (NGWPC-7450)#4

Closed
idtodd wants to merge 1 commit into
developmentfrom
idt-prevent-set-negative-precipitation
Closed

Convert negative precipitation rates to 0 (NGWPC-7450)#4
idtodd wants to merge 1 commit into
developmentfrom
idt-prevent-set-negative-precipitation

Conversation

@idtodd
Copy link
Copy Markdown

@idtodd idtodd commented Sep 12, 2025

LASAM expects the set precipitation rate to be a positive number when Update() is called. It was noticed that snow17 may pass its melt and precipitation delta as a negative number to LASAM, causing LASAM to throw an error. The update prevents the error from being thrown by checking if the incoming precipitation rate is less than 0 and interprets it as 0 instead.

Additions

  • Convert negative precipitation rates to 0 in SetValue.
  • Warning level log when the value is set to 0 to record what the original value is.

Removals

Changes

Testing

Screenshots

Notes

Todos

Checklist

  • PR has an informative and human-readable title
  • Changes are limited to a single goal (no scope creep)
  • Code can be automatically merged (no conflicts)
  • Code follows project standards (link if applicable)
  • Passes all existing automated tests
  • Any change in functionality is tested
  • New functions are documented (with a description, list of inputs, and expected output)
  • Placeholder code is flagged / future todos are captured in comments
  • Visually tested in supported browsers and devices (see checklist below 👇)
  • Project documentation has been updated (including the "Unreleased" section of the CHANGELOG)
  • Reviewers requested with the Reviewers tool ➡️

Testing checklist

Target Environment support

  • Windows
  • Linux
  • Browser

Accessibility

  • Keyboard friendly
  • Screen reader friendly

Other

  • Is useable without CSS
  • Is useable without JS
  • Flexible from small to large screens
  • No linting errors or warnings
  • JavaScript tests are passing

@idtodd idtodd self-assigned this Sep 12, 2025
@idtodd idtodd closed this Sep 15, 2025
@idtodd idtodd deleted the idt-prevent-set-negative-precipitation branch September 15, 2025 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant