SUBROUTINE SUCMBDFP

!**** SUBROUTINE SUCMBDFP - CMA FIXED PART BODY ENTRY PACKED
!                           INFO. FORMAT

!        D. VASILJEVIC     ECMWF    30/08/1994

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

!        SET CMA FIXED PART BODY ENTRY PACKED INFO. FORMAT

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

!        CALL SUCMBDFP

!        SUCMBDFP IS CALLED BY SUCMABDF

!**   METHOD
!     ------

!        CMA FIXED PART BODY ENTRY PACKED INFO. FORMAT IS SET.

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

!        NONE

!**   MODIFICATIONS
!     -------------
!        M.Hamrud      01-Oct-2003 CY28 Cleaning
!        M.Hamrud      01-Dec-2003 CY28R1 Cleaning

!-----------------------------------------------------------------------

USE PARKIND1  ,ONLY : JPRB
USE YOMHOOK   ,ONLY : LHOOK,   DR_HOOK
USE YOMCMBDY , ONLY : NCMBPFBP ,NCMBPFOC ,NCMBVFBP ,NCMBVFOC ,&
 & NCMBHSBP ,NCMBHSOC ,NCMBQSBP ,NCMBQSOC ,NCMBORBP ,&
 & NCMBOROC ,NCMBFLBP ,NCMBFLOC ,NCMBSHBP ,NCMBSHOC ,&
 & NCMBPABP ,NCMBPAOC ,NCMBUABP ,NCMBUAOC ,NCMAFFBP ,&
 & NCMAFFOC ,NCMAGFBP ,NCMAGFOC ,NCMADFBP ,NCMADFOC ,&
 & NCMAVFBP ,NCMAVFOC ,NCMABFBP ,NCMABFOC ,NCMDACBP ,&
 & NCMDACOC ,NCMDPABP ,NCMDPAOC ,NCMDREBP ,NCMDREOC ,&
 & NCMDBLBP ,NCMDBLOC 
 
IMPLICIT NONE
REAL(KIND=JPRB) :: ZHOOK_HANDLE
!     ------------------------------------------------------------------

!*

!        1.       RDB PRESSURE/VARIABLE FLAGS
!                 ---------------------------

!*          1.1   PRESSURE FLAGS

IF (LHOOK) CALL DR_HOOK('SUCMBDFP',0,ZHOOK_HANDLE)
NCMBPFBP =  0
NCMBPFOC = 15

!*          1.2   VARIABLE FLAGS

NCMBVFBP = 15
NCMBVFOC = 15

!*          1.3   VARIABLE/VARIABLE FLAGS INNER STRUCTURE:
!                   BIT  0    - 1 HUMAN MONITOR SUBS.
!                             - 0 NO HUMAN MONITOR SUBS.
!                   BIT  1    - 1 Q/C SUBS.
!                             - 0 NO Q/C SUBS.
!                   BIT  2    - 1 OVER-RIDE FLAG SET
!                             - 0 OVER-RIDE FLAG NOT SET
!                   BITS 3-4  - 0 PARAM CORRECT
!                             - 1 PARAM PROBABLY CORRECT
!                             - 2 PARAM PROBABLY INCORRECT
!                             - 3 PARAM INCORRECT
!                   BIT  5    - 1 PARAM FLAG SET BY HUMAN MONITOR
!                             - 0 PARAM FLAG SET BY Q/C OR NOT CHECKED
!                   BITS 6-7  - 0 PARAM JUDGED CORRECT BY PREV. ANAL.
!                             - 1 PARAM WAS PROBABLY CORRECT
!                             - 2 PARAM WAS PROBABLY INCORRECT
!                             - 3 PARAM WAS INCORRECT
!                   BIT  8    - 1 PARAM WAS USED BY PREVIOUS ANALYSIS
!                             - 0 PARAM WAS NOT USED
!                   BITS 9-14 - 0

!*          1.3.1 HUMAN MONITOR SUBS.

NCMBHSBP =  0
NCMBHSOC =  1

!*          1.3.2 Q/C SUBS.

NCMBQSBP =  1
NCMBQSOC =  1

!*          1.3.3 OVER-RIDE FLAG

NCMBORBP =  2
NCMBOROC =  1

!*          1.3.4 VARIABLE FLAGS

NCMBFLBP =  3
NCMBFLOC =  2

!*          1.3.5 PARAM FLAG SET BY HUMAN MONITOR/QC

NCMBSHBP =  5
NCMBSHOC =  1

!*          1.3.6 PARAM JUDGED CORRECT BY PREV. ANAL.

NCMBPABP =  6
NCMBPAOC =  2

!*          1.3.7 PARAM WAS USED BY PREVIOUS ANALYSIS

NCMBUABP =  8
NCMBUAOC =  1
!*
!-----------------------------------------------------------------------

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

!*          2.1   FINAL FLAG

NCMAFFBP =  0
NCMAFFOC =  4

!*          2.2   FIRST GUESS FLAG

NCMAGFBP =  4
NCMAGFOC =  4

!*          2.3   DEPARTURE FLAG

NCMADFBP =  8
NCMADFOC =  4

!*          2.4   VARIATIONAL QUALITY CONTROL FLAG

NCMAVFBP = 12
NCMAVFOC =  4

!*          2.5   BLACKLIST FLAG

NCMABFBP = 16
NCMABFOC =  4
!*
!-----------------------------------------------------------------------

!        3.       DATUM STATUS
!                 ------------
!                  BIT  0 - IF SET TO 1 DATUM IS ACTIVE
!                  BIT  1 - IF SET TO 1 DATUM IS PASSIVE
!                  BIT  2 - IF SET TO 1 DATUM IS REJECTED
!                  BIT  3 - IF SET TO 1 DATUM IS BLACKLISTED

!*          3.1   ACTIVE DATUM

NCMDACBP=   0
NCMDACOC=   1

!*          3.2   PASSIVE DATUM

NCMDPABP=   1
NCMDPAOC=   1

!*          3.3   REJECTED DATUM

NCMDREBP=   2
NCMDREOC=   1

!*          3.4   BLACKLISTED DATUM

NCMDBLBP=   3
NCMDBLOC=   1
!*
!-----------------------------------------------------------------------

!        4.       DATUM EVENTS (PART 1)
!                 ---------------------
!                 STRUCTURE OF EVENTS WORD IS SUCH TAHT A PARTICULAR
!                 EVENT IS GIVEN BY ITS POSITION IN THE BIT STRING

!*
!-----------------------------------------------------------------------

!        5.       DATUM BLACKLIST EVENTS
!                 ----------------------
!                 STRUCTURE OF BL. EVENTS WORD IS SUCH TAHT A PARTICULAR
!                 EVENT IS GIVEN BY ITS POSITION IN THE BIT STRING

!*
!-----------------------------------------------------------------------

!        6.       RETURN
!                 ------

IF (LHOOK) CALL DR_HOOK('SUCMBDFP',1,ZHOOK_HANDLE)
END SUBROUTINE SUCMBDFP
