From bbe86b231a82ce7e913597e866704aaedcbe20a7 Mon Sep 17 00:00:00 2001 From: Chris Leaman Date: Mon, 4 Mar 2019 16:33:55 +1100 Subject: [PATCH] Fix swash regime not detected if there is no dune toe --- src/analysis/forecasted_storm_impacts.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/analysis/forecasted_storm_impacts.py b/src/analysis/forecasted_storm_impacts.py index 2292598..acfbffe 100644 --- a/src/analysis/forecasted_storm_impacts.py +++ b/src/analysis/forecasted_storm_impacts.py @@ -74,6 +74,13 @@ def storm_regime(df_forecasted_impacts): "storm_regime", ] = "inundation" + # If there is no dune toe defined, R_high should be compared to dune crest to determine if swash or overwash. + df_forecasted_impacts.loc[ + (df_forecasted_impacts.dune_toe_z.isnull()) + & (df_forecasted_impacts.R_high <= df_forecasted_impacts.dune_crest_z), + "storm_regime", + ] = "swash" + return df_forecasted_impacts