SUBROUTINE SUFLTXT(KOUT)

!**** SUBROUTINE SUFLTXT - FLAG'S PLAIN TEXT EXPLANATIONS

!        D. VASILJEVIC    ECMWF    07/09/1994

!**   PURPOSE
!     -------

!        DEFINE TEXT EXPLANATIONS FOR FLAGS

!**   INTERFACE
!     ---------

!        CALL SUFLTXT(KOUT)
!     WHERE:
!            KOUT = OUTPUT UNIT

!        SUFLTXT IS CALLED BY

!**   METHOD
!     ------

!        FOR VARIOUS FLAGS AN EXPLANATION IS GIVEN.

!**   EXTERNALS
!     ---------

!**   MODIFICATIONS
!     -------------
!-----------------------------------------------------------------------

USE PARKIND1  ,ONLY : JPIM     ,JPRB
USE YOMHOOK   ,ONLY : LHOOK,   DR_HOOK

USE YOMFLTXT , ONLY : CRDRPFL  ,CRDDAFL  ,CANDAFL

!*       1.         RDB REPORT, PRESSURE AND VARIABLE FLAGS
!                   ---------------------------------------

!*          1.1     REPORT FLAGS ON LAT, LON, DATE, TIME AND ALT.

IMPLICIT NONE

INTEGER(KIND=JPIM),INTENT(IN)    :: KOUT 
REAL(KIND=JPRB) :: ZHOOK_HANDLE

IF (LHOOK) CALL DR_HOOK('SUFLTXT',0,ZHOOK_HANDLE)
CRDRPFL ( 1)  =  'HUMAN MONITOR SUBSTITUTION'
CRDRPFL ( 2)  =  'QUALITY CONTROL SUBSTITUTION'
CRDRPFL ( 3)  =  'OVERRIDE BY HUMAN MONITOR'
CRDRPFL ( 4)  =  'FLAG ON PARAMETER'
CRDRPFL ( 5)  =  'FLAG SET BY HUMAN MONITOR (1)/BY QC (0)'

!*          1.2     PRESSURE/VARIABLE FLAGS

CRDDAFL ( 1)  =  'HUMAN MONITOR SUBSTITUTION'
CRDDAFL ( 2)  =  'QUALITY CONTROL SUBSTITUTION'
CRDDAFL ( 3)  =  'OVERRIDE BY HUMAN MONITOR'
CRDDAFL ( 4)  =  'FLAG ON PARAMETER'
CRDDAFL ( 5)  =  'FLAG SET BY HUMAN MONITOR (1)/BY QC (0)'
CRDDAFL ( 6)  =  'DEGREE OF CONFIDENCE GIVEN BY A PREV. ANAL.'
CRDDAFL ( 7)  =  'VARIABLE USED (1)/NOT USED (0) BY PREV. ANAL.'
!*
!-----------------------------------------------------------------------

!        2.         ANALYSIS FLAGS
!                   --------------

!*          2.1     VARIABLE FLAGS

CANDAFL ( 1)  =  'FINAL FLAG'
CANDAFL ( 2)  =  'FIRST GUESS FLAG'
CANDAFL ( 3)  =  'DEPARTURE FLAG'
CANDAFL ( 4)  =  'VARIATIONAL QUALITY FLAG'
CANDAFL ( 5)  =  'BLACK LIST FLAG'
CANDAFL ( 6)  =  '  '
CANDAFL ( 7)  =  '  '
!*
!-----------------------------------------------------------------------

!        3.         SETUP
!                   -----
WRITE(KOUT,'(''0FLAGS SETUP'')')
WRITE(KOUT,'('' '')')
WRITE(KOUT,'(''   RDB REPORT FLAGS STRUCTURE:'')')
WRITE(KOUT,'(''   ---------------------------'')')
WRITE(KOUT,'('' '')')
WRITE(KOUT,'(''  '',A)') CRDRPFL( 1)
WRITE(KOUT,'(''  '',A)') CRDRPFL( 2)
WRITE(KOUT,'(''  '',A)') CRDRPFL( 3)
WRITE(KOUT,'(''  '',A)') CRDRPFL( 4)
WRITE(KOUT,'(''  '',A)') CRDRPFL( 5)

WRITE(KOUT,'('' '')')
WRITE(KOUT,'(''   RDB PRESSURE/VARIABLE FLAGS STRUCTURE:'')')
WRITE(KOUT,'(''   --------------------------------------'')')
WRITE(KOUT,'('' '')')
WRITE(KOUT,'(''  '',A)') CRDDAFL( 1)
WRITE(KOUT,'(''  '',A)') CRDDAFL( 2)
WRITE(KOUT,'(''  '',A)') CRDDAFL( 3)
WRITE(KOUT,'(''  '',A)') CRDDAFL( 4)
WRITE(KOUT,'(''  '',A)') CRDDAFL( 5)
WRITE(KOUT,'(''  '',A)') CRDDAFL( 6)
WRITE(KOUT,'(''  '',A)') CRDDAFL( 7)

WRITE(KOUT,'('' '')')
WRITE(KOUT,'(''   ANALYSIS VARIABLE FLAGS STRUCTURE:'')')
WRITE(KOUT,'(''   ----------------------------------'')')
WRITE(KOUT,'('' '')')
WRITE(KOUT,'(''  '',A)') CANDAFL( 1)
WRITE(KOUT,'(''  '',A)') CANDAFL( 2)
WRITE(KOUT,'(''  '',A)') CANDAFL( 3)
WRITE(KOUT,'(''  '',A)') CANDAFL( 4)
WRITE(KOUT,'(''  '',A)') CANDAFL( 5)
WRITE(KOUT,'(''  '',A)') CANDAFL( 6)
WRITE(KOUT,'(''  '',A)') CANDAFL( 7)
!*
!-----------------------------------------------------------------------

!        4.         RETURN
!                   ------
IF (LHOOK) CALL DR_HOOK('SUFLTXT',1,ZHOOK_HANDLE)
END SUBROUTINE SUFLTXT
