!+ Subroutine to read the headers 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_HEADER_0(IERR, IUNIT
     &   , N_ENTRY
     &   , DATE, DATA_BASE, LBL_CODE
     &   , LINE_SHAPE, CUTOFF, CONTINUUM, LINE_COUPLE
     &   , I_GAS, P, T, AMOUNT, PARTIAL_P
     &   , FREQ_ENTRY_LOW, FREQ_ENTRY_HIGH
     &   , N_TRANS_RECORD, I1_RECORD, N_TRANS
     &   )
!
!
!
      IMPLICIT NONE
!
!
!     INCLUDE HEADER FILES.
      INCLUDE 'incl/dimensions_arch.ucf'
      INCLUDE 'incl/def_std_io.icf'
      INCLUDE 'incl/error.pcf'
!
!
!     DUMMY ARGUMENTS.
!
      INTEGER	!, INTENT(OUT)
     &     IERR
!             ERROR FLAG
!
      INTEGER	!, INTENT(IN)
     &     N_ENTRY
!             NUMBER OF ENTRIES IN THE ARCHIVE
!
      INTEGER	!, INTENT(OUT)
     &     IUNIT
!             NUMBER OF UNIT FOR READING
     &   , I_GAS(NPD_ARCH_ENTRY)
!             TYPES OF GASES
     &   , N_TRANS_RECORD(NPD_ARCH_ENTRY)
!             NUMBER OF RECORDS IN ENTRY
     &   , I1_RECORD(NPD_ARCH_ENTRY)
!             POINTER TO FIRST RECORD OF ENTRY
     &   , N_TRANS(NPD_ARCH_ENTRY)
!             NUMBER OF TRANSMISSIONS IN ENTRY
     &   , DATA_BASE(NPD_ARCH_ENTRY)
!             DATA BASE USED FOR LINE DATA
     &   , LBL_CODE(NPD_ARCH_ENTRY)
!             LINE-BY-LINE CODE USED
     &   , LINE_SHAPE(NPD_ARCH_ENTRY)
!             LINE-SHAPE EMPLOYED
!
      CHARACTER	!, INTENT(OUT)
     &     DATE(NPD_ARCH_ENTRY)*9
!             INITIAL DATE OF ENTRY
!
      LOGICAL	!, INTENT(IN)
     &     LINE_COUPLE(NPD_ARCH_ENTRY)
!             LINE COUPLING STRING
     &   , CONTINUUM(NPD_ARCH_ENTRY)
!             CONTINUUM TREATMENT
      REAL*8	!, INTENT(OUT)
     &     CUTOFF(NPD_ARCH_ENTRY)
!             CUTOFFS OF LBL DATA
     &   , P(NPD_ARCH_ENTRY)
!             PRESSURE
     &   , T(NPD_ARCH_ENTRY)
!             TEMPERATURE
     &   , AMOUNT(NPD_ARCH_ENTRY)
!             AMOUNT
     &   , PARTIAL_P(NPD_ARCH_ENTRY)
!             PARTIAL PRESSURE
     &   , FREQ_ENTRY_LOW(NPD_ARCH_ENTRY)
!             LOW FREQUENCY LIMIT OF ENTRY
     &   , FREQ_ENTRY_HIGH(NPD_ARCH_ENTRY)
!             HIGH FREQUENCY LIMIT OF ENTRY
!
!
!     LOCAL VARIABLES.
!
      INTEGER
     &     I_ENTRY
!             NUMBER OF ENTRY IN FILE
     &   , I
!             LOOP VARIABLE
!
!     VARIABLES WITH FIXED PRECISION USED IN THE ARCHIVE.
      REAL*8
     &     ARCH_CUTOFF
     &   , ARCH_FREQ_ENTRY_LOW
     &   , ARCH_FREQ_ENTRY_HIGH
     &   , ARCH_P
     &   , ARCH_T
     &   , ARCH_AMOUNT
     &   , ARCH_PARTIAL_P
!
!
!
!
      DO I=1, N_ENTRY
         READ(IUNIT, REC=4*I-2)
     &      I_ENTRY, DATE(I_ENTRY), DATA_BASE(I_ENTRY)
     &      , LBL_CODE(I_ENTRY)
         READ(IUNIT, REC=4*I-1) LINE_SHAPE(I_ENTRY), ARCH_CUTOFF
     &      , CONTINUUM(I_ENTRY), LINE_COUPLE(I_ENTRY)
     &      , ARCH_FREQ_ENTRY_LOW, ARCH_FREQ_ENTRY_HIGH
         READ(IUNIT, REC=4*I) I_GAS(I_ENTRY), ARCH_P
     &      , ARCH_T, ARCH_AMOUNT, ARCH_PARTIAL_P
         READ(IUNIT, REC=4*I+1) N_TRANS_RECORD(I_ENTRY)
     &      , I1_RECORD(I_ENTRY), N_TRANS(I_ENTRY)
!        TRANSFER FROM THE PRECISION USED IN THE ARCHIVE
!        TO THAT USED IN THE CODE.
         CUTOFF(I_ENTRY)=ARCH_CUTOFF
         FREQ_ENTRY_LOW(I_ENTRY)=ARCH_FREQ_ENTRY_LOW
         FREQ_ENTRY_HIGH(I_ENTRY)=ARCH_FREQ_ENTRY_HIGH
         P(I_ENTRY)=ARCH_P
         T(I_ENTRY)=ARCH_T
         AMOUNT(I_ENTRY)=ARCH_AMOUNT
         PARTIAL_P(I_ENTRY)=ARCH_PARTIAL_P
      ENDDO
!
!
!
      RETURN
      END
