!+ Subroutine to read an entry from an archive of type 0.
!
! Method:
!	The entry contains double precision variables. These are read
!	into variables of fixed precision, independent of the 
!	configuration; and then transferred to the returned arrays
!	which are at the configured precision.
!
! Current Owner of Code: J. M. Edwards
!
! History:
!	Version		Date			Comment
!	1.0		12-04-95		First Version under RCS
!						(J. M. Edwards)
!
! Description of Code:
!   FORTRAN 77  with extensions listed in documentation.
!
!- ---------------------------------------------------------------------
      SUBROUTINE READ_ARCHIVE_ENTRY_0(IUNIT
     &   , N_TRANS_RECORD, I1_RECORD, N_PER_ARCH_RECORD
     &   , N_TRANS, FREQ_LOW, FREQ_HIGH, TRANS
     &   )
!
!
!
      IMPLICIT NONE
!
!
!     INCLUDE HEADER FILES.
      INCLUDE 'incl/arch_record_size.pcf'
!
!
!     DUMMY ARGUMENTS
      INTEGER	!, INTENT(IN)
     &     IUNIT
!             UNIT NUMBER FOR OUTPUT
     &   , N_TRANS_RECORD
!             NUMBER OF TRANSMISSION RECORDS
     &   , I1_RECORD
!             FIRST RECORD OF ENTRY
     &   , N_PER_ARCH_RECORD
!             NUMBER OF SETS OF VALUES PRE REC.
     &   , N_TRANS
!             NUMBER OF TRANSMISSIONS
      REAL*8	!, INTENT(OUT)
     &     FREQ_LOW(N_TRANS)
!             LOWER LIMIT OF INTERVAL
     &   , FREQ_HIGH(N_TRANS)
!             UPPER LIMIT OF INTERVAL
     &   , TRANS(N_TRANS)
!             AVERAGED TRANSMITTANCES
!
!     LOCAL VARIABLES
      INTEGER
     &     I
!             LOOP VARIABLE
     &   , J
!             LOOP VARIABLE
     &   , I_REC
!             NUMBER OF RECORD
     &   , N_OFFSET
!             OFFSET IN MAIN ARRAY
     &   , N_LAST
!             NUMBER OF VARIABLES TO BE READ FROM LAST RECORD
!
!     VARIABLES TO FIXED PRECISION FOR ARCHIVE.
      REAL*8
     &     ARCH_FREQ_LOW(NP_BYTES_PER_RECORD/24)
!             LOWER LIMIT OF INTERVAL
     &   , ARCH_FREQ_HIGH(NP_BYTES_PER_RECORD/24)
!             UPPER LIMIT OF INTERVAL
     &   , ARCH_TRANS(NP_BYTES_PER_RECORD/24)
!             AVERAGED TRANSMITTANCES
!
!
!
      DO I=1, N_TRANS_RECORD-1
         I_REC=I1_RECORD-1+I
         READ(IUNIT, REC=I_REC)
     &      (ARCH_FREQ_LOW(J), ARCH_FREQ_HIGH(J), ARCH_TRANS(J)
     &      , J=1, N_PER_ARCH_RECORD)
         N_OFFSET=N_PER_ARCH_RECORD*(I-1)
         DO J=1, N_PER_ARCH_RECORD
            FREQ_LOW(J+N_OFFSET)=ARCH_FREQ_LOW(J)
            FREQ_HIGH(J+N_OFFSET)=ARCH_FREQ_HIGH(J)
            TRANS(J+N_OFFSET)=ARCH_TRANS(J)
         ENDDO
      ENDDO
!
!     THE LAST RECORD IS EXCEPTIONAL.
      N_LAST=N_TRANS-N_PER_ARCH_RECORD*(N_TRANS_RECORD-1)
      IF (N_LAST.GT.0) THEN
         I_REC=I1_RECORD+N_TRANS_RECORD-1
         READ(IUNIT, REC=I_REC)
     &      (ARCH_FREQ_LOW(J), ARCH_FREQ_HIGH(J), ARCH_TRANS(J)
     &      , J=1, N_LAST)
         N_OFFSET=N_PER_ARCH_RECORD*(N_TRANS_RECORD-1)
         DO J=1, N_LAST
            FREQ_LOW(N_OFFSET+J)=ARCH_FREQ_LOW(J)
            FREQ_HIGH(N_OFFSET+J)=ARCH_FREQ_HIGH(J)
            TRANS(N_OFFSET+J)=ARCH_TRANS(J)
         ENDDO
      ENDIF
!
!
      RETURN
      END
