comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Problems with JULDAY and CALDAT
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Problems with JULDAY and CALDAT [message #14828] Wed, 07 April 1999 00:00
John J. Boia is currently offline  John J. Boia
Messages: 5
Registered: November 1997
Junior Member
Wayne, thanks for the references. Will have a look.

I checked JULDAY just like your example and got different results
from what you got!

IDL> print,julday(4,7,1999,0)
% Compiled module: JULDAY.
2451276.0
IDL> print,julday(4,7,1999,12)
2451276.5
IDL> print, !version
{ mipseb IRIX unix 5.0.2 Aug 19 1997}


Wayne Landsman wrote:
>
>> JULDAY seems to return Julian date values with an offset
>> of 0.5 from the accepted definition, when hours, minutes,
>> and seconds are passed in as arguments Integer julian
>> day numbers correspond to 12:00 noon UT.
>
> I'm not sure what you are referring to here -- I don't see any problems with
> JULDAY. JULDAY should return an integer value when the hour is 12:00 noon --
> which it does.
>
> IDL> print,julday(4,7,1999,0)
> 2451275.5
> IDL> print,julday(4,7,1999,12)
> 2451276.0
>
> --Wayne Landsman landsman@mpb.gsfc.nasa.gov

--
John J. Boia | Email: jboia@iasdev1.gsfc.nasa.gov
Programmer/Analyst | Web: http://iasdev1.gsfc.nasa.gov/~jboia/
Computer Sciences Corp. | Phone: 301.794.2357
Re: Problems with JULDAY and CALDAT [message #14829 is a reply to message #14828] Wed, 07 April 1999 00:00 Go to previous message
landsman is currently offline  landsman
Messages: 93
Registered: August 1991
Member
In article <370B879B.41C6@iasdev1.gsfc.nasa.gov>, "John J. Boia" <jboia@iasdev1.gsfc.nasa.gov> writes...

> CALDAT does not correctly return the month/day/year
> values for Julian day numbers that correspond to leap days
> (Feb 29) in the leap years 1584 through 1604.

John,

As a replacement for CALDAT, you might look at DAYCNV.PRO available at
http://idlastro.gsfc.nasa.gov/ftp/pro/astro/daycnv.pro. It passes your time
test for all years except for the peculiar year 1582 itself.

(I don't know what the algorithm error in CALDAT is, since it uses a
different algorithm from DAYCNV.PRO. But CALDAT does have a most un-IDL like
programming style, with a special subroutine that only does scalar calculations
that is called in a loop. Ugly.)

Although not directly to your question, you might also look the time utilities
in IDL written by Bill Thompson at
http://sohowww.nascom.nasa.gov/solarsoft/gen/idl/time/

> JULDAY seems to return Julian date values with an offset
> of 0.5 from the accepted definition, when hours, minutes,
> and seconds are passed in as arguments Integer julian
> day numbers correspond to 12:00 noon UT.

I'm not sure what you are referring to here -- I don't see any problems with
JULDAY. JULDAY should return an integer value when the hour is 12:00 noon --
which it does.

IDL> print,julday(4,7,1999,0)
2451275.5
IDL> print,julday(4,7,1999,12)
2451276.0

--Wayne Landsman landsman@mpb.gsfc.nasa.gov
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: "ALOG2" ?
Next Topic: Re: Need help with Wavelet Workbench

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 16:00:29 PDT 2025

Total time taken to generate the page: 0.00538 seconds