      SUBROUTINE GCDBOP(PATHID,RETID,NUMCHN,NUMLVL,NANCIL,SAT,ASAT,
     1                  SHRKMX,ERSTAT)
C*********************************************************************
C
C   NAME- GCDBOP
C
C   LANGUAGE- VS FORTRAN    TYPE- SUBROUTINE     COMPUTER- CRAY J916
C
C   VERSION- 1.0      DATE- 11/18/91  PROGRAMMER- CARLA NEIGH (SMSRC)
C   VERSION- 2.0      DATE- 06/02/94  PROGRAMMER- FRANK TILLEY (SMSRC)
C           XATOV-8:  ADDED PARAMETER FILE CDBPARM BEFORE THE
C                     COMMON BLOCK /COMOCD/.
C   VERSION- 3.0      DATE- 06/03/96  PROGRAMMER- TIM GARDNER (HSTX)
C   VERSION- 3.1      DATE- 07/25/97  PROGRAMMER- LEAH WILSON (HSTX)
C
C   FUNCTION-  THIS SUBROUTINE GETS THE CLASSIFICATION RETRIEVAL
C              OPERATOR COMPONENTS FROM THE OPCDB.  THE VALUES OBTAINED
C              FROM THE OPCDB DEPEND ON THE CLASSIFICATION PATH AND
C              THE CLASS IDENTIFICATION NUMBER.
C
C   VERSION 3.0- DOCUMENTATION AND SYNTAX CHANGES FOR ATOVS BASELINE ON
C                THE CRAY.
C   VERSION 3.1- CONVERT CDB UTILITES TO NEW 8-BYTE UTILITIES.  REMOVE
C                GCDBO$ SINCE CDB UTILITIES HANDLE ERRORS.
C
C   FILES-
C   DSN OR DESCRIPTIVE TITLE I/O  UNIT  FUNCTIONAL DESCRIPTION
C   ------------------------ ---  ----  ----------------------
C   NSS. ... .OPCDB           I  UNTOPC RETRIEVAL OPERATOR COMPONENT CDB
C
C   CALLING SEQUENCE PARAMETERS
C   NAME    TYPE   I/O   DESCRIPTION
C   ----    ----   ---   -----------
C   PATHID  INT     I    CLASSIFICATION PATH IDENTIFICATION NUMBER-
C                        1 = CLEAR/CLOUD-CLEARED, 2 = CLOUDY,
C                        3 = NO-HIRS.
C   RETID   INT     I    RETRIEVAL COMPONENT IDENTIFICATION NUMBER.
C   NUMCHN  INT     I    NUMBER OF INSTRUMENT CHANNELS USED IN MAKING
C                        A RETRIEVAL.
C   NUMLVL  INT     I    NUMBER OF LEVELS OF TEMPERATURE AND WATER
C                        VAPOR MIXING RATIO IN A RETRIEVAL.
C   NANCIL  INT     I    TOTAL NUMBER OF ANCILLARY ELEMENTS IN
C                        PREDICTORS USED FOR SHRINKAGE ESTIMATOR
C                        COEFFICIENT MATRIX.
C   SAT     REAL    O    2D ARRAY (DIM NUMLVL X NUMCHN) CONTAINING THE
C                        RETRIEVAL OPERATOR COMPONENT SA-TRANSPOSE.
C   ASAT    REAL    O    2D ARRAY (DIM NUMCHN X NUMCHN) CONTAINING THE
C                        RETRIEVAL OPERATOR COMPONENT (ASA)-TRANSPOSE.
C   SHRKMX  REAL    O    2D ARRAY (DIM NUMCHN X NUMCHN+NANCIL)
C                        CONTAINING THE SHRINKAGE ESTIMATOR COEFFICIENT
C                        MATRIX.
C   ERSTAT  INT     O    ERROR RETURN CODE FROM GCDBOP
C                         = 0 IF NO ERROR OCCURRED IN ACCESSING
C                           OPCDB VALUES
C                         <> 0 IF ERROR OCCURRED.
C
C   LOCAL VARIABLES-
C   NAME   TYPE   DESCRIPTION
C   ----   ----   -----------
C   STATUS INT    STATUS RETURNED FROM REALCOEF
C   NAME   CH*8   CDB GROUP,SUBGROUP, OR COEFFICIENT NAME.
C
C   SUBPROGRAMS CALLED- PTHNAM, REALCOEF
C
C   ASSUMPTIONS- OPEN/CLOSE CDB OPS. ARE CALLED OUTSIDE THIS ROUTINE.
C
C   EXIT STATES-
C    ERSTAT = 99 - ERROR OCCURRED IN ACCESSING OPCDB RETRIEVAL VALUES.
C
C*********************************************************************
C
      INCLUDE 'SPGUNT'
      INTEGER PATHID, RETID, NUMCHN, NUMLVL, NANCIL, ERSTAT
      REAL SAT(NUMLVL,NUMCHN), ASAT(NUMCHN,NUMCHN)
      REAL SHRKMX(NUMCHN,NUMCHN+NANCIL)
      CHARACTER*8 NAME
C
      INTEGER STATUS
C
      ERSTAT = 0
C
C  OBTAIN SA-TRANSPOSE MATRIX FROM OPCDB.
C
      CALL PTHNAM(PATHID,RETID,NAME)
      CALL REALCOEF(UNTOPC,'RETRIEVE','SAT     ',NAME,
     1              NUMLVL,NUMCHN,0,0,SAT,'GET',STATUS)
      IF(STATUS.NE.0) GO TO 20
C
C  OBTAIN (ASA)-TRANSPOSE FROM OPCDB.
C
      CALL REALCOEF(UNTOPC,'RETRIEVE','ASAT    ',NAME,
     1              NUMCHN,NUMCHN,0,0,ASAT,'GET',STATUS)
      IF(STATUS.NE.0) GO TO 20
C
C  OBTAIN SHRINKAGE ESTIMATOR COEFFICIENT MATRIX FROM OPCDB.
C
      CALL REALCOEF(UNTOPC,'RETRIEVE','SHRKESTM',NAME,NUMCHN,
     1              NUMCHN+NANCIL,0,0,SHRKMX,'GET',STATUS)
      IF(STATUS.NE.0) GO TO 20
C
      RETURN
C
   20 ERSTAT = 99
      RETURN
      END
