-
Notifications
You must be signed in to change notification settings - Fork 30
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
[1pt] Update stage-based CatFIM to prevent overflooding if stage + elevation is provided in lieu of stage #1399
Conversation
…into dev-catfim-v2-2-ky-elev2
We need a fix. In the library csv/gpkg, the I found this with Not sure the right fix, and you will need to play with it, but maybe change: for threshold in valid_stage_names: to: |
…into dev-catfim-v2-2-ky-elev2
There are some CatFIM sites where the stage values that are provided in the WRDS API actually have the water surface elevation (WSE) rather than the stage value. One site where this is true is site prdk2 in Paradise, KY. At this site, the action stage is listed as 378 ft, which has caused very intense over inundation (as showen in the "before" example below). This code update detects that this issue is occurring and subtracts the elevation from the incorrect "stage" value to produce the actual stage value. In the case of site prdk2, the listed "stage" value is 378 ft, so the gage elevation (363.19 ft) is subtracted to produce the much more reasonable stage value of 14.81 ft. This results in a much more reasonable stage-based CatFIM result, as shown in the "after" example below.
Addresses vlab ticket #141569.
Changes
inundation-mapping/tools/catfim/generate_categorical_fim.py
: Added an update to detect and fix cases where WSE is provided in lieu of stage. Addeduncorrected_stage
andis_interval
columns to output CSV.inundation-mapping/tools/catfim/generate_categorical_fim_mapping.py
: Added update to facilitate the newis_interval
column.Testing
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)