Skip to content

Commit

Permalink
Fix check for QBO plots and clobber
Browse files Browse the repository at this point in the history
  • Loading branch information
justin-richling committed Jan 3, 2024
1 parent 3f54a42 commit 333a1bf
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions scripts/plotting/qbo.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,10 @@ def qbo(adfobj):
print(f"\t QBO plots will be saved here: {plot_locations[0]}")

# Check redo_plot. If set to True: remove old plots, if they already exist:
if (not redo_plot) and plot_loc_ts.is_file():
if (not redo_plot) and plot_loc_ts.is_file() and plot_loc_amp.is_file():
#Add already-existing plot to website (if enabled):
adfobj.debug_log(f"'{plot_loc_ts}' exists and clobber is false.")
adfobj.debug_log(f"'{plot_loc_ts}' and '{plot_loc_amp}' exist and clobber is false.")
adfobj.add_website_data(plot_loc_ts, "QBO", None, season="QBOts", multi_case=True)
#Continue to next iteration:
return
if (not redo_plot) and plot_loc_amp.is_file():
#Add already-existing plot to website (if enabled):
adfobj.debug_log(f"'{plot_loc_amp}' exists and clobber is false.")
adfobj.add_website_data(plot_loc_amp, "QBO", None, season="QBOamp", multi_case=True)
#Continue to next iteration:
return
Expand Down

0 comments on commit 333a1bf

Please sign in to comment.