From 5e2cfccb3492dd17ba3ac571850aeda04d2ddb35 Mon Sep 17 00:00:00 2001 From: Dan Howe Date: Mon, 9 May 2022 12:55:16 +0200 Subject: [PATCH] Don't process omitted profiles --- probabilistic-analysis/probabilistic_assessment.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/probabilistic-analysis/probabilistic_assessment.py b/probabilistic-analysis/probabilistic_assessment.py index 57901ba..9315829 100644 --- a/probabilistic-analysis/probabilistic_assessment.py +++ b/probabilistic-analysis/probabilistic_assessment.py @@ -438,6 +438,12 @@ def process(beach_name, beach_scenario, n_runs, start_year, end_year, # Loop through profiles dff = df_in[df_in['beach'] == beach_name] + + # Remove omitted profiles + dff = pd.merge( + pd.DataFrame(omit), dff, how='outer', + indicator='source').query('source!="both"').drop(columns='source') + pbar_profile = tqdm(dff.iterrows(), total=dff.shape[0], leave=False) for i, prof in pbar_profile: