Skip to content

Comments

Run T-Route Alongside Catchments (NGWPC-9179)#68

Draft
idtodd wants to merge 3 commits intodevelopmentfrom
idt-run-troute-alongside-catchments-ngen
Draft

Run T-Route Alongside Catchments (NGWPC-9179)#68
idtodd wants to merge 3 commits intodevelopmentfrom
idt-run-troute-alongside-catchments-ngen

Conversation

@idtodd
Copy link

@idtodd idtodd commented Jan 12, 2026

Currently, NGEN runs all the catchments and then passes the nexus results to the T-Route BMI at the end of the process. This update allows for T-Route to work as a BMI that can run alongside NGEN's catchments.

With this update, T-Route's BMI will have a maximum data buffer size that it will hold before running the model and writing the results to the output file. When a sufficient amount of data is added through update, the model will run and the BMI's current data will be cleared from memory.

Additions

  • T-Route BMI output variables for storing the results of the last timestep run.
  • Optional bmi_parameters config property max_timestep_buffer. This will set the number of timestamps the BMI will store before running. The default value is 1,000 if not set in the config.

Removals

Changes

  • When writing the output to netCDF, if the file already exists, the results will be appended to the end instead of overwritten. This allows writing outputs iteratively without significantly changing the flow of writing outputs.
  • Update the "bmi" branch of the t-route compute function to include reservoir RFC and Great Lakes data.
  • Parallel compute method used by the BMI will always be "bmi". During testing with buffer sizes of 1000, this was the fastest method with methods designed for larger time step sizes (e.g., "by-subnetwork-jit-clustered") slowing down the process when run multiple times on small datasets.

Testing

  1. Running locally on AWS Workspaces machine.

Screenshots

Notes

  • The BMI write only supports netCDF output formats. An error will be thrown if the output type is not ".nc".

Todos

  • Allow for writing results into the middle of an output file instead of appending to the end. That allows for NGEN to move to a prior timestamp and write the new data into the correct location of the output file.

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

@idtodd idtodd requested a review from sivasankkar January 13, 2026 14:19
@idtodd idtodd marked this pull request as draft February 2, 2026 19:19
@idtodd idtodd removed the request for review from sivasankkar February 2, 2026 19:19
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