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

Restructure DA classes #605

Merged

Conversation

shorvath-noaa
Copy link
Contributor

Restructure the formulation of DataAssimilation object. Instead of using Abstract Classes, this creates a series of base classes for each type of data assimilation (streamflow nudging, reservoir persistence, and reservoir RFC). A child class then inherits methods all three of these base classes then turns on/off DA features based on user input from the configuration file.

The individual base classes can also be used with the future implementation of a separate reservoir module. For instance, for a single persistence reservoir, we can just use the PersistenceDA() class and skip all of the code/methods associated with streamflow nudging and RFC.

I've also added a method of initializing a DataAssimilation object without reading DA data from files as will be needed for BMI compatibility.

Additions

  • Base class objects NudgingDA, PersistenceDA, RFCDA
  • Child class that inherits methods from all base classes and turns features on/off based on user input in config file

Removals

  • Abstract Class methods

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

@shorvath-noaa shorvath-noaa marked this pull request as ready for review March 6, 2023 18:52
@shorvath-noaa shorvath-noaa marked this pull request as draft March 22, 2023 15:29
@shorvath-noaa shorvath-noaa marked this pull request as ready for review March 23, 2023 16:20
Copy link
Contributor

@kumdonoaa kumdonoaa left a comment

Choose a reason for hiding this comment

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

This PR greatly enhances code readability and efficiency. Great job.

@shorvath-noaa shorvath-noaa merged commit b7c158a into NOAA-OWP:master Mar 27, 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