From bb7fdae46530de07a1379cc7f360a6b4b569590f Mon Sep 17 00:00:00 2001 From: "tyler.schrag" Date: Wed, 1 Nov 2023 10:04:59 -0700 Subject: [PATCH] High Water Probability HUCS SQL Fix --- .../summaries/mrf_gfs_5day_max_high_water_probability/hucs.sql | 2 +- .../summaries/srf_12hr_max_high_water_probability/hucs.sql | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Core/LAMBDA/viz_functions/viz_db_postprocess_sql/summaries/mrf_gfs_5day_max_high_water_probability/hucs.sql b/Core/LAMBDA/viz_functions/viz_db_postprocess_sql/summaries/mrf_gfs_5day_max_high_water_probability/hucs.sql index 762c4aed..21dbbe45 100644 --- a/Core/LAMBDA/viz_functions/viz_db_postprocess_sql/summaries/mrf_gfs_5day_max_high_water_probability/hucs.sql +++ b/Core/LAMBDA/viz_functions/viz_db_postprocess_sql/summaries/mrf_gfs_5day_max_high_water_probability/hucs.sql @@ -4,7 +4,7 @@ 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, + (count(hwp.feature_id)::double precision / hucs.total_nwm_features::double precision)*100 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, diff --git a/Core/LAMBDA/viz_functions/viz_db_postprocess_sql/summaries/srf_12hr_max_high_water_probability/hucs.sql b/Core/LAMBDA/viz_functions/viz_db_postprocess_sql/summaries/srf_12hr_max_high_water_probability/hucs.sql index c6ad84d2..76a3a5d2 100644 --- a/Core/LAMBDA/viz_functions/viz_db_postprocess_sql/summaries/srf_12hr_max_high_water_probability/hucs.sql +++ b/Core/LAMBDA/viz_functions/viz_db_postprocess_sql/summaries/srf_12hr_max_high_water_probability/hucs.sql @@ -4,7 +4,7 @@ SELECT hucs.huc10, TO_CHAR(hucs.huc10, 'fm0000000000') AS huc10_str, hucs.total_nwm_features, - count(hwp.feature_id)::double precision / hucs.total_nwm_features::double precision AS nwm_features_flooded_percent, + (count(hwp.feature_id)::double precision / hucs.total_nwm_features::double precision)*100 AS nwm_features_flooded_percent, avg(srf_prob) 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,