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

Adding lite-restart and lastObs to BMI conversions #685

Merged
merged 2 commits into from
Nov 13, 2023

Conversation

JurgenZach-NOAA
Copy link
Contributor

Added lite-restart and lastObs, along the lines of last additions (usgs, usace, etc). Abstract classes will be created at a later stage upon more-complete integration into t-route.

Additions

Removals

Changes

Testing

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
  • Visually tested in supported browsers and devices (see checklist below 👇)
  • Project documentation has been updated (including the "Unreleased" section of the CHANGELOG)
  • Reviewers requested with the Reviewers tool ➡️

Testing checklist

Target Environment support

  • Windows
  • Linux
  • Browser

Accessibility

  • Keyboard friendly
  • Screen reader friendly

Other

  • Is useable without CSS
  • Is useable without JS
  • Flexible from small to large screens
  • No linting errors or warnings
  • JavaScript tests are passing

@@ -131,6 +132,17 @@ def __init__(self, bmi_cfg_file=None):

# read in metadata for BMI compliant arrays:

if lastobs_file:
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe check if self._lastobs_df is not empty here instead of if the file name exists? Not sure if an empty dataframe would cause _bmi_disassemble_lastObs trouble.


(_q0_columnArray, _q0_columnLengthArray, _q0_nCol, \
_q0_indexArray, _q0_nIndex, _q0_Array) = \
_bmi_disassemble_lite_restart (self._q0,np.float32)
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to verify that self._q0 is not empty before calling this function?


(_waterbodyLR_columnArray, _waterbodyLR_columnLengthArray, _waterbodyLR_nCol, \
_waterbodyLR_indexArray, _waterbodyLR_nIndex, _waterbodyLR_Array) = \
_bmi_disassemble_lite_restart (self._waterbody_df,np.float64)
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here, check if self._waterbody_df is empty?


#testRevert = True

if (testRevert):
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we remove all the testRevert sections? Keep the text somewhere for later use, but we don't need it in this file anymore.

@JurgenZach-NOAA
Copy link
Contributor Author

Implemented requested modifications.

@shorvath-noaa shorvath-noaa merged commit c86b99f into NOAA-OWP:master Nov 13, 2023
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.

2 participants