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

Home » Public Forums » archive » zonal means
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: zonal means [message #11342 is a reply to message #11082] Mon, 23 March 1998 00:00 Go to previous message
James Tappin is currently offline  James Tappin
Messages: 54
Registered: December 1995
Member
Evilio del Rio wrote:
>
> Martin Schultz wrote:
>> ...
>> Q: How do you compute zonal means from a 3D data cube ?
>> (example: A(72,46,14) is a data array with longitude, latitude, altitude
>> as dimensions, and I want to compute the averages over longitude for
>> each latitude and altitude)

> In my opinion you should use the TOTAL function with a second argument:
>
> IDL> help,a
> A FLOAT = Array[72, 46, 14]
> IDL> b = TOTAL(A,1) ; The argument 1 tells TOTAL to sum just in the
> first dim.

Now for the $64,000 question -- how do you do the same thing for
medians? What we need here is an index argument to SORT analogous to the
second argument of TOTAL. Methinks that the only efficient solution is
currently to write the confounded thing as a CALL_EXTERNAL piece of C
code.

--
+------------------------+-------------------------------+-- -------+
| James Tappin, | School of Physics & Astronomy | O__ |
| sjt@star.sr.bham.ac.uk | University of Birmingham | -- \/` |
| Ph: 0121-414-6462. Fax: 0121-414-3722 | |
+--------------------------------------------------------+-- -------+
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: recursive tag_names
Next Topic: Re: time test MacOC

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

Current Time: Tue Dec 02 10:20:20 PST 2025

Total time taken to generate the page: 0.56030 seconds