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

Juan 10/04/2013: put ZQL,ZQR,ZDQ,ZQ6,ZDMQ,ZQL0,ZQR0,ZQ60,ZFPOS,ZFNEG in mode_zwork for ppm.f90

parent 035cf607
No related branches found
No related tags found
No related merge requests found
...@@ -721,6 +721,8 @@ USE MODD_LUNIT ...@@ -721,6 +721,8 @@ USE MODD_LUNIT
USE MODD_PARAMETERS, ONLY : JPHEXT USE MODD_PARAMETERS, ONLY : JPHEXT
USE MODE_MPPDB USE MODE_MPPDB
! !
USE MODE_MNH_ZWORK, ONLY : ZQL,ZQR,ZDQ,ZQ6,ZDMQ,ZQL0,ZQR0,ZQ60,ZFPOS,ZFNEG
!
IMPLICIT NONE IMPLICIT NONE
! !
!* 0.1 Declarations of dummy arguments : !* 0.1 Declarations of dummy arguments :
...@@ -742,12 +744,12 @@ REAL, DIMENSION(:,:,:), INTENT(OUT) :: PR ...@@ -742,12 +744,12 @@ REAL, DIMENSION(:,:,:), INTENT(OUT) :: PR
!* 0.2 Declarations of local variables : !* 0.2 Declarations of local variables :
! !
! terms used in parabolic interpolation, dmq, qL, qR, dq, q6 ! terms used in parabolic interpolation, dmq, qL, qR, dq, q6
REAL, DIMENSION(SIZE(PCR,1),SIZE(PCR,2),SIZE(PCR,3)) :: & !$$ REAL, DIMENSION(SIZE(PCR,1),SIZE(PCR,2),SIZE(PCR,3)) :: &
ZQL,ZQR , ZDQ,ZQ6 , ZDMQ & !$$ ZQL,ZQR , ZDQ,ZQ6 , ZDMQ &
! extra variables for the initial guess of parabolae parameters ! extra variables for the initial guess of parabolae parameters
, ZQL0,ZQR0,ZQ60 & !$$ , ZQL0,ZQR0,ZQ60 &
! advection fluxes ! advection fluxes
, ZFPOS, ZFNEG !$$ , ZFPOS, ZFNEG
INTEGER:: IIB,IJB ! Begining useful area in x,y,z directions INTEGER:: IIB,IJB ! Begining useful area in x,y,z directions
...@@ -803,8 +805,9 @@ CALL GET_HALO_D(PSRC,HDIR="01_Y") ...@@ -803,8 +805,9 @@ CALL GET_HALO_D(PSRC,HDIR="01_Y")
! !
#define JUAN_ACC_01_Y #define JUAN_ACC_01_Y
#ifdef JUAN_ACC_01_Y #ifdef JUAN_ACC_01_Y
!$acc data region local (ZQL,ZQR,ZDQ,ZQ6,ZDMQ,ZQL0,ZQR0,ZQ60,ZFPOS,ZFNEG) !$acc data
!$acc region ! create/mirror (ZQL,ZQR,ZDQ,ZQ6,ZDMQ,ZQL0,ZQR0,ZQ60,ZFPOS,ZFNEG)
!$acc kernels
#endif #endif
PR=PSRC PR=PSRC
ZQL=PSRC ZQL=PSRC
...@@ -817,7 +820,7 @@ ZQR0=PSRC ...@@ -817,7 +820,7 @@ ZQR0=PSRC
ZQ60=PSRC ZQ60=PSRC
ZFPOS=PSRC ZFPOS=PSRC
ZFNEG=PSRC ZFNEG=PSRC
!#acc end region ! acc end region
! !
!!$SELECT CASE ( HLBCY(1) ) ! Y direction LBC type: (1) for left side !!$SELECT CASE ( HLBCY(1) ) ! Y direction LBC type: (1) for left side
!!$! !!$!
...@@ -974,9 +977,9 @@ ZFNEG=PSRC ...@@ -974,9 +977,9 @@ ZFNEG=PSRC
! update ZDMQ HALO before next/further utilisation ! update ZDMQ HALO before next/further utilisation
! !
#ifdef TEMPO_JUAN #ifdef TEMPO_JUAN
!$acc end region !$acc end kernels
CALL GET_HALO_D(ZDMQ,HDIR="01_Y") CALL GET_HALO_D(ZDMQ,HDIR="01_Y")
!$acc region !$acc kernels
#endif #endif
! !
! calculate qL and qR with the modified dmq ! calculate qL and qR with the modified dmq
...@@ -994,9 +997,9 @@ CALL GET_HALO_D(ZDMQ,HDIR="01_Y") ...@@ -994,9 +997,9 @@ CALL GET_HALO_D(ZDMQ,HDIR="01_Y")
!!$ !#acc end region !!$ !#acc end region
! !
#ifdef TEMPO_JUAN #ifdef TEMPO_JUAN
!$acc end region !$acc end kernels
CALL GET_HALO_D(ZQL0,HDIR="01_Y") CALL GET_HALO_D(ZQL0,HDIR="01_Y")
!$acc region !$acc kernels
#endif #endif
! !
! SOUTH BOUND ! SOUTH BOUND
...@@ -1084,9 +1087,9 @@ CALL GET_HALO_D(ZQL0,HDIR="01_Y") ...@@ -1084,9 +1087,9 @@ CALL GET_HALO_D(ZQL0,HDIR="01_Y")
!!$ !#acc end region !!$ !#acc end region
! !
#ifdef TEMPO_JUAN #ifdef TEMPO_JUAN
!$acc end region !$acc end kernels
CALL GET_HALO_D(ZFPOS,HDIR="01_Y") CALL GET_HALO_D(ZFPOS,HDIR="01_Y")
!$acc region !$acc kernels
#endif #endif
! !
! !
...@@ -1118,9 +1121,9 @@ CALL GET_HALO_D(ZFPOS,HDIR="01_Y") ...@@ -1118,9 +1121,9 @@ CALL GET_HALO_D(ZFPOS,HDIR="01_Y")
!!$ !#acc end region !!$ !#acc end region
! !
#ifdef TEMPO_JUAN #ifdef TEMPO_JUAN
!$acc end region !$acc end kernels
CALL GET_HALO_D(ZFNEG,HDIR="01_Y") CALL GET_HALO_D(ZFNEG,HDIR="01_Y")
!$acc region !$acc kernels
#endif #endif
! !
! advection flux at open boundary when u(IJE+1) < 0 ! advection flux at open boundary when u(IJE+1) < 0
...@@ -1149,8 +1152,8 @@ CALL GET_HALO_D(ZFPOS,HDIR="01_Y") ...@@ -1149,8 +1152,8 @@ CALL GET_HALO_D(ZFPOS,HDIR="01_Y")
!!$! !!$!
#ifdef JUAN_ACC_01_Y #ifdef JUAN_ACC_01_Y
!$acc end region !$acc end kernels
!$acc end data region !$acc end data
#endif #endif
CALL GET_HALO_D(PR,HDIR="01_Y") CALL GET_HALO_D(PR,HDIR="01_Y")
...@@ -1247,6 +1250,8 @@ USE MODD_CONF ...@@ -1247,6 +1250,8 @@ USE MODD_CONF
USE MODD_PARAMETERS USE MODD_PARAMETERS
USE MODE_MPPDB USE MODE_MPPDB
! !
USE MODE_MNH_ZWORK, ONLY : ZQL,ZQR,ZDQ,ZQ6,ZDMQ,ZQL0,ZQR0,ZQ60,ZFPOS,ZFNEG
!
IMPLICIT NONE IMPLICIT NONE
! !
!* 0.1 Declarations of dummy arguments : !* 0.1 Declarations of dummy arguments :
...@@ -1265,14 +1270,14 @@ REAL, DIMENSION(:,:,:), INTENT(OUT) :: PR ...@@ -1265,14 +1270,14 @@ REAL, DIMENSION(:,:,:), INTENT(OUT) :: PR
!* 0.2 Declarations of local variables : !* 0.2 Declarations of local variables :
! !
! terms used in parabolic interpolation, dmq, qL, qR, dq, q6 ! terms used in parabolic interpolation, dmq, qL, qR, dq, q6
REAL, DIMENSION(SIZE(PCR,1),SIZE(PCR,2),SIZE(PCR,3)) :: & !$$ REAL, DIMENSION(SIZE(PCR,1),SIZE(PCR,2),SIZE(PCR,3)) :: &
ZQL, ZQR, ZDQ, ZQ6, ZDMQ & !$$ ZQL, ZQR, ZDQ, ZQ6, ZDMQ &
! !
! extra variables for the initial guess of parabolae parameters ! extra variables for the initial guess of parabolae parameters
, ZQL0,ZQR0,ZQ60 & !$$ , ZQL0,ZQR0,ZQ60 &
! !
! advection fluxes ! advection fluxes
, ZFPOS, ZFNEG !$$ , ZFPOS, ZFNEG
! !
INTEGER:: IKB ! Begining useful area in x,y,z directions INTEGER:: IKB ! Begining useful area in x,y,z directions
INTEGER:: IKE ! End useful area in x,y,z directions INTEGER:: IKE ! End useful area in x,y,z directions
...@@ -1302,8 +1307,9 @@ IKU=size(psrc,3) ...@@ -1302,8 +1307,9 @@ IKU=size(psrc,3)
#define JUAN_ACC_01_Z #define JUAN_ACC_01_Z
#ifdef JUAN_ACC_01_Z #ifdef JUAN_ACC_01_Z
!$acc data region local (ZDMQ,ZQL0,ZQR0,ZDQ,ZQ60,ZQL,ZQR,ZQ6,ZFPOS,ZFNEG) !$acc data
!$acc region ! create/mirror (ZDMQ,ZQL0,ZQR0,ZDQ,ZQ60,ZQL,ZQR,ZQ6,ZFPOS,ZFNEG)
!$acc kernels
#endif #endif
! !
!------------------------------------------------------------------------------- !-------------------------------------------------------------------------------
...@@ -1411,8 +1417,8 @@ ZFNEG(:,:,IKE+1) = (ZQR(:,:,IKE)-PSRC(:,:,IKE+1))*PCR(:,:,IKE+1) + & ...@@ -1411,8 +1417,8 @@ ZFNEG(:,:,IKE+1) = (ZQR(:,:,IKE)-PSRC(:,:,IKE+1))*PCR(:,:,IKE+1) + &
!!$ ZFNEG*(0.5-SIGN(0.5,PCR)) ) ) !!$ ZFNEG*(0.5-SIGN(0.5,PCR)) ) )
#ifdef JUAN_ACC_01_Z #ifdef JUAN_ACC_01_Z
!$acc end region !$acc end kernels
!$acc end data region !$acc end data
#endif #endif
CALL GET_HALO_D(PR) CALL GET_HALO_D(PR)
......
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