c c **************************** c *** Subroutine JLcMJL *** c *** 1984/12/06/09-45 *** c **************************** c Subroutine JLcMJL(jl,fjl, mjl,fmjl) *********************************************************************** * * * Purpose: Given the Julian date in days and fraction of * * days (jl, fjl). * * * * Compute the modified Julian date in days plus * * fractional days (mjl, fmjl). * * * * The Julian date is a continuous count of days and * * fractional days from -4712 b.C. january 1 at * * 0.5 hours UT. * * The Julian date 2415385.5 is that for jan. 1, 1901 * * at zero hours. This program is valid between then * * * * The modified Julian date is obtained from the * * Julian date by computing * * (mjl, fmjl) = (jl-2400000, fjl-0.5) * * * * This program is valid between jan. 1, 1901 and * * dec. 31, 2099 at midnite. * * * * * * Parameters Type I/O Function * * * * jl i*8 I days of Julian date * * fjl r*8 I fractional part of * * days of Julian date * * * * mjl i*4 O days of modified Julian * * date * * fmjl r*8 O fractional part of days * * of modidied Julian date * * * * * * Examples * * * * Input: jl = 2445700, fjl = 0.4999898548239471 * * Represents: 1983/12/31/23/59/59.1234567890 * * Output: mjl = 45699, fmjl = 0.9999898548239472 * * * * Input: jl = 2445700, fjl = 0.5000000000000000 * * Represents: 1984/01/01/00/00/00.0 * * Output: mjl = 45700, fmjl = 0.0000000000000000 * * * * Input: jl = 2445700, fjl = 0.5000115740740741 * * Represents: 1984/01/01/00/00/01.0000000000 * * Output: mjl = 45700, fmjl = 0.0000115740740740 * * * * Input: jl = 2445981, fjl = 0.1459736511202432 * * Represents: 1984/10/07/15/30/12.1234567890 * * Output: mjl = 45980, fjl = 0.6459736511202432 * * * * * * B. Hofmann-Wellenhof, B. Remondi * * * *********************************************************************** implicit real*8(a-h,o-z) c c Input data test. c if((jl+fjl) .lt. (2415385.+.5) .or. (jl+fjl) .gt. (2488069.+.5)) + stop + ' JLcMJL: "jl+fjl" must be 2415385.5 <= jl+fjl <= 2488069.5' if(jl .lt. 2415385 .or. jl .gt. 2488069) + stop ' JLcMJL: "jl" must be 2415385 <= jl <= 2488069' if(fjl .lt. 0.d0 .or. fjl .ge. 1.d0) + stop ' JLcMJL: "fjl" must be 0.0 <= fjl < 1.0' c mjl = jl - 2400000 fmjl = fjl - 0.5d0 if(fmjl .ge. 0.d0) return fmjl = fmjl + 1.d0 mjl = mjl - 1 return c c End of Subroutine JLcMJL c c ***************************************************************** end