      SUBROUTINE PLCDBV(NFILE, CDBST)
      IMPLICIT NONE
C
C***********************************************************************
C
C   NAME- PLCDBV
C
C   LANGUAGE- VS FORTRAN      TYPE- SUBROUTINE      COMPUTER- CRAY J916
C
C   VERSION- 1.0      DATE- 03/19/91    PROGRAMMER- CARLA NEIGH  (SMSRC)
C   VERSION- 2.0      DATE- 09/08/94    PROGRAMMER- ALEX POZDNYAK(SMSRC)
C       XATOV-43      REMOVED INITIALIZATION OF COMMON BLOCK VARIABLES
C                     COEFFICIENT NAMES FOR 'MSU' CHANGE TO 'AMSUA'
C                     AND 'SSU' TO 'AMSUB'. VARIABLES IN /PLCOEF/
C                     CHANGED ACCORDING TO CHANGES IN COMMON BLOCK.
C   VERSION- 3.0      DATE- 04/28/96    PROGRAMMER- TIM GARDNER (HSTX)
C   VERSION- 3.1      DATE- 07/25/97    PROGRAMMER- B. GOCKEL (HSTX)/
C                                                   LEAH WILSON (HSTX)
C   VERSION- 3.2      DATE- 02/17/98    PROGRAMMER- LEAH WILSON,
C                                                   (RAYTHEON STX)
C   VERSION- 3.3      DATE- 01/26/04    PROGRAMMER- FRANK TILLEY (RAYTHEON)
C
C   FUNCTION- THIS SUBROUTINE GETS THE 1B INSTRUMENT BAND CENTER
C             FREQUENCIES, SCALES THEM AND PUTS THEM INTO THE COMMON
C             BLOCK /PLCOEF/.
C
C   VERSION 3.0- DOCUMENTATION AND SYNTAX CHANGES FOR ATOVS BASELINE
C                ON THE CRAY.
C   VERSION 3.1- CHANGES FOR CONSISTENCY WITH NEW (CRAY) CDB MANAGER.
C   VERSION 3.2- ADD READ FOR BAND CORRECTION COEFFICIENTS, AND
C                INCLUDE /EFFCOE/.
C   VERSION 3.3- UNCOMMENTED AMSU-B COEFFICIENTS.
C
C   FILES-
C     DSN OR DESCRIPTIVE TITLE  I/O  UNIT   FUNCTIONAL DECRIPTION
C     ------------------------  ---  ----   ---------------------
C     ...CDB                     I  CDBUNT  COEFFICIENT DATABASE.
C
C   CALLING SEQUENCE PARAMETERS-
C
C   NAME    TYPE  I/O    DESCRIPTION
C   ----    ----  ---    -----------
C   NFILE   INT    I     UNIT NUMBER FOR CDB FILE.
C   CDBST   INT    O     STATUS CODE RETURNED FROM ROUTINE
C                        INDICATING ERRORS IN OBTAINING AND
C                        CHECKING CDB VALUES
C                        = 0 IF NO ERROR ENCOUNTERED, = 99 IF
C                        ERROR ENCOUNTERED
C
C   COMMON AREA PARAMETERS- PLCOEF, PLPHSCON, EFFCOE
C
C   LOCAL VARIABLES
C   NAME    TYPE  DESCRIPTION
C   ----    ----  -----------
C   I       INT   DO LOOP VARIABLES
C   OUTARY  REAL  HOLD VALUES FROM CDB FOR BAND CTR FREQ.
C
C   SUBPROGRAMS CALLED-  REALCOEF
C
C   EXIT STATES-
C     CDBST = 99 : ERROR IN ACCESSING CDB VALUES
C
C   COMMENTS- THIS SUBROUTINE ASSUMES THAT THE OPERATIONS TO OPEN AND
C             CLOSE THE CDB ARE DONE ELSEWHERE IN PROCESSING.
C
C***********************************************************************
C
      INTEGER NFILE
      INTEGER CDBST, I
      REAL OUTARY(20),TPDIFL(17)
C
      INCLUDE 'PLCOEF'
      INCLUDE 'PLPHSCON'
      INCLUDE 'EFFCOE'
C
C   INITIALIZE CDB STATUS
C
      CDBST = 0
C
C   GET HIRS BAND CENTER FREQUENCY VALUES FOR COMPUTING C1V3H, C1V1H
C   TO LOAD INTO COMMON /PLCOEF/
C
C      NOTE, THESE ARE NOT "CENTER FREQUENCY" VALUES, BUT
CBG    BUT CENTRAL WAVE NUMBERS...
CBG    NOTE, BASED ON RTOVS CDB, OUTARY(1) SHOULD BE ABOUT 667 AND
CBG    OUTARY(20) SHOULD BE ABOUT 14453.
C
      CALL REALCOEF(NFILE,'INSTRMNT','BANDCENT','HIRS    ',20,0,0,0,
     1              OUTARY,'GET',CDBST)
      IF(CDBST.NE.0) GO TO 990
      DO 50 I = 1,20
        C1V3H(I) = C1PLNK * OUTARY(I)*OUTARY(I)*OUTARY(I)
        C2V1H(I) = C2PLNK * OUTARY(I)
   50 CONTINUE
C
C   GET AMSU-A BAND CENTER FREQUENCY VALUES FOR COMPUTING C1V3A, C1V1A
C   TO LOAD INTO COMMON /PLCOEF/
C
      CALL REALCOEF(NFILE,'INSTRMNT','BANDCENT','AMSUA   ',15,0,0,0,
     1              OUTARY,'GET',CDBST)
      IF(CDBST.NE.0) GO TO 990
      DO 60 I = 1,15
        C1V3A(I) = C1PLNK * OUTARY(I)*OUTARY(I)*OUTARY(I)
        C2V1A(I) = C2PLNK * OUTARY(I)
   60 CONTINUE
C
C   GET AMSU-B BAND CENTER FREQUENCY VALUES FOR COMPUTING C1V3B, C1V1B
C   TO LOAD INTO COMMON /PLCOEF/
C
      CALL REALCOEF(NFILE,'INSTRMNT','BANDCENT','AMSUB   ',5,0,0,0,
     1              OUTARY, 'GET', CDBST)
      IF(CDBST.NE.0) GO TO 990
      DO 70 I = 1,5
        C1V3B(I) = C1PLNK * OUTARY(I)*OUTARY(I)*OUTARY(I)
        C2V1B(I) = C2PLNK * OUTARY(I)
   70 CONTINUE
C
C   GET AVHRR BAND CENTER FREQUENCY VALUES FOR COMPUTING C1V3G, C1V1G
C   TO LOAD INTO COMMON /PLCOEF/
C
      CALL REALCOEF(NFILE,'INSTRMNT','BANDCENT','AVHRR   ',6,0,0,0,
     1              OUTARY, 'GET', CDBST)
      IF(CDBST.NE.0) GO TO 990
      DO 80 I = 1,6
        C1V3G(I) = C1PLNK * OUTARY(I)*OUTARY(I)*OUTARY(I)
        C2V1G(I) = C2PLNK * OUTARY(I)
   80 CONTINUE
C
      CALL REALCOEF(NFILE,'INSTRMNT','BANDCORR','HIRCORRB',20,0,0,0,
     1              CORRB,'GET',CDBST)
      IF(CDBST.NE.0) GO TO 990
      CALL REALCOEF(NFILE,'INSTRMNT','BANDCORR','HIRCORRC',20,0,0,0,
     1              CORRC,'GET',CDBST)
      IF(CDBST.NE.0) GO TO 990
C
      RETURN
C
C  IN THE CASE OF A FATAL CDB ERROR, SET A FATAL ERROR CODE RETURN.
C
  990 CDBST = 99
      RETURN
      END
