Index: palm/trunk/SOURCE/advec_v_up.f90
===================================================================
--- palm/trunk/SOURCE/advec_v_up.f90	(revision 1310)
+++ palm/trunk/SOURCE/advec_v_up.f90	(revision 1320)
@@ -20,5 +20,10 @@
 ! Current revisions:
 ! -----------------
-! 
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements,
+! kinds are defined in new module kinds,
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements
 !
 ! Former revisions:
@@ -28,15 +33,4 @@
 ! 1036 2012-10-22 13:43:42Z raasch
 ! code put under GPL (PALM 3.9)
-!
-! 106 2007-08-16 14:30:26Z raasch
-! j loop is starting from nysv (needed for non-cyclic boundary conditions)
-!
-! 75 2007-03-22 09:54:05Z raasch
-! vynp eliminated
-!
-! RCS Log replace by Id keyword, revision history cleaned up
-!
-! Revision 1.12  2006/02/23 09:46:37  raasch
-! nzb_2d replaced by nzb_v_inner
 !
 ! Revision 1.1  1997/08/29 08:56:05  raasch
@@ -67,13 +61,28 @@
     SUBROUTINE advec_v_up
 
-       USE arrays_3d
-       USE control_parameters
-       USE grid_variables
-       USE indices
+       USE arrays_3d,                                                          &
+           ONLY:  ddzu, tend, u, v, w
+
+       USE control_parameters,                                                 &
+           ONLY:  u_gtrans, v_gtrans
+
+       USE grid_variables,                                                     &
+           ONLY:  ddx, ddy
+
+       USE indices,                                                            &
+           ONLY:  nxl, nxr, nyn, nysv, nzb_v_inner, nzt
+
+       USE kinds
+
 
        IMPLICIT NONE
 
-       INTEGER ::  i, j, k
-       REAL    ::  ukomp, vkomp, wkomp
+       INTEGER(iwp) ::  i !:
+       INTEGER(iwp) ::  j !:
+       INTEGER(iwp) ::  k !:
+
+       REAL(wp) ::  ukomp !:
+       REAL(wp) ::  vkomp !:
+       REAL(wp) ::  wkomp !:       
 
 
@@ -83,11 +92,11 @@
 !
 !--             x-direction
-                ukomp = 0.25 * ( u(k,j,i)   + u(k,j-1,i) + &
+                ukomp = 0.25 * ( u(k,j,i)   + u(k,j-1,i) +                     &
                                  u(k,j,i+1) + u(k,j-1,i+1) ) - u_gtrans
                 IF ( ukomp > 0.0 )  THEN
-                   tend(k,j,i) = tend(k,j,i) - ukomp * &
+                   tend(k,j,i) = tend(k,j,i) - ukomp *                         &
                                          ( v(k,j,i) - v(k,j,i-1) ) * ddx
                 ELSE
-                   tend(k,j,i) = tend(k,j,i) - ukomp * &
+                   tend(k,j,i) = tend(k,j,i) - ukomp *                         &
                                          ( v(k,j,i+1) - v(k,j,i) ) * ddx
                 ENDIF
@@ -96,19 +105,19 @@
                 vkomp = v(k,j,i) - v_gtrans
                 IF ( vkomp > 0.0 )  THEN
-                   tend(k,j,i) = tend(k,j,i) - vkomp * &
+                   tend(k,j,i) = tend(k,j,i) - vkomp *                         &
                                          ( v(k,j,i) - v(k,j-1,i) ) * ddy
                 ELSE
-                   tend(k,j,i) = tend(k,j,i) - vkomp * &
+                   tend(k,j,i) = tend(k,j,i) - vkomp *                         &
                                          ( v(k,j+1,i) - v(k,j,i) ) * ddy
                 ENDIF
 !
 !--             z-direction
-                wkomp = 0.25 * ( w(k,j,i)  + w(k-1,j,i) + &
+                wkomp = 0.25 * ( w(k,j,i)  + w(k-1,j,i) +                      &
                                  w(k,j-1,i) + w(k-1,j-1,i) )
                 IF ( wkomp > 0.0 )  THEN
-                   tend(k,j,i) = tend(k,j,i) - wkomp * &
+                   tend(k,j,i) = tend(k,j,i) - wkomp *                         &
                                          ( v(k,j,i) - v(k-1,j,i) ) * ddzu(k)
                 ELSE
-                   tend(k,j,i) = tend(k,j,i) - wkomp * &
+                   tend(k,j,i) = tend(k,j,i) - wkomp *                         &
                                          ( v(k+1,j,i) - v(k,j,i) ) * ddzu(k+1)
                 ENDIF
@@ -126,14 +135,28 @@
     SUBROUTINE advec_v_up_ij( i, j )
 
-       USE arrays_3d
-       USE control_parameters
-       USE grid_variables
-       USE indices
+       USE arrays_3d,                                                          &
+           ONLY:  ddzu, tend, u, v, w
+
+       USE control_parameters,                                                 &
+           ONLY:  u_gtrans, v_gtrans
+
+       USE grid_variables,                                                     &
+           ONLY:  ddx, ddy
+
+       USE indices,                                                            &
+           ONLY:  nzb_v_inner, nzt
+
+       USE kinds
+
 
        IMPLICIT NONE
 
-       INTEGER ::  i, j, k
-
-       REAL ::  ukomp, vkomp, wkomp
+       INTEGER(iwp) ::  i !:
+       INTEGER(iwp) ::  j !:
+       INTEGER(iwp) ::  k !:
+
+       REAL(wp) ::  ukomp !:
+       REAL(wp) ::  vkomp !:
+       REAL(wp) ::  wkomp !:
 
 
@@ -141,11 +164,11 @@
 !
 !--       x-direction
-          ukomp = 0.25 * ( u(k,j,i) + u(k,j-1,i) + u(k,j,i+1) + u(k,j-1,i+1) &
+          ukomp = 0.25 * ( u(k,j,i) + u(k,j-1,i) + u(k,j,i+1) + u(k,j-1,i+1)   &
                          ) - u_gtrans
           IF ( ukomp > 0.0 )  THEN
-             tend(k,j,i) = tend(k,j,i) - ukomp * &
+             tend(k,j,i) = tend(k,j,i) - ukomp *                               &
                                          ( v(k,j,i) - v(k,j,i-1) ) * ddx
           ELSE
-             tend(k,j,i) = tend(k,j,i) - ukomp * &
+             tend(k,j,i) = tend(k,j,i) - ukomp *                               &
                                          ( v(k,j,i+1) - v(k,j,i) ) * ddx
           ENDIF
@@ -154,8 +177,8 @@
           vkomp = v(k,j,i) - v_gtrans
           IF ( vkomp > 0.0 )  THEN
-             tend(k,j,i) = tend(k,j,i) - vkomp * &
+             tend(k,j,i) = tend(k,j,i) - vkomp *                               &
                                          ( v(k,j,i) - v(k,j-1,i) ) * ddy
           ELSE
-             tend(k,j,i) = tend(k,j,i) - vkomp * &
+             tend(k,j,i) = tend(k,j,i) - vkomp *                               &
                                          ( v(k,j+1,i) - v(k,j,i) ) * ddy
           ENDIF
@@ -164,8 +187,8 @@
           wkomp = 0.25 * ( w(k,j,i) + w(k-1,j,i) + w(k,j-1,i) + w(k-1,j-1,i) )
           IF ( wkomp > 0.0 )  THEN
-             tend(k,j,i) = tend(k,j,i) - wkomp * &
+             tend(k,j,i) = tend(k,j,i) - wkomp *                               &
                                          ( v(k,j,i) - v(k-1,j,i) ) * ddzu(k)
           ELSE
-             tend(k,j,i) = tend(k,j,i) - wkomp * &
+             tend(k,j,i) = tend(k,j,i) - wkomp *                               &
                                          ( v(k+1,j,i) - v(k,j,i) ) * ddzu(k+1)
           ENDIF
