Index: palm/trunk/SOURCE/nudging.f90
===================================================================
--- palm/trunk/SOURCE/nudging.f90	(revision 1381)
+++ palm/trunk/SOURCE/nudging.f90	(revision 1382)
@@ -20,5 +20,8 @@
 ! Current revisions:
 ! ------------------
-! 
+! Changed the weighting factor that is used in the summation of nudging 
+! tendencies for profile data output from weight_pres to weight_substep,
+! added Neumann boundary conditions for profile data output of nudging terms at
+! nzt+1
 ! 
 ! Former revisions:
@@ -299,5 +302,5 @@
 
        USE statistics,                                                         &
-           ONLY:  hom, sums_ls_l, weight_pres
+           ONLY:  hom, sums_ls_l, weight_substep
 
        IMPLICIT NONE
@@ -333,4 +336,5 @@
              DO  i = nxl, nxr
                 DO  j = nys, nyn
+
                    DO  k = nzb_u_inner(j,i)+1, nzt
 
@@ -341,6 +345,9 @@
 
                       sums_ls_l(k,6) = sums_ls_l(k,6) + tmp_tend *             &
-                                       weight_pres(intermediate_timestep_count)
+                                     weight_substep(intermediate_timestep_count)
                    ENDDO
+                  
+                   sums_ls_l(nzt+1,6) = sums_ls_l(nzt,6)
+ 
                 ENDDO
             ENDDO
@@ -350,4 +357,5 @@
              DO  i = nxl, nxr
                 DO  j = nys, nyn
+
                    DO  k = nzb_u_inner(j,i)+1, nzt
 
@@ -358,6 +366,9 @@
 
                       sums_ls_l(k,7) = sums_ls_l(k,7) + tmp_tend *             &
-                                       weight_pres(intermediate_timestep_count)
+                                     weight_substep(intermediate_timestep_count)
                    ENDDO
+                  
+                   sums_ls_l(nzt+1,7) = sums_ls_l(nzt,7)
+
                 ENDDO
             ENDDO
@@ -367,4 +378,5 @@
              DO  i = nxl, nxr
                 DO  j = nys, nyn
+
                    DO  k = nzb_u_inner(j,i)+1, nzt
 
@@ -375,6 +387,9 @@
 
                       sums_ls_l(k,4) = sums_ls_l(k,4) + tmp_tend *             &
-                                       weight_pres(intermediate_timestep_count)
+                                     weight_substep(intermediate_timestep_count)
                    ENDDO
+
+                   sums_ls_l(nzt+1,4) = sums_ls_l(nzt,4)
+
                 ENDDO
             ENDDO
@@ -384,4 +399,5 @@
              DO  i = nxl, nxr
                 DO  j = nys, nyn
+
                    DO  k = nzb_u_inner(j,i)+1, nzt
 
@@ -392,6 +408,9 @@
 
                       sums_ls_l(k,5) = sums_ls_l(k,5) + tmp_tend *             &
-                                       weight_pres(intermediate_timestep_count)
+                                     weight_substep(intermediate_timestep_count)
                    ENDDO
+                  
+                   sums_ls_l(nzt+1,5) = sums_ls_l(nzt,5)
+
                 ENDDO
             ENDDO
@@ -425,5 +444,5 @@
 
        USE statistics,                                                         &
-           ONLY:  hom, sums_ls_l, weight_pres
+           ONLY:  hom, sums_ls_l, weight_substep
 
        IMPLICIT NONE
@@ -466,6 +485,8 @@
 
                 sums_ls_l(k,6) = sums_ls_l(k,6) + tmp_tend                     &
-                                 * weight_pres(intermediate_timestep_count)
+                                 * weight_substep(intermediate_timestep_count)
              ENDDO
+
+             sums_ls_l(nzt+1,6) = sums_ls_l(nzt,6)
 
           CASE ( 'v' )
@@ -479,7 +500,8 @@
 
                 sums_ls_l(k,7) = sums_ls_l(k,7) + tmp_tend                     &
-                                 * weight_pres(intermediate_timestep_count)
+                                 * weight_substep(intermediate_timestep_count)
              ENDDO
 
+             sums_ls_l(nzt+1,7) = sums_ls_l(nzt,7)
 
           CASE ( 'pt' )
@@ -493,6 +515,8 @@
 
                 sums_ls_l(k,4) = sums_ls_l(k,4) + tmp_tend                     &
-                                 * weight_pres(intermediate_timestep_count)
+                                 * weight_substep(intermediate_timestep_count)
              ENDDO
+
+             sums_ls_l(nzt+1,4) = sums_ls_l(nzt,4)
 
 
@@ -507,6 +531,8 @@
 
                 sums_ls_l(k,5) = sums_ls_l(k,5) + tmp_tend                     &
-                                 * weight_pres(intermediate_timestep_count)
+                                 * weight_substep(intermediate_timestep_count)
              ENDDO
+
+             sums_ls_l(nzt+1,5) = sums_ls_l(nzt,5)
 
           CASE DEFAULT
