diff --git a/lib/decoder.f90 b/lib/decoder.f90 index 124d680e4..b34aa4431 100644 --- a/lib/decoder.f90 +++ b/lib/decoder.f90 @@ -39,6 +39,8 @@ subroutine decoder(ss,id2) endif ntol65=20 + newdat65=newdat + newdat9=newdat !$ call omp_set_dynamic(.true.) !$omp parallel sections num_threads(2) copyin(/tracer_priv/) shared(ndecoded) @@ -46,16 +48,16 @@ subroutine decoder(ss,id2) !$omp section if(nmode.eq.65 .or. (nmode.gt.65 .and. ntxmode.eq.65)) then ! We're decoding JT65 or should do this mode first - if(newdat.ne.0) dd(1:npts65)=id2(1:npts65) + if(newdat65.ne.0) dd(1:npts65)=id2(1:npts65) nf1=nfa nf2=nfb call timer('jt65a ',0) - call jt65a(dd,npts65,newdat,nutc,nf1,nf2,nfqso,ntol65,nagain,ndecoded) + call jt65a(dd,npts65,newdat65,nutc,nf1,nf2,nfqso,ntol65,nagain,ndecoded) call timer('jt65a ',1) else ! We're decoding JT9 or should do this mode first call timer('decjt9 ',0) - call decjt9(ss,id2,nutc,nfqso,newdat,npts8,nfa,nfsplit,nfb,ntol,nzhsym, & + call decjt9(ss,id2,nutc,nfqso,newdat9,npts8,nfa,nfsplit,nfb,ntol,nzhsym, & nagain,ndepth,nmode) call timer('decjt9 ',1) endif @@ -63,16 +65,16 @@ subroutine decoder(ss,id2) !$omp section if(nmode.gt.65) then ! do the other mode in dual mode if (ntxmode.eq.9) then - if(newdat.ne.0) dd(1:npts65)=id2(1:npts65) + if(newdat65.ne.0) dd(1:npts65)=id2(1:npts65) nf1=nfa nf2=nfb call timer('jt65a ',0) - call jt65a(dd,npts65,newdat,nutc,nf1,nf2,nfqso,ntol65,nagain,ndecoded) + call jt65a(dd,npts65,newdat65,nutc,nf1,nf2,nfqso,ntol65,nagain,ndecoded) call timer('jt65a ',1) else call timer('decjt9 ',0) - call decjt9(ss,id2,nutc,nfqso,newdat,npts8,nfa,nfsplit,nfb,ntol,nzhsym, & - nagain,ndepth,nmode) + call decjt9(ss,id2,nutc,nfqso,newdat9,npts8,nfa,nfsplit,nfb,ntol, & + nzhsym,nagain,ndepth,nmode) call timer('decjt9 ',1) end if endif diff --git a/lib/downsam9.f90 b/lib/downsam9.f90 index 4c18fe048..520ffa578 100644 --- a/lib/downsam9.f90 +++ b/lib/downsam9.f90 @@ -45,8 +45,7 @@ subroutine downsam9(id2,npts8,nsps8,newdat,nspsd,fpk,c2,nz2) endif if(newdat.eq.1) then - fac=6.963e-6 !Why this weird constant? - x1(0:npts-1)=fac*id2(0:npts-1) + x1(0:npts-1)=id2(0:npts-1) x1(npts:nfft1-1)=0. !Zero the rest of x1 call timer('FFTbig9 ',0) call fftwf_execute_dft_r2c(plan,x1,c1) @@ -61,6 +60,7 @@ subroutine downsam9(id2,npts8,nsps8,newdat,nspsd,fpk,c2,nz2) s(i)=s(i)+real(c1(j))**2 + aimag(c1(j))**2 enddo enddo + newdat=0 endif ndown=8*nsps8/nspsd !Downsample factor diff --git a/lib/filbig.f90 b/lib/filbig.f90 index 3a2d51635..e959b87ff 100644 --- a/lib/filbig.f90 +++ b/lib/filbig.f90 @@ -87,6 +87,7 @@ subroutine filbig(dd,npts,f0,newdat,c4a,n4,sq0) ca(ia:ib)=fac*conjg(ca(ia:ib)) enddo call timer('flatten ',1) + newdat=0 endif ! NB: f0 is the frequency at which we want our filter centered.