Index: palm/trunk/SOURCE/flow_statistics.f90
===================================================================
--- palm/trunk/SOURCE/flow_statistics.f90	(revision 1381)
+++ palm/trunk/SOURCE/flow_statistics.f90	(revision 1382)
@@ -21,5 +21,9 @@
 ! Current revisions:
 ! -----------------
-! 
+! Renamed variables which store large scale forcing tendencies
+! pt_lsa -> td_lsa_lpt, pt_subs -> td_sub_lpt, 
+! q_lsa  -> td_lsa_q,   q_subs  -> td_sub_q,
+! added Neumann boundary conditions for profile data output of large scale
+! advection and subsidence terms at nzt+1
 ! 
 ! Former revisions:
@@ -103,8 +107,8 @@
 
     USE arrays_3d,                                                             &
-        ONLY:  ddzu, ddzw, e, hyp, km, kh, nr, p, prho, pt, pt_lsa, pt_subs, q,&
-               qc, ql, qr, qs, qsws, qswst, q_lsa, q_subs, rho, sa, saswsb,    &
-               saswst, shf, time_vert, ts, tswst, u, ug, us, usws, uswst, vsws,&
-               v, vg, vpt, vswst, w, w_subs, zw
+        ONLY:  ddzu, ddzw, e, hyp, km, kh, nr, p, prho, pt, q, qc, ql, qr, qs, &
+               qsws, qswst, rho, sa, saswsb, saswst, shf, td_lsa_lpt, td_lsa_q,&
+               td_sub_lpt, td_sub_q, time_vert, ts, tswst, u, ug, us, usws,    &
+               uswst, vsws, v, vg, vpt, vswst, w, w_subs, zw
         
     USE cloud_parameters,                                                      &
@@ -1014,18 +1018,24 @@
 
           DO  k = nzb, nzt
-             sums_ls_l(k,0) = pt_lsa(k,nt)                                     &
-                              + fac * ( pt_lsa(k,nt+1) - pt_lsa(k,nt) )
-             sums_ls_l(k,1) = q_lsa(k,nt)                                      &
-                              + fac * ( q_lsa(k,nt+1) - q_lsa(k,nt) )
-          ENDDO
+             sums_ls_l(k,0) = td_lsa_lpt(k,nt)                                 &
+                              + fac * ( td_lsa_lpt(k,nt+1) - td_lsa_lpt(k,nt) )
+             sums_ls_l(k,1) = td_lsa_q(k,nt)                                   &
+                              + fac * ( td_lsa_q(k,nt+1) - td_lsa_q(k,nt) )
+          ENDDO
+
+          sums_ls_l(nzt+1,0) = sums_ls_l(nzt,0)
+          sums_ls_l(nzt+1,1) = sums_ls_l(nzt,1)
 
           IF ( large_scale_subsidence .AND. use_subsidence_tendencies )  THEN
 
              DO  k = nzb, nzt
-                sums_ls_l(k,2) = pt_subs(k,nt)                                 &
-                                 + fac * ( pt_subs(k,nt+1) - pt_subs(k,nt) )
-                sums_ls_l(k,3) = q_subs(k,nt)                                  &
-                                 + fac * ( q_subs(k,nt+1) - q_subs(k,nt) )
-             ENDDO
+                sums_ls_l(k,2) = td_sub_lpt(k,nt) + fac *                      &
+                                 ( td_sub_lpt(k,nt+1) - td_sub_lpt(k,nt) )
+                sums_ls_l(k,3) = td_sub_q(k,nt) + fac *                        &
+                                 ( td_sub_q(k,nt+1) - td_sub_q(k,nt) )
+             ENDDO
+
+             sums_ls_l(nzt+1,2) = sums_ls_l(nzt,2)
+             sums_ls_l(nzt+1,3) = sums_ls_l(nzt,3)
 
           ENDIF
@@ -1192,17 +1202,17 @@
 
        IF ( large_scale_forcing )  THEN
-          hom(:,1,81,sr) = sums_ls_l(:,0)          ! pt_lsa
-          hom(:,1,82,sr) = sums_ls_l(:,1)          ! q_lsa
+          hom(:,1,81,sr) = sums_ls_l(:,0)          ! td_lsa_lpt
+          hom(:,1,82,sr) = sums_ls_l(:,1)          ! td_lsa_q
           IF ( use_subsidence_tendencies )  THEN
-             hom(:,1,83,sr) = sums_ls_l(:,2)       ! pt_subs
-             hom(:,1,84,sr) = sums_ls_l(:,3)       ! q_subs
+             hom(:,1,83,sr) = sums_ls_l(:,2)       ! td_sub_lpt
+             hom(:,1,84,sr) = sums_ls_l(:,3)       ! td_sub_q
           ELSE
-             hom(:,1,83,sr) = sums(:,83)           ! pt_subs
-             hom(:,1,84,sr) = sums(:,84)           ! q_subs
+             hom(:,1,83,sr) = sums(:,83)           ! td_sub_lpt
+             hom(:,1,84,sr) = sums(:,84)           ! td_sub_q
           ENDIF
-          hom(:,1,85,sr) = sums(:,85)              ! pt_nudge
-          hom(:,1,86,sr) = sums(:,86)              ! q_nudge
-          hom(:,1,87,sr) = sums(:,87)              ! u_nudge
-          hom(:,1,88,sr) = sums(:,88)              ! v_nudge
+          hom(:,1,85,sr) = sums(:,85)              ! td_nud_lpt
+          hom(:,1,86,sr) = sums(:,86)              ! td_nud_q
+          hom(:,1,87,sr) = sums(:,87)              ! td_nud_u
+          hom(:,1,88,sr) = sums(:,88)              ! td_nud_v
        ENDIF
 
@@ -1386,8 +1396,8 @@
 
     USE arrays_3d,                                                             &
-        ONLY:  ddzu, ddzw, e, hyp, km, kh, nr, p, prho, pt, pt_lsa, pt_subs, q,&
-               qc, ql, qr, qs, qsws, qswst, q_lsa, q_subs, rho, sa, saswsb,    &
-               saswst, shf, time_vert, ts, tswst, u, ug, us, usws, uswst, vsws,&
-               v, vg, vpt, vswst, w, w_subs, zw
+        ONLY:  ddzu, ddzw, e, hyp, km, kh, nr, p, prho, pt, q, qc, ql, qr, qs, &
+               qsws, qswst, rho, sa, saswsb, saswst, shf, td_lsa_lpt, td_lsa_q,&
+               td_sub_lpt, td_sub_q, time_vert, ts, tswst, u, ug, us, usws,    &
+               uswst, vsws, v, vg, vpt, vswst, w, w_subs, zw
                  
         
@@ -2763,18 +2773,24 @@
 
           DO  k = nzb, nzt
-             sums_ls_l(k,0) = pt_lsa(k,nt)                                     &
-                              + fac * ( pt_lsa(k,nt+1) - pt_lsa(k,nt) )
-             sums_ls_l(k,1) = q_lsa(k,nt)                                      &
-                              + fac * ( q_lsa(k,nt+1) - q_lsa(k,nt) )
-          ENDDO
+             sums_ls_l(k,0) = td_lsa_lpt(k,nt)                                 &
+                              + fac * ( td_lsa_lpt(k,nt+1) - td_lsa_lpt(k,nt) )
+             sums_ls_l(k,1) = td_lsa_q(k,nt)                                   &
+                              + fac * ( td_lsa_q(k,nt+1) - td_lsa_q(k,nt) )
+          ENDDO
+
+          sums_ls_l(nzt+1,0) = sums_ls_l(nzt,0)
+          sums_ls_l(nzt+1,1) = sums_ls_l(nzt,1)
 
           IF ( large_scale_subsidence .AND. use_subsidence_tendencies )  THEN
 
              DO  k = nzb, nzt
-                sums_ls_l(k,2) = pt_subs(k,nt)                                 &
-                                 + fac * ( pt_subs(k,nt+1) - pt_subs(k,nt) )
-                sums_ls_l(k,3) = q_subs(k,nt)                                  &
-                                 + fac * ( q_subs(k,nt+1) - q_subs(k,nt) )
-             ENDDO
+                sums_ls_l(k,2) = td_sub_lpt(k,nt) + fac *                      &
+                                 ( td_sub_lpt(k,nt+1) - td_sub_lpt(k,nt) )
+                sums_ls_l(k,3) = td_sub_q(k,nt) + fac *                        &
+                                 ( td_sub_q(k,nt+1) - td_sub_q(k,nt) )
+             ENDDO
+
+             sums_ls_l(nzt+1,2) = sums_ls_l(nzt,2)
+             sums_ls_l(nzt+1,3) = sums_ls_l(nzt,3)
 
           ENDIF
@@ -2943,17 +2959,17 @@
 
        IF ( large_scale_forcing )  THEN
-          hom(:,1,81,sr) = sums_ls_l(:,0)          ! pt_lsa
-          hom(:,1,82,sr) = sums_ls_l(:,1)          ! q_lsa
+          hom(:,1,81,sr) = sums_ls_l(:,0)          ! td_lsa_lpt
+          hom(:,1,82,sr) = sums_ls_l(:,1)          ! td_lsa_q
           IF ( use_subsidence_tendencies )  THEN
-             hom(:,1,83,sr) = sums_ls_l(:,2)       ! pt_subs
-             hom(:,1,84,sr) = sums_ls_l(:,3)       ! q_subs
+             hom(:,1,83,sr) = sums_ls_l(:,2)       ! td_sub_lpt
+             hom(:,1,84,sr) = sums_ls_l(:,3)       ! td_sub_q
           ELSE
-             hom(:,1,83,sr) = sums(:,83)           ! pt_subs
-             hom(:,1,84,sr) = sums(:,84)           ! q_subs
+             hom(:,1,83,sr) = sums(:,83)           ! td_sub_lpt
+             hom(:,1,84,sr) = sums(:,84)           ! td_sub_q
           ENDIF
-          hom(:,1,85,sr) = sums(:,85)              ! pt_nudge
-          hom(:,1,86,sr) = sums(:,86)              ! q_nudge
-          hom(:,1,87,sr) = sums(:,87)              ! u_nudge
-          hom(:,1,88,sr) = sums(:,88)              ! v_nudge
+          hom(:,1,85,sr) = sums(:,85)              ! td_nud_lpt
+          hom(:,1,86,sr) = sums(:,86)              ! td_nud_q
+          hom(:,1,87,sr) = sums(:,87)              ! td_nud_u
+          hom(:,1,88,sr) = sums(:,88)              ! td_nud_v
        END IF
 
Index: palm/trunk/SOURCE/ls_forcing.f90
===================================================================
--- palm/trunk/SOURCE/ls_forcing.f90	(revision 1381)
+++ palm/trunk/SOURCE/ls_forcing.f90	(revision 1382)
@@ -20,5 +20,8 @@
 ! Current revisions:
 ! ------------------
-! 
+! Renamed variables which store large scale forcing tendencies
+! pt_lsa -> td_lsa_lpt, pt_subs -> td_sub_lpt, 
+! q_lsa  -> td_lsa_q,   q_subs  -> td_sub_q,
+! high|lowpt_lsa -> high|low_td_lsa_lpt, ...
 ! 
 ! Former revisions:
@@ -81,7 +84,7 @@
 
        USE arrays_3d,                                                          &
-           ONLY:  p_surf, pt_lsa, pt_subs, pt_surf, q_lsa, q_subs, q_surf,     &
-                  qsws_surf, shf_surf, time_surf, time_vert, ug_vert, vg_vert, &
-                  wsubs_vert, zu
+           ONLY:  p_surf, pt_surf, q_surf, qsws_surf, shf_surf, td_lsa_lpt,    &
+                  td_lsa_q, td_sub_lpt, td_sub_q, time_surf, time_vert,        &
+                  ug_vert, vg_vert, wsubs_vert, zu
 
        USE control_parameters,                                                 &
@@ -116,26 +119,27 @@
        REAL(wp) ::  lowvg_vert        !:
        REAL(wp) ::  lowwsubs_vert     !:
-       REAL(wp) ::  highpt_lsa        !:
-       REAL(wp) ::  lowpt_lsa         !:
-       REAL(wp) ::  highq_lsa         !:
-       REAL(wp) ::  lowq_lsa          !:
-       REAL(wp) ::  highpt_subs       !:
-       REAL(wp) ::  lowpt_subs        !:
-       REAL(wp) ::  highq_subs        !:
-       REAL(wp) ::  lowq_subs         !:
+       REAL(wp) ::  high_td_lsa_lpt   !:
+       REAL(wp) ::  low_td_lsa_lpt    !:
+       REAL(wp) ::  high_td_lsa_q     !:
+       REAL(wp) ::  low_td_lsa_q      !:
+       REAL(wp) ::  high_td_sub_lpt   !:
+       REAL(wp) ::  low_td_sub_lpt    !:
+       REAL(wp) ::  high_td_sub_q     !:
+       REAL(wp) ::  low_td_sub_q      !:
        REAL(wp) ::  r_dummy           !:
 
-       ALLOCATE( p_surf(0:nlsf), pt_lsa(nzb:nzt+1,0:nlsf),                     &
-                 pt_subs(nzb:nzt+1,0:nlsf), pt_surf(0:nlsf),                   &
-                 q_lsa(nzb:nzt+1,0:nlsf), q_subs(nzb:nzt+1,0:nlsf),            &
-                 q_surf(0:nlsf), qsws_surf(0:nlsf), shf_surf(0:nlsf),          &
+       ALLOCATE( p_surf(0:nlsf), pt_surf(0:nlsf), q_surf(0:nlsf),              &
+                 qsws_surf(0:nlsf), shf_surf(0:nlsf),                          &
+                 td_lsa_lpt(nzb:nzt+1,0:nlsf), td_lsa_q(nzb:nzt+1,0:nlsf),     &
+                 td_sub_lpt(nzb:nzt+1,0:nlsf), td_sub_q(nzb:nzt+1,0:nlsf),     &
                  time_vert(0:nlsf), time_surf(0:nlsf),                         &
                  ug_vert(nzb:nzt+1,0:nlsf), vg_vert(nzb:nzt+1,0:nlsf),         &
                  wsubs_vert(nzb:nzt+1,0:nlsf) )
 
-       p_surf = 0.0_wp; pt_lsa = 0.0; pt_subs = 0.0; pt_surf = 0.0_wp
-       q_lsa = 0.0; q_subs = 0.0; q_surf = 0.0_wp; qsws_surf = 0.0_wp
-       shf_surf = 0.0_wp; time_vert = 0.0_wp; time_surf = 0.0_wp;
-       ug_vert = 0.0_wp; vg_vert = 0.0_wp; wsubs_vert = 0.0_wp
+       p_surf = 0.0_wp; pt_surf = 0.0_wp; q_surf = 0.0_wp; qsws_surf = 0.0_wp
+       shf_surf = 0.0_wp; time_vert = 0.0_wp; td_lsa_lpt = 0.0_wp
+       td_lsa_q = 0.0_wp; td_sub_lpt = 0.0_wp; td_sub_q = 0.0_wp
+       time_surf = 0.0_wp; ug_vert = 0.0_wp; vg_vert = 0.0_wp
+       wsubs_vert = 0.0_wp
 
 !
@@ -224,6 +228,7 @@
 
           READ ( finput, *, IOSTAT=ierrn ) lowheight, lowug_vert, lowvg_vert,  &
-                                           lowwsubs_vert, lowpt_lsa,           &
-                                           lowq_lsa, lowpt_subs, lowq_subs
+                                           lowwsubs_vert, low_td_lsa_lpt,      &
+                                           low_td_lsa_q, low_td_sub_lpt,       &
+                                           low_td_sub_q
           IF ( ierrn /= 0 )  THEN
              message_string = 'errors in file LSF_DATA'
@@ -233,6 +238,6 @@
           READ ( finput, *, IOSTAT=ierrn ) highheight, highug_vert,            &
                                            highvg_vert, highwsubs_vert,        &
-                                           highpt_lsa, highq_lsa,              &
-                                           highpt_subs, highq_subs
+                                           high_td_lsa_lpt, high_td_lsa_q,     &
+                                           high_td_sub_lpt, high_td_sub_q
       
           IF ( ierrn /= 0 )  THEN
@@ -244,18 +249,19 @@
           DO  k = nzb, nzt+1
              IF ( highheight < zu(k) )  THEN
-                lowheight     = highheight
-                lowug_vert    = highug_vert
-                lowvg_vert    = highvg_vert
-                lowwsubs_vert = highwsubs_vert
-                lowpt_lsa     = highpt_lsa
-                lowq_lsa      = highq_lsa
-                lowpt_subs    = highpt_subs
-                lowq_subs     = highq_subs
+                lowheight      = highheight
+                lowug_vert     = highug_vert
+                lowvg_vert     = highvg_vert
+                lowwsubs_vert  = highwsubs_vert
+                low_td_lsa_lpt = high_td_lsa_lpt
+                low_td_lsa_q   = high_td_lsa_q
+                low_td_sub_lpt = high_td_sub_lpt
+                low_td_sub_q   = high_td_sub_q
 
                 ierrn = 0
                 READ ( finput, *, IOSTAT=ierrn ) highheight, highug_vert,      &
                                                  highvg_vert, highwsubs_vert,  &
-                                                 highpt_lsa, highq_lsa,        &
-                                                 highpt_subs, highq_subs
+                                                 high_td_lsa_lpt,              &
+                                                 high_td_lsa_q,                &
+                                                 high_td_sub_lpt, high_td_sub_q
 
                 IF ( ierrn /= 0 )  THEN
@@ -273,12 +279,19 @@
              fac = (highheight-zu(k))/(highheight - lowheight)
 
-             ug_vert(k,nt)    = fac*lowug_vert    + (1.0_wp-fac)*highug_vert
-             vg_vert(k,nt)    = fac*lowvg_vert    + (1.0_wp-fac)*highvg_vert
-             wsubs_vert(k,nt) = fac*lowwsubs_vert + (1.0_wp-fac)*highwsubs_vert
-
-             pt_lsa(k,nt)     = fac*lowpt_lsa     + (1.0_wp-fac)*highpt_lsa
-             q_lsa(k,nt)      = fac*lowq_lsa      + (1.0_wp-fac)*highq_lsa
-             pt_subs(k,nt)    = fac*lowpt_subs    + (1.0_wp-fac)*highpt_subs
-             q_subs(k,nt)     = fac*lowq_subs     + (1.0_wp-fac)*highq_subs
+             ug_vert(k,nt)    = fac * lowug_vert                               &
+                                + ( 1.0_wp - fac ) * highug_vert
+             vg_vert(k,nt)    = fac * lowvg_vert                               &
+                                + ( 1.0_wp - fac ) * highvg_vert
+             wsubs_vert(k,nt) = fac * lowwsubs_vert                            &
+                                + ( 1.0_wp - fac ) * highwsubs_vert
+
+             td_lsa_lpt(k,nt) = fac * low_td_lsa_lpt                           &
+                                + ( 1.0_wp - fac ) * high_td_lsa_lpt
+             td_lsa_q(k,nt)   = fac * low_td_lsa_q                             &
+                                + ( 1.0_wp - fac ) * high_td_lsa_q
+             td_sub_lpt(k,nt) = fac * low_td_sub_lpt                           &
+                                + ( 1.0_wp - fac ) * high_td_sub_lpt
+             td_sub_q(k,nt)   = fac * low_td_sub_q                             &
+                                + ( 1.0_wp - fac ) * high_td_sub_q
 
           ENDDO
@@ -413,5 +426,5 @@
 
        USE arrays_3d,                                                          &
-           ONLY:  pt_lsa, pt_subs, q_lsa, q_subs, tend, time_vert        
+           ONLY:  td_lsa_lpt, td_lsa_q, td_sub_lpt, td_sub_q, tend, time_vert        
        
        USE control_parameters,                                                 &
@@ -455,6 +468,6 @@
                 DO  j = nys, nyn
                    DO  k = nzb_u_inner(j,i)+1, nzt
-                      tend(k,j,i) = tend(k,j,i) + pt_lsa(k,nt)                 &
-                                    + fac * ( pt_lsa(k,nt+1) - pt_lsa(k,nt) )
+                      tend(k,j,i) = tend(k,j,i) + td_lsa_lpt(k,nt) + fac *     &
+                                    ( td_lsa_lpt(k,nt+1) - td_lsa_lpt(k,nt) )
                    ENDDO
                 ENDDO
@@ -466,6 +479,6 @@
                 DO  j = nys, nyn
                    DO  k = nzb_u_inner(j,i)+1, nzt
-                      tend(k,j,i) = tend(k,j,i) + q_lsa(k,nt)                  &
-                                    + fac * ( q_lsa(k,nt+1) - q_lsa(k,nt) )
+                      tend(k,j,i) = tend(k,j,i) + td_lsa_q(k,nt) + fac *       &
+                                    ( td_lsa_q(k,nt+1) - td_lsa_q(k,nt) )
                    ENDDO
                 ENDDO
@@ -485,6 +498,6 @@
                    DO  j = nys, nyn
                       DO  k = nzb_u_inner(j,i)+1, nzt
-                         tend(k,j,i) = tend(k,j,i) + pt_subs(k,nt) + fac *     &
-                                       ( pt_subs(k,nt+1) - pt_subs(k,nt) )
+                         tend(k,j,i) = tend(k,j,i) + td_sub_lpt(k,nt) + fac *  &
+                                       ( td_sub_lpt(k,nt+1) - td_sub_lpt(k,nt) )
                       ENDDO
                    ENDDO
@@ -496,6 +509,6 @@
                    DO  j = nys, nyn
                       DO  k = nzb_u_inner(j,i)+1, nzt
-                         tend(k,j,i) = tend(k,j,i) + q_subs(k,nt) + fac *      &
-                                       ( q_subs(k,nt+1) - q_subs(k,nt) )
+                         tend(k,j,i) = tend(k,j,i) + td_sub_q(k,nt) + fac *    &
+                                       ( td_sub_q(k,nt+1) - td_sub_q(k,nt) )
                       ENDDO
                    ENDDO
@@ -515,5 +528,5 @@
 
        USE arrays_3d,                                                          &
-           ONLY:  pt_lsa, pt_subs, q_lsa, q_subs, tend, time_vert        
+           ONLY:  td_lsa_lpt, td_lsa_q, td_sub_lpt, td_sub_q, tend, time_vert        
        
        USE control_parameters,                                                 &
@@ -555,6 +568,6 @@
 
              DO  k = nzb_u_inner(j,i)+1, nzt
-                tend(k,j,i) = tend(k,j,i) + pt_lsa(k,nt)                       &
-                              + fac * ( pt_lsa(k,nt+1) - pt_lsa(k,nt) )
+                tend(k,j,i) = tend(k,j,i) + td_lsa_lpt(k,nt)                   &
+                              + fac * ( td_lsa_lpt(k,nt+1) - td_lsa_lpt(k,nt) )
              ENDDO
 
@@ -562,6 +575,6 @@
 
              DO  k = nzb_u_inner(j,i)+1, nzt
-                tend(k,j,i) = tend(k,j,i) + q_lsa(k,nt)                        &
-                              + fac * ( q_lsa(k,nt+1) - q_lsa(k,nt) )
+                tend(k,j,i) = tend(k,j,i) + td_lsa_q(k,nt)                     &
+                              + fac * ( td_lsa_q(k,nt+1) - td_lsa_q(k,nt) )
              ENDDO
 
@@ -577,6 +590,6 @@
 
                 DO  k = nzb_u_inner(j,i)+1, nzt
-                   tend(k,j,i) = tend(k,j,i) + pt_subs(k,nt) + fac *           &
-                                 ( pt_subs(k,nt+1) - pt_subs(k,nt) )
+                   tend(k,j,i) = tend(k,j,i) + td_sub_lpt(k,nt) + fac *        &
+                                 ( td_sub_lpt(k,nt+1) - td_sub_lpt(k,nt) )
                 ENDDO
   
@@ -584,6 +597,6 @@
 
                 DO  k = nzb_u_inner(j,i)+1, nzt
-                   tend(k,j,i) = tend(k,j,i) + q_subs(k,nt) + fac *            &
-                                 ( q_subs(k,nt+1) - q_subs(k,nt) )
+                   tend(k,j,i) = tend(k,j,i) + td_sub_q(k,nt) + fac *          &
+                                 ( td_sub_q(k,nt+1) - td_sub_q(k,nt) )
                 ENDDO
 
Index: palm/trunk/SOURCE/modules.f90
===================================================================
--- palm/trunk/SOURCE/modules.f90	(revision 1381)
+++ palm/trunk/SOURCE/modules.f90	(revision 1382)
@@ -20,5 +20,7 @@
 ! Current revisions:
 ! ------------------
-! 
+! Renamed variables which store large scale forcing tendencies
+! pt_lsa -> td_lsa_lpt, pt_subs -> td_sub_lpt, 
+! q_lsa  -> td_lsa_q,   q_subs  -> td_sub_q
 ! 
 ! Former revisions:
@@ -288,9 +290,9 @@
           flux_s_e, flux_s_nr, flux_s_pt, flux_s_q, flux_s_qr, flux_s_sa,      &
           flux_s_u, flux_s_v, flux_s_w, f1_mg, f2_mg, f3_mg,                   &
-          mean_inflow_profiles, nrs, nrsws, nrswst, ptnudge, pt_lsa,           &
-          pt_slope_ref, pt_subs, qnudge, qs, qsws, qswst, qswst_remote, qrs,   &
-          qrsws, qrswst, q_lsa, q_subs, rif, saswsb, saswst, shf, tnudge,      &
-          total_2d_a, total_2d_o, ts, tswst, ug_vert, unudge, us, usws, uswst, &
-          vnudge, vg_vert, vsws, vswst, wnudge, wsubs_vert, z0, z0h
+          mean_inflow_profiles, nrs, nrsws, nrswst, ptnudge, pt_slope_ref,     &
+          qnudge, qs, qsws, qswst, qswst_remote, qrs, qrsws, qrswst, rif,      &
+          saswsb, saswst, shf, tnudge, td_lsa_lpt, td_lsa_q, td_sub_lpt,       &
+          td_sub_q, total_2d_a, total_2d_o, ts, tswst, ug_vert, unudge, us,    &
+          usws, uswst, vnudge, vg_vert, vsws, vswst, wnudge, wsubs_vert, z0, z0h
 
     REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::                                 &
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
Index: palm/trunk/SOURCE/subsidence.f90
===================================================================
--- palm/trunk/SOURCE/subsidence.f90	(revision 1381)
+++ palm/trunk/SOURCE/subsidence.f90	(revision 1382)
@@ -20,5 +20,8 @@
 ! Current revisions:
 ! -----------------
-! 
+! Changed the weighting factor that is used in the summation of subsidence 
+! tendencies for profile data output from weight_pres to weight_substep
+! added Neumann boundary conditions for profile data output of subsidence terms
+! at nzt+1
 ! 
 ! Former revisions:
@@ -163,5 +166,5 @@
 
        USE statistics,                                                         &
-           ONLY:  sums_ls_l, weight_pres
+           ONLY:  sums_ls_l, weight_substep
 
        IMPLICIT NONE
@@ -186,4 +189,5 @@
        DO  i = nxl, nxr
           DO  j = nys, nyn
+
              DO  k = nzb_s_inner(j,i)+1, nzt 
                 IF ( w_subs(k) < 0.0_wp )  THEN    ! large-scale subsidence
@@ -199,7 +203,10 @@
                 IF ( large_scale_forcing )  THEN
                    sums_ls_l(k,ls_index) = sums_ls_l(k,ls_index) + tmp_tend    &
-                                      * weight_pres(intermediate_timestep_count)
+                                   * weight_substep(intermediate_timestep_count)
                 ENDIF
              ENDDO
+
+             sums_ls_l(nzt+1,ls_index) = sums_ls_l(nzt,ls_index)
+
           ENDDO
        ENDDO
@@ -259,5 +266,5 @@
 
        USE statistics,                                                         &
-           ONLY:  sums_ls_l, weight_pres
+           ONLY:  sums_ls_l, weight_substep
 
        IMPLICIT NONE
@@ -291,7 +298,9 @@
           IF ( large_scale_forcing )  THEN
              sums_ls_l(k,ls_index) = sums_ls_l(k,ls_index) + tmp_tend          &
-                                     * weight_pres(intermediate_timestep_count)
+                                   * weight_substep(intermediate_timestep_count)
           ENDIF
        ENDDO
+
+       sums_ls_l(nzt+1,ls_index) = sums_ls_l(nzt,ls_index)
 
 
