Skip to content
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] Implement denylist for flow-based CatFIM #1413

Merged
merged 10 commits into from
Jan 31, 2025

Conversation

EmilyDeardorff
Copy link
Contributor

@EmilyDeardorff EmilyDeardorff commented Jan 24, 2025

Implements a denylist for flow-based CatFIM (that uses the same conventions as the existing denylist functionality used in stage-based CatFIM. Adds CMUG1 to the denylist for flow-based CatFIM.

Additions

  • tools/catfim/ahps_restricted_sites.csv: Renamed from stage_based_ahps_restricted_sites.csv. Added an additional column, catfim_type, that specifies whether a site should be restricted for flow-based CatFIM (flow), stage-based CatFIM (stage), or both (both). Added CMUG1 as another restricted site. Changed a number of sites that were previously just restricted for stage-based CatFIM to be restricted for both.

Changes

  • tools/catfim/generate_categorical_fim.py: Facilitate sites filtration in flow-based CatFIM processing. Update the load_restricted_sites() function to handle restricted sites for both flow- and stage-based CatFIM. Clean up a few comments.
  • tools/catfim/generate_categorical_fim_flows.py: Add restricted sites filtration to flow-based CatFIM processing.

Removals

  • tools/catfim/stage_based_ahps_restricted_sites.csv: Renamed to ahps_restricted_sites.csv

Testing

  • Tested on flow- and stage-based CatFIM in HUC 03130003. In both scenarios, CMUG1 was removed as desired using the denylist.

Deployment Plan (For developer use)

How does the changes affect the product?

  • Code only?
  • If applicable, has a deployment plan be created with the deployment person/team?
  • Require new or adjusted data inputs? Does it have start, end and duration code (in UTC)?
  • If new or updated data sets, has the FIM code been updated and tested with the new/adjusted data (subset is fine, but must be a subset of the new data)?
  • Require new pre-clip set?
  • Has new or updated python packages?

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.

  • Informative and human-readable title, using the format: [_pt] PR: <description>
  • Links are provided if this PR resolves an issue, or depends on another other PR
  • If submitting a PR to the 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)
  • Changes are limited to a single goal (no scope creep)
  • The feature branch you're submitting as a PR is up to date (merged) with the latest dev branch
  • pre-commit hooks were run locally
  • Any change in functionality is tested
  • New functions are documented (with a description, list of inputs, and expected output)
  • Placeholder code is flagged / future todos are captured in comments
  • CHANGELOG updated with template version number, e.g. 4.x.x.x
  • Add yourself as an assignee in the PR as well as the FIM Technical Lead

Merge Checklist (For Technical Lead use only)

  • Update CHANGELOG with latest version number and merge date
  • Update the Citation.cff file to reflect the latest version number in the CHANGELOG
  • If applicable, update README with major alterations

@EmilyDeardorff EmilyDeardorff added the CatFIM NWS Flood Categorical HAND FIM label Jan 24, 2025
@EmilyDeardorff EmilyDeardorff self-assigned this Jan 24, 2025
@EmilyDeardorff EmilyDeardorff marked this pull request as ready for review January 24, 2025 23:59
@EmilyDeardorff EmilyDeardorff changed the title WIP [1pt] Implement denylist for flow-based CatFIM [1pt] Implement denylist for flow-based CatFIM Jan 25, 2025
@CarsonPruitt-NOAA CarsonPruitt-NOAA merged commit 5be6514 into dev Jan 31, 2025
1 check passed
@CarsonPruitt-NOAA CarsonPruitt-NOAA deleted the dev-catfim-v2-2-denylist branch January 31, 2025 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CatFIM NWS Flood Categorical HAND FIM Ready_to_Merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[5pt] Create and implement a restricted sites list to mitigate overlapping sites in flow-based CatFIM
3 participants