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

Philippe 28/02/2017: OpenaACC: improvements (mainly removed unnecessary updates)

parent ae89e5a7
No related branches found
No related tags found
No related merge requests found
This diff is collapsed.
......@@ -285,6 +285,9 @@ USE MODI_C2R2_ADJUST
USE MODI_KHKO_NOTADJUST
USE MODI_C3R5_ADJUST
USE MODI_SHUMAN
#ifdef _OPENACC
USE MODI_SHUMAN_DEVICE
#endif
USE MODI_BUDGET
USE MODI_GET_HALO
!
......@@ -620,11 +623,11 @@ IF (HCLOUD == 'KESS' .OR. HCLOUD == 'ICE3' .OR. HCLOUD == 'C2R2' .OR. &
!
ZRATIO = ZMASSTOT / ZMASSPOS
PRS(:,:,:,JRR) = PRS(:,:,:,JRR) * ZRATIO
!$acc update device(PRS)
!
END IF
END SELECT
END DO
!$acc update device(PRS)
END IF
!
!* 3.2 Adjustement for liquid and solid cloud
......@@ -737,7 +740,6 @@ CALL ABORT
END DO
END DO
!$acc end kernels
!$acc update self(PRS,PTHS)
!
!
#endif
......@@ -843,6 +845,7 @@ END SELECT
!* 3.3 STORE THE BUDGET TERMS
! ----------------------
!
!OPENACC: PW: TODO: update self of PTHS and PRS for budgets
IF ((HCLOUD /= 'KHKO') .AND. (HCLOUD /= 'C2R2') ) THEN
IF (LBUDGET_TH) CALL BUDGET (PTHS(:,:,:) * PRHODJ(:,:,:), 4,'NEGA_BU_RTH')
IF (LBUDGET_RV) CALL BUDGET (PRS(:,:,:,1) * PRHODJ(:,:,:), 6,'NEGA_BU_RRV')
......@@ -999,8 +1002,8 @@ PRINT *,'OPENACC: RESOLVED_CLOUD::ICE3 being implemented'
ZDZZ(:,:,JK)=PZZ(:,:,JK+1)-PZZ(:,:,JK)
ENDDO
!$acc end kernels
!$acc update device(PCIT,PCLDFR)
!$acc update device(PINPRC,PINPRR,PINPRR3D,PEVAP3D,PINPRS,PINPRG,PINDEP)
!$acc update device(PCIT,PCLDFR, &
!$acc & PINPRC,PINPRR,PINPRR3D,PEVAP3D,PINPRS,PINPRG,PINDEP)
!$acc data copyin(PSEA,PTOWN)
CALL RAIN_ICE ( OSEDIC,CSEDIM, HSUBG_AUCV, OWARM,1,IKU,1, &
KSPLITR, PTSTEP, KMI, KRR, &
......@@ -1014,17 +1017,15 @@ PRINT *,'OPENACC: RESOLVED_CLOUD::ICE3 being implemented'
PINPRS, PINPRG, PSIGS, PINDEP, &
PSEA, PTOWN)
!$acc end data
!$acc update self(PINPRC,PINPRR,PINPRR3D,PEVAP3D,PINPRS,PINPRG,PINDEP)
!$acc update self(PCIT)
!$acc update self(PINPRC,PINPRR,PINPRR3D,PEVAP3D,PINPRS,PINPRG,PINDEP,PCIT)
!
!* 9.2 Perform the saturation adjustment over cloud ice and cloud water
!
! #ifndef _OPENACC
#ifndef _OPENACC
ZZZ = MZF(1,IKU,1, PZZ )
! #else
! CALL MZF_DEVICE(1,IKU,1,PZZ,ZZZ)
! #endif
!$acc update device(ZZZ)
#else
CALL MZF_DEVICE(1,IKU,1,PZZ,ZZZ)
#endif
CALL ICE_ADJUST (1,IKU,1, KRR, KMI, HRAD, HTURBDIM, &
OSUBG_COND, OSIGMAS, PTSTEP,PSIGQSAT, &
PRHODJ, PEXNREF, PSIGS, PMFCONV, PPABST, ZZZ, &
......@@ -1161,7 +1162,6 @@ END IF
!* 13. SWITCH BACK TO THE PROGNOSTIC VARIABLES
! ---------------------------------------
!
!$acc update device(PTHS,PRS)
!$acc kernels
PTHS(:,:,:) = PTHS(:,:,:) * PRHODJ(:,:,:)
!
......
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