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

Rename argument directory to SHPC

parent 392c2313
No related branches found
No related tags found
No related merge requests found
......@@ -6,7 +6,7 @@ import numpy as np
from os import path
parser = argparse.ArgumentParser()
parser.add_argument("directory", help = "containing the shapefiles")
parser.add_argument("SHPC")
parser.add_argument("orientation", choices = ["Anticyclones", "Cyclones"])
args = parser.parse_args()
......@@ -18,9 +18,9 @@ n_points = 0
n_missing_speed = np.zeros(3, dtype = int)
n_valid_speed = 0
with shapefile.Reader(path.join(args.directory, "Slice_0", args.orientation,
with shapefile.Reader(path.join(args.SHPC, "Slice_0", args.orientation,
"extremum")) as extremum, \
shapefile.Reader(path.join(args.directory, "Slice_0", args.orientation,
shapefile.Reader(path.join(args.SHPC, "Slice_0", args.orientation,
"outermost_contour")) as outermost_contour:
n_extr = len(extremum)
......@@ -91,7 +91,7 @@ n_max_speed = 0
n_points_valid = 0
n_points = 0
with shapefile.Reader(path.join(args.directory, "Slice_0", args.orientation,
with shapefile.Reader(path.join(args.SHPC, "Slice_0", args.orientation,
"max_speed_contour")) as max_speed_contour:
for shape_rec in max_speed_contour:
l = len(shape_rec.shape.points)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment