[FLASH-BUGS] Possible bug in flash4-beta particle I/O
Nathan Goldbaum
goldbaum at ucolick.org
Tue Mar 20 19:29:30 CDT 2012
Dear flash4-bugs,
I think I've discovered a bug in the way particle files are written in flash4-beta. Basically, plotfiles will always be written one timestep before particle files. When Driver_evolveFlash calls IO_output, it passes dr_nstep+1 as the step number. This causes plotfiles to be written one step before io_nextPlotFileStep. This is correct, since plotfiles are zero indexed.
However, IO_writeParticles does not receive the current step from IO_output, instead it calls Driver_getNStep. I think the following should be inserted on line 113 of IO_writeParticles.F90, right after the call to Driver_getNStep:
nstep = nstep + 1
This will ensure that particle files and plotfiles are written concurrently if PlotFileIntervalStep is set to the same value as ParticleFileIntervalStep in the flash.par file.
I'm not 100% sure that this is correct, but patching my IO_writeParticles as I've indicated above does correctly sync up the outputs of particle files and plot files. Please let me know if I've made a mistake here.
Best,
Nathan Goldbaum
Graduate Student
Astronomy & Astrophysics, UCSC
goldbaum at ucolick.org
http://www.ucolick.org/~goldbaum
More information about the flash-bugs
mailing list