JollyJoystickJester
Programmer
Hello,
I'm new to this forum. I was wondering if anyone can tell me if it is possible and if they know how to create what I call a pseudo array of output files.
Here is the pseudo code:
Do i=1,15
Do j=1,3
open(unit=(10+i*j),file="i-j.txt",status="new")
EndDo
EndDo
Basically what I am trying to do is create a 15x3 array of files taking up units 11-55. The file names would be "1-1.txt", "2-1.txt",... "15-1.txt", "1-2.txt", "2-2.txt",... "15-2.txt", "1-3.txt", "2-3.txt",... "15-3.txt"
Although my purposes for doing this are probably irrelevent, I'll go over it briefly. I am storing three different "properties" of fifteen different "bodies" over time. There are 5000 time steps and I need a separate file for each property for each body, so I can see the change of each individual property over time.
Any help would be greatly appreciated
P.S. I have an idea of what I need to do. I know that I need to somehow convert the integers in the Do loop to strings to make them part of the file name. I unfortunately have no idea how to do this.
I'm new to this forum. I was wondering if anyone can tell me if it is possible and if they know how to create what I call a pseudo array of output files.
Here is the pseudo code:
Do i=1,15
Do j=1,3
open(unit=(10+i*j),file="i-j.txt",status="new")
EndDo
EndDo
Basically what I am trying to do is create a 15x3 array of files taking up units 11-55. The file names would be "1-1.txt", "2-1.txt",... "15-1.txt", "1-2.txt", "2-2.txt",... "15-2.txt", "1-3.txt", "2-3.txt",... "15-3.txt"
Although my purposes for doing this are probably irrelevent, I'll go over it briefly. I am storing three different "properties" of fifteen different "bodies" over time. There are 5000 time steps and I need a separate file for each property for each body, so I can see the change of each individual property over time.
Any help would be greatly appreciated
P.S. I have an idea of what I need to do. I know that I need to somehow convert the integers in the Do loop to strings to make them part of the file name. I unfortunately have no idea how to do this.