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

[15pt] Develop Python code to translate USFIMIR data to Alpha format #629

Closed
2 tasks done
BradfordBates-NOAA opened this issue Jul 11, 2022 · 0 comments · Fixed by #639
Closed
2 tasks done

[15pt] Develop Python code to translate USFIMIR data to Alpha format #629

BradfordBates-NOAA opened this issue Jul 11, 2022 · 0 comments · Fixed by #639
Assignees
Labels
enhancement New feature or request testing Evaluation and testing related

Comments

@BradfordBates-NOAA
Copy link
Member

BradfordBates-NOAA commented Jul 11, 2022

Create a new feature branch off of the dev branch.

Develop Python code to translate shapefiles from the USFIMR to the format required for Alpha evaluations and calibration. For now, let's only consider USFIMR maps that coincide with Mainstem (MS) segments. Only use USFIMIR maps that have Q (flows/discharge) information.

For a USFIMR map...

  • Create flow file using the discharge attribute in the file. CSV should match this format: /dev_fim_share/foss_fim/test_cases/ble_test_cases/validation_data_ble/11100303/500yr/ble_huc_11100303_flows_500yr.csv
  • Create raster of the flood extent. Raster should match this format: /dev_fim_share/foss_fim/test_cases/ble_test_cases/validation_data_ble/11100303/500yr/ble_huc_11100303_extent_500yr.tif

Rasters should be formatted at the HUC8 scale and pixels should be encoded as follows: Wet = 1, Dry = 0, NoData = NoData.

In order to create the flow file, you'll need to determine the NWM feature_ids that contain inundated area, then apply the USFIMR-provided discharges to those feature_ids. For this, I think either a zonal statistic or intersect operation will work. Basically, any NWM MS catchment that contains USFIMR inundation should receive a flow value. If zonal statistics is used, then it makes sense to go ahead and convert the USFIMR shapefile to a raster upfront.

Data needs:

  • WBD: /dev_fim_share/foss_fim/inputs/wbd/WBD_National.gpkg
  • NWM MS flowlines: /dev_fim_share/foss_fim/inputs/nwm_hydrofabric/nwm_flows_ms_wrds.gpkg
  • USFIMR map

Example CSV. Discharge units are CMS.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request testing Evaluation and testing related
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants