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

Polish

parent c766aab9
No related branches found
No related tags found
No related merge requests found
...@@ -89,6 +89,6 @@ if __name__ == "__main__": ...@@ -89,6 +89,6 @@ if __name__ == "__main__":
argparser.add_argument("-b", "--bbox", nargs=4, type = float, argparser.add_argument("-b", "--bbox", nargs=4, type = float,
metavar = ("xmin", "xmax", "ymin", "ymax")) metavar = ("xmin", "xmax", "ymin", "ymax"))
args = argparser.parse_args() args = argparser.parse_args()
d = input("Enter first date (integer value):") d = input("Enter first date index (integer value):")
d = int(d) d = int(d)
loop_inst_eddies(args.file, args.bbox, d) loop_inst_eddies(args.file, args.bbox, d)
...@@ -34,7 +34,10 @@ argparser.add_argument("-b", "--bbox", nargs=4, type = float, ...@@ -34,7 +34,10 @@ argparser.add_argument("-b", "--bbox", nargs=4, type = float,
metavar = ("xmin", "xmax", "ymin", "ymax")) metavar = ("xmin", "xmax", "ymin", "ymax"))
args = argparser.parse_args() 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: with netCDF4.Dataset(args.first_file) as f:
d = f["time"][:].item() d = f["time"][:].item()
...@@ -52,6 +55,7 @@ if args.last_date: ...@@ -52,6 +55,7 @@ if args.last_date:
else: else:
last_date = first_date 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, inst_eddies.loop_inst_eddies(filename_generator(args.first_file, first_date,
last_date, args.template, last_date, args.template,
dirname), args.bbox, d) dirname), args.bbox, d)
...@@ -573,7 +573,7 @@ ...@@ -573,7 +573,7 @@
{ {
"input": "&main_nml /\n", "input": "&main_nml /\n",
"title": "Read_snapshot_15", "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": [ "commands": [
[ [
"mkdir", "mkdir",
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
if (($# != 2)) if (($# != 2))
then then
echo "Usage: eddy_graph.sh N_PROC INPUT_SHPC" echo "Usage: eddy_graph.sh N_PROC SHPC-directory [SHPC-directory] ..."
exit 1 exit 1
fi fi
......
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