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

Append to `ishape_last` only when date is missing

Otherwise the Fortran executable itself appends to `ishape_last.txt`.
parent 306b7526
No related branches found
No related tags found
No related merge requests found
......@@ -96,11 +96,11 @@ while True:
else:
print("inst_eddies.py: Missing file:", nc_file)
for orient in ["cyclo", "anti"]:
with open(f"SHPC_{orient}/ishape_last.txt", "a") as ishape_last, \
shapefile.Reader(f"SHPC_{orient}/extremum") as shpr:
n_shapes = len(shpr)
ishape_last.write(str(n_shapes - 1) + "\n")
for orient in ["cyclo", "anti"]:
with open(f"SHPC_{orient}/ishape_last.txt", "a") as ishape_last, \
shapefile.Reader(f"SHPC_{orient}/extremum") as shpr:
n_shapes = len(shpr)
ishape_last.write(str(n_shapes - 1) + "\n")
my_date += datetime.timedelta(1)
if my_date > last_date: break
......
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