Skip to content
Snippets Groups Projects
Commit 03dd7400 authored by Juan Escobar's avatar Juan Escobar
Browse files

Juan 07/07/2020: more PGI BUG correction -> use MNH_ALLOCATE

parent 62ce784b
No related branches found
No related tags found
No related merge requests found
...@@ -1687,6 +1687,7 @@ REAL, DIMENSION(:,:,:), INTENT(OUT) :: PAMOIST,PATHETA ...@@ -1687,6 +1687,7 @@ REAL, DIMENSION(:,:,:), INTENT(OUT) :: PAMOIST,PATHETA
REAL :: ZEPS ! XMV / XMD REAL :: ZEPS ! XMV / XMD
real, dimension(:,:,:), pointer , contiguous :: zrvsat real, dimension(:,:,:), pointer , contiguous :: zrvsat
real, dimension(:,:,:), pointer , contiguous :: zdrvsatdt real, dimension(:,:,:), pointer , contiguous :: zdrvsatdt
INTEGER :: izrvsat, izdrvsatdt
! !
!------------------------------------------------------------------------------- !-------------------------------------------------------------------------------
...@@ -1699,10 +1700,15 @@ real, dimension(:,:,:), pointer , contiguous :: zdrvsatdt ...@@ -1699,10 +1700,15 @@ real, dimension(:,:,:), pointer , contiguous :: zdrvsatdt
call Mppdb_check( pcp, "Compute_function_thermo beg:pcp" ) call Mppdb_check( pcp, "Compute_function_thermo beg:pcp" )
end if end if
#ifndef MNH_OPENACC
allocate( zrvsat ( size( pexn, 1 ), size( pexn, 2 ), size( pexn, 3 ) ) ) allocate( zrvsat ( size( pexn, 1 ), size( pexn, 2 ), size( pexn, 3 ) ) )
allocate( zdrvsatdt( size( pexn, 1 ), size( pexn, 2 ), size( pexn, 3 ) ) ) allocate( zdrvsatdt( size( pexn, 1 ), size( pexn, 2 ), size( pexn, 3 ) ) )
#else
izrvsat = MNH_ALLOCATE_ZT3D( zrvsat , size( pexn, 1 ), size( pexn, 2 ), size( pexn, 3 ) )
izdrvsatdt = MNH_ALLOCATE_ZT3D( zdrvsatdt, size( pexn, 1 ), size( pexn, 2 ), size( pexn, 3 ) )
#endif
!$acc data create( zrvsat, zdrvsatdt ) !$acc data present( zrvsat, zdrvsatdt )
ZEPS = XMV / XMD ZEPS = XMV / XMD
! !
...@@ -1758,7 +1764,7 @@ real, dimension(:,:,:), pointer , contiguous :: zdrvsatdt ...@@ -1758,7 +1764,7 @@ real, dimension(:,:,:), pointer , contiguous :: zdrvsatdt
PLOCPEXN(:,:,:) = PLOCPEXN(:,:,:) / PEXN(:,:,:) PLOCPEXN(:,:,:) = PLOCPEXN(:,:,:) / PEXN(:,:,:)
!$acc end kernels !$acc end kernels
deallocate( zrvsat, zdrvsatdt )
if ( mppdb_initialized ) then if ( mppdb_initialized ) then
!Check all out arrays !Check all out arrays
...@@ -1769,6 +1775,12 @@ real, dimension(:,:,:), pointer , contiguous :: zdrvsatdt ...@@ -1769,6 +1775,12 @@ real, dimension(:,:,:), pointer , contiguous :: zdrvsatdt
!$acc end data !$acc end data
#ifndef MNH_OPENACC
deallocate( zrvsat, zdrvsatdt )
#else
CALL MNH_REL_ZT3D(izrvsat, izdrvsatdt )
#endif
!$acc end data !$acc end data
END SUBROUTINE COMPUTE_FUNCTION_THERMO END SUBROUTINE COMPUTE_FUNCTION_THERMO
......
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