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

[5pt] PR: Update nws_lid dataset with Alaska sites #1159

Merged
merged 6 commits into from
May 17, 2024

Conversation

AliForghani-NOAA
Copy link
Collaborator

@AliForghani-NOAA AliForghani-NOAA commented May 13, 2024

This PR addresses issue #1132 and produces an updated input dataset to replace /dev_fim_share/foss_fim/inputs/ahps_sites/nws_lid.gpkg with /dev_fim_share/foss_fim/outputs/ali_nws_lid/nws_lid.gpkg

The PR includes the following changes on tools/generate_nws_lid.py for updating nws_lid.gpkg dataset.

In this revised version, stations only from these two groups are retrieved:

  • lid stations with rfc_forecast_point= True
  • lid stations in /data/inputs/ahp_sites/evaluated_ahps_sites.csv

The lid stations in AK (Alaska), HI, and PR, with above two criteria have also been selected, as shown in the map below. In the previous version of the code, all of lid stations in PR and HI (regardless of meeting above two criteria), were also being retrieved. I have updated this version to exclude such stations.

Also, In this revised version, I've eliminated the code sections that previously generated the "is_headwater" and "is_colocated" columns, which are not needed in FIM4. Therefore, in this updated version, these columns are no longer present.

Similar to 'usgs_gages.gpkg' dataset, all lid stations, including those in Alaska, are stored in a single gpkg file (nws_lid.gpkg) with EPSG=5070. The Alaska stations can be identified using their HUC8 numbers (beginning with '19').

Changes

  • tools/generate_nws_lid.py

Testing

The nws_lid.gpkg dataset is used only in usgs_gage_unit_setup.py for generating usgs_subset_gages.gpkg for simulated HUC8s. I confirmed the validity of this PR by running FIM for a HUC8 using the updated nws_lid.gpkg-- contents of usgs_subset_gages.gpkgwere aligned with the data in the updatednws_lid.gpkg`.

This map displays 4381 NWS_LID points compiled using the updated tools/generate_nws_lid.py:
image

Deployment Plan (For developer use)

How does the changes affect the product?

  • Code only?
  • 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?
  • If applicable, has a deployment plan be created with the deployment person/team?

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
  • Passes all unit tests locally (inside interactive Docker container, at /foss_fim/, run: pytest unit_tests/)
  • 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
  • Reviewers requested
  • 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

@AliForghani-NOAA AliForghani-NOAA added enhancement New feature or request CatFIM NWS Flood Categorical HAND FIM FIM4 labels May 13, 2024
@AliForghani-NOAA AliForghani-NOAA self-assigned this May 13, 2024
@AliForghani-NOAA AliForghani-NOAA marked this pull request as ready for review May 16, 2024 14:29
EmilyDeardorff
EmilyDeardorff previously approved these changes May 17, 2024
Copy link
Contributor

@EmilyDeardorff EmilyDeardorff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new dataset worked as expected in my Alaska CatFIM test.

@CarsonPruitt-NOAA CarsonPruitt-NOAA merged commit a488fe2 into dev May 17, 2024
1 check passed
@CarsonPruitt-NOAA CarsonPruitt-NOAA deleted the dev-update-nws-lid branch May 17, 2024 20:04
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 enhancement New feature or request FIM4
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[5pt] Update "generate_nws_lid.py" and generate new NWS lid points, including Alaska points
4 participants