Skip to content
Snippets Groups Projects
Commit ed469442 authored by ESCOBAR MUNOZ Juan's avatar ESCOBAR MUNOZ Juan
Browse files

Juan 16/10/2020: rain_ice_fast_rs.f90 , OpenACC opti -> DO CONCURRENT for BR_POW etc ...

parent 1ee6d0f0
No related branches found
No related tags found
No related merge requests found
...@@ -520,32 +520,34 @@ END IF ...@@ -520,32 +520,34 @@ END IF
! !
!$acc kernels !$acc kernels
GWORK(:) = PRST(:)>XRTMIN(5) .AND. PRSS(:)>0.0 .AND. PZT(:)>XTT GWORK(:) = PRST(:)>XRTMIN(5) .AND. PRSS(:)>0.0 .AND. PZT(:)>XTT
WHERE( GWORK(:) ) DO CONCURRENT (JJ=1:IGACC)
ZZW(:) = PRVT(:)*PPRES(:)/((XMV/XMD)+PRVT(:)) ! Vapor pressure IF ( GWORK(JJ) ) THEN
ZZW(:) = PKA(:)*(XTT-PZT(:)) + & ZZW(JJ) = PRVT(JJ)*PPRES(JJ)/((XMV/XMD)+PRVT(JJ)) ! Vapor pressure
( PDV(:)*(XLVTT + ( XCPV - XCL ) * ( PZT(:) - XTT )) & ZZW(JJ) = PKA(JJ)*(XTT-PZT(JJ)) + &
*(XESTT-ZZW(:))/(XRV*PZT(:)) ) ( PDV(JJ)*(XLVTT + ( XCPV - XCL ) * ( PZT(JJ) - XTT )) &
*(XESTT-ZZW(JJ))/(XRV*PZT(JJ)) )
! !
! compute RSMLT ! compute RSMLT
! !
#ifndef MNH_BITREP #ifndef MNH_BITREP
ZZW(:) = MIN( PRSS(:), XFSCVMG*MAX( 0.0,( -ZZW(:) * & ZZW(JJ) = MIN( PRSS(JJ), XFSCVMG*MAX( 0.0,( -ZZW(JJ) * &
( X0DEPS* PLBDAS(:)**XEX0DEPS + & ( X0DEPS* PLBDAS(JJ)**XEX0DEPS + &
X1DEPS*PCJ(:)*PLBDAS(:)**XEX1DEPS ) ) / & X1DEPS*PCJ(JJ)*PLBDAS(JJ)**XEX1DEPS ) ) / &
( PRHODREF(:)*XLMTT ) ) ) ( PRHODREF(JJ)*XLMTT ) ) )
#else #else
ZZW(:) = MIN( PRSS(:), XFSCVMG*MAX( 0.0,( -ZZW(:) * & ZZW(JJ) = MIN( PRSS(JJ), XFSCVMG*MAX( 0.0,( -ZZW(JJ) * &
( X0DEPS* BR_POW(PLBDAS(:),XEX0DEPS) + & ( X0DEPS* BR_POW(PLBDAS(JJ),XEX0DEPS) + &
X1DEPS*PCJ(:)*BR_POW(PLBDAS(:),XEX1DEPS) ) ) / & X1DEPS*PCJ(JJ)*BR_POW(PLBDAS(JJ),XEX1DEPS) ) ) / &
( PRHODREF(:)*XLMTT ) ) ) ( PRHODREF(JJ)*XLMTT ) ) )
#endif #endif
! !
! note that RSCVMG = RSMLT*XFSCVMG but no heat is exchanged (at the rate RSMLT) ! note that RSCVMG = RSMLT*XFSCVMG but no heat is exchanged (at the rate RSMLT)
! because the graupeln produced by this process are still icy!!! ! because the graupeln produced by this process are still icy!!!
! !
PRSS(:) = PRSS(:) - ZZW(:) PRSS(JJ) = PRSS(JJ) - ZZW(JJ)
PRGS(:) = PRGS(:) + ZZW(:) PRGS(JJ) = PRGS(JJ) + ZZW(JJ)
END WHERE END IF
END DO ! CONCURRENT
!$acc end kernels !$acc end kernels
IF (LBUDGET_RS) THEN IF (LBUDGET_RS) THEN
!$acc update self(PRSS) !$acc update self(PRSS)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment