      REAL*8 FUNCTION TD2UT(TD)
!
!     GIVEN JULIAN DAY NUMBER AND FRACTION IN DYNAMICAL (EPHEMERIS)
!     (TD) TIME, RETURN UNIVERSAL TIME (UT).
!
!     B. KNAPP, 1996-01-26
!
C
C     RCS DATA
C     
C     $Header$
C     
C     $Log$
C
C
      IMPLICIT NONE
!
!     INPUT
      REAL*8 TD
!
!     LOCAL
      REAL*8 JD,YR8,DT,DTPREV
!
!     FUNCTIONS, SUBROUTINES
      REAL*8 DELTAT
      EXTERNAL DELTAT
!
!
      JD = TD
      DT = 1.0
      DTPREV = 0.
      DO WHILE (ABS(DT-DTPREV) .GT. 1E-9)
         YR8 = 2000.0D0+(JD-2451545.0D0)/365.25D0
         DTPREV = DT
         DT = DELTAT(YR8)
         JD = TD-DT/86400.0D0
      ENDDO
      TD2UT = JD
!
      RETURN
      END
