Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trailing zeros in the names of output files #36

Open
siddharthabishnu opened this issue Jul 27, 2022 · 2 comments
Open

Trailing zeros in the names of output files #36

siddharthabishnu opened this issue Jul 27, 2022 · 2 comments

Comments

@siddharthabishnu
Copy link

siddharthabishnu commented Jul 27, 2022

Visualization softwares like VisIt or Paraview do not load the output files in the correct order if there are trailing zeros in the file names. Since the timestamp in the output files of SELF are formatted as DDDDHHMMSSmmm (0-padded day, hour, minute, second, millisecond), any output interval being an integral number of seconds will result in this issue. To eliminate the trailing zeros, one can either modify the relevant lines of code specifying the output file names in SELF, or rename the output files during post-processing (e.g. by using a bash script) before loading these files in VisIt or Paraview for visualization.

@fluidnumerics-joe
Copy link
Member

Thanks @siddharthabishnu for opening this issue. I think that changing the file names in SELF to have a zero padded "file counter", rather than the timestamp, would be better. To keep track of time, in the tecplot files, I think we can add SOLUTIONTIME to the header for each zone.

In the HDF5 files, we can also do something similar, and add a simulation time attribute to each file.

@siddharthabishnu
Copy link
Author

@fluidnumerics-joe, I do believe that will take care of the issue. In my codes, I typically name the output files to contain the time step counter formatted in Fortran as Ix.x where x is the number of digits being padded (only) with leading zeros, instead of the timestamp, and since it's always in ascending order, I have never encountered this issue. But then again, I do not provide the simulation time, like you have been doing. But as long as you do it somewhere e.g. in the header of the output files, it's good enough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants