Skip to content

BMI Fixes#21

Draft
mkarim-rtx wants to merge 2 commits into
developmentfrom
bmi_fixes_mohammed
Draft

BMI Fixes#21
mkarim-rtx wants to merge 2 commits into
developmentfrom
bmi_fixes_mohammed

Conversation

@mkarim-rtx
Copy link
Copy Markdown

@mkarim-rtx mkarim-rtx commented May 21, 2026

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.

@mkarim-rtx mkarim-rtx marked this pull request as draft May 21, 2026 22:11
@mkarim-rtx mkarim-rtx changed the title initial bmi updates to quartz and unit issue BMI Fixes May 21, 2026
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