Skip to content
8 changes: 4 additions & 4 deletions datamodel/app/view/swmm_views/09_vw_swmm_subcatchments.sql
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ SELECT
ELSE (ca.surface_area::numeric)::double precision
END AS Area,
CASE
WHEN state = 'rw_current' then discharge_coefficient_rw_current
WHEN state = 'rw_planned' then discharge_coefficient_rw_planned
WHEN state = 'ww_current' then discharge_coefficient_ww_current
WHEN state = 'ww_planned' then discharge_coefficient_ww_planned
WHEN state = 'rw_current' AND discharge_coefficient_rw_current IS NOT NULL then discharge_coefficient_rw_current
WHEN state = 'rw_planned' AND discharge_coefficient_rw_planned IS NOT NULL then discharge_coefficient_rw_planned
WHEN state = 'ww_current' AND discharge_coefficient_ww_current IS NOT NULL then discharge_coefficient_ww_current
WHEN state = 'ww_planned' AND discharge_coefficient_ww_planned IS NOT NULL then discharge_coefficient_ww_planned
ELSE 0
END as percImperv, -- take from catchment_area instead of default value
CASE
Expand Down