From ca5cfc140232cdc595f4b028bda38b7a77657dce Mon Sep 17 00:00:00 2001 From: Bill Somerville Date: Thu, 17 Dec 2015 23:21:38 +0000 Subject: [PATCH] Fix defect in jt9 standalone mode causing randon file read Made default values for decoding parameters better in standalone jt65 tool. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@6291 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- lib/jt65.f90 | 9 ++++++--- lib/jt9.f90 | 17 ++++++++--------- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/lib/jt65.f90 b/lib/jt65.f90 index b11b5206b..2b52bd876 100644 --- a/lib/jt65.f90 +++ b/lib/jt65.f90 @@ -11,7 +11,8 @@ program jt65 real*4 dd(NZMAX) character*80 infile character(len=500) optarg - character*6 mycall,hiscall,hisgrid + character*12 mycall,hiscall + character*6 hisgrid common/tracer/limtrace,lu equivalence (lenfile,ihdr(2)) type (option) :: long_options(9) = [ & @@ -38,9 +39,10 @@ nhigh=4000 n2pass=2 nrobust=0 nexp_decoded=0 +naggressive=1 do - call getopt('f:hn:rc:x:g:X',long_options,c,optarg,narglen,nstat,noffset,nremain,.true.) + call getopt('f:hn:rc:x:g:X:s',long_options,c,optarg,narglen,nstat,noffset,nremain,.true.) if( nstat .ne. 0 ) then exit end if @@ -90,6 +92,7 @@ nexp_decoded=0 newdat=1 nfa=nlow nfb=nhigh + minsync=0 call get_command_argument(ifile,optarg,narglen) infile=optarg(:narglen) open(10,file=infile,access='stream',status='old',err=998) @@ -109,7 +112,7 @@ nexp_decoded=0 ! write(56) ihdr(1:11) call jt65a(dd,npts,newdat,nutc,nfa,nfb,nfqso,ntol,nsubmode, & - minsync,nagain,n2pass,nrobust,ntrials, naggressive,ndepth, & + minsync,nagain,n2pass,nrobust,ntrials,naggressive,ndepth, & mycall,hiscall,hisgrid,nexp_decoded,ndecoded) call timer('jt65a ',1) enddo diff --git a/lib/jt9.f90 b/lib/jt9.f90 index e2d6ef414..5e005f12a 100644 --- a/lib/jt9.f90 +++ b/lib/jt9.f90 @@ -13,12 +13,11 @@ program jt9 integer(C_INT) iret integer*4 ihdr(11) real*4 s(NSMAX) - integer*2 id2 character c character(len=500) optarg, infile character wisfile*80 integer :: arglen,stat,offset,remain,mode=0,flow=200,fsplit=2700, & - fhigh=4000,nrxfreq=1500,ntrperiod0=1,ndepth=60001,nexp_decode=0 + fhigh=4000,nrxfreq=1500,ntrperiod=1,ndepth=60001,nexp_decode=0 logical :: shmem = .false., read_files = .false., & tx9 = .false., display_help = .false. type (option) :: long_options(22) = [ & @@ -90,7 +89,7 @@ program jt9 read (optarg(:arglen), *) nthreads case ('p') read_files = .true. - read (optarg(:arglen), *) ntrperiod0 + read (optarg(:arglen), *) ntrperiod case ('d') read_files = .true. read (optarg(:arglen), *) ndepth @@ -200,19 +199,19 @@ program jt9 go to 2 1 nutc=0 2 nsps=0 - if(ntrperiod0.eq.1) then + if(ntrperiod.eq.1) then nsps=6912 shared_data%params%nzhsym=181 - else if(ntrperiod0.eq.2) then + else if(ntrperiod.eq.2) then nsps=15360 shared_data%params%nzhsym=178 - else if(ntrperiod0.eq.5) then + else if(ntrperiod.eq.5) then nsps=40960 shared_data%params%nzhsym=172 - else if(ntrperiod0.eq.10) then + else if(ntrperiod.eq.10) then nsps=82944 shared_data%params%nzhsym=171 - else if(ntrperiod0.eq.30) then + else if(ntrperiod.eq.30) then nsps=252000 shared_data%params%nzhsym=167 endif @@ -227,7 +226,7 @@ program jt9 call timer('jt9 ',0) endif - id2=0 !??? Why is this necessary ??? + shared_data%id2=0 !??? Why is this necessary ??? do iblk=1,npts/kstep k=iblk*kstep