SUBROUTINE INI1SCAN2M(CDCONF,KCONF,LDDERR,LD2D,LDVFP,LDHFP,LDJGNR)
!****-------------------------------------------------------------------
!**** *INI1SCAN2M* - Identify what to do in the present call to SCAN2M*
!****-------------------------------------------------------------------
!     Purpose.   
!     --------
!**   Interface.
!     ----------
!        *CALL* *INI1SCAN2M (..)

!        Explicit arguments :  CDCONF - configuration of work (see doc.)
!        --------------------  KCONF  - model configuration
!                              LDDERR -
!                              LD2D -
!                              LDVFP -
!                              LDHFP -
!                              LDJGNR -

!        Implicit arguments :  None.
!        --------------------

!     Method.
!     -------

!     Reference.
!     ----------
!        ECMWF Research Department documentation of the IFS

!     Author.
!     -------
!        Lars Isaksen  *ECMWF*

!     Modifications.
!     --------------
!        Original - 97-05-05
!        R. El Khatib 00-07-31 Reorganize fullpos conf(5:5)
!        M.Hamrud      01-Oct-2003 CY28 Cleaning

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

IMPLICIT NONE

CHARACTER(LEN=9)  ,INTENT(IN)    :: CDCONF 
INTEGER(KIND=JPIM),INTENT(IN)    :: KCONF
LOGICAL           ,INTENT(OUT)   :: LDDERR 
LOGICAL           ,INTENT(OUT)   :: LD2D 
LOGICAL           ,INTENT(OUT)   :: LDVFP 
LOGICAL           ,INTENT(OUT)   :: LDHFP 
LOGICAL           ,INTENT(OUT)   :: LDJGNR 
REAL(KIND=JPRB) :: ZHOOK_HANDLE
!     ------------------------------------------------------------------

!*       1.1 INITIAL SETUP

IF (LHOOK) CALL DR_HOOK('INI1SCAN2M',0,ZHOOK_HANDLE)
LDDERR = CDCONF(3:3) /= 'B' .AND. CDCONF(3:3) /= 'D' .AND.&
 & CDCONF(3:3) /= 'P' .AND. CDCONF(3:3) /= '1'  

LD2D = KCONF/100 == 2 .OR. KCONF/10 == 42 .OR. KCONF/10 == 52

LDVFP =  (CDCONF(5:5) == 'B').OR.(CDCONF(5:5) == 'H')&
 & .OR.(CDCONF(5:5) == 'V').OR.(CDCONF(5:5) == 'T')&
 & .OR.(CDCONF(5:5) == 'S').OR.(CDCONF(5:5) == 'M')&
 & .OR.(CDCONF(5:5) == 'Z').OR.(CDCONF(5:5) == 'E')  

LDHFP =  (CDCONF(5:5) == 'A').OR.(CDCONF(5:5) == 'I').OR.(CDCONF(5:5) == 'G')&
 & .OR.(CDCONF(5:5) == 'P').OR.(CDCONF(5:5) == 'C').OR.(CDCONF(5:5) == 'X')  

LDJGNR = CDCONF(6:6) == 'A' .OR. CDCONF(6:6) == 'B' .OR.&
 & CDCONF(6:6) == 'G' .OR. CDCONF(6:6) == 'H' .OR.&
 & CDCONF(6:6) == 'M' .OR. CDCONF(6:6) == 'N' .OR.&
 & CDCONF(6:6) == 'S' .OR.&
 & CDCONF(6:6) == 'W' .OR. CDCONF(6:6) == 'X' .OR.&
 & CDCONF(6:6) == 'Y' .OR. CDCONF(6:6) == 'Z'  

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

