generated from NOAA-OWP/owp-open-source-project-template
-
Notifications
You must be signed in to change notification settings - Fork 11
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 1 - High Water Probability (#543)
* Couple shared functions tweaks to work with high water probability * Changing viz_max_values lambda function viz_python_preprocessing and associated changes * High water probability product configuration and sql files * Remove high water probability services from Viz EC2 * Adding a 'product' key to python_preprocessing configurations for better conditional logic. * increasing ephemeral strorage on python preprocess lambda to 6.5GB
- Loading branch information
1 parent
27e31da
commit 206e616
Showing
39 changed files
with
433 additions
and
444 deletions.
There are no files selected for viewing
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
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
...db_postprocess_sql/products/medium_range_mem1/mrf_gfs_5day_max_high_water_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.mrf_gfs_5day_max_high_water_probability; | ||
SELECT | ||
channels.feature_id, | ||
channels.feature_id::TEXT AS feature_id_str, | ||
channels.name, | ||
channels.strm_order, | ||
channels.huc6, | ||
channels.state, | ||
hwp.nwm_vers, | ||
hwp.reference_time, | ||
hwp.hours_3_to_24, | ||
hwp.hours_27_to_48, | ||
hwp.hours_51_to_72, | ||
hwp.hours_75_to_120, | ||
hwp.hours_3_to_120, | ||
hwp.high_water_threshold, | ||
to_char(now()::timestamp without time zone, 'YYYY-MM-DD HH24:MI:SS UTC') AS update_time, | ||
channels.geom | ||
INTO publish.mrf_gfs_5day_max_high_water_probability | ||
FROM ingest.mrf_gfs_5day_max_high_water_probability as hwp | ||
JOIN derived.channels_conus channels ON hwp.feature_id = channels.feature_id; |
17 changes: 17 additions & 0 deletions
17
...tions/viz_db_postprocess_sql/products/short_range/srf_12hr_max_high_water_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,17 @@ | ||
DROP TABLE IF EXISTS publish.srf_12hr_max_high_water_probability; | ||
SELECT | ||
channels.feature_id, | ||
channels.feature_id::TEXT AS feature_id_str, | ||
channels.name, | ||
channels.strm_order, | ||
channels.huc6, | ||
channels.state, | ||
hwp.nwm_vers, | ||
hwp.reference_time, | ||
hwp.srf_prob, | ||
hwp.high_water_threshold, | ||
to_char(now()::timestamp without time zone, 'YYYY-MM-DD HH24:MI:SS UTC') AS update_time, | ||
channels.geom | ||
INTO publish.srf_12hr_max_high_water_probability | ||
FROM ingest.srf_12hr_max_high_water_probability as hwp | ||
JOIN derived.channels_conus channels ON hwp.feature_id = channels.feature_id; |
16 changes: 16 additions & 0 deletions
16
...nctions/viz_db_postprocess_sql/summaries/mrf_gfs_5day_max_high_water_probability/hucs.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,16 @@ | ||
-- HUC8 Hotpsot Layer | ||
DROP TABLE IF EXISTS publish.mrf_gfs_5day_max_high_water_probability_hucs; | ||
SELECT | ||
hucs.huc8, | ||
TO_CHAR(hucs.huc8, 'fm00000000') AS huc8_str, | ||
hucs.total_nwm_features, | ||
count(hwp.feature_id)::double precision / hucs.total_nwm_features::double precision AS nwm_features_flooded_percent, | ||
avg(hours_3_to_120) as avg_prob, | ||
to_char('1900-01-01 00:00:00'::timestamp without time zone, 'YYYY-MM-DD HH24:MI:SS UTC') AS reference_time, | ||
to_char(now()::timestamp without time zone, 'YYYY-MM-DD HH24:MI:SS UTC') AS update_time, | ||
hucs.geom | ||
INTO publish.mrf_gfs_5day_max_high_water_probability_hucs | ||
FROM derived.huc8s_conus AS hucs | ||
JOIN derived.featureid_huc_crosswalk AS crosswalk ON hucs.huc8 = crosswalk.huc8 | ||
JOIN publish.mrf_gfs_5day_max_high_water_probability AS hwp ON crosswalk.feature_id = hwp.feature_id | ||
GROUP BY hucs.huc8, total_nwm_features, hucs.geom |
Oops, something went wrong.