[2pt] PR: Changes to pass optional arg for using the precalb_discharge_cms for inundate scripts #1606
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Added new optional input argument to inundate scripts and
synthesize_test_cases.py
to use theprecalb_discharge_cms
values in the hydrotable instead of the defaultdischarge_cms
. Closes #1618Changes
tools/inundate_gms.py
: added "precalb_option", specify "precalb_discharge_cms" as an req input column and force the hydrotable input to be the csv file ("precalb_discharge_cms" is not currently one of the outputs in the feather file). Note that there is logic to fill the "precalb_discharge_cms" with "discharge_cms" when the precalb_discharge is null (this happens for hucs/branches where the calibration routines do not run - not benchmark data to calibrate to)tools/inundate_mosaic_wrapper.py
: added the "precalb_option" argument for passing to downstream functionstools/inundation.py
: added the "precalb_option" argument and added logic to use the "precalb_discharge_cms" data for interpolating the stages.tools/run_test_case.py
: added the "precalb_option" argument for passing to downstream functionstools/synthesize_test_cases.py
: added the "precalb_option" as an optional input argument and pass to the appropriate downstream functionsTesting
Example usage (note -p arg):
python3 foss_fim/tools/synthesize_test_cases.py -c DEV -p -v hand_4_8_7_2_precalb -jh 12 -jb 5 -o -m data/previous_fim/hand_4_8_7_2_precalb/eval_4_8_7_2_precalb/hand_4_8_7_2_metrics_precalb.csv -pcsv data/previous_fim/hand_4_8_7_2_precalb/hand_4_8_7_2_metrics.csv
Example of precalb vs regular eval metrics:

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)