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 #63536 is a reply to message #63535] Wed, 12 November 2008 01:05 Go to previous messageGo to previous message
R.Bauer is currently offline  R.Bauer
Messages: 1424
Registered: November 1998
Senior Member
R.G. Stockwell schrieb:
> "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
>
>


that arr can be created by arr = lindgen(8) + Daystep + 1 no need for where

cheers
Reimar
[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: Sun Oct 12 02:34:13 PDT 2025

Total time taken to generate the page: 0.80266 seconds