import pandas as pd
# Got it from this table.
# https://www.cityoflewiston.org/DocumentCenter/View/1816/SCS-Type-II-Distribution---100-year-PDF?bidId=
SCS_TYPEII = [
(0, 0.00000),
(0.25, 0.00330),
(0.5, 0.00330),
(0.75, 0.00340),
(1, 0.00330),
(1.25, 0.00330),
(1.5, 0.00340),
(1.75, 0.00330),
(2, 0.00330),
(2.25, 0.00340),
(2.5, 0.00330),
(2.75, 0.00330),
(3, 0.00340),
(3.25, 0.00330),
(3.5, 0.00330),
(3.75, 0.00340),
(4, 0.00330),
(4.25, 0.00330),
(4.5, 0.00340),
(4.75, 0.00330),
(5, 0.00330),
(5.25, 0.00340),
(5.5, 0.00330),
(5.75, 0.00330),
(6, 0.00340),
(6.25, 0.00330),
(6.5, 0.00330),
(6.75, 0.00340),
(7, 0.00330),
(7.25, 0.00330),
(7.5, 0.00340),
(7.75, 0.00660),
(8, 0.00670),
(8.25, 0.00670),
(8.5, 0.00660),
(8.75, 0.00670),
(9, 0.00670),
(9.25, 0.01000),
(9.5, 0.01000),
(9.75, 0.01000),
(10, 0.01000),
(10.25, 0.01000),
(10.5, 0.01000),
(10.75, 0.02000),
(11, 0.02000),
(11.25, 0.03000),
(11.5, 0.05000),
(11.75, 0.06000),
(12, 0.12000),
(12.25, 0.12000),
(12.5, 0.06000),
(12.75, 0.05000),
(13, 0.03000),
(13.25, 0.02000),
(13.5, 0.02000),
(13.75, 0.01000),
(14, 0.01000),
(14.25, 0.01000),
(14.5, 0.01000),
(14.75, 0.01000),
(15, 0.01000),
(15.25, 0.00660),
(15.5, 0.00670),
(15.75, 0.00670),
(16, 0.00660),
(16.25, 0.00670),
(16.5, 0.00670),
(16.75, 0.00330),
(17, 0.00330),
(17.25, 0.00340),
(17.5, 0.00330),
(17.75, 0.00330),
(18, 0.00340),
(18.25, 0.00330),
(18.5, 0.00330),
(18.75, 0.00340),
(19, 0.00330),
(19.25, 0.00330),
(19.5, 0.00340),
(19.75, 0.00330),
(20, 0.00330),
(20.25, 0.00340),
(20.5, 0.00330),
(20.75, 0.00330),
(21, 0.00340),
(21.25, 0.00330),
(21.5, 0.00330),
(21.75, 0.00340),
(22, 0.00330),
(22.25, 0.00330),
(22.5, 0.00340),
(22.75, 0.00330),
(23, 0.00330),
(23.25, 0.00340),
(23.5, 0.00330),
(23.75, 0.00330),
(24, 0.00340)
]
df_24 = pd.DataFrame(SCS_TYPEII, columns=["time_hr", "incremental"])
#df_24["incremental"] = df_24["cumulative"].diff().fillna(0)
def make_scs_storm(total_depth_in: float):
"""
total_depth_in : Depth of storm in inches (optional). If None, keeps values as fractions.
"""
storm = df_24.copy() # Local copy
# The decimals are imprecise/rounded, so the total might not match the total depth specified.
if total_depth_in is not None:
storm["incremental_in"] = storm["incremental"] * total_depth_in
return storm.reset_index(drop=True)