- #1

- 1

- 0

for i = 0,611 do begin

for j = 0, 2591 do begin

if sfc_data[j,i] ne 'NaN' then weights

*= weights*

*+ lat_matrix[j,0]*

endfor

endfor

The loop is doing the full number of calculations as if none of the numbers in sfc_data are NaN (there are definitely many NaN's in sfc_data). So how do I check if sfc_data[j,i] is equal to the string NaN and isn't actually a number?endfor

endfor

The loop is doing the full number of calculations as if none of the numbers in sfc_data are NaN (there are definitely many NaN's in sfc_data). So how do I check if sfc_data[j,i] is equal to the string NaN and isn't actually a number?