From 3cd017f4d4b66af9c36aa4ad1ec210538ee7902b Mon Sep 17 00:00:00 2001 From: Lionel GUEZ <guez@lmd.ens.fr> Date: Thu, 20 Jan 2022 22:28:01 +0100 Subject: [PATCH] Polish --- Inst_eddies/inst_eddies.py.in | 2 +- Inst_eddies/inst_eddies_Aviso.py | 6 +++++- Overlap/Tests/short_tests.json | 2 +- Overlap/eddy_graph.sh.in | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Inst_eddies/inst_eddies.py.in b/Inst_eddies/inst_eddies.py.in index 8f79c800..30b65aa4 100644 --- a/Inst_eddies/inst_eddies.py.in +++ b/Inst_eddies/inst_eddies.py.in @@ -89,6 +89,6 @@ if __name__ == "__main__": 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 = input("Enter first date index (integer value):") d = int(d) loop_inst_eddies(args.file, args.bbox, d) diff --git a/Inst_eddies/inst_eddies_Aviso.py b/Inst_eddies/inst_eddies_Aviso.py index 33b05083..9e8eac4d 100644 --- a/Inst_eddies/inst_eddies_Aviso.py +++ b/Inst_eddies/inst_eddies_Aviso.py @@ -34,7 +34,10 @@ argparser.add_argument("-b", "--bbox", nargs=4, type = float, metavar = ("xmin", "xmax", "ymin", "ymax")) args = argparser.parse_args() -# Get the first date from the time coordinate in the NetCDF file: +# Get the first date from the time coordinate in the NetCDF file. (In +# general, we cannot get it from the name of the first file because +# the first file may be the only file, and then there is no template +# option and the file name could not contain the date.) with netCDF4.Dataset(args.first_file) as f: d = f["time"][:].item() @@ -52,6 +55,7 @@ if args.last_date: else: last_date = first_date +# We choose to use d as the first date index. We could choose anything. inst_eddies.loop_inst_eddies(filename_generator(args.first_file, first_date, last_date, args.template, dirname), args.bbox, d) diff --git a/Overlap/Tests/short_tests.json b/Overlap/Tests/short_tests.json index 3b5ba86a..dae5256e 100644 --- a/Overlap/Tests/short_tests.json +++ b/Overlap/Tests/short_tests.json @@ -573,7 +573,7 @@ { "input": "&main_nml /\n", "title": "Read_snapshot_15", - "description": "Read a snapshot from an SHPC with a sufficient number of dates: 15. $tests_old_dir/Extraction_eddies_region_4/SHPC_anti used by the test Read_snapshot has only 2 dates.", + "description": "Read a snapshot from an SHPC on a very small region with a sufficient number of dates: 15. $tests_old_dir/Extraction_eddies_region_4/SHPC_anti used by the test Read_snapshot has only 2 dates.", "commands": [ [ "mkdir", diff --git a/Overlap/eddy_graph.sh.in b/Overlap/eddy_graph.sh.in index eb46ba94..30afb733 100644 --- a/Overlap/eddy_graph.sh.in +++ b/Overlap/eddy_graph.sh.in @@ -5,7 +5,7 @@ if (($# != 2)) then - echo "Usage: eddy_graph.sh N_PROC INPUT_SHPC" + echo "Usage: eddy_graph.sh N_PROC SHPC-directory [SHPC-directory] ..." exit 1 fi -- GitLab