diff --git a/Common/util_detect_eddies.py b/Common/util_eddies.py similarity index 100% rename from Common/util_detect_eddies.py rename to Common/util_eddies.py diff --git a/Inst_eddies/Analysis/eddy_dump.py b/Inst_eddies/Analysis/eddy_dump.py index 96e35119a9b60c0a6468abbcbe87df8f9468e874..363ab3f83cc397482dd20b4b41c64a0cb1b03c88 100755 --- a/Inst_eddies/Analysis/eddy_dump.py +++ b/Inst_eddies/Analysis/eddy_dump.py @@ -11,7 +11,7 @@ from os import path import pprint import sys sys.path.append(path.join(sys.path[0], "../../Common")) -import util_detect_eddies +import util_eddies parser = argparse.ArgumentParser() parser.add_argument("directory", help = "containing the three shapefiles") @@ -21,7 +21,7 @@ reply = input("days_1950, eddy_index = ? ").split(",") days_1950 = int(reply[0]) eddy_index = int(reply[1]) -readers, d_init, ishape_last = util_detect_eddies.open_shpc(args.directory) +readers, d_init, ishape_last = util_eddies.open_shpc(args.directory) # Find ishape: if ishape_last is None: @@ -33,8 +33,7 @@ if ishape_last is None: else: sys.exit("Eddy with this date and index not found") else: - ishape = util_detect_eddies.comp_ishape(d_init, ishape_last, days_1950, - eddy_index) + ishape = util_eddies.comp_ishape(d_init, ishape_last, days_1950, eddy_index) for layer in ["extremum", "outermost_contour", "max_speed_contour"]: shapeRec = readers[layer].shapeRecord(ishape) diff --git a/Inst_eddies/Analysis/plot_eddy_contours.py b/Inst_eddies/Analysis/plot_eddy_contours.py index 9801231c4e7b693270dd853b77902551798cba53..103c71e83c76802c46cbb18b6741f718c181051a 100755 --- a/Inst_eddies/Analysis/plot_eddy_contours.py +++ b/Inst_eddies/Analysis/plot_eddy_contours.py @@ -28,7 +28,7 @@ from matplotlib import animation, patches import f90nml import sys sys.path.append(path.join(sys.path[0], "../../Common")) -import util_detect_eddies +import util_eddies def select_ishapes(d, d_init, ishape_last, reader_extr, window = None): """Select ishapes at date d and in window. @@ -52,7 +52,7 @@ def select_ishapes(d, d_init, ishape_last, reader_extr, window = None): shape_rec_extr = reader_extr.shapeRecord(ishape) points = shape_rec_extr.shape.points[0] - if util_detect_eddies.in_window(points, window): + if util_eddies.in_window(points, window): ishape_list.append(ishape) return ishape_list @@ -263,8 +263,7 @@ if __name__ == "__main__": lon_mask = np.ones(len(longitude), dtype = bool) lat_mask = np.ones(len(latitude), dtype = bool) - readers, d_init, ishape_last \ - = util_detect_eddies.open_shpc(args.shpc_dir) + readers, d_init, ishape_last = util_eddies.open_shpc(args.shpc_dir) if ishape_last is None: print("We will use all the shapes.") diff --git a/Overlap/Analysis/plot_traj.py b/Overlap/Analysis/plot_traj.py index 6166fa10696b6a9328398ba11ee77924fab2d2a5..15b35c41fee76f30ff1dabc72a1b78eccae1f0b0 100755 --- a/Overlap/Analysis/plot_traj.py +++ b/Overlap/Analysis/plot_traj.py @@ -98,7 +98,7 @@ if __name__ == "__main__": import sys from os import path sys.path.append(path.join(sys.path[0], "../../Common")) - import util_detect_eddies + import util_eddies import time parser = argparse.ArgumentParser(description = __doc__) @@ -142,7 +142,7 @@ if __name__ == "__main__": for G in [G_cyclo, G_anti]: for n, d in G.nodes.items(): - if util_detect_eddies.in_window(d["coordinates"], args.window): + if util_eddies.in_window(d["coordinates"], args.window): if "component" not in d: report_graph.add_component(G, n) if args.time: