SUBROUTINE TIMELOG(N,DAYJUL,OUTDIR1) 
   
  ! *** WRITE OUT MODEL TIME STEP AND SUN/PC SYSTEM CLOCK TIME TO TIME.LOG FILE

  USE GLOBAL,ONLY:IK8
  IMPLICIT NONE
  INTEGER(IK8) :: N
  DOUBLE PRECISION, INTENT(IN) :: DAYJUL
  CHARACTER*8,      INTENT(IN) :: OUTDIR1
  CHARACTER*8 MRMDATE,MRMTIME*10  
  
  ! *** WRITE OUT MODEL TIME STEP AND SYSTEM CLOCK TIME TO TIME.LOG  
  CALL DATE_AND_TIME(MRMDATE,MRMTIME)  
    
  OPEN(9,FILE=OUTDIR1//'TIME.LOG',POSITION='APPEND')  
  WRITE(9,100)N,DAYJUL,MRMDATE,MRMTIME  
  CLOSE(9)

  100 FORMAT(' ','N =',I12,5X,'TIMEDAY = ',F12.4,5X,'DATE = ',A8,5X,'TIME = ',A10)  
  
END SUBROUTINE
 
