Index: palm/trunk/SOURCE/nudging.f90
===================================================================
--- palm/trunk/SOURCE/nudging.f90	(revision 1319)
+++ palm/trunk/SOURCE/nudging.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:
@@ -62,20 +68,44 @@
     SUBROUTINE init_nudge
 
-       USE arrays_3d
-       USE control_parameters
-       USE cpulog
-       USE indices
-       USE pegrid
+       USE arrays_3d,                                                          &
+           ONLY:  ptnudge, qnudge, timenudge, tnudge, unudge, vnudge, wnudge,  &
+                  zu
+
+       USE control_parameters,                                                 &
+           ONLY:  dt_3d, lptnudge, lqnudge, lunudge, lvnudge, lwnudge,         &
+                   message_string, ntnudge
+
+       USE indices,                                                            &
+           ONLY:  nzb, nzt
+
+       USE kinds
 
        IMPLICIT NONE
 
-       INTEGER :: finput = 90, ierrn, k, t 
-
-       CHARACTER(1) :: hash
-       REAL :: highheight, highqnudge, highptnudge, highunudge, highvnudge, &
-               highwnudge, hightnudge
-       REAL :: lowheight, lowqnudge, lowptnudge, lowunudge, lowvnudge, &
-               lowwnudge, lowtnudge
-       REAL :: fac
+
+       INTEGER(iwp) ::  finput = 90  !:
+       INTEGER(iwp) ::  ierrn        !:
+       INTEGER(iwp) ::  k            !:
+       INTEGER(iwp) ::  t            !:
+
+       CHARACTER(1) ::  hash     !:
+
+       REAL(wp) ::  highheight   !:
+       REAL(wp) ::  highqnudge   !:
+       REAL(wp) ::  highptnudge  !:
+       REAL(wp) ::  highunudge   !:
+       REAL(wp) ::  highvnudge   !:
+       REAL(wp) ::  highwnudge   !:
+       REAL(wp) ::  hightnudge   !:
+
+       REAL(wp) ::  lowheight    !:
+       REAL(wp) ::  lowqnudge    !:
+       REAL(wp) ::  lowptnudge   !:
+       REAL(wp) ::  lowunudge    !:
+       REAL(wp) ::  lowvnudge    !:
+       REAL(wp) ::  lowwnudge    !:
+       REAL(wp) ::  lowtnudge    !:
+
+       REAL(wp) ::  fac          !:
 
        ALLOCATE( ptnudge(nzb:nzt+1,1:ntnudge), qnudge(nzb:nzt+1,1:ntnudge), &
@@ -103,5 +133,5 @@
           t = t + 1
           hash = "#"
-          ierrn = 1 ! not zero        
+          ierrn = 1 ! not zero
 !
 !--       Search for the next line consisting of "# time", 
@@ -160,10 +190,10 @@
              fac = ( highheight - zu(k) ) / ( highheight - lowheight )
 
-             tnudge(k,t)  = fac * lowtnudge + ( 1 - fac ) * hightnudge
-             unudge(k,t)  = fac * lowunudge + ( 1 - fac ) * highunudge
-             vnudge(k,t)  = fac * lowvnudge + ( 1 - fac ) * highvnudge
-             wnudge(k,t)  = fac * lowwnudge + ( 1 - fac ) * highwnudge
-             ptnudge(k,t) = fac * lowptnudge + ( 1 - fac ) * highptnudge
-             qnudge(k,t)  = fac * lowqnudge + ( 1 - fac ) * highqnudge
+             tnudge(k,t)  = fac * lowtnudge + ( 1.0 - fac ) * hightnudge
+             unudge(k,t)  = fac * lowunudge + ( 1.0 - fac ) * highunudge
+             vnudge(k,t)  = fac * lowvnudge + ( 1.0 - fac ) * highvnudge
+             wnudge(k,t)  = fac * lowwnudge + ( 1.0 - fac ) * highwnudge
+             ptnudge(k,t) = fac * lowptnudge + ( 1.0 - fac ) * highptnudge
+             qnudge(k,t)  = fac * lowqnudge + ( 1.0 - fac ) * highqnudge
           ENDDO
 
@@ -188,19 +218,36 @@
     SUBROUTINE nudge ( time, prog_var )
 
-       USE arrays_3d
-       USE buoyancy_mod
-       USE control_parameters
-       USE cpulog
-       USE indices
-       USE pegrid
-       USE statistics 
+       USE arrays_3d,                                                          &
+           ONLY:  pt, ptnudge, q, qnudge, tend, timenudge, tnudge, u, unudge,  &
+                  v, vnudge
+
+       USE buoyancy_mod,                                                       &
+           ONLY:  calc_mean_profile
+
+       USE control_parameters,                                                 &
+           ONLY:  dt_3d, message_string
+
+       USE indices,                                                            &
+           ONLY:  nxl, nxr, nys, nyn, nzb, nzb_u_inner, nzt
+
+       USE kinds,                                                              &
+           ONLY:  iwp, wp
+
+       USE statistics,                                                         &
+           ONLY:  hom
 
        IMPLICIT NONE
 
-       CHARACTER (LEN=*) ::  prog_var
-
-       REAL :: currtnudge, dtm, dtp, time
-
-       INTEGER ::  i, j, k, t
+       CHARACTER (LEN=*) ::  prog_var  !:
+
+       REAL(wp) ::  currtnudge  !:
+       REAL(wp) ::  dtm         !:
+       REAL(wp) ::  dtp         !:
+       REAL(wp) ::  time        !:
+
+       INTEGER(iwp) ::  i  !:
+       INTEGER(iwp) ::  j  !:
+       INTEGER(iwp) ::  k  !:
+       INTEGER(iwp) ::  t  !:
 
 
@@ -309,19 +356,37 @@
     SUBROUTINE nudge_ij( i, j, time, prog_var )
 
-       USE arrays_3d
-       USE buoyancy_mod
-       USE control_parameters
-       USE cpulog
-       USE indices
-       USE pegrid
-       USE statistics 
+       USE arrays_3d,                                                          &
+           ONLY:  pt, ptnudge, q, qnudge, tend, timenudge, tnudge, u, unudge,  &
+                  v, vnudge
+
+       USE buoyancy_mod,                                                       &
+           ONLY:  calc_mean_profile
+
+       USE control_parameters,                                                 &
+           ONLY:  dt_3d, message_string
+
+       USE indices,                                                            &
+           ONLY:  nxl, nxr, nys, nyn, nzb, nzb_u_inner, nzt
+
+       USE kinds,                                                              &
+           ONLY:  iwp, wp
+
+       USE statistics,                                                         &
+           ONLY:  hom
 
        IMPLICIT NONE
 
-       CHARACTER (LEN=*) ::  prog_var
-
-       REAL :: currtnudge, dtm, dtp, time
-
-       INTEGER ::  i, j, k, t
+
+       CHARACTER (LEN=*) ::  prog_var  !:
+
+       REAL(wp) ::  currtnudge  !:
+       REAL(wp) ::  dtm         !:
+       REAL(wp) ::  dtp         !:
+       REAL(wp) ::  time        !:
+
+       INTEGER(iwp) ::  i  !:
+       INTEGER(iwp) ::  j  !:
+       INTEGER(iwp) ::  k  !:
+       INTEGER(iwp) ::  t  !:
 
 
