- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
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.
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
>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?
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?
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page