Skip to content

Commit

Permalink
Avoid never_average, never_average
Browse files Browse the repository at this point in the history
When generating the MARBL diagnostics file with diag_mode=minimal, some
variables were being listed as "never_average, never_average" (and others were
"medium_average, never_average"); we only need to add never_average to the
freq_op list if that list is empty.
  • Loading branch information
mnlevy1981 committed May 10, 2024
1 parent a3d26cf commit 1e4714a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion MARBL_tools/MARBL_generate_diagnostics_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def generate_diagnostics_file(MARBL_diagnostics, diagnostics_file_out, diag_mode
for freq, op, dm in zip(frequencies, operators, diag_modes):
if diag_mode_in >= diag_mode_opts.index(dm):
freq_op.append(freq + '_' + op)
else:
elif not freq_op: # Only append "never_{op}" if freq_op is empty list
freq_op.append('never_' + op)
fout.write("%s : %s\n" % (diag_name, ", ".join(freq_op)))
fout.close()
Expand Down

0 comments on commit 1e4714a

Please sign in to comment.