ADAS Subroutine d7grps
C
subroutine d7grps(nwave, ndwave, wave, index)
C-----------------------------------------------------------------------
C
C ******************** FORTRAN77 FUNCTION: D7GRPS *********************
C
C PURPOSE : Puts wavelengths into a 5 bin histogram for automating
C effective line selection in ADAS407.
C
C COMMENTS : Note that the number of bins is fixed and no attempt is
C made at clever adaptive methods of optimising case where
C there is a large empty wavelength space between groups.
C
C INPUT: (I*4) NWAVE = number of wavelengths
C INPUT: (I*4) NDWAVE = max size of wavelength array
C INPUT: (R*8) WAVE = wavelengths
C
C OUTPUT: (I*4) INDEX = indices (1->nbin) of wavelengths
C
C ROUTINES:
C ROUTINE SOURCE BRIEF DESCRIPTION
C ------------------------------------------------------------
C I4INDF ADAS Finds closet index in an array
C
C
C AUTHOR : Martin O'Mullane
C
C VERSION : 1.1
C DATE : 17-01-2002
C
C MODIFIED : Martin O'Mullane
C - First version.
C
C-----------------------------------------------------------------------
INTEGER INDEX(NDWAVE), NDWAVE, NWAVE
REAL*8 WAVE(NDWAVE)