c check FACT on spl file c read spl file and check the calculation of FACT c jwb 6/13/2023 INTEGER*2 JTB(6),JTLMOD,JCLK,JDATA(512),IDSC integer*2 jne,lstat,ityp,kmod,ipls character*4 itype,voyname,v1name,v2name data v1name/'v1 '/, v2name/'v2 '/ character*1 lstatbyte(4) equivalence (lstatbyte(1), lstat) character*64 ftdata dimension nout(9),itime(4) c c open the data file as specified c in the bash script mjs.fact call getenv('ft32',ftdata) write(6,4444) ftdata 4444 format("DATA FILE READ: ",A64) open(32,file=ftdata,form="formatted") c c determine spacecraft from keyboard input c write(6,1244) 1244 format("Enter the spacecraft id (1 - Voyager 1; 2 - Voyager 2):") read(5,*) idscinput if(idscinput.eq.1) V0 = 453. if(dscinput.eq.2) V0 = 372. c zero counters do 20 i = 1,4 itime(i)=0 20 continue do 10 i = 1,9 nout(i) = 0 10 continue numproblems = 0 c c read spl file 1 READ(32,40,end=999) JTB,JTLMOD,JNE,JCLK, * LSTAT,ITYP,FACT,IDSC 40 FORMAT(8I5,I3,Z6,I3,F10.2,I2) READ(32,99) (JDATA(J), J = 1,JNE) 99 format(16I4) c c check scid as read off of file versus user input if(idsc.ne.idscinput) write(6,1223) idsc,idscinput 1223 format("S/C ID ON SPL FILE DISAGREES WITH USER INPUT S/C",2i5) c c recompute threshold (fact1) to check against c what was read on file (fact) call thresh(fact1,icap,igain, * ipls,ityp,lstat,idsc,jclk) rper= 100.*abs((fact-fact1))/fact if(rper.gt.2.) write(6,2210) fact,fact1 2210 format(' PROBLEM WITH FACT ', 2f10.4) if(rper.gt.2.) numproblems = numproblems + 1 992 continue c c accumulate statistics c count the distribution of integration times itime(jclk) = itime(jclk)+1 itime(4)= itime(4) +1 c count the number of short modes c (jclk = 2) versus number of long modes (jclk = 3) if(jclk.eq.1) write(6,7722) 7722 format(" problem: illegal value of jclk ") if(jclk.eq.2) ichk = jtlmod if(jclk.eq.3) ichk= jtlmod + 4 nout(ichk)=nout(ichk)+1 nout(9) = nout(9) + 1 go to 1 c 999 continue write(6,2999) 2999 format('end of file on spl file') write(6,3000) nout write(6,3000) itime 3000 format(8(i8,','),I8) write(6,3999) numproblems 3999 format('Number of Problems with Fact = ',i10) stop end