	IMPLICIT NONE

	REAL*8 FLUX(999999),WAVEN(999999)
	INTEGER i,j,k,ni
	REAL dum

	OPEN(04,file='waven_create5.in',type='old')
	READ(04,*) ni
	CLOSE(04)
	WRITE(*,*)'waven_create5: ni = ',ni

c	ni = 199491

	OPEN(01,file='wave5.dat',type='old')
	OPEN(02,file='splinedummi.dat',type='old')
	OPEN(03,file='wavenumbers.dat')

	DO i=1,ni
		READ(01,*) k,dum,WAVEN(i)
		READ(02,*) j,dum,FLUX(i)
		WRITE(03,100) WAVEN(i),FLUX(i)
	END DO
99	FORMAT (F30.15)
100	FORMAT (2X,E25.15,2X,E25.15)
	CLOSE(01)
	CLOSE(02)
	CLOSE(03)

	WRITE(*,*)'OK, file wavenumbers.dat created...'

	END

