!+ Subroutine to read the summary of gaseous transmission data.
!
! Method:
!	Straightforward.
!
! 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_TRANS_SUMMARY(IERR, L_CONTINUUM
     &   , TRANS_TYPE
     &   , N_SET, LENGTH_SET, P_SET, T_SET
     &   , WAVE_LENGTH_SHORT_SET, WAVE_LENGTH_LONG_SET
     &   , BAND_SET, TYPE_SET, INDEX_SET, I_FIRST_RECORD
     &   )
!
!
      IMPLICIT NONE
!
!
!     INCLUDE HEADER FILES.
      INCLUDE 'incl/def_std_io.icf'
      INCLUDE 'incl/dimensions_pp.ucf'
      INCLUDE 'incl/def_pp_io.icf'
      INCLUDE 'incl/file_type.pcf'
      INCLUDE 'incl/error.pcf'
!
!     DUMMY VARIABLES
      CHARACTER	!, INTENT(OUT)
     &     TRANS_TYPE(NPD_SET)*4
!             TYPES OF TRANSMISSION
      INTEGER	!, INTENT(OUT)
     &     IERR
!             ERROR FLAG
     &   , N_SET
!             NUMBER OFSETS
     &   , LENGTH_SET(NPD_SET)
!             LENGTHS OF SETS
     &   , BAND_SET(NPD_SET)
!             BANDS OF SETS
     &   , TYPE_SET(NPD_SET)
!             TYPE NUMBERS OF GASES
     &   , INDEX_SET(NPD_SET)
!             INDEXING NUMBERS OF GASES
     &   , I_FIRST_RECORD(NPD_SET)
!             FIRST RECORDS OF SETS
      LOGICAL	!, INTENT(IN)
     &     L_CONTINUUM
!             WORK IN CONTINUUM MODE
      REAL*8	!, INTENT(OUT)
     &     P_SET(NPD_SET)
!             PRESSURES OF SETS
     &   , T_SET(NPD_SET)
!             TEMPERATURES OF SETS
     &   , WAVE_LENGTH_SHORT_SET(NPD_SET)
!             SHORT WAVELENGTH LIMIT OF SET
     &   , WAVE_LENGTH_LONG_SET(NPD_SET)
!             LONG WAVELENGTH LIMIT OF SET
!
!     LOCAL VARIABLES
      INTEGER
     &     I_INPUT_TYPE
!             TYPE OF FILE
     &   , I_DUMMY
!             DUMMY VARIABLE
!
!
!     READ IN THE HEADER FOR EACH SET OF DATA.
      N_SET=0
10       READ(IU_TRANSMISSION_SUMMARY, '(13X, I5, //)', END=20)
     &      I_INPUT_TYPE
         IF (L_CONTINUUM) THEN
            IF (I_INPUT_TYPE.NE.IT_FILE_CONT_TRANS_SUMMARY) THEN
               WRITE(IU_ERR, '(/A)')
     &            '*** ERROR: THE INPUT FILE IS OF AN INVALID TYPE.'
               IERR=I_ERR_FATAL
               RETURN
            ENDIF
         ELSE
            IF (I_INPUT_TYPE.NE.IT_FILE_LINE_TRANS_SUMMARY) THEN
               WRITE(IU_ERR, '(/A)')
     &            '*** ERROR: THE INPUT FILE IS OF AN INVALID TYPE.'
               IERR=I_ERR_FATAL
               RETURN
            ENDIF
         ENDIF
         N_SET=N_SET+1
!        CHECK SIZE OF ARRAY.
         IF (N_SET.GT.NPD_SET) THEN
            WRITE(IU_ERR, '(/A)')
     &         '***ERROR: TOO MANY SETS OF TRANSMISSION DATA.'
            WRITE(IU_ERR, '(A)')
     &         'INCREASE NPD_SET AND RE-COMPILE.'
            IERR=I_ERR_FATAL
            RETURN
         ENDIF
!
         READ(IU_TRANSMISSION_SUMMARY, '(10X, I5, 17X, I6, /, A4, /)')
     &      I_DUMMY, I_FIRST_RECORD(N_SET), TRANS_TYPE(N_SET)
         IF (L_CONTINUUM) THEN
            READ(IU_TRANSMISSION_SUMMARY, '(45X, I5)') INDEX_SET(N_SET)
         ELSE
            READ(IU_TRANSMISSION_SUMMARY, '(33X, I5, 9X, I5)')
     &         TYPE_SET(N_SET), INDEX_SET(N_SET)
         ENDIF
         READ(IU_TRANSMISSION_SUMMARY,
     &      '(14X, 1PE10.3, 23X, 1PE10.3, 3X)')
     &      P_SET(N_SET), T_SET(N_SET)
         READ(IU_TRANSMISSION_SUMMARY
     &      , '(8X, I5, 4X, 1PE10.3, 6X, 1PE10.3, 2X)')
     &      BAND_SET(N_SET)
     &      , WAVE_LENGTH_SHORT_SET(N_SET), WAVE_LENGTH_LONG_SET(N_SET)
         READ(IU_TRANSMISSION_SUMMARY, '(/, I5, /)') LENGTH_SET(N_SET)
         GOTO 10
!
!
20    RETURN
      END
