From 1a04f5a359c6058ebad02474c41c2736e927ccbc Mon Sep 17 00:00:00 2001 From: "Edgar P. Burkhart" Date: Tue, 29 Mar 2022 10:05:35 +0200 Subject: [PATCH 1/5] Updated swash path for Huascaran server --- swash/config-nb.ini | 2 +- swash/config.ini | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/swash/config-nb.ini b/swash/config-nb.ini index 66c13c0..11f2cc2 100644 --- a/swash/config-nb.ini +++ b/swash/config-nb.ini @@ -3,7 +3,7 @@ out=../data/out_nb [swash] input=sws/SPEC_buoy_nb.sws -path=/opt/swash +path=/data/code/swash out=out/spec_nb mpi=8 diff --git a/swash/config.ini b/swash/config.ini index 39792c7..9bf00a7 100644 --- a/swash/config.ini +++ b/swash/config.ini @@ -3,7 +3,7 @@ out=../data/out [swash] input=sws/SPEC_buoy.sws -path=/opt/swash +path=/data/code/swash out=out/spec mpi=8 From ff3355477857986581d321f50a24fb0c8f6d665e Mon Sep 17 00:00:00 2001 From: "Edgar P. Burkhart" Date: Tue, 29 Mar 2022 10:47:01 +0200 Subject: [PATCH 2/5] Update inp_post for parent mkdir --- swash/config-nb.ini | 2 +- swash/config.ini | 2 +- swash/processing/sws_npz.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/swash/config-nb.ini b/swash/config-nb.ini index 11f2cc2..33812d4 100644 --- a/swash/config-nb.ini +++ b/swash/config-nb.ini @@ -8,7 +8,7 @@ out=out/spec_nb mpi=8 [post] -inp=inp_post +inp=inp_post/spec_nb compare=inp_post_nb out=out_post #nperseg=1024 diff --git a/swash/config.ini b/swash/config.ini index 9bf00a7..b7947c4 100644 --- a/swash/config.ini +++ b/swash/config.ini @@ -8,7 +8,7 @@ out=out/spec mpi=8 [post] -inp=inp_post +inp=inp_post/spec compare=inp_post_nb out=out_post #nperseg=1024 diff --git a/swash/processing/sws_npz.py b/swash/processing/sws_npz.py index 3c971ab..516e3a5 100644 --- a/swash/processing/sws_npz.py +++ b/swash/processing/sws_npz.py @@ -39,7 +39,7 @@ var = { "vz": rsws.read_scalar_lay, } -inp.mkdir(exist_ok=True) +inp.mkdir(parents=True, exist_ok=True) with ThreadPool() as pool: log.info("Converting all data") pool.map( From ee3f7da38a0ef43b8e36dfa4ad17c5c550a7720e Mon Sep 17 00:00:00 2001 From: "Edgar P. Burkhart" Date: Tue, 29 Mar 2022 10:48:46 +0200 Subject: [PATCH 3/5] Removed plot section in config --- swash/config-nb.ini | 3 --- swash/config.ini | 3 --- swash/processing/animate.py | 2 +- swash/processing/layers.py | 2 +- 4 files changed, 2 insertions(+), 8 deletions(-) diff --git a/swash/config-nb.ini b/swash/config-nb.ini index 33812d4..fd56912 100644 --- a/swash/config-nb.ini +++ b/swash/config-nb.ini @@ -15,6 +15,3 @@ out=out_post dt=0.25 x0=-1250 t0=180 - -[plot] -out=out_plt diff --git a/swash/config.ini b/swash/config.ini index b7947c4..1a58cea 100644 --- a/swash/config.ini +++ b/swash/config.ini @@ -15,6 +15,3 @@ out=out_post dt=0.25 x0=-1250 t0=180 - -[plot] -out=out_plt diff --git a/swash/processing/animate.py b/swash/processing/animate.py index 1162399..c8d1eb1 100644 --- a/swash/processing/animate.py +++ b/swash/processing/animate.py @@ -21,7 +21,7 @@ config.read(args.config) inp = pathlib.Path(config.get("post", "inp")) root = pathlib.Path(config.get("swash", "out")) -out = pathlib.Path(config.get("plot", "out")) +out = pathlib.Path(config.get("post", "out")) out.mkdir(exist_ok=True) diff --git a/swash/processing/layers.py b/swash/processing/layers.py index e2d2f05..4b4172a 100644 --- a/swash/processing/layers.py +++ b/swash/processing/layers.py @@ -21,7 +21,7 @@ config.read(args.config) inp = pathlib.Path(config.get("post", "inp")) root = pathlib.Path(config.get("swash", "out")) -out = pathlib.Path(config.get("plot", "out")) +out = pathlib.Path(config.get("post", "out")) out.mkdir(exist_ok=True) From 5e26d5de02b39a5844afc5af346b007728149598 Mon Sep 17 00:00:00 2001 From: "Edgar P. Burkhart" Date: Tue, 29 Mar 2022 10:50:44 +0200 Subject: [PATCH 4/5] Updated output in sws_npz --- swash/processing/sws_npz.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/swash/processing/sws_npz.py b/swash/processing/sws_npz.py index 516e3a5..8db2eda 100644 --- a/swash/processing/sws_npz.py +++ b/swash/processing/sws_npz.py @@ -32,8 +32,8 @@ var = { "dep": rsws.read_scalar, "botl": rsws.read_const, "watl": rsws.read_scalar, - "vel": rsws.read_vector, - "press": rsws.read_scalar, + "pressk": rsws.read_scalar_lay, + "nhprsk": rsws.read_scalar_lay, "zk": rsws.read_scalar_lay, "velk": rsws.read_vector_lay, "vz": rsws.read_scalar_lay, From e83c7507fff070c588b4c52c73f354a13fc1d56d Mon Sep 17 00:00:00 2001 From: "Edgar P. Burkhart" Date: Tue, 29 Mar 2022 10:52:42 +0200 Subject: [PATCH 5/5] Fixed mkdir position in sws_npz --- swash/processing/sws_npz.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/swash/processing/sws_npz.py b/swash/processing/sws_npz.py index 8db2eda..607066b 100644 --- a/swash/processing/sws_npz.py +++ b/swash/processing/sws_npz.py @@ -22,6 +22,7 @@ config.read(args.config) sws_out = pathlib.Path(config.get("swash", "out")) inp = pathlib.Path(config.get("post", "inp")) +inp.mkdir(parents=True, exist_ok=True) log.info(f"Reading swash output from '{sws_out}'") rsws = ReadSwash() @@ -39,7 +40,6 @@ var = { "vz": rsws.read_scalar_lay, } -inp.mkdir(parents=True, exist_ok=True) with ThreadPool() as pool: log.info("Converting all data") pool.map(