      SUBROUTINE PTHNAM(PATHID,RETID,QNAME)
C*********************************************************************
C
C   NAME- PTHNAM
C
C   LANGUAGE- VS FORTRAN      TYPE- SUBROUTINE    COMPUTER- HDS9000
C
C   VERSION- 1.0       DATE- 11/18/91     PROGRAMMER- CARLA NEIGH, SMSRC
C   VERSION- 3.0       DATE- 06/04/96     PROGRAMMER- TIM GARDNER (HSTX)
C
C   FUNCTION- THIS SUBROUTINE BUILDS THE NAME OF A QUALIFIER FOR THE
C             CDB AND OPCDB RETRIEVAL COMPONENTS BASED ON THE
C             CLASSIFICATION PATH AND THE RETRIEVAL COMPONENT
C             IDENTIFICATION NUMBER.
C
C   VERSION 3.0- DOCUMENTATION AND SYNTAX CHANGES FOR ATOVS BASELINE
C                ON THE CRAY.
C
C   CALLING SEQUENCE PARAMETERS-
C   NAME   TYPE   I/O  DESCRIPTION
C   ----    ----   ---  -----------
C   PATHID  INT     I   PATH IDENTIFICATION NUMBER-
C                       1 = CLEAR/CLOUD-CLEARED, 2 = CLOUDY,
C                       3 = NO-HIRS
C   RETID   INT     I   RETRIEVAL COMPONENT IDENTIFICATION NUMBER
C   QNAME   C*8     O   CDB OR OPCDB QUALIFIER NAME
C
C   LOCAL VARIABLES
C   NAME    TYPE   DESCRIPTION
C   ----     ----   -----------
C   NAMLEN   INT   NUMBER OF CHARACTERS IN QNAME
C
C   ASSUMPTIONS- PATHID IS ONE OF THE ALLOWED VALUES.  RETID IS
C                LESS THAN 100.
C
C   EXIT STATES- NONE
C
C*********************************************************************
C
      INTEGER PATHID, RETID, NAMLEN
      CHARACTER*8 QNAME
C
C  INITIALIZE QNAME TO ALL BLANKS.
C
      QNAME = '        '
C
C  ASSIGN VALUE TO QNAME.
C
      IF (PATHID .EQ. 1) THEN
         QNAME = 'CLR     '
         NAMLEN = 3
      ELSE
        IF (PATHID .EQ. 2) THEN
           QNAME = 'CLDY    '
           NAMLEN = 4
        ELSE
           QNAME = 'NOHIR   '
           NAMLEN = 5
        ENDIF
      ENDIF
C
C  IF RETID IS LESS THAN 10, WRITE THE SINGLE DIGIT TO THE NAMLEN+1
C  CHARACTERS OF QNAME.  OTHERWISE, WRITE BOTH DIGITS TO THE NAMLEN+1
C  AND NAMLEN+2 CHARACTERS OF QNAME.
C
      IF (RETID .LT. 10) THEN
        WRITE(QNAME(NAMLEN+1:NAMLEN+1),'(I1)') RETID
      ELSE
        WRITE(QNAME(NAMLEN+1:NAMLEN+2),'(I2)') RETID
      ENDIF
C
      RETURN
      END
