- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
MOSADDEGHI CASE 1: 2019 Water density=0.9986
ENERGY UNITS=kjoule/mol
200 2.000000E-01 38
-7.905859E+04 3.010087E+02 -9.421393E+04 1.741921E+04 -1.116331E+05
0.000000E+00 0.000000E+00 0.000000E+00 0.000000E+00 -8.037317E+04
0.000000E+00 3.425443E+04 -3.975877E+05 1.116268E+05 0.000000E+00
0.000000E+00 3.202153E+05 0.000000E+00 6.048000E+04 0.000000E+00
0.000000E+00 0.000000E+00 9.000000E+01 9.000000E+01 9.000000E+01
0.000000E+00 -3.562117E-01 0.000000E+00 0.000000E+00 -4.113168E-01
-8.834648E-02 -3.593858E-02 -8.834648E-02 1.376611E-01 -2.073464E-01
-3.593858E-02 -2.073464E-01 -7.949794E-01
400 4.000000E-01 38
-7.897667E+04 2.990632E+02 -9.403406E+04 1.768077E+04 -1.117148E+05
0.000000E+00 0.000000E+00 0.000000E+00 0.000000E+00 -7.918380E+04
0.000000E+00 3.073616E+04 -4.011339E+05 1.117082E+05 0.000000E+00
0.000000E+00 3.201619E+05 0.000000E+00 6.048000E+04 0.000000E+00
0.000000E+00 0.000000E+00 9.000000E+01 9.000000E+01 9.000000E+01
0.000000E+00 -5.612462E-02 0.000000E+00 0.000000E+00 8.705193E-01
1.079355E-01 1.559906E-01 1.079355E-01 -3.729550E-01 -5.621051E-02
1.559906E-01 -5.621051E-02 -6.659382E-01
...
original file attached.
thanks for attention.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
[bash]program read_data implicit none integer stepno, arrsiz real steptime, datum real, allocatable :: array(:) integer iunit open(newunit=iunit,file='STATIS',status='old') read(iunit,'()') read(iunit,'()') do read(iunit,'(i10,f14.0,i10)',end=10) & stepno,steptime,arrsiz allocate(array(arrsiz)) read(iunit,'(5f14.0)') array datum = array(36) write(*,'(2(a,es14.6e2))') 'Step time =', & steptime,', datum =',datum deallocate(array) end do 10 continue end program read_data [/bash]
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
[bash]program read_data implicit none integer stepno, arrsiz real steptime, datum real, allocatable :: array(:) integer iunit open(newunit=iunit,file='STATIS',status='old') read(iunit,'()') read(iunit,'()') do read(iunit,'(i10,f14.0,i10)',end=10) & stepno,steptime,arrsiz allocate(array(arrsiz)) read(iunit,'(5f14.0)') array datum = array(36) write(*,'(2(a,es14.6e2))') 'Step time =', & steptime,', datum =',datum deallocate(array) end do 10 continue end program read_data [/bash]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I renamed it to tensor.f and comilpe it with STATIS but I get this error:
------------------------------------------------------------
: error #5149: Illegal character in statement label field [.]
: error #5149: Illegal character in statement label field
: error #5149: Illegal character in statement label field
: error #5149: Illegal character in statement label field
: error #5148: A continuation character is illegal on a line with a statement label
tensor.f(2): error #5149: Illegal character in statement label field [.]
2. implicit none
-^
tensor.f(2): error #5148: A continuation character is illegal on a line with a statement label
2. implicit none
-----^
tensor.f(1): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: ( % : . = =>
1.program read_data
----------------------^
tensor.f(3): error #5149: Illegal character in statement label field [.]
3. integer stepno, arrsiz
-^
tensor.f(3): error #5148: A continuation character is illegal on a line with a statement label
3. integer stepno, arrsiz
-----^
tensor.f(2): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: ( % : . = =>
2. implicit none
---------------------^
tensor.f(4): error #5149: Illegal character in statement label field [.]
4. real steptime, datum
-^
tensor.f(4): error #5148: A continuation character is illegal on a line with a statement label
4. real steptime, datum
-----^
tensor.f(3): error #5082: Syntax error, found ',' when expecting one of: ( % : . = =>
3. integer stepno, arrsiz
-------------------^
tensor.f(5): error #5149: Illegal character in statement label field [.]
5. real, allocatable :: array(:)
-^
tensor.f(5): error #5148: A continuation character is illegal on a line with a statement label
5. real, allocatable :: array(:)
-----^
tensor.f(4): error #5082: Syntax error, found ',' when expecting one of: ( % : . = =>
4. real steptime, datum
------------------^
tensor.f(6): error #5149: Illegal character in statement label field [.]
6. integer iunit
-^
tensor.f(6): error #5148: A continuation character is illegal on a line with a statement label
6. integer iunit
-----^
tensor.f(5): error #5082: Syntax error, found ',' when expecting one of: ( % : . = =>
5. real, allocatable :: array(:)
---------^
tensor.f(5): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: ) ,
5. real, allocatable :: array(:)
-------------------------------------^
tensor.f(7): error #5149: Illegal character in statement label field [.]
7.
-^
tensor.f(8): error #5149: Illegal character in statement label field [.]
8. open(newunit=iunit,file='STATIS',status='old')
-^
tensor.f(8): error #5148: A continuation character is illegal on a line with a statement label
8. open(newunit=iunit,file='STATIS',status='old')
-----^
tensor.f(7): error #5156: Labelled statement is empty
7.
----^
tensor.f(6): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: ( % : . = =>
6. integer iunit
---------------------^
tensor.f(7): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: BLOCK BLOCKDATA PROGRAM MODULE TYPE COMPLEX BYTE CHARACTER CLASS DOUBLE ...
7.
----^
tensor.f(9): error #5149: Illegal character in statement label field [.]
9. read(iunit,'()')
-^
tensor.f(9): error #5148: A continuation character is illegal on a line with a statement label
9. read(iunit,'()')
-----^
tensor.f(8): error #5082: Syntax error, found '=' when expecting one of: ( * ) :: ,
8. open(newunit=iunit,file='STATIS',status='old')
-----------------^
(10): catastrophic error: Too many errors, exiting
compilation aborted for tensor.f (code 1)
--------------------------------------------------------------------------------------
what's you idea?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try renaming the file with a .f90 extension instead.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I do thing that you said (ifort tensor.f90) ,but I get this error:
tensor.f90(8): error #6640: This input/output keyword is invalid. [NEWUNIT]
open(newunit=iunit,file='STATIS',status='old')
--------^
tensor.f90(8): error #6332: A UNIT= specifier is required for this I/O operation.
open(newunit=iunit,file='STATIS',status='old')
---^
tensor.f90(12): error #6323: This label is not defined in this scoping unit. [10]
read(iunit,'(i10,f14.0,i10)',end=10) &
----------------------------------------^
compilation aborted for tensor.f90 (code 1)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page