-
Notifications
You must be signed in to change notification settings - Fork 33
[1pt] PR: Add NFHL availability to floodplain adjustment #1588
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.
Sounds like there is a new full input set to download? Can someone go ahead and take of it? It will also need to go to the other 4 enviros and I can help guide / take care of it. Watch for versioning and keep me posted as well please. :) |
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.
There are two situations where this script may raise errors related to the nfhl_huc.gpkg
file:
1- Missing file:
If the nfhl_huc.gpkg file does not exist for a given HUC, the script will raise a FileNotFoundError at line 75:
nfhl_layers = gpd.list_layers(fema_flood_zones_file)['name'].tolist() |
2- Missing availability layer:
If the file exists but does not contain the availability layer, the code block that initializes distance_grid is skipped. This leads to a NameError at:
inundation-mapping/src/adjust_floodplains.py
Line 106 in d693863
distance = np.where(distance_grid <= distance_threshold, distance_grid, np.nan) |
Adds NFHL
availability
layer to floodplain adjustment outside of areas covered by NFHL floodplain data. Ifavailability
is missing, the NFHL flood hazard layer is not used and the default adjustment distance (3000 meters from the stream line) is used. Resolves #1553.Changes
data/nfhl/download_fema_nfhl.py
: Adds NFHLavailability
layer to download queue.src/adjust_floodplains.py
: Modifies to use NFHLavailability
where floodplain data exists but doesn't have coverage.Testing
Tested on HUC 05120202 with results shown in #1553 (comment), #1553 (comment), and #1553 (comment).
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)