Index: palm/trunk/SOURCE/surface_layer_fluxes_mod.f90
===================================================================
--- palm/trunk/SOURCE/surface_layer_fluxes_mod.f90	(revision 2101)
+++ palm/trunk/SOURCE/surface_layer_fluxes_mod.f90	(revision 2118)
@@ -20,5 +20,5 @@
 ! Current revisions:
 ! ------------------
-! 
+! OpenACC directives and related code removed
 ! 
 ! Former revisions:
@@ -163,5 +163,5 @@
 !>
 !> @todo (re)move large_scale_forcing actions
-!> @todo check/optimize OpenMP and OpenACC directives
+!> @todo check/optimize OpenMP directives
 !------------------------------------------------------------------------------!
  MODULE surface_layer_fluxes_mod
@@ -472,5 +472,4 @@
 
        !$OMP PARALLEL DO PRIVATE( k )
-       !$acc kernels loop present( nzb_s_inner, u, uv_total, v ) private( j, k )
        DO  i = nxl, nxr
           DO  j = nys, nyn
@@ -492,7 +491,5 @@
 !
 !--    Values of uv_total need to be exchanged at the ghost boundaries
-       !$acc update host( uv_total )
        CALL exchange_horiz_2d( uv_total )
-       !$acc update device( uv_total )
 
     END SUBROUTINE calc_uv_total
@@ -522,8 +519,5 @@
        IF ( TRIM( most_method ) /= 'circular' )  THEN
       
-          !$acc data present( nzb_s_inner, pt, q, qsws, rib, shf, uv_total, vpt, zu, zw )
-
           !$OMP PARALLEL DO PRIVATE( k, z_mo )
-          !$acc kernels loop private( j, k, z_mo )
           DO  i = nxl, nxr
              DO  j = nys, nyn
@@ -564,5 +558,4 @@
              ENDDO
           ENDDO 
-          !$acc end data
 
        ENDIF
@@ -574,7 +567,4 @@
 
           !$OMP PARALLEL DO PRIVATE( k, z_mo )
-          !# WARNING: does not work on GPU so far because of DO-loop with
-          !#          undetermined iterations
-          !!!!!!$acc kernels loop
           DO  i = nxl, nxr
              DO  j = nys, nyn
@@ -695,6 +685,4 @@
 
           !$OMP PARALLEL DO PRIVATE( k, l, z_mo ) FIRSTPRIVATE( l_bnd ) LASTPRIVATE( l_bnd )
-          !# WARNING: does not work on GPU so far because of DO  WHILE construct
-          !!!!!!$acc kernels loop
           DO  i = nxl, nxr
              DO  j = nys, nyn
@@ -736,5 +724,4 @@
 
           !$OMP PARALLEL DO PRIVATE( k, z_mo )
-          !$acc kernels loop present( nzb_s_inner, ol, pt, pt1, q, ql, qs, qv1, ts, us, vpt, zu, zw ) private( j, k, z_mo )
           DO  i = nxl, nxr
              DO  j = nys, nyn
@@ -775,7 +762,5 @@
 !--    Values of ol at ghost point locations are needed for the evaluation
 !--    of usws and vsws.
-       !$acc update host( ol )
        CALL exchange_horiz_2d( ol )
-       !$acc update device( ol )
 
     END SUBROUTINE calc_ol
@@ -788,5 +773,4 @@
 
        !$OMP PARALLEL DO PRIVATE( k, z_mo )
-       !$acc kernels loop present( nzb_s_inner, ol, us, uv_total, zu, zw, z0 ) private( j, k, z_mo )
        DO  i = nxlg, nxrg
           DO  j = nysg, nyng
@@ -811,5 +795,4 @@
        IMPLICIT NONE
 
-       !$acc kernels loop present( nzb_s_inner, pt, pt1, pt_d_t, q, ql, qv1 ) private( j, k )
        DO  i = nxlg, nxrg
           DO  j = nysg, nyng
@@ -828,9 +811,4 @@
        IMPLICIT NONE
 
-!
-!--    Data information for accelerators
-       !$acc data present( e, nrsws, nzb_u_inner, nzb_v_inner, nzb_s_inner, pt )  &
-       !$acc      present( q, qs, qsws, qrsws, shf, ts, u, us, usws, v )     &
-       !$acc      present( vpt, vsws, zu, zw, z0, z0h )
 ! 
 !--    Compute theta*
@@ -840,5 +818,4 @@
 !--       For a given heat flux in the surface layer:
           !$OMP PARALLEL DO
-          !$acc kernels loop private( j, k )
           DO  i = nxlg, nxrg
              DO  j = nysg, nyng
@@ -858,5 +835,4 @@
           IF ( large_scale_forcing  .AND.  lsf_surf )  THEN
              !$OMP PARALLEL DO
-             !$acc kernels loop private( j, k )
              DO  i = nxlg, nxrg
                 DO  j = nysg, nyng
@@ -868,5 +844,4 @@
 
           !$OMP PARALLEL DO PRIVATE( k, z_mo )
-          !$acc kernels loop present( nzb_s_inner, ol, pt, pt1, ts, zu, zw, z0h ) private( j, k, z_mo )
           DO  i = nxlg, nxrg
              DO  j = nysg, nyng
@@ -898,5 +873,4 @@
 !--          For a given water flux in the surface layer
              !$OMP PARALLEL DO
-             !$acc kernels loop private( j )
              DO  i = nxlg, nxrg
                 DO  j = nysg, nyng
@@ -912,5 +886,4 @@
              IF ( large_scale_forcing  .AND.  lsf_surf )  THEN
                 !$OMP PARALLEL DO
-                !$acc kernels loop private( j, k )
                 DO  i = nxlg, nxrg
                    DO  j = nysg, nyng
@@ -922,7 +895,5 @@
 
              !$OMP PARALLEL DO PRIVATE( e_s, k, z_mo )
-             !$acc kernels loop independent present( nzb_s_inner, ol, pt, q, qs, qv1, zu, zw, z0q ) private( e_s, j, k, z_mo )
              DO  i = nxlg, nxrg
-                !$acc loop independent
                 DO  j = nysg, nyng
 
@@ -965,5 +936,4 @@
 !--          For a given water flux in the surface layer
              !$OMP PARALLEL DO
-             !$acc kernels loop private( j )
              DO  i = nxlg, nxrg
                 DO  j = nysg, nyng
@@ -981,7 +951,5 @@
 
           !$OMP PARALLEL DO PRIVATE( k, z_mo )
-          !$acc kernels loop independent present( nr, nrs, nzb_s_inner, ol, qr, qrs, zu, zw, z0q ) private( j, k, z_mo )
           DO  i = nxlg, nxrg
-             !$acc loop independent
              DO  j = nysg, nyng
 
@@ -1002,5 +970,4 @@
 
        ENDIF
-       !$acc end data
 
     END SUBROUTINE calc_scaling_parameters
@@ -1020,5 +987,4 @@
 !--    First compute the corresponding component of u* and square it.
        !$OMP PARALLEL DO PRIVATE( k, ol_mid, z_mo )
-       !$acc kernels loop present( nzb_u_inner, ol, u, us, usws, zu, zw, z0 ) private( j, k, z_mo )
        DO  i = nxl, nxr
           DO  j = nys, nyn
@@ -1048,5 +1014,4 @@
 !--    First compute the corresponding component of u* and square it.
        !$OMP PARALLEL DO PRIVATE( k, ol_mid, z_mo )
-       !$acc kernels loop present( nzb_v_inner, ol, v, us, vsws, zu, zw, z0 ) private( j, k, ol_mid, z_mo )
        DO  i = nxl, nxr
           DO  j = nys, nyn
@@ -1075,8 +1040,6 @@
 !
 !--    Exchange the boundaries for the momentum fluxes (is this still required?)
-       !$acc update host( usws, vsws )
        CALL exchange_horiz_2d( usws )
        CALL exchange_horiz_2d( vsws )
-       !$acc update device( usws, vsws )
 
 !
@@ -1086,7 +1049,5 @@
             .NOT.  urban_surface )  THEN
           !$OMP PARALLEL DO
-          !$acc kernels loop independent present( shf, ts, us )
           DO  i = nxlg, nxrg
-             !$acc loop independent
              DO  j = nysg, nyng
                 k   = nzb_s_inner(j,i)
@@ -1103,7 +1064,5 @@
             .OR.  .NOT.  land_surface ) )  THEN
           !$OMP PARALLEL DO
-          !$acc kernels loop independent present( qs, qsws, us )
           DO  i = nxlg, nxrg
-             !$acc loop independent
              DO  j = nysg, nyng
                 k   = nzb_s_inner(j,i)
@@ -1120,7 +1079,5 @@
             .OR.  .NOT.  land_surface ) )  THEN
           !$OMP PARALLEL DO
-          !$acc kernels loop independent present( qs, qsws, us )
           DO  i = nxlg, nxrg
-             !$acc loop independent
              DO  j = nysg, nyng
                 ssws(j,i) = -ss(j,i) * us(j,i)
@@ -1134,7 +1091,5 @@
        IF ( cloud_physics  .AND.  microphysics_seifert )  THEN
           !$OMP PARALLEL DO
-          !$acc kernels loop independent present( nrs, nrsws, qrs, qrsws, us )
           DO  i = nxlg, nxrg
-             !$acc loop independent
              DO  j = nysg, nyng
                 qrsws(j,i) = -qrs(j,i) * us(j,i)
@@ -1148,7 +1103,5 @@
        IF ( ibc_e_b == 2 )  THEN
           !$OMP PARALLEL DO
-          !$acc kernels loop independent present( e, nzb_s_inner, us )
           DO  i = nxlg, nxrg
-             !$acc loop independent
              DO  j = nysg, nyng
                 k = nzb_s_inner(j,i)
