We could ``loop'' over all the data to find the ones that are not equal to 9999999, which is what you would do with fortran. But instead try,
window,0,retain=2 ; note data(3,*) are temperatures and data(2,*) are heights wtempandheight=where(data(3,*) gt -200 and data(3,*) lt 500 and data(2,*) gt 0 and data(2,*) lt 30000.) plot,(data(3,*))(wtempandheight),(data(2,*))(wtempandheight)which actually gives a useful plot (and is much quicker to write and run than a loop).
``Where'' is incredibly useful, you will use it for many different things.
Look at ``temp'', ``height'' and ``wtempandheight'' using help. Now look at what where outputs, ``print, wtempandheight''. Print the data as well. You will see that where lists the positions of the elements where both the heights and tempetatures have fulfilled the conditions prescribed.
Look up where in the IDL help.