Index: palm/trunk/SOURCE/tridia_solver.f90
===================================================================
--- palm/trunk/SOURCE/tridia_solver.f90	(revision 1323)
+++ palm/trunk/SOURCE/tridia_solver.f90	(revision 1342)
@@ -20,5 +20,5 @@
 ! Current revisions:
 ! ------------------
-! 
+! REAL constants defined as wp-kind
 !
 ! Former revisions:
@@ -110,5 +110,5 @@
           ddzuw(k,1) = ddzu_pres(k+1) * ddzw(k+1)
           ddzuw(k,2) = ddzu_pres(k+2) * ddzw(k+1)
-          ddzuw(k,3) = -1.0 * &
+          ddzuw(k,3) = -1.0_wp * &
                        ( ddzu_pres(k+2) * ddzw(k+1) + ddzu_pres(k+1) * ddzw(k+1) )
        ENDDO
@@ -172,25 +172,25 @@
                 IF ( j >= 0  .AND.  j <= nnyh )  THEN
                    IF ( i >= 0  .AND.  i <= nnxh )  THEN
-                      ll(i,j) = 2.0 * ( 1.0 - COS( ( 2.0 * pi * i ) / &
-                                                  REAL( nx+1, KIND=wp ) ) ) / ( dx * dx ) + &
-                                2.0 * ( 1.0 - COS( ( 2.0 * pi * j ) / &
-                                                  REAL( ny+1, KIND=wp ) ) ) / ( dy * dy )
+                      ll(i,j) = 2.0_wp * ( 1.0_wp - COS( ( 2.0_wp * pi * i ) / &
+                                            REAL( nx+1, KIND=wp ) ) ) / ( dx * dx ) + &
+                                2.0_wp * ( 1.0_wp - COS( ( 2.0_wp * pi * j ) / &
+                                            REAL( ny+1, KIND=wp ) ) ) / ( dy * dy )
                    ELSE
-                      ll(i,j) = 2.0 * ( 1.0 - COS( ( 2.0 * pi * ( nx+1-i ) ) / &
-                                                  REAL( nx+1, KIND=wp ) ) ) / ( dx * dx ) + &
-                                2.0 * ( 1.0 - COS( ( 2.0 * pi * j ) / &
-                                                  REAL( ny+1, KIND=wp ) ) ) / ( dy * dy )
+                      ll(i,j) = 2.0_wp * ( 1.0_wp - COS( ( 2.0_wp * pi * ( nx+1-i ) ) / &
+                                            REAL( nx+1, KIND=wp ) ) ) / ( dx * dx ) + &
+                                2.0_wp * ( 1.0_wp - COS( ( 2.0_wp * pi * j ) / &
+                                            REAL( ny+1, KIND=wp ) ) ) / ( dy * dy )
                    ENDIF
                 ELSE
                    IF ( i >= 0  .AND.  i <= nnxh )  THEN
-                      ll(i,j) = 2.0 * ( 1.0 - COS( ( 2.0 * pi * i ) / &
-                                                  REAL( nx+1, KIND=wp ) ) ) / ( dx * dx ) + &
-                                2.0 * ( 1.0 - COS( ( 2.0 * pi * ( ny+1-j ) ) / &
-                                                  REAL( ny+1, KIND=wp ) ) ) / ( dy * dy )
+                      ll(i,j) = 2.0_wp * ( 1.0_wp - COS( ( 2.0_wp * pi * i ) / &
+                                            REAL( nx+1, KIND=wp ) ) ) / ( dx * dx ) + &
+                                2.0_wp * ( 1.0_wp - COS( ( 2.0_wp * pi * ( ny+1-j ) ) / &
+                                            REAL( ny+1, KIND=wp ) ) ) / ( dy * dy )
                    ELSE
-                      ll(i,j) = 2.0 * ( 1.0 - COS( ( 2.0 * pi * ( nx+1-i ) ) / &
-                                                  REAL( nx+1, KIND=wp ) ) ) / ( dx * dx ) + &
-                                2.0 * ( 1.0 - COS( ( 2.0 * pi * ( ny+1-j ) ) / &
-                                                  REAL( ny+1, KIND=wp ) ) ) / ( dy * dy )
+                      ll(i,j) = 2.0_wp * ( 1.0_wp - COS( ( 2.0_wp * pi * ( nx+1-i ) ) / &
+                                            REAL( nx+1, KIND=wp ) ) ) / ( dx * dx ) + &
+                                2.0_wp * ( 1.0_wp - COS( ( 2.0_wp * pi * ( ny+1-j ) ) / &
+                                            REAL( ny+1, KIND=wp ) ) ) / ( dy * dy )
                    ENDIF
                 ENDIF
@@ -283,5 +283,5 @@
 
                    IF ( k == nz-1 )  THEN
-                      ar(i,j,k+1) = ar1(i,j,k) / ( tri(i,j,k,1) + 1.0E-20 )
+                      ar(i,j,k+1) = ar1(i,j,k) / ( tri(i,j,k,1) + 1.0E-20_wp )
                    ELSE
                       ar(i,j,k+1) = ( ar1(i,j,k) - ddzuw(k,2) * ar(i,j,k+2) ) &
@@ -301,5 +301,5 @@
                 !$acc kernels loop present( ar )
                 DO  k = 1, nz
-                   ar(nxl_z,nys_z,k) = 0.0
+                   ar(nxl_z,nys_z,k) = 0.0_wp
                 ENDDO
                 !$acc end kernels loop
@@ -367,5 +367,5 @@
 
                    IF ( k == nz-1 )  THEN
-                      ar(i,j,k+1) = ar1(i,j,k) / ( tri(i,jj,k,1) + 1.0E-20 )
+                      ar(i,j,k+1) = ar1(i,j,k) / ( tri(i,jj,k,1) + 1.0E-20_wp )
                    ELSE
                       ar(i,j,k+1) = ( ar1(i,j,k) - ddzuw(k,2) * ar(i,j,k+2) ) &
@@ -385,5 +385,5 @@
                 !$acc kernels loop present( ar )
                 DO  k = 1, nz
-                   ar(nxl_z,nys_z,k) = 0.0
+                   ar(nxl_z,nys_z,k) = 0.0_wp
                 ENDDO
              ENDIF
@@ -560,13 +560,13 @@
           DO  i = 0, nx
              IF ( i >= 0 .AND. i <= nnxh ) THEN
-                l(i) = 2.0 * ( 1.0 - COS( ( 2.0 * pi * i ) / &
-                                         REAL( nx+1, KIND=wp ) ) ) * ddx2 + &
-                       2.0 * ( 1.0 - COS( ( 2.0 * pi * j ) / &
-                                         REAL( ny+1, KIND=wp ) ) ) * ddy2
+                l(i) = 2.0_wp * ( 1.0_wp - COS( ( 2.0_wp * pi * i ) / &
+                                   REAL( nx+1, KIND=wp ) ) ) * ddx2 + &
+                       2.0_wp * ( 1.0_wp - COS( ( 2.0_wp * pi * j ) / &
+                                   REAL( ny+1, KIND=wp ) ) ) * ddy2
              ELSE
-                l(i) = 2.0 * ( 1.0 - COS( ( 2.0 * pi * ( nx+1-i ) ) / &
-                                         REAL( nx+1, KIND=wp ) ) ) * ddx2 + &
-                       2.0 * ( 1.0 - COS( ( 2.0 * pi * j ) / &
-                                         REAL( ny+1, KIND=wp ) ) ) * ddy2
+                l(i) = 2.0_wp * ( 1.0_wp - COS( ( 2.0_wp * pi * ( nx+1-i ) ) / &
+                                   REAL( nx+1, KIND=wp ) ) ) * ddx2 + &
+                       2.0_wp * ( 1.0_wp - COS( ( 2.0_wp * pi * j ) / &
+                                   REAL( ny+1, KIND=wp ) ) ) * ddy2
              ENDIF
           ENDDO
@@ -574,6 +574,6 @@
           DO  k = 0, nz-1
              DO  i = 0, nx
-                a = -1.0 * ddzu_pres(k+2) * ddzw(k+1)
-                c = -1.0 * ddzu_pres(k+1) * ddzw(k+1)
+                a = -1.0_wp * ddzu_pres(k+2) * ddzw(k+1)
+                c = -1.0_wp * ddzu_pres(k+1) * ddzw(k+1)
                 tri_for_1d(1,i,k) = a + c - l(i)
              ENDDO
@@ -660,5 +660,5 @@
 !--       the model domain.
           DO  i = 0, nx
-             ar(i,nz) = ar1(i,nz-1) / ( tri_for_1d(4,i,nz-1) + 1.0E-20 )
+             ar(i,nz) = ar1(i,nz-1) / ( tri_for_1d(4,i,nz-1) + 1.0E-20_wp )
           ENDDO
           DO  k = nz-2, 0, -1
@@ -676,5 +676,5 @@
              IF ( j == 0 )  THEN
                 DO  k = 1, nz
-                   ar(0,k) = 0.0
+                   ar(0,k) = 0.0_wp
                 ENDDO
              ENDIF
