From 4c5d93f171cf1ee73f78f9e2dd0ebccc465370f8 Mon Sep 17 00:00:00 2001 From: JanvE97 <112380765+JanvE97@users.noreply.github.com> Date: Fri, 27 Dec 2024 11:57:02 +0100 Subject: [PATCH] Update scenario_selector.py - temp fix 0 leadtime --- flash_flood_pipeline/scenario_selection/scenario_selector.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/flash_flood_pipeline/scenario_selection/scenario_selector.py b/flash_flood_pipeline/scenario_selection/scenario_selector.py index 10e6cfa..4de79cf 100644 --- a/flash_flood_pipeline/scenario_selection/scenario_selector.py +++ b/flash_flood_pipeline/scenario_selection/scenario_selector.py @@ -155,9 +155,11 @@ def find_worst_event(self, df_target_hours, district): df_target_hours[most_severe_event.split("_")[1]] == most_severe_event ].first_valid_index() event_time = df_target_hours.loc[most_severe_event_index, "time_reference"] + event_time = max(1, event_time) # temporary fix return most_severe_event, event_time else: - return "0mm_1hr", 0 + # return "0mm_1hr", 0 + return "0mm_1hr", 1 def select_scenarios(self): """