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

Home » Public Forums » archive » Re: array of Julian Days
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: array of Julian Days [message #63554 is a reply to message #63551] Tue, 11 November 2008 13:57 Go to previous messageGo to previous message
R.G. Stockwell is currently offline  R.G. Stockwell
Messages: 363
Registered: July 1999
Senior Member
"Bulrush" <Wasit.Weather@gmail.com> wrote in message
news:2a70777d-8578-42bc-9700-9e6be44a2fb4@a3g2000prm.googleg roups.com...
> Hello,
> I wanted to generate an array of Jdays of the year, and extract some
> of them according to 8 days of increment. However the following code I
> could think of does not work.
>
> Any help is appreciated.
>
> Jdays = Lindgen (366)
> Start_day= 265
> End_day = 361
>
> Daystep = 265
> ; collect the days
> WHILE Daystep LE 361and Daystep GT 265 Do Begin
> arr = Where (Jdays LE Daystep+8 and Jdays GT Daystep, count)
> Days = JDays[arr]
> EndWhile
>
> What is wrong with it? How can I get the job done?
>
> Thanks

JD for current dates is quite a large number, but that is besides the point.
From your example, i don't know if you are trying to extract 8 days,
or trying to extract a series of 8 day arrays.


Here is an example (the simple, select 8 days one):


Jdays = Lindgen (366)
Start_day= 265
End_day = 361

Daystep = 265
; collect the days
arr = Where (Jdays LE Daystep+8 and Jdays GT Daystep, count)

if count gt 0 then Days = JDays[arr] else days = [-1]

print,days



Cheers,
bob
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: convert 003 and 033 to strings
Next Topic: Workbench: Run idl several times

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

Current Time: Sat Oct 18 04:07:15 PDT 2025

Total time taken to generate the page: 1.11873 seconds