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

BMI restart and lastobs files #654

Merged
merged 16 commits into from
Oct 30, 2023

Conversation

shorvath-noaa
Copy link
Contributor

Add functionality to pass info pertaining to restart and lastobs files from troute_model to DAforcing_model, which in turn can write/read appropriate files.

Additions

  • Read/write restart and lastobs files from DAforcing_model
  • Pass relevant info via BMI between troute and DAforcing
  • Handle accepting restart and lastobs info via BMI in network classes
  • Update creating gages dictionary to only include the linked flowpath that is furthest downstream (when multiple flowpaths are associated with the same gage)

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

@@ -247,6 +253,9 @@ def __init__(self,
value_dict,
bmi_parameters,
)
#FIXME: See FIXME above.
if not from_files_copy:
from_files=False

# Preprocess network objects
self.preprocess_network(flowpaths)
Copy link
Contributor

Choose a reason for hiding this comment

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

At L269, after changing use_preprocessed_data to False, I got an error saying that
PermissionError: [Errno 13] Permission denied: '/home/APD/inland_hydraulics/Apr2023_testcase/preprocess/Extended_AnA_output.npy'

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's a permissions issue on apd-dev, not necessarily a t-route issue. But curious why that came up. Do you have preprocess_only: set to True?

Copy link
Contributor

Choose a reason for hiding this comment

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

I put False to both preprocess_only and use_preprocessed_data.

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.

At Line406 in HYFeaturesNetwork.py, some lake id with NaN values of the attributes of Lakes layer of gpkg should be removed not to cause an error here:
https://github.com/shorvath-noaa/t-route/blob/14926225cacb5e4d773916913fc3956f1436c835/src/troute_model.py#L520-L523

The reason of the error is that lakes with such NaN values don't seem to have computed results in wbdy so that there are no id of such lakes in wbdy.

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