c numbering 2 c dimension ik(100),geta(100) open(10,file='I:\GHdata\bias_gh90mag0.txt',status='old') k=0 100 continue read(10,*,end=9) ii,bias k=k+1 ik(k)=ii geta(k)=bias go to 100 9 continue ke=k write(6,*) ke close(10) c open(20,file='I:\GHdata\yoko_gh90mag0.txt',status='old') open(30,file='I:\GHdata\ad_yoko_gh90mag0.txt') do 25 i=1,ke num=ik(i) add=geta(i) 150 continue read(20,*,end=99) k,alon,alat,val,ahdg if(k.eq.num) then aval=val+add write(30,*) k,alon,alat,aval else write(30,*) k,alon,alat,val end if go to 150 99 continue rewind 20 25 continue close(20) close(30) stop end