Index: palm/trunk/SOURCE/surface_mod.f90
===================================================================
--- palm/trunk/SOURCE/surface_mod.f90	(revision 3745)
+++ palm/trunk/SOURCE/surface_mod.f90	(revision 3761)
@@ -26,4 +26,8 @@
 ! -----------------
 ! $Id$
+! OpenACC directives added to avoid compiler warnings about unused variables,
+! unused variable removed
+! 
+! 3745 2019-02-15 18:57:56Z suehring
 ! +waste_heat
 ! 
@@ -617,12 +621,4 @@
     END INTERFACE init_surface_arrays
 
-    INTERFACE enter_surface_arrays
-       MODULE PROCEDURE enter_surface_arrays
-    END INTERFACE
-
-    INTERFACE exit_surface_arrays
-       MODULE PROCEDURE exit_surface_arrays
-    END INTERFACE
-
     INTERFACE surface_rrd_local
        MODULE PROCEDURE surface_rrd_local
@@ -642,17 +638,29 @@
     END INTERFACE surface_restore_elements
 
+#if defined( _OPENACC )
+    INTERFACE enter_surface_arrays
+       MODULE PROCEDURE enter_surface_arrays
+    END INTERFACE
+
+    INTERFACE exit_surface_arrays
+       MODULE PROCEDURE exit_surface_arrays
+    END INTERFACE
+#endif
+
 !
 !-- Public variables
-    PUBLIC bc_h, ind_pav_green, ind_veg_wall, ind_wat_win, ns_h_on_file,       &
-           ns_v_on_file, surf_def_h, surf_def_v, surf_lsm_h, surf_lsm_v,       &
-           surf_usm_h, surf_usm_v, surf_type, vertical_surfaces_exist,         &
-           surf_bulk_cloud_model, surf_microphysics_morrison, surf_microphysics_seifert
+    PUBLIC bc_h, ind_pav_green, ind_veg_wall, ind_wat_win, ns_h_on_file, ns_v_on_file, surf_def_h, &
+           surf_def_v, surf_lsm_h, surf_lsm_v, surf_usm_h, surf_usm_v, surf_type,                  &
+           vertical_surfaces_exist, surf_bulk_cloud_model, surf_microphysics_morrison,             &
+           surf_microphysics_seifert
 !
 !-- Public subroutines and functions
-    PUBLIC get_topography_top_index, get_topography_top_index_ji, init_bc,     &
-           init_surfaces, init_surface_arrays, enter_surface_arrays,           &
-           exit_surface_arrays, surface_rrd_local, surface_restore_elements,   &
-           surface_wrd_local, surface_last_actions
-
+    PUBLIC get_topography_top_index, get_topography_top_index_ji, init_bc, init_surfaces,          &
+           init_surface_arrays, surface_rrd_local, surface_restore_elements, surface_wrd_local,    &
+           surface_last_actions
+
+#if defined( _OPENACC )
+    PUBLIC enter_surface_arrays, exit_surface_arrays
+#endif
 
  CONTAINS
@@ -1109,4 +1117,5 @@
 !> Enter horizontal and vertical surfaces.
 !------------------------------------------------------------------------------!
+#if defined( _OPENACC )
     SUBROUTINE enter_surface_arrays
 
@@ -1146,5 +1155,5 @@
 
     END SUBROUTINE enter_surface_arrays
-
+#endif
 
 !------------------------------------------------------------------------------!
@@ -1153,4 +1162,5 @@
 !> Exit horizontal and vertical surfaces.
 !------------------------------------------------------------------------------!
+#if defined( _OPENACC )
     SUBROUTINE exit_surface_arrays
 
@@ -1190,5 +1200,5 @@
 
     END SUBROUTINE exit_surface_arrays
-
+#endif
 
 !------------------------------------------------------------------------------!
@@ -1437,4 +1447,5 @@
 !> except for top fluxes.
 !------------------------------------------------------------------------------!
+#if defined( _OPENACC )
     SUBROUTINE exit_surface_attributes_h( surfaces )
 
@@ -1470,5 +1481,5 @@
    
     END SUBROUTINE exit_surface_attributes_h
-
+#endif
 
 !------------------------------------------------------------------------------!
@@ -1478,4 +1489,5 @@
 !> except for top fluxes.
 !------------------------------------------------------------------------------!
+#if defined( _OPENACC )
     SUBROUTINE enter_surface_attributes_h( surfaces )
 
@@ -1511,5 +1523,5 @@
 
     END SUBROUTINE enter_surface_attributes_h
-
+#endif
 
 !------------------------------------------------------------------------------!
@@ -1655,4 +1667,5 @@
 !> Exit memory for model-top fluxes.
 !------------------------------------------------------------------------------!
+#if defined( _OPENACC )
     SUBROUTINE exit_surface_attributes_h_top( surfaces )
 
@@ -1678,5 +1691,5 @@
    
     END SUBROUTINE exit_surface_attributes_h_top
-
+#endif
 
 !------------------------------------------------------------------------------!
@@ -1685,4 +1698,5 @@
 !> Enter memory for model-top fluxes.
 !------------------------------------------------------------------------------!
+#if defined( _OPENACC )
     SUBROUTINE enter_surface_attributes_h_top( surfaces )
 
@@ -1708,5 +1722,5 @@
 
     END SUBROUTINE enter_surface_attributes_h_top
-
+#endif
 
 !------------------------------------------------------------------------------!
@@ -1958,4 +1972,5 @@
 !> Exit memory for vertical surface types. 
 !------------------------------------------------------------------------------!
+#if defined( _OPENACC )
     SUBROUTINE exit_surface_attributes_v( surfaces )
 
@@ -1982,5 +1997,5 @@
 
     END SUBROUTINE exit_surface_attributes_v
-
+#endif
 
 !------------------------------------------------------------------------------!
@@ -1989,4 +2004,5 @@
 !> Enter memory for vertical surface types. 
 !------------------------------------------------------------------------------!
+#if defined( _OPENACC )
     SUBROUTINE enter_surface_attributes_v( surfaces )
    
@@ -2013,5 +2029,5 @@
    
     END SUBROUTINE enter_surface_attributes_v
-
+#endif
 
 !------------------------------------------------------------------------------!
@@ -2773,5 +2789,4 @@
              INTEGER(iwp)  ::  j               !< running index x-direction
              INTEGER(iwp)  ::  k               !< running index x-direction
-             INTEGER(iwp)  ::  l               !< index variable for the surface type, indicating the facing 
              INTEGER(iwp)  ::  num_v           !< current number of surface element
              INTEGER(iwp)  ::  num_v_kji       !< current number of surface element at (j,i)
