Index: /palm/trunk/SOURCE/module_interface.f90
===================================================================
--- /palm/trunk/SOURCE/module_interface.f90	(revision 3761)
+++ /palm/trunk/SOURCE/module_interface.f90	(revision 3762)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! only pass required arguments to surface_data_output_rrd_local
+! 
+! 3747 2019-02-16 15:15:23Z gronemeier
 ! Call user_init_arrays
 ! 
@@ -1252,13 +1255,7 @@
                               found                                            &
                            ) ! ToDo: change interface to pass variable
-          
-   IF ( .NOT. found ) CALL surface_data_output_rrd_local(                      &
-                              file_index, map_index,                           &
-                              nxlf, nxlc, nxl_on_file,                         &
-                              nxrf, nxrc, nxr_on_file,                         &
-                              nynf, nync, nyn_on_file,                         &
-                              nysf, nysc, nys_on_file,                         &
-                              found                                            &
-                           ) ! ToDo: change interface to pass variable
+!
+!--Surface data do not need overlap data, so do not pass these information. 
+   IF ( .NOT. found ) CALL surface_data_output_rrd_local( found )
                            
    IF ( .NOT. found ) CALL user_rrd_local(                                     &
Index: /palm/trunk/SOURCE/surface_data_output_mod.f90
===================================================================
--- /palm/trunk/SOURCE/surface_data_output_mod.f90	(revision 3761)
+++ /palm/trunk/SOURCE/surface_data_output_mod.f90	(revision 3762)
@@ -25,4 +25,8 @@
 ! -----------------
 ! $Id$
+! Remove unused variables and add preprocessor directives for variables that 
+! are used only when netcdf4 is defined 
+! 
+! 3745 2019-02-15 18:57:56Z suehring
 ! Output of waste_heat and innermost wall flux from indoor model
 ! 
@@ -156,8 +160,9 @@
    INTEGER(iwp) ::  average_count_surf = 0   !< number of ensemble members used for averaging
    INTEGER(iwp) ::  dosurf_no(0:1) = 0       !< number of surface output quantities
-
+#if defined( __netcdf4_parallel )
    INTEGER(iwp) :: nc_stat                   !< error code for netcdf routines
    INTEGER(iwp) ::  oldmode                  !< save old set-fill-mode of netcdf file (not needed, but required for routine call)
 
+   INTEGER(iwp), DIMENSION(0:1) ::  dosurf_time_count = 0 !< count of output time steps
    INTEGER(iwp), DIMENSION(0:1) ::  id_dim_s_surf         !< netcdf ID for dimension s
    INTEGER(iwp), DIMENSION(0:1) ::  id_dim_time_surf      !< netcdf ID for dimension time
@@ -172,8 +177,8 @@
    INTEGER(iwp), DIMENSION(0:1) ::  id_var_zenith_surf    !< netcdf ID for variable zenith
    INTEGER(iwp), DIMENSION(0:1) ::  id_var_zs_surf        !< netcdf ID for variable zs
-   INTEGER(iwp), DIMENSION(0:1) ::  dosurf_time_count = 0 !< count of output time steps
    INTEGER(iwp), DIMENSION(0:1) ::  ntdim_surf            !< number of output time steps
 
    INTEGER(iwp), DIMENSION(0:1,300) ::  id_var_dosurf     !< netcdf ID for output variables
+#endif
 
    LOGICAL :: first_output(0:1) = .FALSE.                 !< true if first output was already called
@@ -305,5 +310,6 @@
 
       IMPLICIT NONE
-
+      
+#if defined( __netcdf4_parallel )
       CHARACTER (LEN=100)  :: filename            !< name of output file
       CHARACTER (LEN=80)   ::  time_average_text  !< string written to file attribute time_avg
@@ -311,4 +317,5 @@
 
       INTEGER(iwp) ::  av                !< flag for averaged (=1) and non-averaged (=0) data
+#endif
       INTEGER(iwp) ::  i                 !< grid index in x-direction, also running variable for counting non-average data output
       INTEGER(iwp) ::  j                 !< grid index in y-direction, also running variable for counting average data output
@@ -328,6 +335,7 @@
       REAL(wp) ::  off_x !< grid offset in x-direction between the stored grid index and the actual wall
       REAL(wp) ::  off_y !< grid offset in y-direction between the stored grid index and the actual wall
-
+#if defined( __netcdf4_parallel )
       REAL(wp), DIMENSION(:), ALLOCATABLE ::  netcdf_data_1d  !< dummy array to output 1D data into netcdf file
+#endif
 
 !
@@ -4493,7 +4501,5 @@
 !> This routine reads the respective restart data.
 !------------------------------------------------------------------------------!
-    SUBROUTINE surface_data_output_rrd_local( i, k, nxlf, nxlc, nxl_on_file,   &
-                              nxrf, nxrc, nxr_on_file, nynf, nync, nyn_on_file,&
-                              nysf, nysc, nys_on_file, found )
+    SUBROUTINE surface_data_output_rrd_local( found )
 
 
@@ -4503,20 +4509,5 @@
        IMPLICIT NONE
 
-       INTEGER(iwp)       ::  l                 !< index variable for surface type
-       INTEGER(iwp)       ::  i                 !< running index over input files
        INTEGER(iwp)       ::  k                 !< running index over previous input files covering current local domain
-       INTEGER(iwp)       ::  ns_h_on_file_usm  !< number of horizontal surface elements (urban type) on file
-       INTEGER(iwp)       ::  nxlc              !< index of left boundary on current subdomain
-       INTEGER(iwp)       ::  nxlf              !< index of left boundary on former subdomain
-       INTEGER(iwp)       ::  nxl_on_file       !< index of left boundary on former local domain
-       INTEGER(iwp)       ::  nxrc              !< index of right boundary on current subdomain
-       INTEGER(iwp)       ::  nxrf              !< index of right boundary on former subdomain
-       INTEGER(iwp)       ::  nxr_on_file       !< index of right boundary on former local domain
-       INTEGER(iwp)       ::  nync              !< index of north boundary on current subdomain
-       INTEGER(iwp)       ::  nynf              !< index of north boundary on former subdomain
-       INTEGER(iwp)       ::  nyn_on_file       !< index of north boundary on former local domain
-       INTEGER(iwp)       ::  nysc              !< index of south boundary on current subdomain
-       INTEGER(iwp)       ::  nysf              !< index of south boundary on former subdomain
-       INTEGER(iwp)       ::  nys_on_file       !< index of south boundary on former local domain
 
        LOGICAL, INTENT(OUT)  ::  found
