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

Home » Public Forums » archive » Re: TIMEGEN problem, bug?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: TIMEGEN problem, bug? [message #34445 is a reply to message #34444] Sat, 15 March 2003 15:37 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Luciano (lucianor@sinectis.com.ar) writes:

> I tried the following:
>
> IDL> Jul1=JulDay(3,31,1998,23)
> IDL> dummy=TIMEGEN(40,START=jul1,UNITS='Hours')
> IDL> caldat,dummy[39],month,day,year,hour
> IDL> print,year,month,day,hour
> 1998 4 1 14
>
> How adding 40 hours to 31/3,23h could end up in 1/4,14h??
> The problem seems to appear because TIMEGEN takes 30 as the first day, and not 31:
>
> IDL> caldat,dummy,month,day,year,hour
> IDL> print,day[0:4]
> 30 31 31 31 31
>
> Of course that if it starts at day 30/3 it will be correct to end at day 1/4
> But I'm telling it to start at day 31!!
>
> Any help??
>
> (I'm using IDL 5.4 on Windows XP)

I think it must be a problem with that version. I get this
with IDL 5.6 and Windows 2000:


IDL> Jul1=JulDay(3,31,1998,23)
% Compiled module: JULDAY.
IDL> dummy=TIMEGEN(40,START=jul1,UNITS='Hours')
% Compiled module: TIMEGEN.
% Compiled module: CALDAT.
IDL> caldat,dummy[39],month,day,year,hour
IDL> print,year,month,day,hour
1998 4 2 14
IDL> caldat,dummy,month,day,year,hour
IDL> print,day[0:4]
31 1 1 1 1

I get the same result you got in IDL 5.5.

Cheers,

David

--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
[Message index]
 
Read Message
Read Message
Previous Topic: TIMEGEN problem, bug?
Next Topic: Question: Graphing Radar?

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

Current Time: Tue Oct 21 16:05:01 PDT 2025

Total time taken to generate the page: 1.27772 seconds