Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

playing with array problems!

milenko1976
Beginner
723 Views
I have a two files,I want to rewrite resistivities from the second to the first,21 values(It can be 1d array).My module:
module newmodc

use constants
use params
use mt2dmod
use fdsystem
use mt2ddat
use mt2dsens

implicit none
contains
subroutine newmodel
integer*4 i,icd
real,dimension(21) :: res1

do i=1,57
read(5,*)icd,res(icd),ivar(icd)
end do
read(103,*)(res1(i),i=1,21)

if (ivar(icd).eq.1) then
res(icd)=res1(i)
end if

write(200,454)icd,res(icd),ivar(icd)
454 format(i5,1x,f5.2,2x,i1)

end subroutine
end module
Intel Fortran Composer compiles it without programs but at he end program is not writing what I want.
0 Kudos
1 Reply
mecej4
Honored Contributor III
723 Views
>but at he end program is not writing what I want

That is vexing, but one small detail was left out: have you communicated to the computer what you want and, if so, how have you done it?
0 Kudos
Reply