real*8 function carr2ut(c) ! ! Given Carrington solar rotation number (& fraction) c, returns ! the Universal Time (Julian Day Number & fraction). ! ! B. Knapp, 2001-01-10 ! ! Reference: J. Meeus, Astronomical Algorithms, 2nd ed., Willmann- ! Bell, 1998, pp. 191-192. ! C C RCS DATA C C $Header$ C C $Log$ C C implicit none ! ! Input real*8 c ! ! Constants real*8 PI, D2R parameter (PI=3.14159265358979324D0,D2R=PI/180.0D0) ! ! Function parameters real*8 T0, dTdC, M0, dMdC, P, Q, R parameter (T0=2398140.2270d0, dTdC=27.2752316D0) parameter (M0=281.96d0*D2R, dMdC=26.882476d0*D2R) parameter (P=0.1454d0, Q=-0.0085d0, R=-0.0141d0) ! ! Local variables real*8 m, t, sinM, cos2M, sin2M ! ! External subroutines, functions real*8 td2ut external td2ut ! ! Calculate the dynamic time, t... m = M0+dMdC*c sinM = sin(m) sin2M = sin(2.d0*m) cos2M = cos(2.d0*m) t = T0+dTdC*c+P*sinM+Q*sin2M+R*cos2M ! ! ...and the Universal Time carr2ut = td2ut(t) return end