SUBROUTINE SUTIM(KULOUT)

!**** *SUTIM * - Initialize the common containing real time

!     Purpose.
!     --------
!        Initialisation of the common YOMTIM

!**   Interface.
!     ----------
!        *CALL* *SUTIM(KULOUT)*

!        Explicit arguments :
!        --------------------

!           KULOUT : logical unit for the output

!        Implicit arguments :
!        --------------------
!           common YOMTIM

!     Method.
!     -------
!        Use of the facilities of the CRAY timing functions

!     Externals.
!     ----------
!        USER_CLOCK,DATE_AND_TIME

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

!     Author.
!     -------
!        Mats Hamrud and Philippe Courtier  *ECMWF*

!     Modifications.
!     --------------
!        Original : 87-10-15
!        M.Hamrud      01-Oct-2003 CY28 Cleaning
!     ------------------------------------------------------------------

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

USE YOMTIM   , ONLY : RSTART   ,RVSTART  ,RTIMEF

IMPLICIT NONE

INTEGER(KIND=JPIM),INTENT(IN)    :: KULOUT 
INTEGER(KIND=JPIM) :: J

INTERFACE
#include "user_clock.h"
END INTERFACE

INTEGER(KIND=JPIM) :: IVALUES(8)
CHARACTER (LEN = 10) ::  CLDAT(3)
REAL(KIND=JPRB) :: ZHOOK_HANDLE

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

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

IF (LHOOK) CALL DR_HOOK('SUTIM',0,ZHOOK_HANDLE)
CALL USER_CLOCK(PELAPSED_TIME=RTIMEF,PVECTOR_CP=RVSTART,PTOTAL_CP=RSTART)

CALL DATE_AND_TIME(CLDAT(1),CLDAT(2),CLDAT(3),IVALUES)

WRITE(UNIT=KULOUT,FMT='('' ***   Real world time    ***'')')
WRITE(UNIT=KULOUT,&
 & FMT='('' Date : '',I4.4,''-'',I2.2,''-'',I2.2,'' Time : ''&
 & ,I2.2,'':'',I2.2,'':'',I2.2)')&
 & (IVALUES(J),J=1,3),(IVALUES(J),J=5,7)  
WRITE(KULOUT,'(1X,F17.10,'' s since start of run'')')RSTART
WRITE(KULOUT,'(1X,F17.10,'' s from last call  '')')RTIMEF

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

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