      SUBROUTINE ODBTIM(CENDAY, MILTIM, TIMODB)
      IMPLICIT NONE
C
C***********************************************************************
C    NAME- ODBTIM
C
C    LANGUAGE- FORTRAN 77     TYPE- SUBROUTINE   COMPUTER- CRAY   
C
C    VERSION- 1.0     DATE- 05/30/91   PROGRAMMER- DAVE MOREL (SMSRC)
C    VERSION- 3.0     DATE- 04/15/96   PROGRAMMER- ALEX POZDNYAK (FDC)
C      MODIFIED TO RUN ON THE CRAY.  REPLACED I*4 WITH INT.
C 
C    FUNCTION- THIS SUBROUTINE COMPUTES CENTURY DAY AND MILISECOND
C              TIME USED IN DATA INPUT TO A VECTOR OF 3 ELEMENTS
C              IN FORMAT YYMM, DDHH, MMSS FOR THE OPERATIONAL
C              DATA BASE(ODB).
C
C    CALLING SEQUENCES-
C      VARIABLE   TYPE  I/O  DESCRIPTION
C      --------   ----  ---  -----------
C      CENDAY      INT   I   DAY OF CENTURY (FROM 1900)
C      MILTIM      INT   I   SYNC TIME OF DATA FRAME IN MILLISECONDS
C      TIMODB      INT   O   A VECTOR OF 3 ELEMENTS CONTAINING THE
C                            YYMM, DDHH, MMSS FOR THE ODB
C
C    LOCAL VARIABLES-
C      VARIABLE    TYPE   DESCRIPTION
C      --------    ----   -----------
C      IHR          INT   HOUR OF DAY EXTRACTED FROM MILTIM
C      IMN          INT   MINUTE OF HOUR EXTRACTED FROM MILTIM
C      ISC          INT   SECOND OF MINUTE EXTRACTED FROM MILTIM
C      MSEC         INT   WORK SPACE TO HOLD PORTIONS OF MILTIM
C      YEAR         INT   YEAR OF CENTURY EXTRACTED FROM CENDAY
C      MNTH         INT   MONTH OF YEAR EXTRACTED FROM CENDAY
C      DY           INT   DAY OF MONTH EXTRACTED FROM CENDAY
C      JDAY         INT   DAY OF YEAR
C
C    SUBPROGRAMS CALLED- JULDAY, YRJDAY
C
C    EXIT STATES- NONE
C
C    RESTRICTIONS-
C      IT IS ASSUMED THE MILLISECONDS OF DAY WILL NOT EXCEED ONE DAY.
C      CENTURY DAY MUST REFLECT THE ACTUAL DAY.
C***********************************************************************
C
      INTEGER  CENDAY, MILTIM, TIMODB(3)
C
      INTEGER  IHR, IMN, ISC, MSEC, YEAR, MNTH, DY, JDAY
C
C  INITIALIZE ALL LOCAL VARIABLES
C
      IHR = 0
      IMN = 0
      ISC = 0
      MSEC = 0
      YEAR = 0
      MNTH = 0
      DY = 0
      JDAY = 0
C
C  CALL YRJDAY TO EXTRACT YEAR AND JDAY FROM CENDAY
C
      CALL YRJDAY(CENDAY, YEAR, JDAY)
C
C  CALL JULDAY TO EXTRACT THE MONTH AND DAY
C
      CALL JULDAY(JDAY, YEAR, MNTH, DY)
C
C  EXTRACT THE HOUR, MINUTE AND SECOND FROM MILTIM
C
      IHR = MILTIM/3600000
      MSEC = MILTIM-(IHR*3600000)
      IMN = MSEC/60000
      MSEC = MSEC-(IMN*60000)
      ISC = MSEC/1000
C
C  PACK YEAR AND MONTH, DAY AND HOUR, MINUTE AND SECOND
C  IN THE VECTOR TIMODB
C
      TIMODB(1) = (YEAR*100)+MNTH
      TIMODB(2) = (DY*100)+IHR
      TIMODB(3) = (IMN*100)+ISC
      RETURN
      END
