diff --git a/src/pyclaw/fileio/ascii.py b/src/pyclaw/fileio/ascii.py index 7d979db9..39e3cb6e 100644 --- a/src/pyclaw/fileio/ascii.py +++ b/src/pyclaw/fileio/ascii.py @@ -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) @@ -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)