|
|
|
@ -83,8 +83,12 @@ def plot_profiles(profile_name, csv_output_dir, graph_loc, ch_limits, delta_vol,
|
|
|
|
|
# Set figure dimensions based on beach size
|
|
|
|
|
vertical_exag = 8
|
|
|
|
|
m_per_inch = 8
|
|
|
|
|
fig_h = profiles.dropna().values.max() / m_per_inch * vertical_exag
|
|
|
|
|
fig_w = (profiles.index.max() - ch_min) / m_per_inch
|
|
|
|
|
try:
|
|
|
|
|
fig_h = profiles.dropna().values.max() / m_per_inch * vertical_exag
|
|
|
|
|
fig_w = (profiles.index.max() - ch_min) / m_per_inch
|
|
|
|
|
except ValueError:
|
|
|
|
|
fig_h = 5
|
|
|
|
|
fig_w = 10
|
|
|
|
|
|
|
|
|
|
if scale_figures:
|
|
|
|
|
fig, ax = plt.subplots(figsize=(fig_w, fig_h))
|
|
|
|
@ -160,7 +164,10 @@ def calculate_volumes(profile_name, survey_date, csv_output_dir, ch_limits, volu
|
|
|
|
|
# Get Nielsen erosion volumes
|
|
|
|
|
chainage = profiles.loc[:, current_date].dropna().index
|
|
|
|
|
elevation = profiles.loc[:, current_date].dropna().values
|
|
|
|
|
volume = nielsen_volumes.volume_available(chainage, elevation, ch_min)
|
|
|
|
|
try:
|
|
|
|
|
volume = nielsen_volumes.volume_available(chainage, elevation, ch_min)
|
|
|
|
|
except ValueError:
|
|
|
|
|
volume = np.nan
|
|
|
|
|
|
|
|
|
|
# Update spreadsheet
|
|
|
|
|
volumes.loc[profile_name, 'Volume_' + survey_date] = volume
|
|
|
|
|