I would like to know, how where statement affects vectorization.
My belief is its bad for vectorization.
Here is a short part of the original code
where ( LMASK ) WORK1(:,:,kk) = KAPPA_THIC(:,:,kbt,k,bid) & * SLX(:,:,kk,kbt,k,bid) * dz(k) . . . endwhere
Even the Optrpt seems to suggest the same.