Add TODOs for getting observed storm impacts

develop
Chris Leaman 6 years ago
parent 976ecc8ebb
commit d00a9d8c21

@ -36,6 +36,8 @@ def volume_change(df_profiles, df_profile_features, zone):
for site_id, df_site in sites:
logger.debug("Calculating change in beach volume at {} in {} zone".format(site_id, zone))
# TODO Change this query to an index
query = "site_id=='{}'&profile_type=='prestorm'".format(site_id)
prestorm_dune_toe_x = df_profile_features.query(query).dune_toe_x.tolist()
prestorm_dune_crest_x = df_profile_features.query(query).dune_crest_x.tolist()
@ -44,7 +46,7 @@ def volume_change(df_profiles, df_profile_features, zone):
prestorm_dune_crest_x = return_first_or_nan(prestorm_dune_crest_x)
prestorm_dune_toe_x = return_first_or_nan(prestorm_dune_toe_x)
# If no dune to has been defined, Dlow = Dhigh. Refer to Sallenger (2000).
# If no dune toe has been defined, Dlow = Dhigh. Refer to Sallenger (2000).
if np.isnan(prestorm_dune_toe_x):
prestorm_dune_toe_x = prestorm_dune_crest_x
@ -145,6 +147,10 @@ def storm_regime(df_observed_impacts):
df_observed_impacts.loc[swash, "storm_regime"] = "swash"
df_observed_impacts.loc[collision, "storm_regime"] = "collision"
# TODO We may be able to identify observed regimes by looking at the change in crest and toe elevation. This would be useful for
# locations where we have overwash and cannot calculate the change in volume correctly. Otherwise, maybe it's better to put it in manually.
return df_observed_impacts

Loading…
Cancel
Save