Index: palm/trunk/UTIL/surface_output_processing/surface_output_parin
===================================================================
--- palm/trunk/UTIL/surface_output_processing/surface_output_parin	(revision 4766)
+++ palm/trunk/UTIL/surface_output_processing/surface_output_parin	(revision 4784)
@@ -6,11 +6,5 @@
 !
 !-- Path to the output binary files.
-    path = '~/palm/current_version/JOBS/test_urban/OUTPUT/', 
-!
-!-- Name of the run.
-    run = 'test_urban',
-!
-!-- Cycle number of the output data which should be processed.
-    cycle_number = 0, 
+    path = <replace by your path to surface data>,
 !
 !-- Convert instantaneous or average data.
Index: palm/trunk/UTIL/surface_output_processing/surface_output_to_vtk.f90
===================================================================
--- palm/trunk/UTIL/surface_output_processing/surface_output_to_vtk.f90	(revision 4766)
+++ palm/trunk/UTIL/surface_output_processing/surface_output_to_vtk.f90	(revision 4784)
@@ -20,9 +20,15 @@
 ! Current revisions:
 ! -----------------
-! 
-! 
+!
+!
 ! Former revisions:
 ! -----------------
 ! $Id$
+! - Give path to surface data directly
+! - Remove non-used input variables
+! - Output 5 relevant digits for the point data in order to account also for
+!   small grid spacings
+! 
+! 4481 2020-03-31 18:55:54Z maronga
 ! Add suffix to VTK output to indicate average data
 ! 
@@ -164,9 +170,8 @@
 
     CHARACTER(LEN=100) ::  path                   !< path to the binary data 
-    CHARACTER(LEN=100) ::  run                    !< name of the run
     CHARACTER(LEN=100) ::  variable_name          !< name of the processed output variable    
 
-    INTEGER(4)   ::  ftell                      !< intrinsic function, get current position in file
-    INTEGER(4)   ::  ndum                       !< return parameter of intrinsic function fseek   
+    INTEGER(4)   ::  ftell                        !< intrinsic function, get current position in file
+    INTEGER(4)   ::  ndum                         !< return parameter of intrinsic function fseek   
        
     INTEGER, PARAMETER ::  iwp = 4                !< integer precision
@@ -174,5 +179,4 @@
     INTEGER, PARAMETER ::  OFFSET_KIND = C_SIZE_T !< unsigned integer for the C-interface
 
-    INTEGER(iwp) ::  cycle_number                 !< cycle number
     INTEGER(iwp) ::  f                            !< running index over all binary files
     INTEGER(iwp) ::  file_id_in = 18              !< file unit for input binaray file    
@@ -201,4 +205,5 @@
     REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  points         !< point / vertex data
     REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  polygons       !< polygon data
+    real(wp) :: dum
     
     logical :: flag
@@ -240,5 +245,5 @@
 !
 !--    Open file with surface output for processor f.
-       OPEN ( file_id_in, FILE = TRIM( path ) // TRIM( run ) //                &
+       OPEN ( file_id_in, FILE = TRIM( path ) //                               &
               TRIM( myid_char ), FORM = 'UNFORMATTED' )
 !
@@ -271,5 +276,5 @@
 !--    Write the vertex data into header file.
        DO  n = 1, npoints(f)
-          WRITE( file_id_out_header, '(8F15.1)' )  points(1:3,n)
+          WRITE( file_id_out_header, '(8F15.4)' )  points(1:3,n)
        ENDDO
 !
@@ -287,6 +292,5 @@
 !
 !--    Open file with surface output for processor f.
-       OPEN ( file_id_in, FILE = TRIM( path ) // TRIM( run ) //                &
-              TRIM( myid_char ), FORM = 'UNFORMATTED' )
+       OPEN ( file_id_in, FILE = TRIM( path ) //  TRIM( myid_char ), FORM = 'UNFORMATTED' )
 !
 !--    Move to last postion. 
@@ -357,6 +361,5 @@
 !
 !--       Open binary file with surface output for processor f.
-          OPEN ( file_id_in, FILE = TRIM( path ) // TRIM( run ) //         &
-                 TRIM( myid_char ), FORM = 'UNFORMATTED' )
+          OPEN ( file_id_in, FILE = TRIM( path ) // TRIM( myid_char ), FORM = 'UNFORMATTED' )
 !
 !--       Move to last postion. 
@@ -472,6 +475,5 @@
        INTEGER(iwp) ::  file_id_parin = 90
        
-       NAMELIST /surface_output/  convert_average_data, cycle_number, num_pe,  &
-                                  path, run
+       NAMELIST /surface_output/  convert_average_data, num_pe, path
 
 !
@@ -494,24 +496,8 @@
 !------------------------------------------------------------------------------!
     SUBROUTINE surface_output_create_file_string
-       
+
        IMPLICIT NONE
-       
+
        CHARACTER(LEN=3) ::  char_av = ''
-       CHARACTER(LEN=4) ::  char_cycle = ''
-       
-!
-!--    Create substring for the cycle number.
-       IF ( cycle_number /= 0 )  THEN
-          IF ( cycle_number < 10 )  THEN
-             WRITE( char_cycle, '(I1)')  cycle_number
-             char_cycle = '.00' // TRIM( char_cycle )
-          ELSEIF ( cycle_number < 100 )  THEN
-             WRITE( char_cycle, '(I2)')  cycle_number
-             char_cycle = '.0' // TRIM( char_cycle )
-          ELSEIF ( cycle_number < 1000 )  THEN
-             WRITE( char_cycle, '(I3)')  cycle_number
-             char_cycle = '.' // TRIM( char_cycle )
-          ENDIF
-       ENDIF
 !
 !--    Create substring for averaged data. 
@@ -521,26 +507,20 @@
        IF ( f < 10 )  THEN
           WRITE( char_dum, '(I1)')  f
-          myid_char = TRIM( char_av ) // '_surf_00000' // TRIM( char_dum ) //  &
-                      TRIM( char_cycle ) // file_suffix
+          myid_char = TRIM( char_av ) // '_00000' // TRIM( char_dum )
        ELSEIF ( f < 100     )  THEN
           WRITE( char_dum, '(I2)')  f
-          myid_char = TRIM( char_av ) // '_surf_0000'  // TRIM( char_dum ) //  &
-                      TRIM( char_cycle ) // file_suffix
+          myid_char = TRIM( char_av ) // '_0000'  // TRIM( char_dum )
        ELSEIF ( f < 1000    )  THEN
           WRITE( char_dum, '(I3)')  f
-          myid_char = TRIM( char_av ) // '_surf_000'   // TRIM( char_dum ) //  &
-                      TRIM( char_cycle ) // file_suffix
+          myid_char = TRIM( char_av ) // '_000'   // TRIM( char_dum )
        ELSEIF ( f < 10000   )  THEN
           WRITE( char_dum, '(I4)')  f
-          myid_char = TRIM( char_av ) // '_surf_00'    // TRIM( char_dum ) //  &
-                      TRIM( char_cycle ) // file_suffix
+          myid_char = TRIM( char_av ) // '_00'    // TRIM( char_dum )
        ELSEIF ( f < 100000  )  THEN
           WRITE( char_dum, '(I5)')  f
-          myid_char = TRIM( char_av ) // '_surf_0'     // TRIM( char_dum ) //  &
-                      TRIM( char_cycle ) // file_suffix
+          myid_char = TRIM( char_av ) // '_0'     // TRIM( char_dum )
        ELSEIF ( f < 1000000 )  THEN
           WRITE( char_dum, '(I6)')  f
-          myid_char = TRIM( char_av ) // '_surf_'      // TRIM( char_dum ) //  &
-                      TRIM( char_cycle ) // file_suffix
+          myid_char = TRIM( char_av ) // '_'      // TRIM( char_dum )
        ENDIF
        
