BMI Fixes#21
Draft
mkarim-rtx wants to merge 2 commits into
Draft
Conversation
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.
https://jira.nextgenwaterprediction.com/browse/NGWPC-10839
SFT BMI Compliance Fixes
The SFT BMI implementation was reviewed and updated to address BMI compliance issues identified during UAT validation and exchange-item documentation review.
Issues Addressed
Quartz BMI Exposure
quartz was documented as BMI-exposed but was not accessible through BMI APIs such as GetValuePtr.
Added full BMI exposure support for quartz.
Incorrect Units for Ice Fraction Variable
ice_fraction_schaake was documented with units of m, but it is actually unitless.
Updated units to 1 (dimensionless).
Added missing documentation for ice_fraction_scheme_bmi.
Invalid GetGridType() Return Values
GetGridType() could return an empty string (""), which is not BMI compliant.
Updated implementation to return valid BMI grid types or throw exceptions for invalid grids.
Grid Metadata Consistency
Grid-related BMI functions had inconsistent behavior regarding grid handling.
Updated grid metadata functions to behave consistently across the implementation.
Invalid GetVarLocation() Return Values
GetVarLocation() could return "", which violates the BMI specification.
Updated to return valid BMI location strings or throw exceptions.
Invalid GetVarType() Behavior
GetVarType() returned "" for unknown variables.
Updated implementation to throw exceptions for unsupported variables, matching BMI requirements.
Automated Test Fixes
Two issues were fixed in tests/main_unittest.cxx:
Incorrect loop variables were used in assertions around lines 452 and 539.
The tests were unintentionally checking the same array element repeatedly, creating potential false positives.
Fix
Updated assertions to use the correct inner-loop variable so that every array element is properly validated during testing.