From d78a30bd99c2352ba62d0abdae9442728e255249 Mon Sep 17 00:00:00 2001 From: DavidChoi76 Date: Mon, 10 Dec 2018 21:00:39 -0500 Subject: [PATCH] update simulatio.py to get output without simulation --- pysumma/Simulation.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pysumma/Simulation.py b/pysumma/Simulation.py index b892e095..40045290 100644 --- a/pysumma/Simulation.py +++ b/pysumma/Simulation.py @@ -101,6 +101,7 @@ def execute(self, run_option, run_suffix, specworker_img = None): " -v {}:{}".format(self.output_path.filepath, self.output_path.filepath) + \ " {} -p never -s {} -m {}".format(self.executable, self.run_suffix, self.filepath) # run shell script in python and print output + print(cmd) cmd = shlex.split(cmd) p = subprocess.Popen(cmd, stdout=subprocess.PIPE) output = p.communicate()[0].decode('utf-8') @@ -178,8 +179,7 @@ def execute(self, run_option, run_suffix, specworker_img = None): def get_output(self, version, output_prefix=None, run_suffix=None): if version == "cuahsi_sopron": out_file_path = self.base_dir + '/' + self.output_path.filepath.split('/')[1] + '/' + \ - output_prefix + '_output_' + \ - self.run_suffix + 'timestep.nc' + output_prefix + '_output_' + 'timestep.nc' xr_output = xr.open_dataset(out_file_path) elif version == "cuahsi_master": out_file_path = self.base_dir + self.output_path.value.split('>')[1] + \