Zero plane displacement clamp in BMI#55
Merged
aaraney merged 2 commits intoNOAA-OWP:masterfrom Feb 20, 2026
Merged
Conversation
0b241e0 to
05cd655
Compare
05cd655 to
87ae7fe
Compare
aaraney
requested changes
Feb 20, 2026
Member
aaraney
left a comment
There was a problem hiding this comment.
Logic looks solid, just a minor unit issue!
aaraney
requested changes
Feb 20, 2026
Contributor
Author
|
After a separate but related discussion with @ajkhattak I'm going to relax the validation/error conditions on wind speed displacement height < measurement height. There are some deeper assumptions in the pet code that handle this in non-obvious ways, but allow this condition to be "valid" still I think. |
Contributor
Author
|
Changes to #54 ensure that the pet module can gracefully handle displacement and measurement height relationships in a meaningful way, so we don't need to handle that in BMI config parsing, but the displacement <= 0 is still reasonable to adjust here, I think. |
…ment relationship
3be3ca4 to
0e130c9
Compare
aaraney
approved these changes
Feb 20, 2026
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.
Related to #52 and #54 , when running the BMI model, we can try to prevent divide by zero conditions by clamping the zero plane displacement height.
Additions
measurement height - 0.01when they are equal. This ensure valid computations of the profile at nearly the measurement height.Changes
Config returns BMI_FAILURE and prints an error when measurement_height < displacement height
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
Project documentation has been updated (including the "Unreleased" section of the CHANGELOG)
Reviewers requested with the Reviewers tool ➡️