-
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 CatFIM metadata API pulls and add duplicate site filtering, add CatFIM vis files #1379
Conversation
Error found. Can be seen on dev1 at catfim/rob_test/dup_lids_flow_based/logs/ Also take a peak at the warnings for both flow and stage.. did you expect that many? |
…into dev-catfim-v2-2-site-filtering
…into dev-catfim-v2-2-site-filtering
There are many sites in non-CONUS regions (AK, PR, HI) where we would like to run CatFIM but they are being excluded because they are not NWM forecast points. This PR brings back the double API pull and adds in some code to filter out duplicate (and NULL) lids from the metadata lists.
Additions
inundation-mapping/tools/catfim/vis_categorical_fim.py
: Functions for reading in, processing, and visualizing CatFIM results. Functions should be run in vis_catfim_cross_section.ipynb.inundation-mapping/tools/catfim/notebooks/vis_catfim_cross_section.ipynb
: A new Jupyter notebook for viewing and analyzing CatFIM results at a given site.inundation-mapping/tools/catfim/notebooks/eval_catfim_metadata.ipynb
: A new Jupyter notebook for evaluating metadata and results from CatFIM runs.inundation-mapping/tools/catfim/notebooks/.ipynb_checkpoints/vis_catfim_cross_section-checkpoint.ipynb
: Checkpoint file for vis_catfim_cross_section.ipynb.inundation-mapping/tools/catfim/notebooks/.ipynb_checkpoints/eval_catfim_metadata-checkpoint.ipynb
: Checkpoint file for eval_catfim_metadata.ipynbinundation-mapping\config/symbology/qgis/catfim_library.qml
: Symbology preset for viewing CatFIM library in QGIS.Changes
inundation-mapping/tools/catfim/generate_categorical_fim_flows.py
: Re-implements the dual API call, with the first API call getting all forecast points and the second API call getting all points (regardless of forecast point status). Adds code to filter out duplicate sites.Testing
I ran some tests with the updated API method (two API pulls + filtering out duplicate sites) and summarized the results below. It seems like this update handles the duplicate point issue well while still widening the selection criteria enough to produce more CatFIM results for AK, HI, and PR.
It will be worth separately looking into why HI and PR are not producing any stage-based CatFIM.
Flow-based, Number of sites (Mapped | Unmapped)
Stage-based, Number of sites (Mapped | Unmapped)
*FIM 4.5.2.11 has no CatFIM points for Alaska because it was added later, in FIM 4.5.11.1
** Unmapped sites weren’t tallied because the test did not produce any mapped sites for the region.
Further Testing
It would be good to test this on stage-based and flow-based a dozen or so HUCs, including some from Alaska, Puerto Rico, and Hawaii. When testing, it would be good to view the CatFIM outputs after the runs to make sure the CatFIM sites and CatFIM libraries look good, especially in AK, PR, and HI.
It would also be good to run
inundation-mapping/tools/catfim/notebooks/vis_catfim_cross_section.ipynb
to make sure that you can get the visualization scripts to run.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)