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

Home » Public Forums » archive » Re: Five days mean values
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: Five days mean values [message #45764 is a reply to message #45761] Wed, 05 October 2005 14:57 Go to previous message
K. Bowman is currently offline  K. Bowman
Messages: 330
Registered: May 2000
Senior Member
In article <1128546470.965721.312300@g49g2000cwa.googlegroups.com>,
"Julio" <julio@cpa.unicamp.br> wrote:

> Hello people,
>
> I have meteorological data from several years, like these:
>
> Date Temp (max) Temp (min)
> 01/08/2001 27.2 12.7
> 02/08/2001 27.8 12.4
> 03/08/2001 26.8 16.3
> 04/08/2001 26.6 12
> 05/08/2001 27.4 11
> 06/08/2001 27.6 16.1
> 07/08/2001 27.6 11.2
> 08/08/2001 28.4 13.4
> 09/08/2001 27.2 10.9
> 10/08/2001 26 9.7
>
> I want to calculate mean value from 01-05 days, 05-10 days, 10-15 days
> and so on.
> In other words, I must get the mean value at each five days.
> I'm trying to make some code to get it automatically. I think this kind
> of work is trivial for meteorological data users. Does anybody have
> some idea?
>
> Regards,
> J�lio

If the data are in an array T, this is a very quick way to compute averages

IDL> T = findgen(15)
IDL> print, T
0.00000 1.00000 2.00000 3.00000 4.00000 5.00000
6.00000
7.00000 8.00000 9.00000 10.0000 11.0000 12.0000
13.0000
14.0000
IDL> print, rebin(T, 3)
2.00000 7.00000 12.0000

but make sure that the number of days is a multiple of 5 and that you have no
missing data. Also, watch out for leap days.

Ken Bowman
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: easy question
Next Topic: Easy question?

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

Current Time: Wed Oct 08 17:34:05 PDT 2025

Total time taken to generate the page: 0.00417 seconds