Index: palm/trunk/SOURCE/fft_xy_mod.f90
===================================================================
--- palm/trunk/SOURCE/fft_xy_mod.f90	(revision 4650)
+++ palm/trunk/SOURCE/fft_xy_mod.f90	(revision 4651)
@@ -24,4 +24,7 @@
 ! -----------------
 ! $Id$
+! preprocessor branch for ibm removed
+!
+! 4646 2020-08-24 16:02:40Z raasch
 ! file re-formatted to follow the PALM coding standard
 !
@@ -99,15 +102,5 @@
     REAL(wp), DIMENSION(:,:), ALLOCATABLE, SAVE ::  f_vec_x
 
-#if defined( __ibm )
-    INTEGER(iwp), PARAMETER ::  nau1 = 20000  !<
-    INTEGER(iwp), PARAMETER ::  nau2 = 22000  !<
-!
-!-- The following working arrays contain tables and have to be "save" and shared in OpenMP sense
-    REAL(wp), DIMENSION(nau1), SAVE ::  aux1  !<
-    REAL(wp), DIMENSION(nau1), SAVE ::  auy1  !<
-    REAL(wp), DIMENSION(nau1), SAVE ::  aux3  !<
-    REAL(wp), DIMENSION(nau1), SAVE ::  auy3  !<
-
-#elif defined( __nec_fft )
+#if defined( __nec_fft )
     INTEGER(iwp), SAVE ::  nz1  !<
 
@@ -189,12 +182,5 @@
 !--    The following temporary working arrays have to be on stack or private
 !--    in OpenMP sense
-#if defined( __ibm )
-       REAL(wp), DIMENSION(nau2)   ::  aux2   !<
-       REAL(wp), DIMENSION(nau2)   ::  auy2   !<
-       REAL(wp), DIMENSION(nau2)   ::  aux4   !<
-       REAL(wp), DIMENSION(nau2)   ::  auy4   !<
-       REAL(wp), DIMENSION(0:nx+2) ::  workx  !<
-       REAL(wp), DIMENSION(0:ny+2) ::  worky  !<
-#elif defined( __nec_fft )
+#if defined( __nec_fft )
        REAL(wp), DIMENSION(0:nx+3,nz+1)   ::  work_x  !<
        REAL(wp), DIMENSION(0:ny+3,nz+1)   ::  work_y  !<
@@ -228,14 +214,6 @@
           sqr_dnx = SQRT( dnx )
           sqr_dny = SQRT( dny )
-#if defined( __ibm )
-!
-!--       Initialize tables for fft along x
-          CALL DRCFT( 1, workx, 1, workx, 1, nx+1, 1,  1, sqr_dnx, aux1, nau1, aux2, nau2 )
-          CALL DCRFT( 1, workx, 1, workx, 1, nx+1, 1, -1, sqr_dnx, aux3, nau1, aux4, nau2 )
-!
-!--       Initialize tables for fft along y
-          CALL DRCFT( 1, worky, 1, worky, 1, ny+1, 1,  1, sqr_dny, auy1, nau1, auy2, nau2 )
-          CALL DCRFT( 1, worky, 1, worky, 1, ny+1, 1, -1, sqr_dny, auy3, nau1, auy4, nau2 )
-#elif defined( __nec_fft )
+
+#if defined( __nec_fft )
           message_string = 'fft method "' // TRIM( fft_method) // '" currently does not work on NEC'
           CALL message( 'fft_init', 'PA0187', 1, 2, 0, 6, 0 )
@@ -350,8 +328,5 @@
        REAL(wp), DIMENSION(nys_x:nyn_x,nzb_x:nzt_x,0:nx), OPTIONAL ::  ar_inv   !<
 
-#if defined( __ibm )
-       REAL(wp), DIMENSION(nau2) ::  aux2  !<
-       REAL(wp), DIMENSION(nau2) ::  aux4  !<
-#elif defined( __nec_fft )
+#if defined( __nec_fft )
        REAL(wp), DIMENSION(6*(nx+1)) ::  work2  !<
 #elif defined( __cuda_fft )
@@ -643,54 +618,5 @@
        ELSEIF ( fft_method == 'system-specific' )  THEN
 
-#if defined( __ibm )
-          IF ( forward_fft )  THEN
-
-             !$OMP PARALLEL PRIVATE ( work, i, j, k )
-             !$OMP DO
-             DO  k = nzb_x, nzt_x
-                DO  j = nys_x, nyn_x
-
-                   CALL DRCFT( 0, ar, 1, work, 1, nx+1, 1, 1, sqr_dnx, aux1, nau1, aux2, nau2 )
-
-                   DO  i = 0, (nx+1)/2
-                      ar(i,j,k) = work(2*i)
-                   ENDDO
-                   DO  i = 1, (nx+1)/2 - 1
-                      ar(nx+1-i,j,k) = work(2*i+1)
-                   ENDDO
-
-                ENDDO
-             ENDDO
-             !$OMP END PARALLEL
-
-          ELSE
-
-             !$OMP PARALLEL PRIVATE ( work, i, j, k )
-             !$OMP DO
-             DO  k = nzb_x, nzt_x
-                DO  j = nys_x, nyn_x
-
-                   DO  i = 0, (nx+1)/2
-                      work(2*i) = ar(i,j,k)
-                   ENDDO
-                   DO  i = 1, (nx+1)/2 - 1
-                      work(2*i+1) = ar(nx+1-i,j,k)
-                   ENDDO
-                   work(1) = 0.0_wp
-                   work(nx+2) = 0.0_wp
-
-                   CALL DCRFT( 0, work, 1, work, 1, nx+1, 1, -1, sqr_dnx, aux3, nau1, aux4, nau2 )
-
-                   DO  i = 0, nx
-                      ar(i,j,k) = work(i)
-                   ENDDO
-
-                ENDDO
-             ENDDO
-             !$OMP END PARALLEL
-
-          ENDIF
-
-#elif defined( __nec_fft )
+#if defined( __nec_fft )
 
           IF ( forward_fft )  THEN
@@ -822,8 +748,5 @@
        COMPLEX(wp), DIMENSION(:), ALLOCATABLE ::  cwork  !<
 
-#if defined( __ibm )
-       REAL(wp), DIMENSION(nau2) ::  aux2       !<
-       REAL(wp), DIMENSION(nau2) ::  aux4       !<
-#elif defined( __nec_fft )
+#if defined( __nec_fft )
        REAL(wp), DIMENSION(6*(nx+1)) ::  work2  !<
 #endif
@@ -940,35 +863,5 @@
        ELSEIF ( fft_method == 'system-specific' )  THEN
 
-#if defined( __ibm )
-          IF ( forward_fft )  THEN
-
-             CALL DRCFT( 0, ar, 1, work, 1, nx+1, 1, 1, sqr_dnx, aux1, nau1, aux2, nau2 )
-
-             DO  i = 0, (nx+1)/2
-                ar(i) = work(2*i)
-             ENDDO
-             DO  i = 1, (nx+1)/2 - 1
-                ar(nx+1-i) = work(2*i+1)
-             ENDDO
-
-          ELSE
-
-             DO  i = 0, (nx+1)/2
-                work(2*i) = ar(i)
-             ENDDO
-             DO  i = 1, (nx+1)/2 - 1
-                work(2*i+1) = ar(nx+1-i)
-             ENDDO
-             work(1) = 0.0_wp
-             work(nx+2) = 0.0_wp
-
-             CALL DCRFT( 0, work, 1, work, 1, nx+1, 1, -1, sqr_dnx, aux3, nau1, aux4, nau2 )
-
-             DO  i = 0, nx
-                ar(i) = work(i)
-             ENDDO
-
-          ENDIF
-#elif defined( __nec_fft )
+#if defined( __nec_fft )
           IF ( forward_fft )  THEN
 
@@ -1061,8 +954,5 @@
        COMPLEX(wp), DIMENSION(:), ALLOCATABLE ::  cwork  !<
 
-#if defined( __ibm )
-       REAL(wp), DIMENSION(nau2) ::  auy2  !<
-       REAL(wp), DIMENSION(nau2) ::  auy4  !<
-#elif defined( __nec_fft )
+#if defined( __nec_fft )
        REAL(wp), DIMENSION(6*(ny+1)) ::  work2  !<
 #elif defined( __cuda_fft )
@@ -1347,53 +1237,5 @@
        ELSEIF ( fft_method == 'system-specific' )  THEN
 
-#if defined( __ibm )
-          IF ( forward_fft)  THEN
-
-             !$OMP PARALLEL PRIVATE ( work, i, j, k )
-             !$OMP DO
-             DO  k = nzb_y, nzt_y
-                DO  i = nxl_y_l, nxr_y_l
-
-                   CALL DRCFT( 0, ar, 1, work, 1, ny+1, 1, 1, sqr_dny, auy1, nau1, auy2, nau2 )
-
-                   DO  j = 0, (ny+1)/2
-                      ar_tr(j,i,k) = work(2*j)
-                   ENDDO
-                   DO  j = 1, (ny+1)/2 - 1
-                      ar_tr(ny+1-j,i,k) = work(2*j+1)
-                   ENDDO
-
-                ENDDO
-             ENDDO
-             !$OMP END PARALLEL
-
-          ELSE
-
-             !$OMP PARALLEL PRIVATE ( work, i, j, k )
-             !$OMP DO
-             DO  k = nzb_y, nzt_y
-                DO  i = nxl_y_l, nxr_y_l
-
-                   DO  j = 0, (ny+1)/2
-                      work(2*j) = ar_tr(j,i,k)
-                   ENDDO
-                   DO  j = 1, (ny+1)/2 - 1
-                      work(2*j+1) = ar_tr(ny+1-j,i,k)
-                   ENDDO
-                   work(1)    = 0.0_wp
-                   work(ny+2) = 0.0_wp
-
-                   CALL DCRFT( 0, work, 1, work, 1, ny+1, 1, -1, sqr_dny, auy3, nau1, auy4, nau2 )
-
-                   DO  j = 0, ny
-                      ar(j,i,k) = work(j)
-                   ENDDO
-
-                ENDDO
-             ENDDO
-             !$OMP END PARALLEL
-
-          ENDIF
-#elif defined( __nec_fft )
+#if defined( __nec_fft )
           IF ( forward_fft )  THEN
 
@@ -1523,8 +1365,5 @@
        COMPLEX(wp), DIMENSION(:), ALLOCATABLE ::  cwork  !<
 
-#if defined( __ibm )
-       REAL(wp), DIMENSION(nau2) ::  auy2  !<
-       REAL(wp), DIMENSION(nau2) ::  auy4  !<
-#elif defined( __nec_fft )
+#if defined( __nec_fft )
        REAL(wp), DIMENSION(6*(ny+1)) ::  work2  !<
 #endif
@@ -1643,35 +1482,5 @@
        ELSEIF ( fft_method == 'system-specific' )  THEN
 
-#if defined( __ibm )
-          IF ( forward_fft )  THEN
-
-             CALL DRCFT( 0, ar, 1, work, 1, ny+1, 1, 1, sqr_dny, auy1, nau1, auy2, nau2 )
-
-             DO  j = 0, (ny+1)/2
-                ar(j) = work(2*j)
-             ENDDO
-             DO  j = 1, (ny+1)/2 - 1
-                ar(ny+1-j) = work(2*j+1)
-             ENDDO
-
-          ELSE
-
-             DO  j = 0, (ny+1)/2
-                work(2*j) = ar(j)
-             ENDDO
-             DO  j = 1, (ny+1)/2 - 1
-                work(2*j+1) = ar(ny+1-j)
-             ENDDO
-             work(1)    = 0.0_wp
-             work(ny+2) = 0.0_wp
-
-             CALL DCRFT( 0, work, 1, work, 1, ny+1, 1, -1, sqr_dny, auy3, nau1, auy4, nau2 )
-
-             DO  j = 0, ny
-                ar(j) = work(j)
-             ENDDO
-
-          ENDIF
-#elif defined( __nec_fft )
+#if defined( __nec_fft )
           IF ( forward_fft )  THEN
 
Index: palm/trunk/SOURCE/global_min_max.f90
===================================================================
--- palm/trunk/SOURCE/global_min_max.f90	(revision 4650)
+++ palm/trunk/SOURCE/global_min_max.f90	(revision 4651)
@@ -23,4 +23,7 @@
 ! -----------------
 ! $Id$
+! preprocessor branch for ibm removed
+!
+! 4646 2020-08-24 16:02:40Z raasch
 ! file re-formatted to follow the PALM coding standard
 !
@@ -86,19 +89,10 @@
     REAL(wp), OPTIONAL ::  value1  !<
 
-    REAL(wp) ::  ar(i1:i2,j1:j2,k1:k2)  !<
-
-#if defined( __ibm )
-    REAL(sp) ::  fmax(2)    !<
-    REAL(sp) ::  fmax_l(2)  !<
-    REAL(sp) ::  fmin(2)    !<
-    REAL(sp) ::  fmin_l(2)  !<
-             ! on 32bit-machines MPI_2REAL must not be replaced
-             ! by MPI_2DOUBLE_PRECISION
-#else
     REAL(wp), DIMENSION(2) ::  fmax    !<
     REAL(wp), DIMENSION(2) ::  fmax_l  !<
     REAL(wp), DIMENSION(2) ::  fmin    !<
     REAL(wp), DIMENSION(2) ::  fmin_l  !<
-#endif
+
+    REAL(wp), DIMENSION(i1:i2,j1:j2,k1:k2) ::  ar  !<
 
 #if defined( _OPENACC )
Index: palm/trunk/SOURCE/pres.f90
===================================================================
--- palm/trunk/SOURCE/pres.f90	(revision 4650)
+++ palm/trunk/SOURCE/pres.f90	(revision 4651)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! preprocessor branch for ibm removed
+!
+! 4649 2020-08-25 12:11:17Z raasch
 ! File re-formatted to follow the PALM coding standard
 !
@@ -384,33 +387,4 @@
     threadsum = 0.0_wp
 
-#if defined( __ibm )
-    !$OMP PARALLEL PRIVATE (i,j,k) FIRSTPRIVATE(threadsum) REDUCTION(+:localsum)
-    !$OMP DO SCHEDULE( STATIC )
-    DO  i = nxl, nxr
-       DO  j = nys, nyn
-          DO  k = nzb+1, nzt
-             d(k,j,i) = ( ( u(k,j,i+1) - u(k,j,i) ) * rho_air(k) * ddx +                           &
-                          ( v(k,j+1,i) - v(k,j,i) ) * rho_air(k) * ddy +                           &
-                          ( w(k,j,i)   * rho_air_zw(k) - w(k-1,j,i) * rho_air_zw(k-1) )            &
-                          * ddzw(k) )  * ddt_3d * d_weight_pres                                    &
-                        * MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_total_0(k,j,i), 0 ) )
-          ENDDO
-!
-!--       Compute possible PE-sum of divergences for flow_statistics
-          DO  k = nzb+1, nzt
-             threadsum = threadsum + ABS( d(k,j,i) )                                               &
-                         * MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_total_0(k,j,i), 0 ) )
-          ENDDO
-
-       ENDDO
-    ENDDO
-
-    IF ( intermediate_timestep_count == intermediate_timestep_count_max  .OR.                      &
-         intermediate_timestep_count == 0 )  THEN
-       localsum = localsum + threadsum * dt_3d * weight_pres_l
-    ENDIF
-    !$OMP END PARALLEL
-#else
-
     !$OMP PARALLEL PRIVATE (i,j,k)
     !$OMP DO SCHEDULE( STATIC )
@@ -451,5 +425,4 @@
        !$OMP END PARALLEL
     ENDIF
-#endif
 
 !
@@ -788,21 +761,4 @@
 
        !$OMP PARALLEL PRIVATE (i,j,k) FIRSTPRIVATE(threadsum) REDUCTION(+:localsum)
-#if defined( __ibm )
-       !$OMP DO SCHEDULE( STATIC )
-       DO  i = nxl, nxr
-          DO  j = nys, nyn
-             DO  k = nzb+1, nzt
-             d(k,j,i) = ( ( u(k,j,i+1) - u(k,j,i) ) * rho_air(k) * ddx +                           &
-                          ( v(k,j+1,i) - v(k,j,i) ) * rho_air(k) * ddy +                           &
-                          ( w(k,j,i)   * rho_air_zw(k) - w(k-1,j,i) * rho_air_zw(k-1) )            &
-                          * ddzw(k) )                                                              &
-                        * MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_total_0(k,j,i), 0 ) )
-             ENDDO
-             DO  k = nzb+1, nzt
-                threadsum = threadsum + ABS( d(k,j,i) )
-             ENDDO
-          ENDDO
-       ENDDO
-#else
        !$OMP DO SCHEDULE( STATIC )
        !$ACC PARALLEL LOOP COLLAPSE(3) PRIVATE(i, j, k) &
@@ -833,5 +789,4 @@
           ENDDO
        ENDDO
-#endif
 
        localsum = localsum + threadsum
