Skip to content

Commit

Permalink
Fix clawpack#740: file_prefix argument is inconsistently implemented …
Browse files Browse the repository at this point in the history
…in fileio/ascii.py
  • Loading branch information
MohitKambli committed Dec 22, 2024
1 parent f55b884 commit cf07f27
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pyclaw/fileio/ascii.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def write(solution, frame, path, file_prefix='fort', write_aux=False,
f.write("%s file_format\n" % "ascii")

# Write fort.qxxxx file
file_name = 'fort.q%s' % str(frame).zfill(4)
file_name = '%s.q%s' % (file_prefix,str(frame).zfill(4))
with open(os.path.join(path,file_name),'w') as q_file:
for state in solution.states:
write_patch_header(q_file,state.patch)
Expand All @@ -62,7 +62,7 @@ def write(solution, frame, path, file_prefix='fort', write_aux=False,

# Write fort.auxxxxx file if required
if solution.num_aux > 0 and write_aux:
file_name = 'fort.a%s' % str(frame).zfill(4)
file_name = '%s.a%s' % (file_prefix,str(frame).zfill(4))
with open(os.path.join(path,file_name),'w') as aux_file:
for state in solution.states:
write_patch_header(aux_file,state.patch)
Expand Down

0 comments on commit cf07f27

Please sign in to comment.