      SUBROUTINE GLCDVR
      IMPLICIT NONE
C***********************************************************************
C
C   NAME- GLCDVR
C
C   LANGUAGE-VS FORTRAN        TYPE-SUBROUTINE
C
C   VERSION-1.0      DATE- 10/25/91     PROGRAMMER-TERESA SIMMS (SMSRC)
C   VERSION- 2.0     DATE- 05/06/94   PROGRAMMER- FRANK TILLEY (SMSRC)
C                    XATOV-3 REPLACE COMMON BLOCK /BUFFER/ WITH
C                    PARAMETER FILE INSPARM AND COMMON BLOCK /INSCOM/.
C   VERSION- 2.1     DATE- 10/17/94   PROGRAMMER- TERESA SIMMS (SMSRC)
C                    XATOV-61 CALLS TO LCHIRS, LCMSU & LCSSU REPLACED
C                    WITH CALL TO LIMCOR.  COMMON /LCCOEF/ AND INCLUDE
C                    /INPARM/ ARE ADDED. CALLING ARGUMENTS REMOVED.
C   VERSION- 3.0     DATE- 06/13/96  PROGRAMMER- LEAH CASEY (HSTX)
C                    MODIFICATIONS FOR ATOVS BASELINE ON CRAY.
C
C   FUNCTION- THIS ROUTINE IS THE DRIVER FOR ALL THE GLOBAL LIMB
C   CORRECTION ROUTINES.  IT REPLACES THE VALUES IN THE AMSU-A, AMSU-B,
C   AND HIRS BUFFERS WITH THEIR LIMB CORRECTED VALUES.
C
C   COMMON AREA PARAMETERS - INSCOM,ERPARM,ERINFO,INSPARM,INPARM,LCCOEF
C
C   SUBROUTINES CALLED - LIMCOR
C
C   FUNCTIONS USED - BTEST
C
C   EXIT STATES - NONE
C
C**********************************************************************
C
      INCLUDE 'INSPARM'
      INCLUDE 'INSCOM'
      INCLUDE 'ERPARM'
      INCLUDE 'ERINFO'
      INCLUDE 'INPARM'
      INCLUDE 'LCCOEF'
C
C  CHECK THAT THE HIRS DATA IS AVAILABLE FOR THIS FRAME.
      IF (.NOT. BTEST(FRMCNF,31)) GOTO 10
C
C  PERFORM LIMB CORRECTION ON THE HIRS DATA.
      CALL LIMCOR(HIRDAT,HNSPOT,HTOTLN,HDATEL,HNCHAN,ASOHIR,LCCHIR)
C
C  CHECK THAT THE AMSU-A DATA IS AVAILABLE FOR THIS FRAME.
   10 IF (.NOT. BTEST(FRMCNF,30)) GOTO 20
C
C  PERFORM LIMB CORRECTION ON THE AMSU-A DATA.
      CALL LIMCOR(AMADAT,ANSPOT,ATOTLN,ADATEL,ANCHAN,ASOAMA,LCCAMA)
C
C  CHECK THAT THE AMSU-B DATA IS AVAILABLE FOR THIS FRAME.
   20 IF (.NOT. BTEST(FRMCNF,29)) GOTO 30
C
C  PERFORM LIMB CORRECTION ON THE AMSU-B DATA.
      CALL LIMCOR(AMBDAT,BNSPOT,BTOTLN,BDATEL,BNCHAN,ASOAMB,LCCAMB)
C
   30 RETURN
      END
