SUBROUTINE CHREVE(PREPORT,KRLN,KEVENT)

!**** SUBROUTINE CHREVE - CHANGE (ADD) REPORT EVENT

!          HEIKKI JARVINEN   ECMWF          15/MAR/1995

!*    PURPOSE
!     -------

!        CHANGE REPORT EVENT

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

!     ***CALL CHREVE(PREPORT,KRLN,KEVENT)
!     WHERE PREPORT = THE WHOLE REPORT IN AN REAL ARRAY
!           KRLN    = THE REPORT LENGTH
!           KEVENT = NUMBER OF REPORT EVENT TO BE ADDED

!        CHREVE IS CALLED BY SUBROUTINES PRECH, SELEC, ...

!*    METHOD
!     ------

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

!**   MODIFICATIONS
!     -------------
!        H. Jarvinen 12 Dec 1996 : A modified subroutine call
!     ------------------------------------------------------------------

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

USE YOMCMHDR , ONLY : NCMREV1

IMPLICIT NONE

INTEGER(KIND=JPIM),INTENT(IN)    :: KRLN 
REAL(KIND=JPRB)   ,INTENT(INOUT) :: PREPORT(KRLN) 
INTEGER(KIND=JPIM),INTENT(IN)    :: KEVENT 
#include "fcobs.h"

INTEGER(KIND=JPIM) :: ICMREV1
REAL(KIND=JPRB) :: ZHOOK_HANDLE

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

!        1.       INITIALIZE
!                 ----------
!*
!     ------------------------------------------------------------------

!        2.       CHANGE REPORT EVENT
!                 -------------------

IF (LHOOK) CALL DR_HOOK('CHREVE',0,ZHOOK_HANDLE)
ICMREV1 = INTREA(PREPORT(NCMREV1))
INVAL   = 1
ICMREV1 = INSERT(ICMREV1, INVAL, KEVENT-1)
PREPORT(NCMREV1) = REAINT(ICMREV1)
!*
!     ------------------------------------------------------------------

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

