PSyclone icon indicating copy to clipboard operation
PSyclone copied to clipboard

Some more bugs in arrayrange2loop_trans

Open sergisiso opened this issue 3 years ago • 0 comments

In some cases (e.g. NEMO sbcblk.f90), range expressions like: zrhoa(:,:) = rho_air( sf(jp_tair)%fnow(:,:,1), sf(jp_humi)%fnow(:,:,1), sf(jp_slp)%fnow(:,:,1) )

are converted to explicit loops like: zrhoa(idx_15,idx_14) = rho_air(sf(jp_tair)%fnow(:,:,1),sf(jp_humi)%fnow(:,:,1),sf(jp_slp)%fnow(idx_15,idx_14,1)) this should not happend because rho_air is NOT declared as an elemental function. even if it was, it should have unrolled the expression in each argument.

Curiously if the expression is. zrhoa(:,:) = rho_air(t_zu(:,:),q_zu(:,:),sf(jp_slp)%fnow(:,:,1)) it is correctly rejected

sergisiso avatar Aug 12 '22 15:08 sergisiso