Index: palm/trunk/SOURCE/plant_canopy_model.f90
===================================================================
--- palm/trunk/SOURCE/plant_canopy_model.f90	(revision 1321)
+++ palm/trunk/SOURCE/plant_canopy_model.f90	(revision 1340)
@@ -20,5 +20,5 @@
 ! Current revisions:
 ! -----------------
-!
+! REAL constants defined as wp-kind
 !
 ! Former revisions:
@@ -100,10 +100,10 @@
                                               v(k,j+1,i)      +  &
                                               v(k,j+1,i-1) )     &
-                                            / 4.0 )**2        +  &
+                                            / 4.0_wp )**2     +  &
                                           ( ( w(k-1,j,i-1)    +  &
                                               w(k-1,j,i)      +  &
                                               w(k,j,i-1)      +  &
                                               w(k,j,i) )         &
-                                            / 4.0 )**2 )      *  &
+                                            / 4.0_wp )**2 )   *  &
                                     u(k,j,i)
                    ENDDO
@@ -123,5 +123,5 @@
                                               u(k,j,i)        +  &
                                               u(k,j,i+1) )       &
-                                            / 4.0 )**2        +  &
+                                            / 4.0_wp )**2     +  &
                                               v(k,j,i)**2     +  &
                                           ( ( w(k-1,j-1,i)    +  &
@@ -129,5 +129,5 @@
                                               w(k,j-1,i)      +  &
                                               w(k,j,i) )         &
-                                            / 4.0 )**2 )      *  &
+                                            / 4.0_wp )**2 )   *  &
                                     v(k,j,i)  
                    ENDDO
@@ -147,10 +147,10 @@
                                               u(k+1,j,i)      +  &
                                               u(k+1,j,i+1) )     &
-                                            / 4.0 )**2        +  &
+                                            / 4.0_wp )**2     +  &
                                           ( ( v(k,j,i)        +  &
                                               v(k,j+1,i)      +  &
                                               v(k+1,j,i)      +  &
                                               v(k+1,j+1,i) )     &
-                                            / 4.0 )**2        +  &
+                                            / 4.0_wp )**2     +  &
                                               w(k,j,i)**2 )   *  &
                                     w(k,j,i)
@@ -183,11 +183,11 @@
                                     SQRT( ( ( u(k,j,i)        +       &
                                               u(k,j,i+1) )            &
-                                            / 2.0 )**2        +       &
+                                            / 2.0_wp )**2     +       &
                                           ( ( v(k,j,i)        +       &
                                               v(k,j+1,i) )            &
-                                            / 2.0 )**2        +       &
+                                            / 2.0_wp )**2     +       &
                                           ( ( w(k-1,j,i)      +       & 
                                               w(k,j,i) )              &
-                                            / 2.0 )**2 )      *       &
+                                            / 2.0_wp )**2 )   *       &
                                     ( q(k,j,i) - sls(k,j,i) )
                    ENDDO
@@ -202,14 +202,14 @@
                    DO  k = nzb_s_inner(j,i)+1, pch_index
                       tend(k,j,i) = tend(k,j,i) -                     &
-                                    2.0 * cdc(k,j,i) * lad_s(k,j,i) * &
+                                    2.0_wp * cdc(k,j,i) * lad_s(k,j,i) * &
                                     SQRT( ( ( u(k,j,i)              + &
                                               u(k,j,i+1) )            &
-                                            / 2.0 )**2              + &
+                                            / 2.0_wp )**2           + &
                                           ( ( v(k,j,i)              + &
                                               v(k,j+1,i) )            &
-                                            / 2.0 )**2              + &
+                                            / 2.0_wp )**2           + &
                                           ( ( w(k,j,i)              + &
                                               w(k+1,j,i) )            &
-                                            / 2.0 )**2 )            * &
+                                            / 2.0_wp )**2 )         * &
                                     e(k,j,i)
                    ENDDO
@@ -267,10 +267,10 @@
                                         v(k,j+1,i)  +        &
                                         v(k,j+1,i-1) )       &
-                                      / 4.0 )**2    +        &
+                                      / 4.0_wp )**2 +        &
                                     ( ( w(k-1,j,i-1) +       &
                                         w(k-1,j,i)   +       &
                                         w(k,j,i-1)   +       &
                                         w(k,j,i) )           &
-                                      / 4.0 )**2 ) *         &
+                                      / 4.0_wp )**2 ) *      &
                               u(k,j,i)
           ENDDO
@@ -286,5 +286,5 @@
                                         u(k,j,i)     +       &
                                         u(k,j,i+1) )         &
-                                      / 4.0 )**2     +       &
+                                      / 4.0_wp )**2  +       &
                                         v(k,j,i)**2  +       &
                                     ( ( w(k-1,j-1,i) +       &
@@ -292,5 +292,5 @@
                                         w(k,j-1,i)   +       &
                                         w(k,j,i) )           &
-                                      / 4.0 )**2 ) *         &
+                                      / 4.0_wp )**2 ) *      &
                               v(k,j,i)
           ENDDO
@@ -306,10 +306,10 @@
                                         u(k+1,j,i)  +        &
                                         u(k+1,j,i+1) )       &
-                                      / 4.0 )**2    +        &
+                                      / 4.0_wp )**2 +        &
                                     ( ( v(k,j,i)    +        &
                                         v(k,j+1,i)  +        &
                                         v(k+1,j,i)  +        &
                                         v(k+1,j+1,i) )       &
-                                      / 4.0 )**2    +        &
+                                      / 4.0_wp )**2 +        &
                                         w(k,j,i)**2 ) *      &
                               w(k,j,i)
@@ -336,11 +336,11 @@
                               SQRT( ( ( u(k,j,i)        +       &
                                         u(k,j,i+1) )            &
-                                      / 2.0 )**2        +       &
+                                      / 2.0_wp )**2     +       &
                                     ( ( v(k,j,i)        +       &
                                         v(k,j+1,i) )            &
-                                      / 2.0 )**2        +       &
+                                      / 2.0_wp )**2     +       &
                                     ( ( w(k-1,j,i)      +       &
                                         w(k,j,i) )              &
-                                      / 2.0 )**2 )      *       &
+                                      / 2.0_wp )**2 )   *       &
                               ( q(k,j,i) - sls(k,j,i) )
              ENDDO   
@@ -351,14 +351,14 @@
           DO  k = nzb_s_inner(j,i)+1, pch_index   
              tend(k,j,i) = tend(k,j,i) -                        &
-                              2.0 * cdc(k,j,i) * lad_s(k,j,i) * &
+                              2.0_wp * cdc(k,j,i) * lad_s(k,j,i) * &
                               SQRT( ( ( u(k,j,i)           +    &
                                         u(k,j,i+1) )            &
-                                      / 2.0 )**2           +    &  
+                                      / 2.0_wp )**2        +    &  
                                     ( ( v(k,j,i)           +    &
                                         v(k,j+1,i) )            &
-                                      / 2.0 )**2           +    &
+                                      / 2.0_wp )**2        +    &
                                     ( ( w(k,j,i)           +    &
                                         w(k+1,j,i) )            &
-                                      / 2.0 )**2 )         *    &
+                                      / 2.0_wp )**2 )      *    &
                               e(k,j,i)
           ENDDO
