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

Home » Public Forums » archive » Re: IDL missing date and data
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: IDL missing date and data [message #64900 is a reply to message #64899] Thu, 29 January 2009 04:38 Go to previous message
Wout De Nolf is currently offline  Wout De Nolf
Messages: 194
Registered: October 2008
Senior Member
On Thu, 29 Jan 2009 02:15:05 -0800 (PST), mbo <mstyesi@gmail.com>
wrote:

> I am to creating a monthly time series data from daily averages data
> that spans from 1999 to 2008.
>
> However, there data gaps of about 2 to for 4 days for some of the
> monts. So that this data would look like this
>
> 20/07/1999 20
> 24/07/1999 40
>
> You would notice that there are 4 days missing but the data shows no
> gaps int it.
>
> How can I expand this kind of data to look like this
>
> 20/07/1999 20
> 21/07/1999 NaN
> 22/07/1999 NaN
> 23/07/1999 NaN
> 24/ 07/1999 40


How about this:

days=[20,24,25,26]
months=[7,7,7,7]
years=[1999,1999,1999,1999]
data=[20,40,10,10]
date=JULDAY(months,days,years)

ind=date-date[0]
ndays=ind[n_elements(date)-1]+1
date_full=lindgen(1,ndays)+date[0]
data_full=make_array(1,ndays,value=!values.f_nan)
data_full[ind]=data

CALDAT, date_full, months, days, years
print, [months, days, years, $
data_full],format='(I02,"/",I02,"/",I04,F)'
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: IDL missing date and data
Next Topic: change mouse cursor in draw widget

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

Current Time: Sun Oct 12 02:38:15 PDT 2025

Total time taken to generate the page: 1.52126 seconds