Skip to content
Snippets Groups Projects
Commit 306b7526 authored by Lionel GUEZ's avatar Lionel GUEZ
Browse files

Write times only when they are defined

(Writing times when the Fortran executable did not run was justified
by the existence of `elapsed_cat`.)
parent e5675bf5
No related branches found
No related tags found
Loading
......@@ -92,9 +92,9 @@ while True:
os.remove("h.nc")
os.remove("uv.nc")
writer.writerow([my_date, elapsed_NCO, elapsed_Fortran])
else:
print("inst_eddies.py: Missing file:", nc_file)
elapsed_NCO, elapsed_Fortran = - 1, - 1
for orient in ["cyclo", "anti"]:
with open(f"SHPC_{orient}/ishape_last.txt", "a") as ishape_last, \
......@@ -102,7 +102,6 @@ while True:
n_shapes = len(shpr)
ishape_last.write(str(n_shapes - 1) + "\n")
writer.writerow([my_date, elapsed_NCO, elapsed_Fortran])
my_date += datetime.timedelta(1)
if my_date > last_date: break
basename = my_date.strftime(args.template)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment