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

Home » Public Forums » archive » Re: Filtering data in multidimensional arrays
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: Filtering data in multidimensional arrays [message #20303 is a reply to message #20301] Fri, 02 June 2000 00:00 Go to previous messageGo to previous message
Martin Schultz is currently offline  Martin Schultz
Messages: 515
Registered: August 1997
Senior Member
Hi Simon,

first of all: which data are you working on there: PEM-West or
PEM-Tropics ?
Are you using merged data sets or are you working with the original
files from the GTE website?

As to your problem: if it's only the plot you are concerned about,
try using the MIN_VALID keyword and set it to a reasonably low number
(usually 0. except for the longitude which may extend to -180 ;-). If
you really need to get rid of that data (e.g. for computing a mean
etc.), it depends on how you atore the data exactly. I usually have
arrays with dimensions where observations loops
from 0 to however many there were, and variables is the number of
variables you read in. I also keep a string array containing the
variable names. To distinguish between various flights, I have a
variable named 'FLIGHT', and to have a continuous time vector, I add the
julian day and the time (divided by 24.).
Then, say I want to filter a certain longitude range and eliminate all
missing values, what I do is:

ilon = where(StrUpCase(Names) eq 'LON') ; if you go beyond your
personal hack
; please add error checking
!
lon = reform( data )
ok = Where(lon gt 150. OR lon le -100 )

regional_data = data
; then I extract all variables I want to plot and eliminate missing
values
itime = where(StrUpCase(Names) eq 'CONTINUOUSTIME')
io3 = where(StrUpCase(Names) eq 'OZONE')
time = reform(regional_data)
o3 = reform(regional_data)

ok = where(o3 ge 0.)
plot,time, o3
print,'Mean, median of Ozone = ',mean(o3), median(o3)


Hope, this helps,
Martin

Simon de Vet wrote:
>
> David Fanning wrote:
>
>> Humm, I'd have to see a little code to see what it is exactly you
>> are trying to do, but I have no time to look at it today. This is
>> a pretty small array, however. Why don't you just break the problem
>> up into (20?) pieces that you know how to deal with and do it in
>> a loop? It may cost you 0.000348302 seconds of processing time,
>> but it would be finished by the end of lunch today. :-)
>
> I'm not even sure if I could do this, but I'll give it a try.. It's ackward since
> I'll have to eventually read in another 3 data sets with similar properties, and
> I'd much rather handle 4 big arrays than 80 little ones. It's my own brain I'm
> worried about, not the computer's!
>
> I think my problem may be that my array is not consistent. I can apply one filter
> to the flight# (3-19 only), but I cannot apply a single filter to the point
> number, since this varies from flight to flight. On flight 3, there may only be 10
> data points, but flight 4 may have 12, flight 4 21, etc...
>
> Perhaps I am misunderstanding the usage of the filter. Am I producing seperate
> filters for each dimension (hence the problem above), or am I producing a global
> filter for the entire array (which treats entries individually, and not genrically
> by dimension)?
>
> Simon

--
[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[ [[[[[[[
[[ Dr. Martin Schultz Max-Planck-Institut fuer Meteorologie [[
[[ Bundesstr. 55, 20146 Hamburg [[
[[ phone: +49 40 41173-308 [[
[[ fax: +49 40 41173-298 [[
[[ martin.schultz@dkrz.de [[
[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[ [[[[[[[
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Color printing to a Lexmark printer
Next Topic: Re: CALL_EXTERNAL and Fortran under Linux

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

Current Time: Sat Oct 11 07:55:39 PDT 2025

Total time taken to generate the page: 0.47989 seconds