- #1
obeythepoof
- 1
- 0
I am trying to self-teach myself Fortran for an undergrad research position. A basic program that I am trying to develop is something will open a file, read a single value from a large table of data, do some calculations with it, and print it into a new file. I was hoping to get a little advice about how to approach this.
Specifically I know I'm supposed to:
1. Open a file called /.../grpdatas_r500_108.tab
2. Read the radius, called r200, which is in the 4th column of the 1st row
3. define fov, and it can be found in the .out files in the same directory as the above file
4. Do the following calculation: r200px=r200*1024*500./fov/.73
5. Print in a file called halo.108.reg
I was hoping someone could explain to me some of the simple syntax as well, as I am having troubles understanding everything that goes in the parenthesis for OPEN, READ, WRITE, etc.
Thanks a million to anyone who can help!
Specifically I know I'm supposed to:
1. Open a file called /.../grpdatas_r500_108.tab
2. Read the radius, called r200, which is in the 4th column of the 1st row
3. define fov, and it can be found in the .out files in the same directory as the above file
4. Do the following calculation: r200px=r200*1024*500./fov/.73
5. Print in a file called halo.108.reg
I was hoping someone could explain to me some of the simple syntax as well, as I am having troubles understanding everything that goes in the parenthesis for OPEN, READ, WRITE, etc.
Thanks a million to anyone who can help!