Hello!
I'm trying to read files (ASCII output from commercial software) containing data as follow (coordinates, title, values):
1 -27.500 -70.500 -94.500
2 -27.500 -69.500 -94.500
3 -27.500 -68.500 -94.500
4 -27.500 -67.500 -94.500
5 -27.500 -66.500 -94.500
6 -27.500 -65.500 -94.500
7 -27.500 -64.500 -94.500
8 -27.500 -63.500 -94.500
9 -27.500 -62.500 -94.500
10 -27.500 -61.500 -94.500
primo.kout HEADER CMPD 1
0.000
-0.003
-0.005
-0.003
-0.004
-0.005
-0.005
-0.004
-0.003
-0.003
In order to read only the values (0.000, -0.003, ect.) I'm using this approach
...
REAL:: data
...
300 FORMAT(T2, F8.3) !is the same if I use default (2,*)
...
DO l=1,(number of row in the file)
IF ((11<l).AND.(l<21)) THEN
READ(2,300) data !is the same when (2,*)
WRITE(*,*) data
END If
ENDDO
...
Surprising, the result is ALWAYS something like the subsequent, instead of a list of values!
1.000000
2.000000
3.000000
etc...
The mail poin is:
=>if I try to read the coordinates set (like -27.500 -70.500 -94.500) is quite easy.
=> I'm not able to read the values, because each appempt to do this give a set of increasing integer values!!!
But.... if I delete the reports of coordinates and title the program work wery well!!!!
Do you have some ideas to solve the problem or understand better?
Thank you
Marck
I'm trying to read files (ASCII output from commercial software) containing data as follow (coordinates, title, values):
1 -27.500 -70.500 -94.500
2 -27.500 -69.500 -94.500
3 -27.500 -68.500 -94.500
4 -27.500 -67.500 -94.500
5 -27.500 -66.500 -94.500
6 -27.500 -65.500 -94.500
7 -27.500 -64.500 -94.500
8 -27.500 -63.500 -94.500
9 -27.500 -62.500 -94.500
10 -27.500 -61.500 -94.500
primo.kout HEADER CMPD 1
0.000
-0.003
-0.005
-0.003
-0.004
-0.005
-0.005
-0.004
-0.003
-0.003
In order to read only the values (0.000, -0.003, ect.) I'm using this approach
...
REAL:: data
...
300 FORMAT(T2, F8.3) !is the same if I use default (2,*)
...
DO l=1,(number of row in the file)
IF ((11<l).AND.(l<21)) THEN
READ(2,300) data !is the same when (2,*)
WRITE(*,*) data
END If
ENDDO
...
Surprising, the result is ALWAYS something like the subsequent, instead of a list of values!
1.000000
2.000000
3.000000
etc...
The mail poin is:
=>if I try to read the coordinates set (like -27.500 -70.500 -94.500) is quite easy.
=> I'm not able to read the values, because each appempt to do this give a set of increasing integer values!!!
But.... if I delete the reports of coordinates and title the program work wery well!!!!
Do you have some ideas to solve the problem or understand better?
Thank you
Marck