Index: palm/trunk/SOURCE/disturb_field.f90
===================================================================
--- palm/trunk/SOURCE/disturb_field.f90	(revision 1319)
+++ palm/trunk/SOURCE/disturb_field.f90	(revision 1320)
@@ -20,5 +20,11 @@
 ! 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, 
+! old module precision_kind is removed,
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements 
 !
 ! Former revisions:
@@ -26,24 +32,6 @@
 ! $Id$
 !
-! 1318 2014-03-17 13:35:16Z raasch
-! module interfaces removed
-!
 ! 1036 2012-10-22 13:43:42Z raasch
 ! code put under GPL (PALM 3.9)
-!
-! 667 2010-12-23 12:06:00Z suehring/gryschka
-! nxl-1, nxr+1, nys-1, nyn+1 replaced by nxlg, nxrg, nysg, nyng
-! Calls of exchange_horiz are modified.
-!
-! 420 2010-01-13 15:10:53Z franke
-! Loop was split to make runs reproducible when using ifort compiler
-!
-! 75 2007-03-22 09:54:05Z raasch
-! xrp, ynp eliminated, 2nd+3rd argument removed from exchange horiz
-!
-! RCS Log replace by Id keyword, revision history cleaned up
-!
-! Revision 1.11  2006/08/04 14:31:59  raasch
-! izuf renamed iran
 !
 ! Revision 1.1  1998/02/04 15:40:45  raasch
@@ -60,19 +48,35 @@
 !------------------------------------------------------------------------------!
 
-    USE control_parameters
-    USE cpulog
-    USE grid_variables
-    USE indices
-    USE random_function_mod
+    USE control_parameters,   &
+        ONLY:  dist_nxl, dist_nxr, dist_nyn, dist_nys, dist_range,             &
+               disturbance_amplitude, disturbance_created,                     &
+               disturbance_level_ind_b, disturbance_level_ind_t, iran,         &
+               random_generator, topography
+                
+    USE cpulog,                                                                &
+        ONLY:  cpu_log, log_point
+        
+    USE indices,                                                               &
+        ONLY:  nbgp, nxl, nxlg, nxr, nxrg, nyn, nyng, nys, nysg, nzb, nzt
+        
+    USE kinds
+    
+    USE random_function_mod,                                                   &
+        ONLY: random_function
 
     IMPLICIT NONE
 
-    INTEGER ::  i, j, k
-    INTEGER ::  nzb_uv_inner(nysg:nyng,nxlg:nxrg)
-
-    REAL    ::  randomnumber,                             &
-                dist1(nzb:nzt+1,nysg:nyng,nxlg:nxrg), &
-                field(nzb:nzt+1,nysg:nyng,nxlg:nxrg)
-    REAL, DIMENSION(:,:,:), ALLOCATABLE ::  dist2
+    INTEGER(iwp) ::  i  !:
+    INTEGER(iwp) ::  j  !:
+    INTEGER(iwp) ::  k  !:
+    
+    INTEGER(iwp) ::  nzb_uv_inner(nysg:nyng,nxlg:nxrg) !:
+
+    REAL(wp) ::  randomnumber  !:
+    
+    REAL(wp) ::  dist1(nzb:nzt+1,nysg:nyng,nxlg:nxrg)  !:
+    REAL(wp) ::  field(nzb:nzt+1,nysg:nyng,nxlg:nxrg)  !:
+    
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  dist2  !:
 
 
@@ -92,8 +96,8 @@
           DO  j = dist_nys(dist_range), dist_nyn(dist_range)
              DO  k = disturbance_level_ind_b, disturbance_level_ind_t
-                randomnumber = 3.0 * disturbance_amplitude * &
+                randomnumber = 3.0 * disturbance_amplitude *                   &
                                ( random_function( iran ) - 0.5 )
-                IF ( nxl <= i  .AND.  nxr >= i  .AND.  nys <= j  .AND.  &
-                     nyn >= j ) &
+                IF ( nxl <= i  .AND.  nxr >= i  .AND.  nys <= j  .AND.         &
+                     nyn >= j )                                                &
                 THEN
                    dist1(k,j,i) = randomnumber
@@ -107,12 +111,12 @@
              DO  k = disturbance_level_ind_b, disturbance_level_ind_t
 #if defined( __nec )
-                randomnumber = 3.0 * disturbance_amplitude * &
+                randomnumber = 3.0 * disturbance_amplitude *                   &
                                ( RANDOM( 0 ) - 0.5 )
 #else
                 CALL RANDOM_NUMBER( randomnumber )
-                randomnumber = 3.0 * disturbance_amplitude * &
+                randomnumber = 3.0 * disturbance_amplitude *                   &
                                 ( randomnumber - 0.5 )
 #endif
-                IF ( nxl <= i .AND. nxr >= i .AND. nys <= j .AND. nyn >= j ) &
+                IF ( nxl <= i .AND. nxr >= i .AND. nys <= j .AND. nyn >= j )   &
                 THEN
                    dist1(k,j,i) = randomnumber
@@ -137,6 +141,6 @@
         DO  j = nys, nyn
           DO  k = disturbance_level_ind_b-1, disturbance_level_ind_t+1
-             dist2(k,j,i) = ( dist1(k,j,i-1) + dist1(k,j,i+1) &
-                            + dist1(k,j+1,i) + dist1(k+1,j,i) &
+             dist2(k,j,i) = ( dist1(k,j,i-1) + dist1(k,j,i+1)                  &
+                            + dist1(k,j+1,i) + dist1(k+1,j,i)                  &
                             ) / 12.0
           ENDDO
