      program convgecd
C
C......................................................Apr 2023
C  Reorganise data to 1col for periodogram analysis
C
C
       CHARACTER*64 infile,outfile,txt
	DIMENSION ind(0:23),IM(12)
	CHARACTER*4 AYEAR
	CHARACTER*2 AYR,AMN
	CHARACTER*6 YYMMDD
	DATA IM/31,28,31,30,31,30,31,31,30,31,30,31/
C
C-       infile='c:\MSDEV\Projects\GEC\gechYEAR.txt'
      infile='d:\web\dat0\YR\ghYRMN.txt'
	outfile='c:\MSDEV\Projects\GEC\gechYEAR.res'
C-	outfile(32:34)='res'
      OPEN(11,file=outfile)
C
   30 format(A6,24(1X,I4),1X,F4.2)
   31 format(F4.2)
       DO 100 iyear=1994,2022
	call blet4(iyear,AYEAR)
	AYR=AYEAR(3:4)
	infile(13:14)=AYR
	infile(18:19)=AYR
C
	ryear=float(iyear)
		if(int(ryear/4.)*4.eq.iyear) THEN 
	ndnyr=366
      IM(2)=29
	                          ELSE
	ndnyr=365
	IM(2)=28
	ENDIF
C
	DO imn=1,12            ! MON
	ndmn=IM(imn)
	call blet2(imn,AMN)
	infile(20:21)=AMN
	OPEN(10,file=infile,action='READ')
	DO n=1,4
	read(10,*) txt
	enddo
C
      DO idy=1,ndmn			 ! DAY
	read(10,30,end=51) YYMMDD,(ind(k),k=0,23),gec
	write(11,31) gec
	ENDDO					 ! DAY
   51 close(10)
       ENDDO					 ! MON
  100 CONTINUE
      close(11)
	pause ' '
	STOP
	END