Skip to content
Snippets Groups Projects
Commit db04f0ba authored by WAUTELET Philippe's avatar WAUTELET Philippe
Browse files

Philippe 18/01/2022: OpenACC: move more Print_msg calls outside of kernels regions

parent 3b28f7f5
No related branches found
No related tags found
No related merge requests found
......@@ -678,7 +678,6 @@ ELSE
!* 3. Compute the vertical contravariant components (general case)
! ------------------------------------
!
!$acc kernels
! Z1(:,:,:) = 0.
! Z2(:,:,:) = 0.
!
......@@ -687,6 +686,7 @@ IF (KADV_ORDER == 2 ) THEN
call Print_msg( NVERB_WARNING, 'GEN', 'CONTRAV', 'OpenACC: KADV_ORDER=2 and LFLAT=.TRUE. not yet tested' )
#endif
!
!$acc kernels
!$acc loop independent collapse(3)
do jk = ikb, ike + 1
do jj = 1, iju
......@@ -717,8 +717,10 @@ IF (KADV_ORDER == 2 ) THEN
end do
end do
end do
!$acc end kernels
!
ELSE IF (KADV_ORDER == 4 ) THEN
!$acc kernels
!
!!$ IF (NHALO == 1) THEN
IF ( GWEST ) THEN
......@@ -863,10 +865,12 @@ ELSE IF (KADV_ORDER == 4 ) THEN
end do
end do
end do
!$acc end kernels
!
!
END IF
!
!$acc kernels
PRWCT(:,:,1) = - PRWCT(:,:,3) ! Mirror hypothesis
!$acc end kernels
!$acc update self(PRWCT)
......
!MNH_LIC Copyright 1994-2021 CNRS, Meteo-France and Universite Paul Sabatier
!MNH_LIC Copyright 1994-2022 CNRS, Meteo-France and Universite Paul Sabatier
!MNH_LIC This is part of the Meso-NH software governed by the CeCILL-C licence
!MNH_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt
!MNH_LIC for details. version 1.
......@@ -202,11 +202,13 @@ DO JL=1, ISIZE
PA_RC(JL) = PA_RC(JL) - PRCAUTR(JL)
PA_RR(JL) = PA_RR(JL) + PRCAUTR(JL)
ENDDO
!$acc end kernels
!
!
!* 4.3 compute the accretion of r_c for r_r production: RCACCR
!
IF (HSUBG_RC_RR_ACCR=='NONE') THEN
!$acc kernels
!CLoud water and rain are diluted over the grid box
DO JL=1, ISIZE
ZMASK(JL)=MAX(0., -SIGN(1., XRTMIN(2)-PRCT(JL))) * & ! PRCT(:)>XRTMIN(2)
......@@ -231,8 +233,10 @@ IF (HSUBG_RC_RR_ACCR=='NONE') THEN
#endif
END WHERE
ENDIF
!$acc end kernels
ELSEIF (HSUBG_RC_RR_ACCR=='PRFR') THEN
!$acc kernels
!Cloud water is concentrated over its fraction with possibly to parts with high and low content as set for autoconversion
!Rain is concnetrated over its fraction
!Rain in high content area fraction: PHLC_HCF
......@@ -286,17 +290,21 @@ ELSEIF (HSUBG_RC_RR_ACCR=='PRFR') THEN
#endif
END WHERE
ENDIF
!$acc end kernels
ELSE
CALL PRINT_MSG(NVERB_FATAL,'GEN','ICE4_WARM','wrong HSUBG_RC_RR_ACCR case')
ENDIF
!$acc kernels
DO JL=1, ISIZE
PA_RC(JL) = PA_RC(JL) - PRCACCR(JL)
PA_RR(JL) = PA_RR(JL) + PRCACCR(JL)
ENDDO
!$acc end kernels
!
!* 4.4 compute the evaporation of r_r: RREVAV
!
IF (HSUBG_RR_EVAP=='NONE') THEN
!$acc kernels
DO JL=1, ISIZE
ZMASK(JL)=MAX(0., -SIGN(1., XRTMIN(3)-PRRT(JL))) * & ! PRRT(:)>XRTMIN(3)
&MAX(0., SIGN(1., XRTMIN(2)-PRCT(JL))) * & ! PRCT(:)<=XRTMIN(2)
......@@ -329,8 +337,10 @@ IF (HSUBG_RR_EVAP=='NONE') THEN
#endif
END WHERE
ENDIF
!$acc end kernels
ELSEIF (HSUBG_RR_EVAP=='CLFR' .OR. HSUBG_RR_EVAP=='PRFR') THEN
!$acc kernels
!Evaporation in clear sky part
!With CLFR, rain is diluted over the grid box
!With PRFR, rain is concentrated in its fraction
......@@ -396,10 +406,12 @@ ELSEIF (HSUBG_RR_EVAP=='CLFR' .OR. HSUBG_RR_EVAP=='PRFR') THEN
PRREVAV(:) = PRREVAV(:)*(ZZW4(:)-PCF(:))
END WHERE
ENDIF
!$acc end kernels
ELSE
CALL PRINT_MSG(NVERB_FATAL,'GEN','ICE4_WARM','wrong HSUBG_RR_EVAP case')
END IF
!$acc kernels
DO JL=1, ISIZE
PA_RR(JL) = PA_RR(JL) - PRREVAV(JL)
PA_RV(JL) = PA_RV(JL) + PRREVAV(JL)
......
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