      SUBROUTINE INIFIN(DMLNMP,QFLAGS,SCTIM,CLCOEF,BUFLEN,OVLEN,NCHAN)
C***********************************************************************
C
C   NAME- INIFIN
C
C   LANGUAGE- FORTRAN 77     TYPE- SUBROUTINE    COMPUTER- CRAY    
C
C   VERSION- 1.0      DATE- 6/4/91   PROGRAMMER- CARLA NEIGH (SMSRC)
C   VERSION- 2.0      DATE- 11/6/95  PROGRAMMER- DIANE BEITZELL (SMSRC)
C     ATOVS-242    CLCOEF WAS ADJUSTED TO HANDLE 3 COEFFICIENTS FOR ATOVS.
C   VERSION- 2.1      DATE- 12/4/95  PROGRAMMER- CARLA NEIGH (SMSRC)
C     ATOVS-263:  QFLAGS DIMENSION CHANGED TO 32 X BUFLEN.
C   VERSION- 3.0      DATE- 5/9/96   PROGRAMMER- ALEX POZDNYAK (FDC)   
C      MODIFIED TO RUN ON THE CRAY.  REPLACED I*4 WITH INT AND
C      R*4 WITH REAL.
C  
C   FUNCTION- THIS SUBROUTINE INITIALIZES EACH OF THE ARRAYS USED IN
C             THE COMMON BLOCK FRMINF AND THE ARRAY OF INSTRUMENT
C             CALIBRATION COEFFICIENTS.  FIRST THE PORTION OF THE
C             ARRAYS CONTAINING THE OVERLAP FROM THE PREVIOUS FRAME
C             IS COPIED INTO THE BEGINNING OF EACH ARRAY.  THEN THE
C             REMAINDER OF EACH ARRAY IS INITIALIZED TO A DESIGNATED
C             VALUE.
C
C   CALLING SEQUENCE PARAMETERS-
C   NAME      TYPE   I/O   DESCRIPTION
C   ----      ----   ---   -----------
C   DMLNMP    LOG    I/O   INSTRUMENT DUMMY LINE MAP-
C                          ARRAY OF LENGTH BUFLEN WHERE ELEMENT IS
C                          SET TO TRUE IF SCAN LINE CONTAINS USABLE
C                          DATA, SET TO FALSE IF DATA IS NOT USABLE
C   QFLAGS    INT    I/O   ARRAY OF 1B* SCAN LINE QUALITY INFORMATION
C                          FOR EACH LINE OF THE EXTENDED FRAME BUFFER
C                          (DIMENSIONED 32 X BUFLEN) 
C   SCTIM     INT    I/O   2D ARRAY OF SCAN LINE TIMES FOR EACH LINE
C                          OF THE EXTENDED FRAME BUFFER IN FORMAT
C                          CENTURY DAY, MILLISECOND OF DAY
C                          (DIMENSION 2 X BUFLEN)
C   CLCOEF    REAL   I/O   3D ARRAY OF CALIBRATION COEFFICIENTS FOR EACH
C                          CHANNEL FOR INSTRUMENT EXTENDED DATA FRAME
C                          (DIMENSION 3 X NCHAN X BUFLEN)
C   BUFLEN    INT     I    NUMBER OF SCAN LINES IN EXTENDED DATA FRAME
C                          BUFFER FOR INSTRUMENT
C   OVLEN     INT     I    LENGTH OF DATA FRAME OVERLAP FOR INSTRUMENT
C   NCHAN     INT     I    NUMBER OF CHANNELS FOR INSTRUMENT
C
C   COMMON AREA PARAMETERS- SPVAL
C
C   LOCAL VARIABLES
C   NAME     TYPE    DESCRIPTION
C   ----     ----    -----------
C   INDX     INT     DO LOOP COUNTER FOR ARRAY INDEX
C   CHAN     INT     DO LOOP COUNTER FOR CHANNELS
C   I        INT     DO LOOP INDEX
C
C   EXIT STATES-NONE
C
C***********************************************************************
      INTEGER BUFLEN, OVLEN, INDX, NCHAN, CHAN, I
      INTEGER QFLAGS(32,BUFLEN), SCTIM(2,BUFLEN)
      REAL    CLCOEF(3,NCHAN,BUFLEN)
      LOGICAL*1 DMLNMP(BUFLEN)
C
      INCLUDE 'SPVAL'
C
C  COPY PREVIOUS OVERLAP PORTION OF ARRAYS TO BEGINNING OF ARRAYS
C
      DO 30 INDX = 1, OVLEN
        DMLNMP(INDX) = DMLNMP(BUFLEN-OVLEN+INDX)
        SCTIM(1,INDX) = SCTIM(1,BUFLEN-OVLEN+INDX)
        SCTIM(2,INDX) = SCTIM(2,BUFLEN-OVLEN+INDX)
        DO 10 CHAN = 1, NCHAN
          CLCOEF(1,CHAN,INDX) = CLCOEF(1,CHAN,BUFLEN-OVLEN+INDX)
          CLCOEF(2,CHAN,INDX) = CLCOEF(2,CHAN,BUFLEN-OVLEN+INDX)
          CLCOEF(3,CHAN,INDX) = CLCOEF(3,CHAN,BUFLEN-OVLEN+INDX)
   10   CONTINUE
        DO 20 I = 1, 32
           QFLAGS(I,INDX) = QFLAGS(I,BUFLEN-OVLEN+INDX)
   20   CONTINUE
   30 CONTINUE
C
C  INITIALIZE REMAINDER OF ARRAYS
C
      DO 80 INDX = OVLEN+1, BUFLEN
        DMLNMP(INDX) = .FALSE.
        SCTIM(1,INDX) = I4SPV
        SCTIM(2,INDX) = I4SPV
        DO 50 CHAN = 1, NCHAN
          CLCOEF(1,CHAN,INDX) = R4SPV
          CLCOEF(2,CHAN,INDX) = R4SPV
          CLCOEF(3,CHAN,INDX) = R4SPV
   50   CONTINUE
        DO 60 I = 1, 32
           QFLAGS(I,INDX) = I4SPV
   60   CONTINUE
   80 CONTINUE
C
      RETURN
      END
