deep65.F: force message to upper case

specjt.py: add code for 2 x waterfall BW
sync65.f:  allow sync searcy over full BW
wsjt65.f:  add end-of-line numbers to average message
flat2.f:   extend spectrum to 5 kHz
gcom2.f90: add communication for wide waterfall BW
spec.f90:  add code for 2 x BW
wsjt.py:   dummy


git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/trunk@262 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2006-08-18 19:25:52 +00:00
parent 13ceaf225a
commit c99e8fe358
8 changed files with 211 additions and 65 deletions

View File

@ -145,6 +145,11 @@ C This is really weird, but do not remove the following statement!
qual=0. qual=0.
endif endif
decoded(22:22)=c decoded(22:22)=c
C Make sure everything is upper case.
do i=1,22
if(decoded(i:i).ge.'a' .and. decoded(i:i).le.'z')
+ decoded(i:i)=char(ichar(decoded(i:i))-32)
enddo
return return
end end

15
flat2.f
View File

@ -1,8 +1,8 @@
subroutine flat2(ss,n,nsum) subroutine flat2(ss,n,nsum)
real ss(1024) real ss(2048)
real ref(1024) real ref(2048)
real tmp(1024) real tmp(2048)
nsmo=20 nsmo=20
base=50*(float(nsum)**1.5) base=50*(float(nsum)**1.5)
@ -11,12 +11,17 @@
do i=ia,ib do i=ia,ib
call pctile(ss(i-nsmo),tmp,2*nsmo+1,50,ref(i)) call pctile(ss(i-nsmo),tmp,2*nsmo+1,50,ref(i))
enddo enddo
call pctile(ref(ia),tmp,ib-ia+1,50,base2) call pctile(ref(ia),tmp,ib-ia+1,68,base2)
if(base2.gt.0.1*base) then C Don't flatten if signal is extremely low (e.g., RX is off).
if(base2.gt.0.05*base) then
do i=ia,ib do i=ia,ib
ss(i)=base*ss(i)/ref(i) ss(i)=base*ss(i)/ref(i)
enddo enddo
else
do i=1,n
ss(i)=0.
enddo
endif endif
return return

View File

@ -35,6 +35,8 @@ integer mode65 !JT65 sub-mode (A/B/C ==> 1/2/4) GUI,SoundIn,Decoder
integer nclip !Clipping level GUI integer nclip !Clipping level GUI
integer ndebug !Write debugging info? GUI integer ndebug !Write debugging info? GUI
integer nblank !Is NB checked? GUI integer nblank !Is NB checked? GUI
integer nfmid !Center frequency of main display GUI
integer nfrange !Frequency range of main display GUI
integer nport !Requested COM port number GUI integer nport !Requested COM port number GUI
integer mousedf !Mouse-selected freq offset, DF GUI integer mousedf !Mouse-selected freq offset, DF GUI
integer neme !EME calls only in deep search? GUI integer neme !EME calls only in deep search? GUI
@ -89,7 +91,7 @@ common/gcom2/ps0(431),psavg(450),s2(64,3100),ccf(-5:540), &
mousedf,neme,nsked,naggressive,ntx2,nslim2,nagain,nsavelast, & mousedf,neme,nsked,naggressive,ntx2,nslim2,nagain,nsavelast, &
shok,sendingsh,d2a(661500),d2b(661500),b(60000),jza,jzb,ntime, & shok,sendingsh,d2a(661500),d2b(661500),b(60000),jza,jzb,ntime, &
idinterval,msmax,lenappdir,ndiskdat,nlines,nflat,ntxreq,ntxnow, & idinterval,msmax,lenappdir,ndiskdat,nlines,nflat,ntxreq,ntxnow, &
ndepth,nspecial,ndf,ss1(-224:224),ss2(-224:224), & ndepth,nspecial,ndf,nfmid,nfrange,ss1(-224:224),ss2(-224:224), &
mycall,hiscall,hisgrid,txmsg,sending,mode,fname0,fnamea, & mycall,hiscall,hisgrid,txmsg,sending,mode,fname0,fnamea, &
fnameb,decodedfile,AppDir,filetokilla,filetokillb,utcdate,pttport fnameb,decodedfile,AppDir,filetokilla,filetokillb,utcdate,pttport

View File

@ -22,7 +22,7 @@ subroutine spec(brightness,contrast,logmap,ngain,nspeed,a)
integer b0,c0 integer b0,c0
real x(4096) !Data for FFT real x(4096) !Data for FFT
complex c(0:2048) !Complex spectrum complex c(0:2048) !Complex spectrum
real ss(1024) !Bottom half of power spectrum real ss(2048) !Power spectrum
logical first logical first
include 'gcom1.f90' include 'gcom1.f90'
include 'gcom2.f90' include 'gcom2.f90'
@ -36,12 +36,12 @@ subroutine spec(brightness,contrast,logmap,ngain,nspeed,a)
save save
if(first) then if(first) then
do i=1,nq
ss(i)=0.
enddo
istep=2205 istep=2205
nfft=4096 nfft=4096
nq=nfft/4 nh=nfft/2
do i=1,nh
ss(i)=0.
enddo
df=11025.0/nfft df=11025.0/nfft
fac=2.0/10000. fac=2.0/10000.
nsum=0 nsum=0
@ -140,7 +140,7 @@ subroutine spec(brightness,contrast,logmap,ngain,nspeed,a)
call xfft2(x,nfft) call xfft2(x,nfft)
do i=1,nq !Accumulate power spectrum do i=1,nh !Accumulate power spectrum
ss(i)=ss(i) + real(c(i))**2 + aimag(c(i))**2 ss(i)=ss(i) + real(c(i))**2 + aimag(c(i))**2
enddo enddo
nsum=nsum+1 nsum=nsum+1
@ -159,17 +159,29 @@ subroutine spec(brightness,contrast,logmap,ngain,nspeed,a)
enddo enddo
endif endif
if(nflat.gt.0) call flat2(ss,1024,nsum) if(nflat.gt.0) call flat2(ss,nh,nsum)
do i=1,750 !Insert new data in top row ia=1
j=i+182 ! ?? was 186 ?? if(nfrange.eq.2000) then
a0(i)=5*ss(j)/nsum i0=182 + nint((nfmid-1500)/df)
if(i0.lt.0) ia=1-i0
else if(nfrange.eq.4000) then
i0=nint(nfmid/df - 752.0)
if(i0.lt.0) ia=1-i0/2
endif
do i=ia,750 !Insert new data in top row
if(nfrange.eq.2000) then
a0(i)=5*ss(i+i0)/nsum
else if(nfrange.eq.4000) then
smax=max(ss(2*i+i0),ss(2*i+i0-1))
a0(i)=5*smax/nsum
endif
xdb=-40. xdb=-40.
if(a0(i).gt.0.) xdb=10*log10(a0(i)) if(a0(i).gt.0.) xdb=10*log10(a0(i))
enddo 20 enddo
nsum=0 nsum=0
newdat=1 !Flag for new spectrum available newdat=1 !Flag for new spectrum available
do i=1,nq !Zero the accumulating array do i=1,nh !Zero the accumulating array
ss(i)=0. ss(i)=0.
enddo enddo
if(jz.lt.300) jz=jz+1 if(jz.lt.300) jz=jz+1

155
specjt.py
View File

@ -1,5 +1,4 @@
#---------------------------------------------------- SpecJT #---------------------------------------------------- SpecJT
from Tkinter import * from Tkinter import *
from tkMessageBox import showwarning from tkMessageBox import showwarning
import time import time
@ -39,6 +38,10 @@ c0=0
g0=0 g0=0
g.cmap="Linrad" g.cmap="Linrad"
df=2.69165 df=2.69165
fmid=1500
fmid0=1500
frange=2000
frange0=2000
isec0=-99 isec0=-99
logmap=IntVar() logmap=IntVar()
logmap.set(0) logmap.set(0)
@ -50,6 +53,8 @@ naxis=IntVar()
ncall=0 ncall=0
newMinute=0 newMinute=0
nflat=IntVar() nflat=IntVar()
nfr=IntVar()
nfr.set(1)
nfreeze0=0 nfreeze0=0
nmark=IntVar() nmark=IntVar()
nmark0=0 nmark0=0
@ -116,7 +121,8 @@ def tx_volume():
# Readout of graphical cursor location # Readout of graphical cursor location
def fdf_change(event): def fdf_change(event):
if nspeed0.get()<6: if nspeed0.get()<6:
g.DFreq=df*(event.x-288.7) g.DFreq=df*(event.x-288.7) + fmid - 1500
if nfr.get()==2: g.DFreq=2*df*(event.x-375.5) + fmid - 1270.5
g.Freq=g.DFreq+1270.46 g.Freq=g.DFreq+1270.46
t="Freq: %5d DF: %5d (Hz)" % (int(g.Freq),int(g.DFreq)) t="Freq: %5d DF: %5d (Hz)" % (int(g.Freq),int(g.DFreq))
else: else:
@ -133,9 +139,12 @@ def fdf_change(event):
#---------------------------------------------------- set_freezedf #---------------------------------------------------- set_freezedf
def set_freezedf(event): def set_freezedf(event):
if g.mode[:4]=='JT65': if g.mode[:4]=='JT65':
n=int(df*(event.x-288.7)) n=int(df*(event.x-288.7) + fmid - 1500)
if n<-600: n=-600 if nfr.get()==2: n=int(2*df*(event.x-375.5) + fmid - 1270.5)
if n>600: n=600 # if n<-600: n=-600
# if n>600: n=600
if n<-1270: n=-1270
if n>3800: n=3800
Audio.gcom2.mousedf=n Audio.gcom2.mousedf=n
else: else:
decode_request(event) decode_request(event)
@ -156,18 +165,74 @@ def df_mark():
if g.mode[4:5]=='C': fstep=4*fstep if g.mode[4:5]=='C': fstep=4*fstep
# Mark sync tone and top JT65 tone (green) and shorthand tones (red) # Mark sync tone and top JT65 tone (green) and shorthand tones (red)
if(frange==2000):
dx=288.7 + (1500-fmid)/df
if g.mode[:4]=="JT65": if g.mode[:4]=="JT65":
color='green' color='green'
x1=(Audio.gcom2.mousedf + 6.6*fstep)/df + 288.7 x1=(Audio.gcom2.mousedf + 6.6*fstep)/df + dx
c.create_line(x1-0.5,25,x1-0.5,12,fill=color) c.create_line(x1-0.5,25,x1-0.5,12,fill=color)
c.create_line(x1+0.5,25,x1+0.5,12,fill=color) c.create_line(x1+0.5,25,x1+0.5,12,fill=color)
for i in range(5): for i in range(5):
x1=(Audio.gcom2.mousedf+i*fstep)/df + 288.7 x1=(Audio.gcom2.mousedf + i*fstep)/df + dx
j=12 j=12
if i>0: j=15 if i>0: j=15
if i!=1: c.create_line(x1-0.5,25,x1-0.5,j,fill=color) if i!=1: c.create_line(x1-0.5,25,x1-0.5,j,fill=color)
if i!=1: c.create_line(x1+0.5,25,x1+0.5,j,fill=color) if i!=1: c.create_line(x1+0.5,25,x1+0.5,j,fill=color)
color='red' color='red'
if(frange==4000):
dx=375 + (1270.5-fmid)/(2*df)
if g.mode[:4]=="JT65":
color='green'
x1=(Audio.gcom2.mousedf + 6.6*fstep)/(2*df) + dx
c.create_line(x1-0.5,25,x1-0.5,12,fill=color)
c.create_line(x1+0.5,25,x1+0.5,12,fill=color)
for i in range(5):
x1=(Audio.gcom2.mousedf + i*fstep)/(2*df) + dx
j=12
if i>0: j=15
if i!=1: c.create_line(x1-0.5,25,x1-0.5,j,fill=color)
if i!=1: c.create_line(x1+0.5,25,x1+0.5,j,fill=color)
color='red'
#---------------------------------------------------- change_fmid
def change_fmid1():
global fmid
fmid=fmid+100
if fmid>5000-1000*nfr.get(): fmid=5000-1000*nfr.get()
def change_fmid2():
global fmid
fmid=fmid-100
if fmid<1000*nfr.get(): fmid=1000*nfr.get()
def set_fmid():
global fmid
if nfr.get()==1: fmid=1200
if nfr.get()==2: fmid=2200
#---------------------------------------------------- freq_range
def freq_range(event):
# Move frequency scale left or right in 100 Hz increments
global fmid
if event.num==1:
fmid=fmid+100
else:
if event.num==3:
fmid=fmid-100
if fmid<1000*nfr.get(): fmid=1000*nfr.get()
if fmid>5000-1000*nfr.get(): fmid=5000-1000*nfr.get()
def set_frange():
nfr.set(3-nfr.get())
#---------------------------------------------------- freq_center
##def freq_center(event):
### Move clicked location to center of frequency scale
## global fmid,frange
## n=100*int(0.01*df*(event.x-375))
## fmid = fmid + n
## if fmid<1000: fmid=1000
## if fmid>1700: fmid=1700
#---------------------------------------------------- decode_request #---------------------------------------------------- decode_request
def decode_request(event): def decode_request(event):
@ -192,7 +257,8 @@ def freeze_decode(event):
#---------------------------------------------------- update #---------------------------------------------------- update
def update(): def update():
global a,b0,c0,g0,im,isec0,line0,newMinute,nscroll,nspeed00,pim, \ global a,b0,c0,g0,im,isec0,line0,newMinute,nscroll,nspeed00,pim, \
root_geom,t0,mousedf0,nfreeze0,tol0,mode0,nmark0,logm0 root_geom,t0,mousedf0,nfreeze0,tol0,mode0,nmark0,logm0, \
fmid,fmid0,frange,frange0
utc=time.gmtime(time.time()+0.1*Audio.gcom1.ndsec) utc=time.gmtime(time.time()+0.1*Audio.gcom1.ndsec)
isec=utc[5] isec=utc[5]
@ -300,17 +366,29 @@ def update():
if newdat: Audio.gcom2.ndiskdat=0 if newdat: Audio.gcom2.ndiskdat=0
Audio.gcom2.nlines=0 Audio.gcom2.nlines=0
Audio.gcom2.nflat=nflat.get() Audio.gcom2.nflat=nflat.get()
frange=nfr.get()*2000
if(fmid<>fmid0 or frange<>frange0):
if fmid<1000*nfr.get(): fmid=1000*nfr.get()
if fmid>5000-1000*nfr.get(): fmid=5000-1000*nfr.get()
draw_axis()
fmid0=fmid
frange0=frange
Audio.gcom2.nfmid=int(fmid)
Audio.gcom2.nfrange=int(frange)
if g.focus==2: if g.focus==2:
root.focus_set() root.focus_set()
ltime.after(200,update) #Reset the timer ltime.after(200,update) #Reset the timer
#-------------------------------------------------------- draw_axis #-------------------------------------------------------- draw_axis
def draw_axis(): def draw_axis():
xmid=1500 xmid=fmid
if naxis.get(): xmid=xmid-1270.46 if naxis.get(): xmid=xmid-1270.46
c.delete(ALL) c.delete(ALL)
if nspeed0.get()<6: if nspeed0.get()<6:
for ix in range(-1000,2501,20): # Draw the frequency or DF tick marks
if(frange==2000):
for ix in range(-1300,5001,20):
i=374.5 + (ix-xmid)/df i=374.5 + (ix-xmid)/df
j=20 j=20
if (ix%100)==0 : if (ix%100)==0 :
@ -321,14 +399,33 @@ def draw_axis():
c.create_text(x,y,text=str(ix)) c.create_text(x,y,text=str(ix))
c.create_line(i,25,i,j,fill='black') c.create_line(i,25,i,j,fill='black')
if(frange==4000):
for ix in range(-2600,5401,50):
i=374.5 + (ix-xmid)/(2*df)
j=20
if (ix%200)==0 :
j=16
x=i-2
if ix<1000 : x=x+2
y=8
c.create_text(x,y,text=str(ix))
c.create_line(i,25,i,j,fill='black')
if g.mode[:4]=="JT65": if g.mode[:4]=="JT65":
dx=288.7 + (1500-fmid)/df
dff=df
if frange==4000:
dx=375 + (1270.5-fmid)/(2*df)
dff=2*df
if Audio.gcom2.nfreeze==0: if Audio.gcom2.nfreeze==0:
x1=-600/df + 288.7 # x1=-600/dff + dx
x2=600/df + 288.7 # x2=600/dff + dx
x1=0
x2=749
else: else:
tol=Audio.gcom2.dftolerance tol=Audio.gcom2.dftolerance
x1=(Audio.gcom2.mousedf-tol)/df + 288.7 x1=(Audio.gcom2.mousedf-tol)/dff + dx
x2=(Audio.gcom2.mousedf+tol)/df + 288.7 x2=(Audio.gcom2.mousedf+tol)/dff + dx
c.create_line(x1,25,x2,25,fill='green',width=2) c.create_line(x1,25,x2,25,fill='green',width=2)
else: else:
@ -369,9 +466,6 @@ setupmenu.add_radiobutton(label='Frequency axis',command=draw_axis,
setupmenu.add_radiobutton(label='JT65 DF axis',command=draw_axis, setupmenu.add_radiobutton(label='JT65 DF axis',command=draw_axis,
value=1,variable=naxis) value=1,variable=naxis)
setupmenu.add_separator() setupmenu.add_separator()
#setupmenu.add_radiobutton(label='High sensitivity',value=0,variable=logmap)
#setupmenu.add_radiobutton(label='High dynamic range',value=1,variable=logmap)
#setupmenu.add_separator()
setupmenu.palettes=Menu(setupmenu,tearoff=0) setupmenu.palettes=Menu(setupmenu,tearoff=0)
setupmenu.palettes.add_radiobutton(label='Gray0',command=pal_gray0, setupmenu.palettes.add_radiobutton(label='Gray0',command=pal_gray0,
value=0,variable=npal) value=0,variable=npal)
@ -387,11 +481,25 @@ setupmenu.palettes.add_radiobutton(label='AFMHot',command=pal_AFMHot,
value=5,variable=npal) value=5,variable=npal)
setupmenu.add_cascade(label = 'Palette',menu=setupmenu.palettes) setupmenu.add_cascade(label = 'Palette',menu=setupmenu.palettes)
lab1=Label(mbar,padx=50,bd=0) lab1=Label(mbar,padx=40,bd=0)
lab1.pack(side=LEFT) lab1.pack(side=LEFT)
fdf=Label(mbar,width=12,bd=0,padx=90) fdf=Label(mbar,width=20,bd=0,padx=20)
fdf.pack(side=LEFT) fdf.pack(side=LEFT)
lab3=Label(mbar,padx=13,bd=0)
lab3.pack(side=LEFT)
bbw=Button(mbar,text='BW',command=set_frange,padx=1,pady=1)
bbw.pack(side=LEFT)
lab0=Label(mbar,padx=5,bd=0)
lab0.pack(side=LEFT)
bfmid1=Button(mbar,text='<',command=change_fmid1,padx=1,pady=1)
bfmid2=Button(mbar,text='>',command=change_fmid2,padx=1,pady=1)
bfmid3=Button(mbar,text='|',command=set_fmid,padx=3,pady=1)
bfmid1.pack(side=LEFT)
bfmid3.pack(side=LEFT)
bfmid2.pack(side=LEFT)
#------------------------------------------------- Speed selection buttons #------------------------------------------------- Speed selection buttons
for i in (7, 6, 5, 4, 3, 2, 1): for i in (7, 6, 5, 4, 3, 2, 1):
t=str(i) t=str(i)
@ -405,6 +513,11 @@ lab2.pack(side=RIGHT)
iframe1 = Frame(frame, bd=1, relief=SUNKEN) iframe1 = Frame(frame, bd=1, relief=SUNKEN)
c=Canvas(iframe1, bg='white', width=750, height=25,bd=0) c=Canvas(iframe1, bg='white', width=750, height=25,bd=0)
c.pack(side=TOP) c.pack(side=TOP)
Widget.bind(c,"<Shift-Button-1>",freq_range)
Widget.bind(c,"<Shift-Button-2>",freq_range)
Widget.bind(c,"<Shift-Button-3>",freq_range)
#Widget.bind(c,"<Control-Button-1>",freq_center)
graph1=Canvas(iframe1, bg='black', width=750, height=300,bd=0,cursor='crosshair') graph1=Canvas(iframe1, bg='black', width=750, height=300,bd=0,cursor='crosshair')
graph1.pack(side=TOP) graph1.pack(side=TOP)
Widget.bind(graph1,"<Motion>",fdf_change) Widget.bind(graph1,"<Motion>",fdf_change)
@ -462,6 +575,8 @@ try:
elif key == 'Flatten': nflat.set(value) elif key == 'Flatten': nflat.set(value)
elif key == 'LogMap': logmap.set(value) elif key == 'LogMap': logmap.set(value)
elif key == 'Palette': g.cmap=value elif key == 'Palette': g.cmap=value
elif key == 'Frange': nfr.set(value)
elif key == 'Fmid': fmid=int(value)
else: pass else: pass
except: except:
print 'Error reading WSJT.INI, continuing with defaults.' print 'Error reading WSJT.INI, continuing with defaults.'
@ -526,6 +641,8 @@ f.write("MarkTones " + str(nmark.get()) + "\n")
f.write("Flatten " + str(nflat.get()) + "\n") f.write("Flatten " + str(nflat.get()) + "\n")
f.write("LogMap " + str(logmap.get()) + "\n") f.write("LogMap " + str(logmap.get()) + "\n")
f.write("Palette " + g.cmap + "\n") f.write("Palette " + g.cmap + "\n")
f.write("Frange " + str(nfr.get()) + "\n")
f.write("Fmid " + str(fmid) + "\n")
root_geom=root_geom[root_geom.index("+"):] root_geom=root_geom[root_geom.index("+"):]
f.write("SpecJTGeometry " + root_geom + "\n") f.write("SpecJTGeometry " + root_geom + "\n")
f.close() f.close()

View File

@ -39,11 +39,15 @@ C Compute power spectrum for each step and get average
call flat1(psavg,s2,nh,nsteps,NHMAX,NSMAX) !Flatten the spectra call flat1(psavg,s2,nh,nsteps,NHMAX,NSMAX) !Flatten the spectra
C Find the best frequency channel for CCF C Find the best frequency channel for CCF
fa= 670.46 ! famin= 670.46
fb=1870.46 ! fbmax=1870.46
famin=200
fbmax=3800
fa=famin
fb=fbmax
if(NFreeze.eq.1) then if(NFreeze.eq.1) then
fa=max( 670.46,1270.46+MouseDF-DFTolerance) fa=max(famin,1270.46+MouseDF-DFTolerance)
fb=min(1870.46,1270.46+MouseDF+DFTolerance) fb=min(fbmax,1270.46+MouseDF+DFTolerance)
endif endif
ia=fa/df ia=fa/df
ib=fb/df ib=fb/df
@ -61,7 +65,8 @@ C Find the best frequency channel for CCF
do i=ia,ib do i=ia,ib
call xcor(s2,i,nsteps,nsym,lag1,lag2, call xcor(s2,i,nsteps,nsym,lag1,lag2,
+ ccfblue,ccf0,lagpk0,flip,0.0) + ccfblue,ccf0,lagpk0,flip,0.0)
ccfred(i-i0)=ccf0 j=i-i0
if(j.ge.-224 .and. j.le.224) ccfred(j)=ccf0
C Find rms of the CCF, without the main peak C Find rms of the CCF, without the main peak
call slope(ccfblue(lag1),lag2-lag1+1,lagpk0-lag1+1.0) call slope(ccfblue(lag1),lag2-lag1+1,lagpk0-lag1+1.0)

View File

@ -1,4 +1,4 @@
#---------------------------------------------------------------- WSJT #----------------------------------------------------------------- WSJT
# $Date$ $Revision$ # $Date$ $Revision$
# #
from Tkinter import * from Tkinter import *

View File

@ -186,7 +186,7 @@ C Write the average line
+ avemsg1,nc1,nqual1 + avemsg1,nc1,nqual1
1023 format(a6,i3,i4,'/',i3,18x,a19,i8,i4) 1023 format(a6,i3,i4,'/',i3,18x,a19,i8,i4)
if(lcum .and. (avemsg1.ne.' ')) if(lcum .and. (avemsg1.ne.' '))
+ write(21,1011) ave1(1:57)//' ' + write(21,1011) ave1
ns10=ns1 ns10=ns1
endif endif
@ -200,7 +200,7 @@ C If Monitor segment #2 is available, write that line also
if(ns2.ge.100) write(ave2,1023) cfile6,2,nused2,ns2,avemsg2, if(ns2.ge.100) write(ave2,1023) cfile6,2,nused2,ns2,avemsg2,
+ nc2,nqual2 + nc2,nqual2
if(lcum .and. (avemsg2.ne.' ')) if(lcum .and. (avemsg2.ne.' '))
+ write(21,1011) ave2(1:57)//' ' + write(21,1011) ave2
ns20=ns2 ns20=ns2
endif endif