Move s3, s3a arrays into qra_loops.

This commit is contained in:
Joe Taylor 2020-10-09 14:12:34 -04:00
parent a4ba64a5fa
commit 538b0b91ab
2 changed files with 46 additions and 60 deletions

View File

@ -56,10 +56,8 @@ contains
logical ltext
complex, allocatable :: c00(:) !Analytic signal, 6000 Sa/s
complex, allocatable :: c0(:) !Analytic signal, 6000 Sa/s
real, allocatable, save :: s3(:,:) !Synchronized symbol spectra
real, allocatable, save :: s3a(:,:) !Symbol spectra for avg messages
data nc1z/-1/,nc2z/-1/,ng2z/-1/,maxaptypez/-1/,nsubmodez/-1/
save nc1z,nc2z,ng2z,maxaptypez,nsave,nsubmodez
save nc1z,nc2z,ng2z,maxaptypez,nsubmodez
mode65=2**nsubmode
nfft1=ntrperiod*12000
@ -67,13 +65,6 @@ contains
allocate (c00(0:nfft1-1))
allocate (c0(0:nfft1-1))
if(nsubmode.ne.nsubmodez) then
if(allocated(s3)) deallocate(s3)
if(allocated(s3a)) deallocate(s3a)
allocate(s3(-64:64*mode65+63,63))
allocate(s3a(-64:64*mode65+63,63))
endif
if(ntrperiod.eq.15) then
nsps=1800
else if(ntrperiod.eq.30) then
@ -109,15 +100,13 @@ contains
maxaptype.ne.maxaptypez) then
do naptype=0,maxaptype
if(naptype.eq.2 .and. maxaptype.eq.4) cycle
call qra64_dec(s3,nc1,nc2,ng2,naptype,1,nSubmode,b90, &
call qra64_dec(s3dummy,nc1,nc2,ng2,naptype,1,nSubmode,b90, &
nFadingModel,dat4,snr2,irc)
enddo
nc1z=nc1
nc2z=nc2
ng2z=ng2
maxaptypez=maxaptype
s3a=0.
nsave=0
endif
naptype=maxaptype
@ -130,7 +119,6 @@ contains
fac=1.0/32767.0
dd=fac*iwave
! npts=648000
minsync=-2
nmode=65
@ -138,14 +126,12 @@ contains
call timer('qraloops',0)
call qra_loops(c00,npts/2,nmode,mode65,nsubmode,nFadingModel,minsync, &
ndepth,nc1,nc2,ng2,naptype,jpk0,xdt,f0,width,snr2,s3,irc,dat4)
if(nmode.eq.65) xdt=xdt+0.4 !### Empirical WHY ??? ###
ndepth,nc1,nc2,ng2,naptype,jpk0,xdt,f0,width,snr2,irc,dat4)
call timer('qraloops',1)
xdt=xdt+0.4 !### Empirical -- WHY ??? ###
snr2=snr2 + db(6912.0/nsps)
decoded=' '
if(irc.ge.0) then
nsave=0
s3a=0.
call unpackmsg(dat4,decoded) !Unpack the user message
call fmtmsg(decoded,iz)
if(index(decoded,"000AAA ").ge.1) then

View File

@ -1,5 +1,5 @@
subroutine qra_loops(c00,npts2,mode,mode64,nsubmode,nFadingModel,minsync, &
ndepth,nc1,nc2,ng2,naptype,jpk0,xdt,f0,width,snr2,s3,irc,dat4)
ndepth,nc1,nc2,ng2,naptype,jpk0,xdt,f0,width,snr2,irc,dat4)
use timer_module, only: timer
parameter (LN=1152*63)