C------------------------------------------------------------------------------- C L I N E R H - Converter of a .LIN file for the ERHam program C------------------------------------------------------------------------------- C C This program goes through the .LIN file for Pickett's SPFIT program C and produces line listing compatible with input required by C Groner's ERHAM program C C Pertinent control data is to be placed in file LINERH.INP C C C ver. 21.IX.2006 ----- Zbigniew KISIEL ----- C __________________________________________________ C | Institute of Physics, Polish Academy of Sciences | C | Al.Lotnikow 32/46, Warszawa, POLAND | C | kisiel@ifpan.edu.pl | C | http://info.ifpan.edu.pl/~kisiel/prospe.htm | C_________________________/-------------------------------------------------- C C Modification history: C c 15.09.06: creation C_____________________________________________________________________________ C IMPLICIT REAL*8 (A-H,O-Z) IMPLICIT INTEGER*4 (I-N) character line*100,filein*30,filout*30 integer lq(6),linq(12) c c...Deal with the control file c WRITE(*,5500) 5500 FORMAT(1X//' ',76(1H_)/' |',T79,'|'/ * ' | LINERH - Converter of a .LIN file for the ERHam prog', * 'ram ',T79,'|'/ * ' |',76(1H_),'|'/' version 21.IX.2006',T64,'Zbigniew KISIEL'/) cc open(4,file='linerh.inp',status='old') read(4,'(40x,a)')filein read(4,'(40x,a)')filout read(4,'(40x,6i5)')lq read(4,'(40x,2i5)')is1,is2 close(4) c open(2,file=filein,status='old') write(*,'(1x,2a)')'Reading from: ',filein(1:len_trim(filein)) open(3,file=filout,status='unknown') write(*,'(1x,2a)')' Writing to: ',filout(1:len_trim(filout)) c c...Go through the .LIN file c nlin=0 1 read(2,'(a)',err=4,end=4)line read(line,'(12I3)',err=4,end=4)linq line=line(37:len_trim(line)) c write(*,*)line read(line,*,err=4,end=4)freq,ferr,rint c jup=linq(lq(1)) kau=linq(lq(2)) kpu=linq(lq(3)) jlo=linq(lq(4)) kal=linq(lq(5)) kpl=linq(lq(6)) c nup=kau-kpu+jup+1 nlo=kal-kpl+jlo+1 c if(freq.eq.0.d0)ferr=0.d0 write(3,5)is1,is2,jup,nup,jlo,nlo,freq,0.0,ferr nlin=nlin+1 5 format(2i3,i5,i3,i5,i3,f20.6,f7.1,f12.6) goto 1 c c 4 close(2) close(3) write(*,'(1x/i7,a//)')nlin,' lines have been converted' c stop end C_____________________________________________________________________________ C_____________________________________________________________________________