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

Home » Public Forums » archive » Averaging timesteps on large geospatial dataset?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Averaging timesteps on large geospatial dataset? [message #92315] Tue, 17 November 2015 05:43 Go to next message
rjp23 is currently offline  rjp23
Messages: 97
Registered: June 2010
Member
It'd be great if someone could help me figure out a fast way to do this.

I have a high resolution, regularly gridded, global dataset with multiple timesteps. I want to average all the timesteps at each location.

For example the data is [3600, 1800, 30]

I want to get a [3600, 1800] array that for every lon/lat point has the average of those 30 timesteps.

Looping over all 3600*1800 points is obviously not the way to go...

Cheers

Rob
Re: Averaging timesteps on large geospatial dataset? [message #92316 is a reply to message #92315] Tue, 17 November 2015 05:49 Go to previous messageGo to next message
greg.addr is currently offline  greg.addr
Messages: 160
Registered: May 2007
Senior Member
try,

res=mean(data,dimension=3)

cheers,
Greg
Re: Averaging timesteps on large geospatial dataset? [message #92317 is a reply to message #92316] Tue, 17 November 2015 05:52 Go to previous messageGo to next message
rjp23 is currently offline  rjp23
Messages: 97
Registered: June 2010
Member
On Tuesday, November 17, 2015 at 1:49:18 PM UTC, greg...@googlemail.com wrote:
> try,
>
> res=mean(data,dimension=3)
>
> cheers,
> Greg

Ah IDL8 magic!

Thanks
Re: Averaging timesteps on large geospatial dataset? [message #92319 is a reply to message #92317] Tue, 17 November 2015 09:38 Go to previous message
Michael Galloy is currently offline  Michael Galloy
Messages: 1114
Registered: April 2006
Senior Member
On 11/17/15 6:52 AM, rjp23@le.ac.uk wrote:
> On Tuesday, November 17, 2015 at 1:49:18 PM UTC, greg...@googlemail.com wrote:
>> try,
>>
>> res=mean(data,dimension=3)
>>
>> cheers,
>> Greg
>
> Ah IDL8 magic!
>
> Thanks
>

TOTAL has had a dimension parameter for a long time if you don't have
access to IDL 8.0+.

Mike
--
Michael Galloy
www.michaelgalloy.com
Modern IDL: A Guide to IDL Programming (http://modernidl.idldev.com)
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: TRIANGULATE's bug?
Next Topic: Combining two strings

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

Current Time: Wed Oct 08 11:34:54 PDT 2025

Total time taken to generate the page: 0.00440 seconds