MODULE ENKF_MIX

!   Purpose
!   -------
!     Switches for Ensemble Kalman Filter within the IFS

!   Author
!   ------
!     Mats Hamrud

!   Modifications
!   -------------
!     Original    23-Feb-2010
!
USE PARKIND1, ONLY: JPIM, JPRB
USE YOMHOOK , ONLY: LHOOK, DR_HOOK
USE YOMLUN   , ONLY : NULOUT   ,NULNAM

IMPLICIT NONE
SAVE

LOGICAL :: LENKF
INTEGER :: NSIZE_ENSEMBLE
INTEGER :: MYMEMBER

CONTAINS
!========================================================================
SUBROUTINE SETUP_ENKF

!   Purpose
!   -------
!    Setup routine for ENKF control

IMPLICIT NONE

REAL(KIND=JPRB) :: ZHOOK_HANDLE

NAMELIST/NAMENKF/LENKF,NSIZE_ENSEMBLE,MYMEMBER

#include "posnam.intfb.h"
!-----------------------------------------------------------------------
IF (LHOOK) CALL DR_HOOK('ENKF_MIX:SETUP_ENKF',0,ZHOOK_HANDLE)


LENKF = .FALSE.
NSIZE_ENSEMBLE = 0
MYMEMBER = 0

CALL POSNAM(NULNAM,'NAMENKF')
READ(NULNAM,NAMENKF)

WRITE(NULOUT,NAMENKF)

IF (LHOOK) CALL DR_HOOK('ENKF_MIX:SETUP_ENKF',1,ZHOOK_HANDLE)

END SUBROUTINE SETUP_ENKF
!========================================================================
END MODULE ENKF_MIX
