Skip to content

Conversation

@mkarim-rtx
Copy link

@mkarim-rtx mkarim-rtx commented Sep 17, 2025

The UDUNITS package can’t parse "none", which caused warnings like “Unable to parse out_units value none.” Normalizing to "1" matches ngen's convention and avoids spurious conversion errors. This ensures variables defined with “no-units” in realization metadata are recorded as dimensionless from the start, preventing downstream unit-conversion attempts and warnings.

Changes

Updated cfe/src/bmi_cfe.c

  • the input units for ice_fraction_schaake are "1" (dimensionless) instead of "m". This aligns with UDUNITS and SFT’s outputs, eliminating “units not convertible/parse none” warnings during CFE↔SFT coupling.
  • nn output_var_units, SURF_RUNOFF_SCHEME is currently "none". If that value is ever consumed by another module, switch it to "1" as well to avoid future UDUNITS parse errors.

Testing

  1. Not seeing the conversion error

cmaynard-ngwpc and others added 3 commits September 15, 2025 13:39
Express dimensionless units of ice_fraction_xinanjiang and soil_moisture_profile as "1" so UDUNITS2 can parse them
@yuqiong77
Copy link

Looks good

cmaynard-ngwpc
cmaynard-ngwpc previously approved these changes Sep 23, 2025
Copy link

@cmaynard-ngwpc cmaynard-ngwpc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on comments, looks good.

@cmaynard-ngwpc cmaynard-ngwpc self-requested a review September 23, 2025 00:23
@cmaynard-ngwpc cmaynard-ngwpc dismissed their stale review September 23, 2025 00:24

Need feedback from Mohammed on Phil's comment in Jira.

@cmaynard-ngwpc cmaynard-ngwpc changed the base branch from release-candidate to development September 23, 2025 19:47
@cmaynard-ngwpc cmaynard-ngwpc changed the title NGWPC-7604: NGEN Unit Conversion Error Unit Conversion Error (NGWPC-7604) Sep 26, 2025
@cmaynard-ngwpc cmaynard-ngwpc merged commit 7aab752 into development Sep 26, 2025
@cmaynard-ngwpc cmaynard-ngwpc deleted the unit_conversion_mohammed branch September 26, 2025 15:15
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.

3 participants