diff --git a/src/MNH/gradient_m.f90 b/src/MNH/gradient_m.f90 index f65faf2ddb01013e367062ee2e364b8cc7031d5f..09ca8193187dac734081aef45e8dda8b5be37818 100644 --- a/src/MNH/gradient_m.f90 +++ b/src/MNH/gradient_m.f90 @@ -138,7 +138,7 @@ REAL, DIMENSION(:,:,:), INTENT(IN) :: PDZZ !d*zz ! REAL, DIMENSION(:,:,:), INTENT(IN) :: PY ! variable at mass ! localization -REAL, DIMENSION(:,:,:) :: PGY_M_V ! result at flux side +REAL, DIMENSION(SIZE(PY,1),SIZE(PY,2),SIZE(PY,3)) :: PGY_M_V ! result at flux side END FUNCTION GY_M_V ! ! @@ -969,7 +969,7 @@ REAL, DIMENSION(:,:,:), INTENT(IN) :: PDZZ !d*zz ! REAL, DIMENSION(:,:,:), INTENT(IN) :: PY ! variable at mass ! localization -REAL, DIMENSION(:,:,:) :: PGY_M_V ! result at flux side +REAL, DIMENSION(SIZE(PY,1),SIZE(PY,2),SIZE(PY,3)) :: PGY_M_V ! result at flux side INTEGER IJU,IKU,JJ,JK ! diff --git a/src/MNH/ice4_nucleation.f90 b/src/MNH/ice4_nucleation.f90 index 4f1ebb48ddfbec02dfa5fcc14dcdf9ac74af885a..73c5f20b16b67a78cd13b82bbfb7c88e2d8fc5c1 100644 --- a/src/MNH/ice4_nucleation.f90 +++ b/src/MNH/ice4_nucleation.f90 @@ -175,7 +175,7 @@ IF(.NOT. GDSOFT) THEN ZZW(JI)=XNU20*EXP(XALPHA2*ZSSI(JI)-XBETA2) ELSE IF (GWORK2(JI)) THEN ZZW(JI)=MAX(XNU20*(-XBETA2 ), & - XNU10*EXP(-XBETA1*(PT(JI)-XTT))*(ZSSI(JI)/ZUSW(JI)**XALPHA1) + XNU10*EXP(-XBETA1*(PT(JI)-XTT))*(ZSSI(JI)/ZUSW(JI))**XALPHA1) END IF END DO #endif diff --git a/src/MNH/ppm.f90 b/src/MNH/ppm.f90 index 6323a8f9e875c5a7428dace63469754b8395e0d1..a96d8c7f5f6afdc33114b55a7a67680f85221546 100644 --- a/src/MNH/ppm.f90 +++ b/src/MNH/ppm.f90 @@ -474,7 +474,9 @@ REAL, DIMENSION(IIU,IJU,IKU), INTENT(OUT) :: PR INTEGER:: IIB,IJB ! Begining useful area in x,y,z directions INTEGER:: IIE,IJE ! End useful area in x,y,z directions ! +integer :: ji, jj, jk #ifndef _OPENACC +integer :: iiu, iju, iku ! terms used in parabolic interpolation, dmq, qL, qR, dq, q6 REAL, DIMENSION(SIZE(PCR,1),SIZE(PCR,2),SIZE(PCR,3)) :: ZQL,ZQR REAL, DIMENSION(SIZE(PCR,1),SIZE(PCR,2),SIZE(PCR,3)) :: ZDQ,ZQ6 @@ -491,7 +493,6 @@ INTEGER :: IJS,IJN !END JUAN PPM_LL #else INTEGER :: I,J,K -integer :: ji, jj, jk ! !!$! !!$! terms used in parabolic interpolation, dmq, qL, qR, dq, q6 @@ -525,6 +526,10 @@ GEAST = LEAST_ll() !* initialise & update halo & halo2 for PSRC ! #ifndef _OPENACC +iiu = size( PSRC, 1 ) +iju = size( PSRC, 2 ) +iku = size( PSRC, 3 ) + CALL GET_HALO(PSRC) ! PR (:,:,:) = PSRC(:,:,:) @@ -1153,6 +1158,9 @@ IMPLICIT NONE ! !* 0.1 Declarations of dummy arguments : ! +#ifdef _OPENACC +integer, intent(in) :: iiu, iju, iku +#endif CHARACTER (LEN=4), DIMENSION(2), INTENT(IN) :: HLBCY ! Y direction LBC type ! INTEGER, INTENT(IN) :: KGRID ! C grid localisation @@ -1182,6 +1190,7 @@ INTEGER :: IIW,IIA ! LOGICAL :: GSOUTH , GNORTH #ifndef _OPENACC +integer :: iiu, iju, iku ! ! terms used in parabolic interpolation, dmq, qL, qR, dq, q6 REAL, DIMENSION(SIZE(PCR,1),SIZE(PCR,2),SIZE(PCR,3)) :: ZQL,ZQR @@ -1206,7 +1215,7 @@ REAL, DIMENSION(IIU,IJU,IKU) :: & ! !JUAN ACC -INTEGER :: I,J,K ,IIU,IJU,IKU +INTEGER :: I,J,K ! INTEGER :: IKB,IKE INTEGER :: IJN,IJS @@ -1226,6 +1235,10 @@ GSOUTH=LSOUTH_ll() GNORTH=LNORTH_ll() ! #ifndef _OPENACC +iiu = size( PSRC, 1 ) +iju = size( PSRC, 2 ) +iku = size( PSRC, 3 ) + CALL GET_HALO(PSRC) #else IJS=1 @@ -1838,6 +1851,9 @@ IMPLICIT NONE ! !* 0.1 Declarations of dummy arguments : ! +#ifdef _OPENACC +integer, intent(in) :: iiu, iju, iku +#endif INTEGER, INTENT(IN) :: KGRID ! C grid localisation ! #ifndef _OPENACC @@ -1863,9 +1879,9 @@ REAL, DIMENSION(IIU,IJU,IKU), INTENT(OUT) :: PR !* 0.2 Declarations of local variables : ! #ifndef _OPENACC +INTEGER :: IIU, IJU, IKU INTEGER:: IKB ! Begining useful area in x,y,z directions INTEGER:: IKE ! End useful area in x,y,z directions -INTEGER:: IKU ! ! terms used in parabolic interpolation, dmq, qL, qR, dq, q6 REAL, DIMENSION(SIZE(PCR,1),SIZE(PCR,2),SIZE(PCR,3)) :: ZQL,ZQR @@ -1892,11 +1908,7 @@ REAL, DIMENSION(IIU,IJU,IKU) :: & INTEGER:: IKB ! Begining useful area in x,y,z directions INTEGER:: IKE ! End useful area in x,y,z directions ! -!JUAN ACC -INTEGER :: IIU,IJU,IKU -! INTEGER :: I,J,K -!JUAN ACC #endif integer :: ji, jj, jk ! @@ -1908,7 +1920,9 @@ integer :: ji, jj, jk IKB = 1 + JPVEXT IKE = SIZE(PSRC,3) - JPVEXT #ifndef _OPENACC -IKU = SIZE(PSRC,3) +iiu = size( PSRC, 1 ) +iju = size( PSRC, 2 ) +iku = size( PSRC, 3 ) #endif ! !------------------------------------------------------------------------------- diff --git a/src/MNH/turb_ver_thermo_corr.f90 b/src/MNH/turb_ver_thermo_corr.f90 index 5732723a1b61641d8e2f8b9c6adf1eebaf4521a4..372cc9f32d829f372b80f28c3c4abac7bd9426ce 100644 --- a/src/MNH/turb_ver_thermo_corr.f90 +++ b/src/MNH/turb_ver_thermo_corr.f90 @@ -1004,7 +1004,8 @@ END IF CALL DZM_DEVICE(KKA,KKU,KKL,ZTMP8_DEVICE,ZTMP1_DEVICE) !!! !$acc kernels - ZTMP7_DEVICE = (ZTMP3_DEVICE +ZTMP4_DEVICE) *PDR_DZ *ZTMP2_DEVICE / PDZZ + (ZTMP5_DEVICE+ZTMP6_DEVICE) *PDTH_DZ *ZTMP1_DEVICE / PDZZ + ZTMP7_DEVICE = ( ZTMP3_DEVICE + ZTMP4_DEVICE) * PDR_DZ * ZTMP2_DEVICE / PDZZ & + + ( ZTMP5_DEVICE + ZTMP6_DEVICE) * PDTH_DZ * ZTMP1_DEVICE / PDZZ !$acc end kernels !!! !$acc kernels