generated from NOAA-OWP/owp-open-source-project-template
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Viz EC2 Services to Lambda - Part 2 - Rapid Onset Flooding Probability (
#558) This PR migrates the ensemble-based Rapid Onset Flooding Probability products from the Viz EC2 to the Viz Max Values lambda function (now called Python Preprocessing). It broadly encapsulates the following changes: **Changes** - New rapid_onset_flooding product script in the python_preprocessing lambda function that supports both 12 hour SRF and 5 day GFS MRF configurations. - Removal of rapid_onset_flooding pipeline and product files in the source-aws_loosa library **Deployment Considerations:** - Not sure if we should include this in the 2.1.4 release or not? I'm good to test/fix quickly and thoroughly next week if you want to include it. Otherwise, fine to go in the next one (wait to merge for now) - We will need to include a ingest schema db dump when deploying to UAT. --------- Co-authored-by: CoreyKrewson-NOAA <[email protected]>
- Loading branch information
1 parent
578e439
commit 493f5f9
Showing
32 changed files
with
229 additions
and
282 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
...tprocess_sql/products/medium_range_mem1/mrf_gfs_5day_rapid_onset_flooding_probability.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
DROP TABLE IF EXISTS publish.mrf_gfs_5day_rof_prob; | ||
SELECT | ||
channels.feature_id, | ||
channels.feature_id::TEXT AS feature_id_str, | ||
channels.name, | ||
channels.strm_order, | ||
channels.huc6, | ||
channels.state, | ||
rofp.nwm_vers, | ||
rofp.reference_time, | ||
rofp.rapid_onset_prob_day1, | ||
rofp.rapid_onset_prob_day2, | ||
rofp.rapid_onset_prob_day3, | ||
rofp.rapid_onset_prob_day4_5, | ||
rofp.rapid_onset_prob_all, | ||
rf.high_water_threshold, | ||
ST_LENGTH(channels.geom)*0.000621371 AS reach_length_miles, | ||
to_char(now()::timestamp without time zone, 'YYYY-MM-DD HH24:MI:SS UTC') AS update_time, | ||
channels.geom | ||
INTO publish.mrf_gfs_5day_rof_prob | ||
FROM ingest.mrf_gfs_5day_rof_prob as rofp | ||
JOIN derived.channels_conus channels ON rofp.feature_id = channels.feature_id | ||
JOIN derived.recurrence_flows_conus rf ON rofp.feature_id = rf.feature_id; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
...viz_db_postprocess_sql/products/short_range/srf_12hr_rapid_onset_flooding_probability.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
DROP TABLE IF EXISTS publish.srf_12hr_rof_prob; | ||
SELECT | ||
channels.feature_id, | ||
channels.feature_id::TEXT AS feature_id_str, | ||
channels.name, | ||
channels.strm_order, | ||
channels.huc6, | ||
channels.state, | ||
rofp.nwm_vers, | ||
rofp.reference_time, | ||
rofp.rapid_onset_prob_1_6, | ||
rofp.rapid_onset_prob_7_12, | ||
rofp.rapid_onset_prob_all, | ||
rf.high_water_threshold, | ||
ST_LENGTH(channels.geom)*0.000621371 AS reach_length_miles, | ||
to_char(now()::timestamp without time zone, 'YYYY-MM-DD HH24:MI:SS UTC') AS update_time, | ||
channels.geom | ||
INTO publish.srf_12hr_rof_prob | ||
FROM ingest.srf_12hr_rof_prob as rofp | ||
JOIN derived.channels_conus channels ON rofp.feature_id = channels.feature_id | ||
JOIN derived.recurrence_flows_conus rf ON rofp.feature_id = rf.feature_id; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
...eline/product_configs/medium_range_mem1/mrf_gfs_5day_rapid_onset_flooding_probability.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
product: mrf_gfs_5day_rapid_onset_flooding_probability | ||
configuration: medium_range_mem1 | ||
product_type: "vector" | ||
run: true | ||
|
||
python_preprocessing: | ||
- file_format: common/data/model/com/nwm/{{variable:NWM_DATAFLOW_VERSION}}/nwm.{{datetime:%Y%m%d}}/medium_range_mem{{range:1,7,1,%01d}}/nwm.t{{datetime:%H}}z.medium_range.channel_rt_{{range:1,7,1,%01d}}.f{{range:3,121,3,%03d}}.conus.nc | ||
file_step: None | ||
file_window: None | ||
product: rapid_onset_flooding_probability | ||
output_file: viz_ingest/medium_range_mem1/{{datetime:%Y%m%d}}/{{datetime:%H}}_mrf_gfs_5day_rapid_onset_flooding_probability.csv | ||
target_table: ingest.mrf_gfs_5day_rof_prob | ||
target_keys: (feature_id) | ||
|
||
postprocess_sql: | ||
- sql_file: mrf_gfs_5day_rapid_onset_flooding_probability | ||
target_table: publish.mrf_gfs_5day_rof_prob | ||
|
||
product_summaries: | ||
- sql_file: hucs | ||
target_table: | ||
- publish.mrf_gfs_5day_rof_prob_hucs | ||
|
||
services: | ||
- mrf_gfs_5day_rapid_onset_flooding_probability |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
...ialize_pipeline/product_configs/short_range/srf_12hr_rapid_onset_flooding_probability.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
product: srf_12hr_rapid_onset_flooding_probability | ||
configuration: short_range | ||
product_type: "vector" | ||
run: true | ||
|
||
python_preprocessing: | ||
- file_format: common/data/model/com/nwm/{{variable:NWM_DATAFLOW_VERSION}}/nwm.{{datetime:%Y%m%d}}/short_range/nwm.t{{datetime:%H}}z.short_range.channel_rt.f{{range:1,19,1,%03d}}.conus.nc | ||
file_step: 1H | ||
file_window: PT7H | ||
product: rapid_onset_flooding_probability | ||
output_file: viz_ingest/short_range/{{datetime:%Y%m%d}}/{{datetime:%H}}_srf_12hr_rapid_onset_flooding_probability.csv | ||
target_table: ingest.srf_12hr_rof_prob | ||
target_keys: (feature_id) | ||
|
||
postprocess_sql: | ||
- sql_file: srf_12hr_rapid_onset_flooding_probability | ||
target_table: publish.srf_12hr_rof_prob | ||
|
||
product_summaries: | ||
- sql_file: hucs | ||
target_table: | ||
- publish.srf_12hr_rof_prob_hucs | ||
|
||
services: | ||
- srf_12hr_rapid_onset_flooding_probability |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.