Index: palm/trunk/SOURCE/header.f90
===================================================================
--- palm/trunk/SOURCE/header.f90	(revision 3045)
+++ palm/trunk/SOURCE/header.f90	(revision 3065)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! Header output concerning stretching revised
+! 
+! 3045 2018-05-28 07:55:41Z Giersch
 ! Error messages revised
 ! 
@@ -800,17 +803,67 @@
 !-- Computational grid
     IF ( .NOT. ocean )  THEN
-       WRITE ( io, 250 )  dx, dy, dz, (nx+1)*dx, (ny+1)*dy, zu(nzt+1)
-       IF ( dz_stretch_level_index < nzt+1 )  THEN
-          WRITE ( io, 252 )  dz_stretch_level, dz_stretch_level_index, &
-                             dz_stretch_factor, dz_max
-       ENDIF
+       WRITE ( io, 250 )  dx, dy
+       
+       DO i = 1, number_stretch_level_start+1
+          WRITE ( io, 253 )  i, dz(i)
+       ENDDO
+       
+       WRITE( io, 251 ) (nx+1)*dx, (ny+1)*dy, zu(nzt+1)
+       
+       IF ( ANY( dz_stretch_level_start_index < nzt+1 ) )  THEN
+          WRITE( io, '(A)', advance='no') ' Vertical stretching starts at height:'
+          DO i = 1, number_stretch_level_start
+             WRITE ( io, '(F10.1,A3)', advance='no' )  dz_stretch_level_start(i), ' m,'
+          ENDDO
+          WRITE( io, '(/,A)', advance='no') ' Vertical stretching starts at index: '
+          DO i = 1, number_stretch_level_start
+             WRITE ( io, '(I12,A1)', advance='no' )  dz_stretch_level_start_index(i), ','
+          ENDDO
+          WRITE( io, '(/,A)', advance='no') ' Vertical stretching ends at height:  '
+          DO i = 1, number_stretch_level_start
+             WRITE ( io, '(F10.1,A3)', advance='no' )  dz_stretch_level_end(i), ' m,'
+          ENDDO
+          WRITE( io, '(/,A)', advance='no') ' Vertical stretching ends at index:   '
+          DO i = 1, number_stretch_level_start
+             WRITE ( io, '(I12,A1)', advance='no' )  dz_stretch_level_end_index(i), ','
+          ENDDO
+          WRITE( io, '(/,A)', advance='no') ' Factor used for stretching:          '
+          DO i = 1, number_stretch_level_start
+             WRITE ( io, '(F12.3,A1)', advance='no' )  dz_stretch_factor_array(i), ','
+          ENDDO
+       ENDIF
+       
     ELSE
-       WRITE ( io, 250 )  dx, dy, dz, (nx+1)*dx, (ny+1)*dy, zu(0)
-       IF ( dz_stretch_level_index > 0 )  THEN
-          WRITE ( io, 252 )  dz_stretch_level, dz_stretch_level_index, &
-                             dz_stretch_factor, dz_max
-       ENDIF
-    ENDIF
-    WRITE ( io, 254 )  nx, ny, nzt+1, MIN( nnx, nx+1 ), MIN( nny, ny+1 ), &
+       WRITE ( io, 250 )  dx, dy
+       DO i = 1, number_stretch_level_start+1
+          WRITE ( io, 253 )  i, dz(i)
+       ENDDO
+       
+       WRITE ( io, 251 ) (nx+1)*dx, (ny+1)*dy, zu(0)
+       
+       IF ( ANY( dz_stretch_level_start_index > 0 ) )  THEN
+          WRITE( io, '(A)', advance='no') ' Vertical stretching starts at height:'
+          DO i = 1, number_stretch_level_start
+             WRITE ( io, '(F10.1,A3)', advance='no' )  dz_stretch_level_start(i), ' m,'
+          ENDDO
+          WRITE( io, '(/,A)', advance='no') ' Vertical stretching starts at index: '
+          DO i = 1, number_stretch_level_start
+             WRITE ( io, '(I12,A1)', advance='no' )  dz_stretch_level_start_index(i), ','
+          ENDDO
+          WRITE( io, '(/,A)', advance='no') ' Vertical stretching ends at height:  '
+          DO i = 1, number_stretch_level_start
+             WRITE ( io, '(F10.1,A3)', advance='no' )  dz_stretch_level_end(i), ' m,'
+          ENDDO
+          WRITE( io, '(/,A)', advance='no') ' Vertical stretching ends at index:   '
+          DO i = 1, number_stretch_level_start
+             WRITE ( io, '(I12,A1)', advance='no' )  dz_stretch_level_end_index(i), ','
+          ENDDO
+          WRITE( io, '(/,A)', advance='no') ' Factor used for stretching:          '
+          DO i = 1, number_stretch_level_start
+             WRITE ( io, '(F12.3,A1)', advance='no' )  dz_stretch_factor_array(i), ','
+          ENDDO
+       ENDIF
+    ENDIF
+    WRITE ( io, 254 )  nx, ny, nzt+1, MIN( nnx, nx+1 ), MIN( nny, ny+1 ),      &
                        MIN( nnz+2, nzt+2 )
     IF ( sloping_surface )  WRITE ( io, 260 )  alpha_surface
@@ -2083,12 +2136,9 @@
 250 FORMAT (//' Computational grid and domain size:'/ &
               ' ----------------------------------'// &
-              ' Grid length:      dx =    ',F7.3,' m    dy =    ',F7.3, &
-              ' m    dz =    ',F7.3,' m'/ &
-              ' Domain size:       x = ',F10.3,' m     y = ',F10.3, &
+              ' Grid length:      dx =    ',F8.3,' m    dy =    ',F8.3, ' m')
+251 FORMAT (  /' Domain size:       x = ',F10.3,' m     y = ',F10.3, &
               ' m  z(u) = ',F10.3,' m'/)
-252 FORMAT (' dz constant up to ',F10.3,' m (k=',I4,'), then stretched by', &
-              ' factor:',F6.3/ &
-            ' maximum dz not to be exceeded is dz_max = ',F10.3,' m'/)
-254 FORMAT (' Number of gridpoints (x,y,z):  (0:',I4,', 0:',I4,', 0:',I4,')'/ &
+253 FORMAT ( '                dz(',I1,') =    ', F8.3, ' m')
+254 FORMAT (//' Number of gridpoints (x,y,z):  (0:',I4,', 0:',I4,', 0:',I4,')'/ &
             ' Subdomain size (x,y,z):        (  ',I4,',   ',I4,',   ',I4,')'/)
 260 FORMAT (/' The model has a slope in x-direction. Inclination angle: ',F6.2,&
