-
Notifications
You must be signed in to change notification settings - Fork 33
[1pt] PR: Fix CatFIM inundate gms errors #1573
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
base: dev
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made a couple of changes to the script and fixed the linting error. Everything looks good to me!
Greg has approved his part, but Rob still needs to do a CatFIM test in order to fully approve |
Picked up a new error when running this which the most recent changes on the new temp ucs3 OWP server. I ran stage based against 15050302. HOWEVER... this bug pops up due to it being new DEV git repo code looking for the new hydrotables, but the catfim tests I did had older hand datasets. I will get a new temp copy for that HUC into ucs3 and retest. Is this really a bug or just a matter of handling it more elegantly. Keep me posted if a fix, or enhancement, is really coming for this one. |
See comment from today, we might have a new fix, or at least an enhancement to handle the scenario better. Sorry.. it is hard to test in EC2s accurately.
I went ahead and made a check for None Type, please test again that should be the last quick fix. |
Just tested Greg's fix to handle the error more gracefully and that works. I tried it against the hand 4.6.1.4 hand dataset which we know was not a valid scenario in the first place. My bad. I just pulled down one HUC from the brand new 4.8.6.1 and will retest. That will become a truly valid test. |
…into dev-catfim-inundate-gms-errors
Ran full scale Flow Base CatFIM for 4.8.6.1 and the comparison tool again it and 4.6.1.4. Both look great. Did some analysis on the sites and the libraries against the datasets for sites / libraries against 4.6.1.4 and they looked good. Did some analysis of the compare tool results against the two and it looks great as well.. Wahoo!!! Flow based is perfect. Now, we just have to finish getting stage based happy. |
Note; Do not worry about the merge conflict. Once we merge in the navd PR first, this will resolve itself. |
…acters are handled properly.
Closes Issue #1572
In the recent tests of the CatFIM code, the processing errored out during the Inundate_gms() processing. The following error was recorded:
This error arose due to some updates to the inudnate_gms() script that removed the ability of inundate_gms() to use the branch hydrotables. This update resolves the error by re-implementing the branch hydrotable functionality and updating the input parameters for the inundate_gms() function in the CatFIM code.
Changes
tools/inundate_gms.py
: Re-implement functionality to use branch hydrotables (rather than HUC hydrotables) inside__inundate_gms_generator()
.tools/catfim/generate_categorical_fim_mapping.py
: Updated output ofget_thresholds()
function. Removed logic that disregarded LIDs with more or fewer characters than 5. Fixed '---' bug by adding logic to remove that prefix if the site is not on thevalid_ahps_ids
(in other words, not mapped). Add improved status messaging for when sites are not found on the WRDS API (which uses the newthreshold_count
variable).tools/catfim/generate_categorical_fim_mapping.py
: Fixed HAND gage elevation so they are correctly working in millimeters rather than meters and being saved asuint16
rather thanuint8
.tools/catfim/generate_categorical_fim_flows.py
: Updated output ofget_thresholds()
function.tools/tools_shared_functions.py
: Updatedget_thresholds()
function to output the number of thresholds found for the site.data/nws/preprocess_ahps_nws.py
: Updated output ofget_thresholds()
function.data/usgs/preprocess_ahps_usgs.py
: Updated output ofget_thresholds()
function.data/usgs/rating_curve_get_usgs_curves.py
: Updated output ofget_thresholds()
function.tools/catfim/ahps_restricted_sites.csv
: Added site BOCC2AJM to restricted sites.Testing
Tested on a flow-based CatFIM run for HUC 01010004 and it worked as expected.
Deployment Plan (For developer use)
How does the changes affect the product?
Issuer Checklist (For developer use)
You may update this checklist before and/or after creating the PR. If you're unsure about any of them, please ask, we're here to help! These items are what we are going to look for before merging your code.
[_pt] PR: <description>
dev
branch (the default branch), you have a descriptive Feature Branch name using the format:dev-<description-of-change>
(e.g.dev-revise-levee-masking
)dev
branchpre-commit
hooks were run locally4.x.x.x
Merge Checklist (For Technical Lead use only)