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

Rename variable `my_pc` to t0

parent 2de1e45d
No related branches found
No related tags found
No related merge requests found
...@@ -19,7 +19,7 @@ import csv ...@@ -19,7 +19,7 @@ import csv
def process_1_file(bbox, nco_instance, nc_file, cropped_fname, unpacked_fname, def process_1_file(bbox, nco_instance, nc_file, cropped_fname, unpacked_fname,
inst_eddies_exe, d, my_slice, writer): inst_eddies_exe, d, my_slice, writer):
my_pc = time.perf_counter() t0 = time.perf_counter()
if bbox: if bbox:
xmin, xmax, ymin, ymax = bbox xmin, xmax, ymin, ymax = bbox
...@@ -35,12 +35,12 @@ def process_1_file(bbox, nco_instance, nc_file, cropped_fname, unpacked_fname, ...@@ -35,12 +35,12 @@ def process_1_file(bbox, nco_instance, nc_file, cropped_fname, unpacked_fname,
nc_file = cropped_fname nc_file = cropped_fname
nco_instance.ncpdq(nc_file, output = unpacked_fname, options = ["--unpack"]) nco_instance.ncpdq(nc_file, output = unpacked_fname, options = ["--unpack"])
elapsed_NCO = time.perf_counter() - my_pc elapsed_NCO = time.perf_counter() - t0
my_pc = time.perf_counter() t0 = time.perf_counter()
subprocess.run([inst_eddies_exe, unpacked_fname, unpacked_fname], subprocess.run([inst_eddies_exe, unpacked_fname, unpacked_fname],
check = True, input = f"&dates_nml date = {d}, " check = True, input = f"&dates_nml date = {d}, "
f"slice = {my_slice}/\n", text = True) f"slice = {my_slice}/\n", text = True)
elapsed_Fortran = time.perf_counter() - my_pc elapsed_Fortran = time.perf_counter() - t0
writer.writerow([d, elapsed_NCO, elapsed_Fortran]) writer.writerow([d, elapsed_NCO, elapsed_Fortran])
......
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