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

Home » Public Forums » archive » A strange error with WHERE
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
A strange error with WHERE [message #67485] Thu, 30 July 2009 20:08 Go to previous message
Lindzen is currently offline  Lindzen
Messages: 4
Registered: July 2009
Junior Member
Dear all,
I come across a strange error with WHERE function. Could you
please help me to check it?
Here is part of the code. I will explain below the code.

outer1_begin: id_hr = where(r03_temp ge 50)
n_hr = n_elements(id_hr)

if (n_elements(id_hr) gt 1) then begin
id_max = where(r03_temp eq max(r03_temp))
lonc = lon_aoc(id_max)
latc = lat_aoc(id_max)

ii=0
outer2_begin: print,ii
ii=ii+1
lon_left = lonc-ii*0.5
lon_right = lonc+ii*0.5
lat_up = latc+ii*0.5
lat_down = latc-ii*0.5
id_box = where(lon_aoc ge lon_left)

Here lon_left=117.25, is a flot number. lon_aoc is a 80*30 matrix,
with many values larger than 117.25.
If I use id=where(lon_aoc ge 117.25), id returns right results.
However, the above code returns -1 to id_box. It is really strange.
Could anyone help me? Thank you very much!

Lin
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: True-Color Modis Image
Next Topic: How not to plot blank/zero points?

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

Current Time: Sun Oct 12 10:00:43 PDT 2025

Total time taken to generate the page: 0.56042 seconds