      program annwpftec
C.....................................................................Mar 2020
C combine daily Wptec , Wpf for1996-2019
C
      character*120 infile1,infile2,outfile,txt
	character*2 AYR
	character*4 AYEAR
c
      infile1='d:/web/graf/datw/wptecYR.txt'
	infile2='d:/web/graf/datw/wjfcfYR.txt'
	outfile='annwpftec.res'
	OPEN(10,file=outfile)
C
       DOiyear=1994,2019
	call blet4(iyear,AYEAR)
	AYR=AYEAR(3:4)
	infile1(23:24)=AYR
      infile2(23:24)=AYR
      OPEN(11,file=infile1,action='READ')
	read(11,*) txt
	OPEN(12,file=infile2,action='READ')
      read(12,*) txt
		xyear=float(iyear)
	if(int(xyear/4.)*4.eq.iyear) THEN 
 	ndnr=366
	                          ELSE
	ndnr=365
	ENDIF
	dyr=1./ndnr
C
       do lda=1,ndnr
	ryear=xyear+(lda-1)*dyr
	read(11,30,end=40) wtec
	read(12,30,end=41) wf
	write(*,31) ryear,wtec,wf
      write(10,31) ryear,wtec,wf
	enddo
   40 close(unit=11)
   41 close(unit=12)
      ENDDO
   30 format(129X,F5.2)
   31 format(1X,F8.3,2(1X,F5.2))
      pause ' '
	STOP
	END