I am running several Montecarlo simulations with different random seeds and storing the results on files to analyze them later. As I need to run quite a lot of simulations to ensure statistical rigor, I was wondering if it is possible to create a do loop from 1 to N and make every run of the loop store the results in a different file (Results0001.dat,Results002.dat,...,ResultsN.dat), as I don't know if the Write structure allows it.
Asked
Active
Viewed 36 times
0
-
Please try searching for the answer first next time. This was asked many times before. – Vladimir F Героям слава Mar 08 '17 at 21:12
-
I agree that this is a duplicate of the question that @VladimirF identifies. But I don't think that the duplicate question title is very good, so I've changed it to something that OP, and askers of the other duplicates, might more easily have found. – High Performance Mark Mar 09 '17 at 17:17
-
@HighPerformanceMark In principle I agree. But also we have many others where the title varies somewhat so one can find one of the other combinations http://stackoverflow.com/questions/16291270/looping-over-variable-file-names?noredirect=1&lq=1 http://stackoverflow.com/questions/13048441/writing-files-in-fortran-with-increasing-numbers?noredirect=1&lq=1 http://stackoverflow.com/questions/13250123/reading-multiple-files-in-fortran?noredirect=1&lq=1 http://stackoverflow.com/questions/22694626/how-to-name-output-files-making-it-related-to-a-variable-in-fortran?noredirect=1&lq=1 and many more. – Vladimir F Героям слава Mar 09 '17 at 17:45
-
Hello, this is the original poster. First of all, thanking you, as it is true that those questions already adressed my issue. I am very sorry for creating an unnecessary thread, but I did try searching for my issue around the website and couldn't find it, although maybe I tried to find it using very specific sentences and thus nothing turned up. I am not very familiar with this website nor very proficcient with FORTRAN. Once again, thank you for your help and i apologize for wasting your time. – P.Martín Mar 09 '17 at 21:51
-
1You didn't waste too much of our time. We can find the duplicate for this one in a few seconds. Don't worry. – Vladimir F Героям слава Mar 09 '17 at 22:16