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
!
!$acc kernels
GWORK(:) = PRST(:)>XRTMIN(5) .AND. PRSS(:)>0.0 .AND. PZT(:)>XTT
WHERE( GWORK(:) )
ZZW(:) = PRVT(:)*PPRES(:)/((XMV/XMD)+PRVT(:)) ! Vapor pressure
ZZW(:) = PKA(:)*(XTT-PZT(:)) + &
( PDV(:)*(XLVTT + ( XCPV - XCL ) * ( PZT(:) - XTT )) &
*(XESTT-ZZW(:))/(XRV*PZT(:)) )
DO CONCURRENT (JJ=1:IGACC)
IF ( GWORK(JJ) ) THEN
ZZW(JJ) = PRVT(JJ)*PPRES(JJ)/((XMV/XMD)+PRVT(JJ)) ! Vapor pressure
ZZW(JJ) = PKA(JJ)*(XTT-PZT(JJ)) + &
( PDV(JJ)*(XLVTT + ( XCPV - XCL ) * ( PZT(JJ) - XTT )) &
*(XESTT-ZZW(JJ))/(XRV*PZT(JJ)) )
!
! compute RSMLT
!
#ifndef MNH_BITREP
ZZW(:) = MIN( PRSS(:), XFSCVMG*MAX( 0.0,( -ZZW(:) * &
( X0DEPS* PLBDAS(:)**XEX0DEPS + &
X1DEPS*PCJ(:)*PLBDAS(:)**XEX1DEPS ) ) / &
( PRHODREF(:)*XLMTT ) ) )
ZZW(JJ) = MIN( PRSS(JJ), XFSCVMG*MAX( 0.0,( -ZZW(JJ) * &
( X0DEPS* PLBDAS(JJ)**XEX0DEPS + &
X1DEPS*PCJ(JJ)*PLBDAS(JJ)**XEX1DEPS ) ) / &
( PRHODREF(JJ)*XLMTT ) ) )
#else
ZZW(:) = MIN( PRSS(:), XFSCVMG*MAX( 0.0,( -ZZW(:) * &
( X0DEPS* BR_POW(PLBDAS(:),XEX0DEPS) + &
X1DEPS*PCJ(:)*BR_POW(PLBDAS(:),XEX1DEPS) ) ) / &
( PRHODREF(:)*XLMTT ) ) )
ZZW(JJ) = MIN( PRSS(JJ), XFSCVMG*MAX( 0.0,( -ZZW(JJ) * &
( X0DEPS* BR_POW(PLBDAS(JJ),XEX0DEPS) + &
X1DEPS*PCJ(JJ)*BR_POW(PLBDAS(JJ),XEX1DEPS) ) ) / &
( PRHODREF(JJ)*XLMTT ) ) )
#endif
!
! note that RSCVMG = RSMLT*XFSCVMG but no heat is exchanged (at the rate RSMLT)
! because the graupeln produced by this process are still icy!!!
!
PRSS(:) = PRSS(:) - ZZW(:)
PRGS(:) = PRGS(:) + ZZW(:)
END WHERE
PRSS(JJ) = PRSS(JJ) - ZZW(JJ)
PRGS(JJ) = PRGS(JJ) + ZZW(JJ)
END IF
END DO ! CONCURRENT
!$acc end kernels
IF (LBUDGET_RS) THEN
!$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