diff --git a/src/ZSOLVER/rain_ice_red.f90 b/src/ZSOLVER/rain_ice_red.f90 index c362b0ee7196fdcd50a4b3c0cee71f16f1087853..0c7cc40178808fd0e88b3a9069bbcb9d262c3ba6 100644 --- a/src/ZSOLVER/rain_ice_red.f90 +++ b/src/ZSOLVER/rain_ice_red.f90 @@ -1901,11 +1901,17 @@ DO WHILE(ANY(ZTIME(:)<PTSTEP)) ! Loop to *really* compute tendencies ZRGT(JL)=ZRGT(JL)+ZA_RG(JL)*ZMAXTIME(JL)+ZB_RG(JL) ZCIT(JL)=ZCIT(JL) * MAX(0., -SIGN(1., -ZRIT(JL))) ! WHERE(ZRIT(:)==0.) ZCIT(:) = 0. ENDDO - IF(KRR==7) ZRHT(:)=ZRHT(:)+ZA_RH(:)*ZMAXTIME(:)+ZB_RH(:) +!$acc end kernels + IF(KRR==7) THEN +!$acc kernels + ZRHT(:)=ZRHT(:)+ZA_RH(:)*ZMAXTIME(:)+ZB_RH(:) +!$acc end kernels + END IF ! !*** 4.4 Mixing ratio change due to each process ! IF(LBU_ENABLE) THEN +!$acc kernels ZTOT_RVHENI(:)= ZTOT_RVHENI(:) +ZRVHENI_MR(:) ZTOT_RCHONI(:)= ZTOT_RCHONI(:) +ZRCHONI(:) *ZMAXTIME(:) ZTOT_RRHONG(:)= ZTOT_RRHONG(:) +ZRRHONG_MR(:) @@ -1951,11 +1957,13 @@ DO WHILE(ANY(ZTIME(:)<PTSTEP)) ! Loop to *really* compute tendencies ZTOT_RHMLTR(:)= ZTOT_RHMLTR(:) +ZRHMLTR(:) *ZMAXTIME(:) ZTOT_RIMLTC(:)= ZTOT_RIMLTC(:) +ZRIMLTC_MR(:) ZTOT_RCBERI(:)= ZTOT_RCBERI(:) +ZRCBERI(:) *ZMAXTIME(:) +!$acc end kernels ENDIF ! !*** 4.5 Next loop ! GSOFT=.TRUE. ! We try to adjust tendencies (inner while loop) +!$acc kernels ZTIME(:)=ZTIME(:)+ZMAXTIME(:) !$acc end kernels !$acc update self(ZCOMPUTE) @@ -2073,8 +2081,8 @@ end if ! ! ZW_??S variables will contain the new S variables values ! -!$acc kernels IF(GEXT_TEND) THEN +!$acc kernels !Z..T variables contain the exeternal tendency, we substract it !$acc loop independent DO CONCURRENT ( JL = 1 : IMICRO ) @@ -2085,10 +2093,17 @@ IF(GEXT_TEND) THEN ZRST(JL) = ZRST(JL) - ZEXT_RS(JL) * PTSTEP ZRGT(JL) = ZRGT(JL) - ZEXT_RG(JL) * PTSTEP ZTHT(JL) = ZTHT(JL) - ZEXT_TH(JL) * PTSTEP - ENDDO - IF (KRR==7) ZRHT(:) = ZRHT(:) - ZEXT_RH(:) * PTSTEP -ENDIF + END DO !$acc end kernels + IF (KRR==7) THEN +!$acc kernels +!$acc loop independent + DO CONCURRENT ( JL = 1 : IMICRO ) + ZRHT(JL) = ZRHT(JL) - ZEXT_RH(JL) * PTSTEP + END DO +!$acc end kernels + END IF +END IF !$acc update self(ZRVT) !Tendencies computed from difference between old state and new state (can be negative) #ifndef MNH_OPENACC