|
|
@ -624,12 +624,6 @@ def process(beach_name, beach_scenario, n_runs, start_year, end_year,
|
|
|
|
float_format='%g')
|
|
|
|
float_format='%g')
|
|
|
|
|
|
|
|
|
|
|
|
if output_diagnostics:
|
|
|
|
if output_diagnostics:
|
|
|
|
# Generate basename for diagnostic files
|
|
|
|
|
|
|
|
diag_basename = (f"{beach_scenario} "
|
|
|
|
|
|
|
|
f"{profile_type} "
|
|
|
|
|
|
|
|
f"block-{prof['block']} "
|
|
|
|
|
|
|
|
f"profile-{prof['profile']}")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Save probabilistic diagnostics
|
|
|
|
# Save probabilistic diagnostics
|
|
|
|
year_idx = year == years
|
|
|
|
year_idx = year == years
|
|
|
|
|
|
|
|
|
|
|
@ -690,8 +684,10 @@ def process(beach_name, beach_scenario, n_runs, start_year, end_year,
|
|
|
|
0, 100, num=n_runs + 2)[1:-1]
|
|
|
|
0, 100, num=n_runs + 2)[1:-1]
|
|
|
|
dump_df = dump_df.set_index('Encounter probability (%)')
|
|
|
|
dump_df = dump_df.set_index('Encounter probability (%)')
|
|
|
|
|
|
|
|
|
|
|
|
csv_name = os.path.join('diagnostics',
|
|
|
|
csv_name = os.path.join(
|
|
|
|
diag_basename + '.csv')
|
|
|
|
'diagnostics',
|
|
|
|
|
|
|
|
'{} {} {}.csv'.format(beach_scenario, year,
|
|
|
|
|
|
|
|
profile_type))
|
|
|
|
dump_df = dump_df[::100] # Only output every 100th row
|
|
|
|
dump_df = dump_df[::100] # Only output every 100th row
|
|
|
|
dump_df.to_csv(csv_name, float_format='%g')
|
|
|
|
dump_df.to_csv(csv_name, float_format='%g')
|
|
|
|
|
|
|
|
|
|
|
@ -720,8 +716,9 @@ def process(beach_name, beach_scenario, n_runs, start_year, end_year,
|
|
|
|
y=0.92)
|
|
|
|
y=0.92)
|
|
|
|
|
|
|
|
|
|
|
|
if output_diagnostics:
|
|
|
|
if output_diagnostics:
|
|
|
|
figname = os.path.join('diagnostics',
|
|
|
|
figname = os.path.join(
|
|
|
|
diag_basename + ' scatter.png')
|
|
|
|
'diagnostics',
|
|
|
|
|
|
|
|
f'{beach_scenario} {profile_type} scatter.png')
|
|
|
|
plt.savefig(figname, bbox_inches='tight', dpi=300)
|
|
|
|
plt.savefig(figname, bbox_inches='tight', dpi=300)
|
|
|
|
plt.close(fig)
|
|
|
|
plt.close(fig)
|
|
|
|
|
|
|
|
|
|
|
@ -828,8 +825,9 @@ def process(beach_name, beach_scenario, n_runs, start_year, end_year,
|
|
|
|
a.spines['top'].set_visible(False)
|
|
|
|
a.spines['top'].set_visible(False)
|
|
|
|
a.spines['right'].set_visible(False)
|
|
|
|
a.spines['right'].set_visible(False)
|
|
|
|
|
|
|
|
|
|
|
|
figname = os.path.join('diagnostics',
|
|
|
|
figname = os.path.join(
|
|
|
|
diag_basename + ' timeseries.png')
|
|
|
|
'diagnostics',
|
|
|
|
|
|
|
|
f'{beach_scenario} {profile_type} timeseries.png')
|
|
|
|
plt.savefig(figname, bbox_inches='tight', dpi=300)
|
|
|
|
plt.savefig(figname, bbox_inches='tight', dpi=300)
|
|
|
|
plt.close(fig)
|
|
|
|
plt.close(fig)
|
|
|
|
|
|
|
|
|
|
|
|