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

RTX Code Release (PI-4): Additions to T-Route to be run at the Old River Control Center to connect disconnected flowline networks and assimilate using observations #847

Open
wants to merge 28 commits into
base: master
Choose a base branch
from

Conversation

taddyb
Copy link

@taddyb taddyb commented Dec 17, 2024

Today, Raytheon showcased the following code to NOAA-OWP demonstrating the ability for a graph breakage at the old-river-control center to be connected and assimilated within T-Route using USGS observations. This PR is the accompanying code that contains only feature code related to that release (Note: provided test files are in test/water_transfer and this only works with Hydrofabric v20.1

NOTE: A significant number of these additions/files come from including forcing files and a jupyter notebook to test this code

Additions

If you look in our config file, we're using the following fields to reference the data:

compute_parameters:
    data_assimilation_parameters:
        divergence_outflow : divergence_obs/old_river_lock.csv

With an addition to compute_parameters.py:

divergence_outflow: Optional[FilePath] = None
"""
CSV file containing DA values for man-made breakages in the hydrofabric (locks). Needs to be obtained and pre-processed from https://waterdata.usgs.gov/monitoring-location/ observations
NOTE: Required for Old River Lock DA (2.2.3.15.2).
"""

and a new class in the DataAssimilation.py file to follow the patterns within the file

class Divergence(AbstractDA):
    def __init__(self, network, from_files, value_dict):
        LOG.info("divergence class is started.")
        start_time = time.time()
        data_assimilation_parameters = self._data_assimilation_parameters
        run_parameters = self._run_parameters

        self._divergence_df = pd.DataFrame()
        
        if data_assimilation_parameters.get("divergence_outflow", False):
            self._divergence_df = _create_divergence_df(run_parameters, network, data_assimilation_parameters)

        LOG.debug("divergence class is completed in %s seconds." % (time.time() - start_time))

Removals

Changes

  • Updates to the LICENSE to include information that this work was paid for by a government contract, and data attributions to Lynker Spatial for geopackage files for hydrofabric v20.1

Testing

  1. See test/water_transfer/README.md for testing information

Screenshots

image

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

@taddyb taddyb changed the title RTX Code Release (PI-4): Additions to T-Route to be run at the Old River Control Center and connect a disconnected graph RTX Code Release (PI-4): Additions to T-Route to be run at the Old River Control Center to connect disconnected flowline networks and assimilate using observations Dec 17, 2024
@taddyb taddyb marked this pull request as draft December 17, 2024 22:35
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