Good morning Marie,
Well, your variable A makes more than 3Gb of size (2000x6000x150x2), so you are very close to your memory limit. Your second line should perform the operation without any extra memory BUT I suspect it does it due to the data type change. I mean, when you type something like A+=1 there is no problem because the result of A+1 has the same data type as A and the operation is performed in place. But your comparison A GT 100 returns a BYTE result and A is UINT, so I suspect that IDL is creating a temporary variable to run your comparison and then assign it to A. This is why memory is collapsed.
If you need to manage data of such a huge size I suggest you to use some kind of "tiling" mechanism. I mean, try to separate your data in smaller pieces, process them and gather all the results. In your case you could do something like:
a=UINDGEN(2000,6000,150)
b=0
for i=0,149 do b+=TOTAL(a ge 100)
Imanol
|