Skip to content

Commit

Permalink
Added ability of ctem driver to supply alternative input files
Browse files Browse the repository at this point in the history
  • Loading branch information
daminton committed Mar 9, 2022
1 parent 12a318e commit e15622e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions python/ctem/ctem/driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit e15622e

Please sign in to comment.