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

Allow the module to be imported

So we get the function without executing the rest.
parent bed3c9b0
No related branches found
No related tags found
No related merge requests found
......@@ -84,13 +84,14 @@ def loop_inst_eddies(files, bbox, d):
os.remove("unpacked.nc")
if bbox: os.remove("cropped.nc")
argparser = argparse.ArgumentParser()
argparser.add_argument("file", nargs = "+",
help = "NetCDF file containing SSH and velocity at a "
"single date")
argparser.add_argument("-b", "--bbox", nargs=4, type = float,
metavar = ("xmin", "xmax", "ymin", "ymax"))
args = argparser.parse_args()
d = input("Enter first date (integer value):")
d = int(d)
loop_inst_eddies(args.file, args.bbox, d)
if __name__ == "__main__":
argparser = argparse.ArgumentParser()
argparser.add_argument("file", nargs = "+",
help = "NetCDF file containing SSH and velocity at a "
"single date")
argparser.add_argument("-b", "--bbox", nargs=4, type = float,
metavar = ("xmin", "xmax", "ymin", "ymax"))
args = argparser.parse_args()
d = input("Enter first date (integer value):")
d = int(d)
loop_inst_eddies(args.file, args.bbox, d)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment