-
Notifications
You must be signed in to change notification settings - Fork 32
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] Add lake masking to stage- and flow-based CatFIM #1418
base: dev
Are you sure you want to change the base?
Conversation
Testing for Stage Based looks great. Carson mentioned we should add this to Flow Based as well. |
…A-OWP/inundation-mapping into dev-catfim-v2-2-lake-masking Conflicts: tools/catfim/generate_categorical_fim_mapping.py
Implemented this change to flow-based and it looks like it's working as expected! I just need to do a bit more testing and then we should be good to go. The lake needing to be masked out from this example is in the bottom right corner. In the example with lake masking, we can see that inundation in the lake polygon has been removed. |
Previously, CatFIM would inundate areas that we know to be lakes based on our FIM data. This update masks out lakes from stage- and flow-based CatFIM inundation.
Changes
inundation-mapping/tools/catfim/generate_categorical_fim_mapping.py
: Added code to stage-based CatFIM to filter out HydroIDs that are associated with a non-null LakeID. Also uses new lake masking function to mask lakes from flow- and stage-based CatFIM right before the tifs are saved, at the end ofproduce_stage_based_lid_tifs()
. Comments in this area were also cleaned up.inundation-mapping/tools/tools_shared_functions.py
: Added function that uses the water bodies geopackage to mask out lakes from a tiff.Testing
Tested flow- and stage-based CatFIM at site auon6 (HUC 04140201)
Additional testing detailed in Issue 1358
Potential HUC/site combos where stage-based CatFIM intersects a lake (for additional testing):
'07090002' 'okfi2'
'07130008' 'kcai2'
'07140202' 'ylow4'
'10070001' 'brlk1'
'11070204' 'tifm7'
'11070208' 'olbo2'
'11100301' 'wtnw2'
'05020002' 'cpei3'
'04300108' 'wlbn6'
'04040002' 'racw3'
Potential HUC/site combos where flow-based CatFIM intersects a lake (for additional testing):
Site auon6 before update:
![auon6_BEFORE_masking](https://private-user-images.githubusercontent.com/60829052/408761761-010a2498-43ad-42d9-aa1f-20e3796e32f0.JPG?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk0NDg4NTMsIm5iZiI6MTczOTQ0ODU1MywicGF0aCI6Ii82MDgyOTA1Mi80MDg3NjE3NjEtMDEwYTI0OTgtNDNhZC00MmQ5LWFhMWYtMjBlMzc5NmUzMmYwLkpQRz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEzVDEyMDkxM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWM3NGYxNzI4ZGE3ODJiYzkxZWY3NTU1ZTQ2MzA2ZGJmYTA1ODZiODZlMTVjMGZjMDcyZTAwNGM2YjE1ZmU4ZjMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.a3Nta16DGzeHznNaoXqXOs_EdNuEeMIQg6qbXTN0VeU)
Site auon6 AFTER update:
![auon6_hydroids_filtered_lakes_masked](https://private-user-images.githubusercontent.com/60829052/408761772-27f0d18c-2b0d-47f9-a526-11f7d3720362.JPG?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk0NDg4NTMsIm5iZiI6MTczOTQ0ODU1MywicGF0aCI6Ii82MDgyOTA1Mi80MDg3NjE3NzItMjdmMGQxOGMtMmIwZC00N2Y5LWE1MjYtMTFmN2QzNzIwMzYyLkpQRz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEzVDEyMDkxM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWUzNWNkYjY3NjhhOTFjMjA2ZWEzM2UyOWMzZDY2YzQ0NmU0ZjYwZjFjZTQ2YzRlN2EyY2UyYWFmZTJlNDY2YjEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.BeFzTZwkI_bCXRydrtSwLIzgz1IW4EcmsS8h_CZHfJM)
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)