Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove custom time unit conversion in favor of UDUNITS #633

Merged
merged 2 commits into from
Sep 12, 2023

Conversation

stcui007
Copy link
Contributor

@stcui007 stcui007 commented Sep 7, 2023

Replace acquire_time_conversion_factor() function with get_time_convert_factor() function using UnitsHelper.

Additions

Removals

Changes

To comply with BMI standard, the function acquire_time_conversion_factor() defined Bmi_Adapter.hpp is removed and replaced with the function get_time_convert_factor() which returns the bmi_model_time_convert_factor used in a number of code files listed below. This is faciliated by BMI interface and UnitsHelper functions.

include/realizations/catchment/Bmi_Adapter.hpp
include/realizations/catchment/Bmi_Fortran_Adapter.hpp
src/realizations/catchment/Bmi_C_Adapter.cpp
src/realizations/catchment/Bmi_Cpp_Adapter.cpp
src/realizations/catchment/Bmi_Py_Adapter.cpp

Testing

Run ngen test

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
  • Project documentation has been updated (including the "Unreleased" section of the CHANGELOG)
  • Reviewers requested with the Reviewers tool ➡️

Testing checklist (automated report can be put here)

Target Environment support

  • Linux

@mattw-nws mattw-nws assigned mattw-nws and stcui007 and unassigned mattw-nws Sep 8, 2023
@mattw-nws mattw-nws linked an issue Sep 8, 2023 that may be closed by this pull request
@stcui007 stcui007 marked this pull request as ready for review September 8, 2023 17:56
@PhilMiller
Copy link
Contributor

Once these are improved, I'm happy to approve this:

  • Please use the Changes section of the PR notes to describe the changes, not to just list out files (since Git can tell us what files changed anyway), and fix the checklist formatting.
  • Please fix the marked typo

@PhilMiller PhilMiller mentioned this pull request Sep 11, 2023
11 tasks
@stcui007
Copy link
Contributor Author

Thanks for the careful checking, Phil. Will do.

@PhilMiller PhilMiller merged commit b749e0f into NOAA-OWP:master Sep 12, 2023
19 checks passed
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.

Remove custom time unit conversion in favor of UDUNITS
3 participants