Index: palm/trunk/SOURCE/ls_forcing.f90
===================================================================
--- palm/trunk/SOURCE/ls_forcing.f90	(revision 1366)
+++ 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
 
