      program tecnoonmn
C TEC monthly avewr noon
C..............................................................Jun 2017
	character*76 infile,outfile
	CHARACTER*4 AYEAR,STAT
	CHARACTER*2 AMN
	DIMENSION dat(288,12),aver(12)
	infile='tecnoonYEAR.txt'
	outfile='avernoon.txt'
C	
   31	format(1X,A4,12(1X,F4.1))
	OPEN(11,file=outfile)
C
	DO iyear=1998,2016
	call blet4(iyear,AYEAR)
	infile(8:11)=AYEAR
      OPEN(10,file=infile,action='READ')
C
	DO ii=1,12
	aver(ii)=0.
	enddo
C
	icnt=0
	DO kk=1,288
	read(10,31,end=41) stat,(dat(kk,i),i=1,12)
	do ii=1,12
	aver(ii)=aver(ii)+dat(kk,ii)
	icnt=icnt+1
	enddo
	ENDDO
   41 close(unit=10)
C
	DO imn=1,12
	call blet2(imn,AMN)
	ryear=iyear+(imn-1)/12.
	avermn=aver(imn)/288.
	write(*,32) ryear,AMN,avermn
	write(11,32) ryear,AMN,avermn
	enddo
C
   32 format(1X,F8.2,1X,A2,1X,F7.1)
      ENDDO        ! Annual cycle
      close(unit=11)
	pause ' '
	STOP
	END