Index: palm/trunk/SOURCE/timestep.f90
===================================================================
--- palm/trunk/SOURCE/timestep.f90	(revision 2101)
+++ palm/trunk/SOURCE/timestep.f90	(revision 2118)
@@ -20,5 +20,5 @@
 ! Current revisions:
 ! ------------------
-! 
+! OpenACC directives and related part of code removed
 ! 
 ! Former revisions:
@@ -182,5 +182,4 @@
           u_gtrans_l = 0.0_wp
           v_gtrans_l = 0.0_wp
-          !$acc parallel present( u, v )
           DO  i = nxl, nxr
              DO  j = nys, nyn
@@ -191,5 +190,4 @@
              ENDDO
           ENDDO
-          !$acc end parallel
           uv_gtrans_l(1) = u_gtrans_l / REAL( (nxr-nxl+1)*(nyn-nys+1)*(nzt-nzb), KIND=wp )
           uv_gtrans_l(2) = v_gtrans_l / REAL( (nxr-nxl+1)*(nyn-nys+1)*(nzt-nzb), KIND=wp )
@@ -210,62 +208,4 @@
 !-- Determine the maxima of the velocity components, including their
 !-- grid index positions.
-#if defined( __openacc )
-    IF ( dt_fixed )  THEN  ! otherwise do it further below for better cache usage
-       u_max_l = -999999.9_wp
-       u_min_l =  999999.9_wp
-       v_max_l = -999999.9_wp
-       v_min_l =  999999.9_wp
-       w_max_l = -999999.9_wp
-       w_min_l =  999999.9_wp
-       !$acc parallel present( u, v, w )
-       DO  i = nxl, nxr
-          DO  j = nys, nyn
-             DO  k = nzb+1, nzt
-                u_max_l = MAX( u_max_l, u(k,j,i) )
-                u_min_l = MIN( u_min_l, u(k,j,i) )
-                v_max_l = MAX( v_max_l, v(k,j,i) )
-                v_min_l = MIN( v_min_l, v(k,j,i) )
-                w_max_l = MAX( w_max_l, w(k,j,i) )
-                w_min_l = MIN( w_min_l, w(k,j,i) )
-             ENDDO
-          ENDDO
-       ENDDO
-       !$acc end parallel
-#if defined( __parallel )
-       reduce_l(1) = u_max_l
-       reduce_l(2) = v_max_l
-       reduce_l(3) = w_max_l
-       IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
-       CALL MPI_ALLREDUCE( reduce_l, reduce, 3, MPI_REAL, MPI_MAX, comm2d, ierr )
-       u_max = reduce(1)
-       v_max = reduce(2)
-       w_max = reduce(3)
-       reduce_l(1) = u_min_l
-       reduce_l(2) = v_min_l
-       reduce_l(3) = w_min_l
-       IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
-       CALL MPI_ALLREDUCE( reduce_l, reduce, 3, MPI_REAL, MPI_MIN, comm2d, ierr )
-       IF ( ABS( reduce(1) ) > u_max )  u_max = reduce(1)
-       IF ( ABS( reduce(2) ) > v_max )  v_max = reduce(2)
-       IF ( ABS( reduce(3) ) > w_max )  w_max = reduce(3)
-#else
-       IF ( ABS( u_min_l ) > u_max_l )  THEN
-          u_max = u_min_l
-       ELSE
-          u_max = u_max_l
-       ENDIF
-       IF ( ABS( v_min_l ) > v_max_l )  THEN
-          v_max = v_min_l
-       ELSE
-          v_max = v_max_l
-       ENDIF
-       IF ( ABS( w_min_l ) > w_max_l )  THEN
-          w_max = w_min_l
-       ELSE
-          w_max = w_max_l
-       ENDIF
-#endif
-    ENDIF
-#else
     CALL global_min_max( nzb, nzt+1, nysg, nyng, nxlg, nxrg, u, 'abs', 0.0_wp, &
                          u_max, u_max_ijk )
@@ -274,88 +214,6 @@
     CALL global_min_max( nzb, nzt+1, nysg, nyng, nxlg, nxrg, w, 'abs', 0.0_wp, &
                          w_max, w_max_ijk )
-#endif
 
     IF ( .NOT. dt_fixed )  THEN
-#if defined( __openacc )
-!
-!--    Variable time step:
-!--    Calculate the maximum time step according to the CFL-criterion,
-!--    individually for each velocity component
-       dt_u_l  =  999999.9_wp
-       dt_v_l  =  999999.9_wp
-       dt_w_l  =  999999.9_wp
-       u_max_l = -999999.9_wp
-       u_min_l =  999999.9_wp
-       v_max_l = -999999.9_wp
-       v_min_l =  999999.9_wp
-       w_max_l = -999999.9_wp
-       w_min_l =  999999.9_wp
-       !$acc parallel loop collapse(3) present( u, v, w )
-       DO  i = nxl, nxr
-          DO  j = nys, nyn
-             DO  k = nzb+1, nzt
-                dt_u_l  = MIN( dt_u_l, ( dx     / ( ABS( u(k,j,i) - u_gtrans ) + 1.0E-10_wp ) ) )
-                dt_v_l  = MIN( dt_v_l, ( dy     / ( ABS( v(k,j,i) - v_gtrans ) + 1.0E-10_wp ) ) )
-                dt_w_l  = MIN( dt_w_l, ( dzu(k) / ( ABS( w(k,j,i) )            + 1.0E-10_wp ) ) )
-                u_max_l = MAX( u_max_l, u(k,j,i) )
-                u_min_l = MIN( u_min_l, u(k,j,i) )
-                v_max_l = MAX( v_max_l, v(k,j,i) )
-                v_min_l = MIN( v_min_l, v(k,j,i) )
-                w_max_l = MAX( w_max_l, w(k,j,i) )
-                w_min_l = MIN( w_min_l, w(k,j,i) )
-             ENDDO
-          ENDDO
-       ENDDO
-       !$acc end parallel
-
-#if defined( __parallel )
-       reduce_l(1) = dt_u_l
-       reduce_l(2) = dt_v_l
-       reduce_l(3) = dt_w_l
-       IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
-       CALL MPI_ALLREDUCE( reduce_l, reduce, 3, MPI_REAL, MPI_MIN, comm2d, ierr )
-       dt_u = reduce(1)
-       dt_v = reduce(2)
-       dt_w = reduce(3)
-
-       reduce_l(1) = u_max_l
-       reduce_l(2) = v_max_l
-       reduce_l(3) = w_max_l
-       IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
-       CALL MPI_ALLREDUCE( reduce_l, reduce, 3, MPI_REAL, MPI_MAX, comm2d, ierr )
-       u_max = reduce(1)
-       v_max = reduce(2)
-       w_max = reduce(3)
-       reduce_l(1) = u_min_l
-       reduce_l(2) = v_min_l
-       reduce_l(3) = w_min_l
-       IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
-       CALL MPI_ALLREDUCE( reduce_l, reduce, 3, MPI_REAL, MPI_MIN, comm2d, ierr )
-       IF ( ABS( reduce(1) ) > u_max )  u_max = reduce(1)
-       IF ( ABS( reduce(2) ) > v_max )  v_max = reduce(2)
-       IF ( ABS( reduce(3) ) > w_max )  w_max = reduce(3)
-#else
-       dt_u = dt_u_l
-       dt_v = dt_v_l
-       dt_w = dt_w_l
-
-       IF ( ABS( u_min_l ) > u_max_l )  THEN
-          u_max = u_min_l
-       ELSE
-          u_max = u_max_l
-       ENDIF
-       IF ( ABS( v_min_l ) > v_max_l )  THEN
-          v_max = v_min_l
-       ELSE
-          v_max = v_max_l
-       ENDIF
-       IF ( ABS( w_min_l ) > w_max_l )  THEN
-          w_max = w_min_l
-       ELSE
-          w_max = w_max_l
-       ENDIF
-#endif
-
-#else
 !
 !--    Variable time step:
@@ -390,6 +248,4 @@
 #endif
 
-#endif
-
 !
 !--    Compute time step according to the diffusion criterion.
@@ -404,7 +260,6 @@
        ENDDO
 
-!$OMP PARALLEL private(i,j,k,value) reduction(MIN: dt_diff_l)
-!$OMP DO
-       !$acc parallel loop collapse(3) present( kh, km )
+       !$OMP PARALLEL private(i,j,k,value) reduction(MIN: dt_diff_l)
+       !$OMP DO
        DO  i = nxl, nxr
           DO  j = nys, nyn
@@ -415,6 +270,5 @@
           ENDDO
        ENDDO
-       !$acc end parallel
-!$OMP END PARALLEL 
+       !$OMP END PARALLEL
 #if defined( __parallel )
        IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
