UMR-CNRM / pyfortool

Python FORTRAN tool
Other
2 stars 3 forks source link

convertTypesInCompute detects the size of array in TYPE%ARRAY by acessing the array declaration with tree #27

Open QuentinRodier opened 2 months ago

QuentinRodier commented 2 months ago

In one case, (rain_ice.f90)

!$mnh_expand_array(JRR=1:KRR) ZRSMIN(1:KRR) = ICEDXRTMIN(1:KRR) * ZINV_TSTEP !$mnh_end_expand_array(JRR=1:KRR)

is transformed first by mnh_expand by DO JRR=1,KRR ZRSMIN(JRR) = ICED%XRTMIN(JRR) * ZINV_TSTEP END DO

then ICED%XRTMIN size is not yet accessible. Either :

QuentinRodier commented 1 month ago

Other example (without mnh_expand related) in mode_ice4_stepping : with convertTypesInCompute within an if-then-stmt : IF (ZA(JL, JV) < -1.E-20 .AND. PVART(JL, JV) > ICED%XRTMIN(JV)) THEN