w=where(data eq 9999999.) data(w)=-1.*data(w)
Again, look at ``help,w'' and ``print,w(0:10)'' (the first ten elements of w). ``Where'' has again returned a 1D list of numbers even though data is 2D. Where can be used on arrays of any dimensions, but it always refers to the position of each element with a single number (by just counting through the elements of the array in order).
Also note the useful trick,
w=where(data eq 9999999.,cw) if cw gt 0 then data(w)=-1.*data(w)here cw counts how many elements fulfil the conditions.
(Also look at
~lecjm/IDL/Procedures/Logic/Logic/wheretomulti.prowhich is useful for converting 1D lists from where to 2D or 3D subscripts if you ever need to -- although generally you wont have to).