From e15622e7a2f2bb12bd810f68d686c948c133246b Mon Sep 17 00:00:00 2001 From: David Minton Date: Wed, 9 Mar 2022 13:27:29 -0500 Subject: [PATCH] Added ability of ctem driver to supply alternative input files --- python/ctem/ctem/driver.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/python/ctem/ctem/driver.py b/python/ctem/ctem/driver.py index 3c198a56..08999077 100644 --- a/python/ctem/ctem/driver.py +++ b/python/ctem/ctem/driver.py @@ -231,17 +231,18 @@ def run(self): return - def compute_one_interval(self): + def compute_one_interval(self, ctemin="ctem.in"): """ Executes the Fortran code to generate one interval of simulation output. """ # Create crater population and display CTEM progress on screen print(self.user['ncount'], ' Calling FORTRAN routine') try: - p = subprocess.Popen([os.path.join(self.user['workingdir'], 'CTEM')], + p = subprocess.Popen([os.path.join(self.user['workingdir'], 'CTEM'), ctemin], stdout=subprocess.PIPE, stderr=subprocess.PIPE, - universal_newlines=True) + universal_newlines=True, + shell=False) for line in p.stdout: print(line, end='') res = p.communicate()