TAITT Subroutine

public subroutine TAITT(tai1, tai2, tt1, tt2, j)

Time scale transformation: International Atomic Time, TAI, to Terrestrial Time, TT.

Status: canonical.

Note

TAI1+TAI2 is Julian Date, apportioned in any convenient way between the two arguments, for example where TAI1 is the Julian Day Number and TAI2 is the fraction of a day. The returned TT1,TT2 follow suit.

References

  • McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), IERS Technical Note No. 32, BKG (2004)

  • Explanatory Supplement to the Astronomical Almanac, P. Kenneth Seidelmann (ed), University Science Books (1992)

History

  • IAU SOFA revision: 2019 June 20

Arguments

TypeIntentOptionalAttributesName
real(kind=wp), intent(in) :: tai1

TAI as a 2-part Julian Date

real(kind=wp), intent(in) :: tai2

TAI as a 2-part Julian Date

real(kind=wp), intent(out) :: tt1

TT as a 2-part Julian Date

real(kind=wp), intent(out) :: tt2

TT as a 2-part Julian Date

integer, intent(out) :: j

Called by

proc~~taitt~~CalledByGraph proc~taitt TAITT proc~apco13 APCO13 proc~apco13->proc~taitt proc~apio13 APIO13 proc~apio13->proc~taitt proc~atco13 ATCO13 proc~atco13->proc~apco13 proc~atoi13 ATOI13 proc~atoi13->proc~apio13 proc~atio13 ATIO13 proc~atio13->proc~apio13 proc~atoc13 ATOC13 proc~atoc13->proc~apco13

Contents

Source Code


Source Code

    subroutine TAITT ( tai1, tai2, tt1, tt2, j )

    implicit none

    real(wp),intent(in) :: tai1 !! TAI as a 2-part Julian Date
    real(wp),intent(in) :: tai2 !! TAI as a 2-part Julian Date
    real(wp),intent(out) :: tt1 !! TT as a 2-part Julian Date
    real(wp),intent(out) :: tt2 !! TT as a 2-part Julian Date
    integer,intent(out) :: j !! status:  0 = OK

    !  TT minus TAI (days).
    real(wp),parameter :: dtat = 32.184_wp/86400.0_wp

    !  Result, safeguarding precision.
    if ( abs(tai1)>abs(tai2) ) then
       tt1 = tai1
       tt2 = tai2 + dtat
    else
       tt1 = tai1 + dtat
       tt2 = tai2
    end if

    !  Status (always OK).
    j = 0

    end subroutine TAITT