Index: palm/trunk/SOURCE/lpm_collision_kernels.f90
===================================================================
--- palm/trunk/SOURCE/lpm_collision_kernels.f90	(revision 1347)
+++ palm/trunk/SOURCE/lpm_collision_kernels.f90	(revision 1359)
@@ -20,5 +20,6 @@
 ! Current revisions:
 ! -----------------
-! 
+! New particle structure integrated.
+! Kind definition added to all floating point numbers.
 ! 
 ! Former revisions:
@@ -177,12 +178,9 @@
           rclass_lbound = LOG( 1.0E-6_wp )
           rclass_ubound = LOG( 2.0E-4_wp )
-          radclass(1)   = 1.0E-6
+          radclass(1)   = 1.0E-6_wp
           DO  i = 2, radius_classes
              radclass(i) = EXP( rclass_lbound +                                &
-                                ( rclass_ubound - rclass_lbound ) * ( i-1.0 ) /&
-                                ( radius_classes - 1.0 ) )
-!             IF ( myid == 0 )  THEN
-!                PRINT*, 'i=', i, ' r = ', radclass(i)*1.0E6
-!             ENDIF
+                                ( rclass_ubound - rclass_lbound ) *            &
+                                ( i - 1.0_wp ) / ( radius_classes - 1.0_wp ) )
           ENDDO
 
@@ -190,8 +188,5 @@
 !--       Set the class bounds for dissipation in interval [0.0, 0.1] m**2/s**3
           DO  i = 1, dissipation_classes
-             epsclass(i) = 0.1 * REAL( i, KIND=wp ) / dissipation_classes
-!             IF ( myid == 0 )  THEN
-!                PRINT*, 'i=', i, ' eps = ', epsclass(i)
-!             ENDIF
+             epsclass(i) = 0.1_wp * REAL( i, KIND=wp ) / dissipation_classes
           ENDDO
 !
@@ -205,5 +200,5 @@
 
              epsilon = epsclass(k)
-             urms    = 2.02 * ( epsilon / 0.04_wp )**( 1.0_wp / 3.0_wp )
+             urms    = 2.02_wp * ( epsilon / 0.04_wp )**( 1.0_wp / 3.0_wp )
 
              CALL turbsd
@@ -240,5 +235,5 @@
 
              PRINT*, '*** Hall kernel'
-             WRITE ( *,'(5X,20(F4.0,1X))' ) ( radclass(i)*1.0E6, &
+             WRITE ( *,'(5X,20(F4.0,1X))' ) ( radclass(i)*1.0E6_wp, &
                                               i = 1,radius_classes )
              DO  j = 1, radius_classes
@@ -250,6 +245,6 @@
                 DO  i = 1, radius_classes
                    DO  j = 1, radius_classes
-                      IF ( hkernel(i,j) == 0.0 )  THEN
-                         hwratio(i,j) = 9999999.9
+                      IF ( hkernel(i,j) == 0.0_wp )  THEN
+                         hwratio(i,j) = 9999999.9_wp
                       ELSE
                          hwratio(i,j) = ckernel(i,j,k) / hkernel(i,j)
@@ -259,10 +254,8 @@
 
                 PRINT*, '*** epsilon = ', epsclass(k)
-                WRITE ( *,'(5X,20(F4.0,1X))' ) ( radclass(i)*1.0E6, &
+                WRITE ( *,'(5X,20(F4.0,1X))' ) ( radclass(i) * 1.0E6_wp, &
                                                  i = 1,radius_classes )
                 DO  j = 1, radius_classes
-!                   WRITE ( *,'(F4.0,1X,20(F4.2,1X))' ) radclass(j)*1.0E6, &
-!                                       ( ckernel(i,j,k), i = 1,radius_classes )
-                   WRITE ( *,'(F4.0,1X,20(F8.4,1X))' ) radclass(j)*1.0E6, &
+                   WRITE ( *,'(F4.0,1X,20(F8.4,1X))' ) radclass(j) * 1.0E6_wp, &
                                           ( hwratio(i,j), i = 1,radius_classes )
                 ENDDO
@@ -292,5 +285,5 @@
 
        USE particle_attributes,                                                &
-           ONLY:  prt_count, prt_start_index, radius_classes, wang_kernel
+           ONLY:  prt_count, radius_classes, wang_kernel
 
        IMPLICIT NONE
@@ -305,6 +298,6 @@
 
 
-       pstart = prt_start_index(k1,j1,i1)
-       pend   = prt_start_index(k1,j1,i1) + prt_count(k1,j1,i1) - 1
+       pstart = 1
+       pend   = prt_count(k1,j1,i1)
        radius_classes = prt_count(k1,j1,i1)
 
@@ -319,9 +312,9 @@
           epsilon = diss(k1,j1,i1)   ! dissipation rate in m**2/s**3
        ELSE
-          epsilon = 0.0
+          epsilon = 0.0_wp
        ENDIF
-       urms    = 2.02 * ( epsilon / 0.04_wp )**( 0.33333333333_wp )
-
-       IF ( wang_kernel  .AND.  epsilon > 1.0E-7 )  THEN
+       urms    = 2.02_wp * ( epsilon / 0.04_wp )**( 0.33333333333_wp )
+
+       IF ( wang_kernel  .AND.  epsilon > 1.0E-7_wp )  THEN
 !
 !--       Call routines to calculate efficiencies for the Wang kernel
@@ -442,11 +435,11 @@
        lambda_re = urms**2 * SQRT( 15.0_wp / epsilon / molecular_viscosity )
        tl        = urms**2 / epsilon                       ! in s
-       lf        = 0.5 * urms**3 / epsilon                 ! in m
+       lf        = 0.5_wp * urms**3 / epsilon              ! in m
        tauk      = SQRT( molecular_viscosity / epsilon )                  ! in s
        eta       = ( molecular_viscosity**3 / epsilon )**0.25_wp          ! in m
        vk        = eta / tauk
 
-       ao = ( 11.0 + 7.0 * lambda_re ) / ( 205.0 + lambda_re )
-       tt = SQRT( 2.0 * lambda_re / ( SQRT( 15.0_wp ) * ao ) ) * tauk   ! in s
+       ao = ( 11.0_wp + 7.0_wp * lambda_re ) / ( 205.0_wp + lambda_re )
+       tt = SQRT( 2.0_wp * lambda_re / ( SQRT( 15.0_wp ) * ao ) ) * tauk  ! in s
 
        CALL fallg    ! gives winf in m/s
@@ -461,14 +454,14 @@
        z   = tt / tl
        be  = SQRT( 2.0_wp ) * lambda / lf
-       bbb = SQRT( 1.0 - 2.0 * be**2 )
-       d1  = ( 1.0 + bbb ) / ( 2.0 * bbb )
-       e1  = lf * ( 1.0 + bbb ) * 0.5   ! in m
-       d2  = ( 1.0 - bbb ) * 0.5 / bbb
-       e2  = lf * ( 1.0 - bbb ) * 0.5   ! in m
-       ccc = SQRT( 1.0 - 2.0 * z**2 )
-       b1  = ( 1.0 + ccc ) * 0.5 / ccc
-       c1  = tl * ( 1.0 + ccc ) * 0.5   ! in s
-       b2  = ( 1.0 - ccc ) * 0.5 / ccc
-       c2  = tl * ( 1.0 - ccc ) * 0.5   ! in s
+       bbb = SQRT( 1.0_wp - 2.0_wp * be**2 )
+       d1  = ( 1.0_wp + bbb ) / ( 2.0_wp * bbb )
+       e1  = lf * ( 1.0_wp + bbb ) * 0.5_wp   ! in m
+       d2  = ( 1.0_wp - bbb ) * 0.5_wp / bbb
+       e2  = lf * ( 1.0_wp - bbb ) * 0.5_wp   ! in m
+       ccc = SQRT( 1.0_wp - 2.0_wp * z**2 )
+       b1  = ( 1.0_wp + ccc ) * 0.5_wp / ccc
+       c1  = tl * ( 1.0_wp + ccc ) * 0.5_wp   ! in s
+       b2  = ( 1.0_wp - ccc ) * 0.5_wp / ccc
+       c2  = tl * ( 1.0_wp - ccc ) * 0.5_wp   ! in s
 
        DO  i = 1, radius_classes
@@ -509,7 +502,7 @@
                          b2 * d2* zhi(c2,e2,v1,t1,v2,t2)
              fr       = d1 * EXP( -rrp / e1 ) - d2 * EXP( -rrp / e2 )
-             v1v2xy   = v1v2xy * fr * urms**2 / tau(i) / tau(j)  ! in m**2/s**2
-             wrtur2xy = vrms1xy**2 + vrms2xy**2 - 2.0 * v1v2xy   ! in m**2/s**2
-             IF ( wrtur2xy < 0.0 )  wrtur2xy = 0.0
+             v1v2xy   = v1v2xy * fr * urms**2 / tau(i) / tau(j)   ! in m**2/s**2
+             wrtur2xy = vrms1xy**2 + vrms2xy**2 - 2.0_wp * v1v2xy ! in m**2/s**2
+             IF ( wrtur2xy < 0.0_wp )  wrtur2xy = 0.0_wp
              wrgrav2  = pi / 8.0_wp * ( winf(j) - winf(i) )**2
              wrfin    = SQRT( ( 2.0_wp / pi ) * ( wrtur2xy + wrgrav2) ) ! in m/s
@@ -523,19 +516,19 @@
              ENDIF
 
-             xx = -0.1988 * sst**4 + 1.5275 * sst**3 - 4.2942 * sst**2 + &
-                   5.3406 * sst
-             IF ( xx < 0.0 )  xx = 0.0
-             yy = 0.1886 * EXP( 20.306_wp / lambda_re )
+             xx = -0.1988_wp * sst**4 + 1.5275_wp * sst**3 - 4.2942_wp *       &
+                   sst**2 + 5.3406_wp * sst
+             IF ( xx < 0.0_wp )  xx = 0.0_wp
+             yy = 0.1886_wp * EXP( 20.306_wp / lambda_re )
 
              c1_gr  =  xx / ( g / vk * tauk )**yy
 
              ao_gr  = ao + ( pi / 8.0_wp) * ( g / vk * tauk )**2
-             fao_gr = 20.115 * SQRT( ao_gr / lambda_re )
+             fao_gr = 20.115_wp * SQRT( ao_gr / lambda_re )
              rc     = SQRT( fao_gr * ABS( st(j) - st(i) ) ) * eta   ! in cm
 
-             grfin  = ( ( eta**2 + rc**2 ) / ( rrp**2 + rc**2) )**( c1_gr*0.5 )
-             IF ( grfin < 1.0 )  grfin = 1.0
-
-             gck(i,j) = 2.0 * pi * rrp**2 * wrfin * grfin           ! in cm**3/s
+             grfin  = ( ( eta**2 + rc**2 ) / ( rrp**2 + rc**2) )**( c1_gr*0.5_wp )
+             IF ( grfin < 1.0_wp )  grfin = 1.0_wp
+
+             gck(i,j) = 2.0_wp * pi * rrp**2 * wrfin * grfin        ! in cm**3/s
              gck(j,i) = gck(i,j)
 
@@ -559,6 +552,6 @@
        REAL(wp) ::  vsett !:
 
-       aa1 = 1.0 / tau0 + 1.0 / a + vsett / b
-       phi_w = 1.0 / aa1  - 0.5 * vsett / b / aa1**2  ! in s
+       aa1 = 1.0_wp / tau0 + 1.0_wp / a + vsett / b
+       phi_w = 1.0_wp / aa1  - 0.5_wp * vsett / b / aa1**2  ! in s
 
     END FUNCTION phi_w
@@ -585,14 +578,15 @@
        REAL(wp) ::  vsett2 !:
 
-       aa1 = vsett2 / b - 1.0 / tau2 - 1.0 / a
-       aa2 = vsett1 / b + 1.0 / tau1 + 1.0 / a
-       aa3 = ( vsett1 - vsett2 ) / b + 1.0 / tau1 + 1.0 / tau2
-       aa4 = ( vsett2 / b )**2 - ( 1.0 / tau2 + 1.0 / a )**2
-       aa5 = vsett2 / b + 1.0 / tau2 + 1.0 / a
-       aa6 = 1.0 / tau1 - 1.0 / a + ( 1.0 / tau2 + 1.0 / a) * vsett1 / vsett2
-       zhi = (1.0 / aa1 - 1.0 / aa2 ) * ( vsett1 - vsett2 ) * 0.5 / b / aa3**2 &
-           + (4.0 / aa4 - 1.0 / aa5**2 - 1.0 / aa1**2 ) * vsett2 * 0.5 / b /aa6&
-           + (2.0 * ( b / aa2 - b / aa1 ) - vsett1 / aa2**2 + vsett2 / aa1**2 )&
-           * 0.5 / b / aa3      ! in s**2
+       aa1 = vsett2 / b - 1.0_wp / tau2 - 1.0_wp / a
+       aa2 = vsett1 / b + 1.0_wp / tau1 + 1.0_wp / a
+       aa3 = ( vsett1 - vsett2 ) / b + 1.0_wp / tau1 + 1.0_wp / tau2
+       aa4 = ( vsett2 / b )**2 - ( 1.0_wp / tau2 + 1.0_wp / a )**2
+       aa5 = vsett2 / b + 1.0_wp / tau2 + 1.0_wp / a
+       aa6 = 1.0_wp / tau1 - 1.0_wp / a + ( 1.0_wp / tau2 + 1.0_wp / a) *      &
+             vsett1 / vsett2
+       zhi = (1.0_wp / aa1 - 1.0_wp / aa2 ) * ( vsett1 - vsett2 ) * 0.5_wp /   &
+             b / aa3**2 + ( 4.0_wp / aa4 - 1.0_wp / aa5**2 - 1.0_wp / aa1**2 ) &
+             * vsett2 * 0.5_wp / b /aa6 + ( 2.0_wp * ( b / aa2 - b / aa1 ) -   &
+             vsett1 / aa2**2 + vsett2 / aa1**2 ) * 0.5_wp / b / aa3    ! in s**2
 
     END FUNCTION zhi
@@ -645,18 +639,19 @@
 
           first = .FALSE.
-          b = (/  -0.318657E1,  0.992696E0, -0.153193E-2, -0.987059E-3, &
-                 -0.578878E-3, 0.855176E-4, -0.327815E-5 /)
-          c = (/  -0.500015E1,  0.523778E1,  -0.204914E1,   0.475294E0, &
-                 -0.542819E-1, 0.238449E-2 /)
+          b = (/  -0.318657E1_wp,   0.992696E0_wp,  -0.153193E-2_wp, &
+                  -0.987059E-3_wp, -0.578878E-3_wp,  0.855176E-4_wp, &
+                  -0.327815E-5_wp /)
+          c = (/  -0.500015E1_wp,   0.523778E1_wp,  -0.204914E1_wp,   &
+                   0.475294E0_wp,  -0.542819E-1_wp,  0.238449E-2_wp /)
 
 !
 !--       Parameter values for p = 1013,25 hPa and T = 293,15 K
-          eta   = 1.818E-5         ! in kg/(m s)
-          xlamb = 6.6E-8           ! in m
-          rho_a = 1.204            ! in kg/m**3
-          cunh  = 1.26 * xlamb     ! in m
-          sigma = 0.07363          ! in kg/s**2
-          stok  = 2.0  * g * ( rho_l - rho_a ) / ( 9.0 * eta ) ! in 1/(m s)
-          stb   = 32.0 * rho_a * ( rho_l - rho_a) * g / (3.0 * eta * eta)
+          eta   = 1.818E-5_wp         ! in kg/(m s)
+          xlamb = 6.6E-8_wp           ! in m
+          rho_a = 1.204_wp            ! in kg/m**3
+          cunh  = 1.26_wp * xlamb     ! in m
+          sigma = 0.07363_wp          ! in kg/s**2
+          stok  = 2.0_wp  * g * ( rho_l - rho_a ) / ( 9.0_wp * eta ) ! in 1/(m s)
+          stb   = 32.0_wp * rho_a * ( rho_l - rho_a) * g / (3.0_wp * eta * eta)
           phy   = sigma**3 * rho_a**2 / ( eta**4 * g * ( rho_l - rho_a ) )
           py    = phy**( 1.0_wp / 6.0_wp )
@@ -666,12 +661,12 @@
        DO  j = 1, radius_classes
 
-          IF ( radclass(j) <= 1.0E-5 ) THEN
+          IF ( radclass(j) <= 1.0E-5_wp )  THEN
 
              winf(j) = stok * ( radclass(j)**2 + cunh * radclass(j) )
 
-          ELSEIF ( radclass(j) > 1.0E-5  .AND.  radclass(j) <= 5.35E-4 )  THEN
+          ELSEIF ( radclass(j) > 1.0E-5_wp  .AND.  radclass(j) <= 5.35E-4_wp )  THEN
 
              x = LOG( stb * radclass(j)**3 )
-             y = 0.0
+             y = 0.0_wp
 
              DO  i = 1, 7
@@ -681,18 +676,18 @@
 !--          Note: this Eq. is wrong in (Pruppacher and Klett, 1997, p. 418)
 !--          for correct version see (Beard, 1976)
-             xrey = ( 1.0 + cunh / radclass(j) ) * EXP( y ) 
-
-             winf(j) = xrey * eta / ( 2.0 * rho_a * radclass(j) )
-
-          ELSEIF ( radclass(j) > 5.35E-4 )  THEN
-
-             IF ( radclass(j) > 0.0035 )  THEN
-                bond = g * ( rho_l - rho_a ) * 0.0035**2 / sigma
+             xrey = ( 1.0_wp + cunh / radclass(j) ) * EXP( y )
+
+             winf(j) = xrey * eta / ( 2.0_wp * rho_a * radclass(j) )
+
+          ELSEIF ( radclass(j) > 5.35E-4_wp )  THEN
+
+             IF ( radclass(j) > 0.0035_wp )  THEN
+                bond = g * ( rho_l - rho_a ) * 0.0035_wp**2 / sigma
              ELSE
                bond = g * ( rho_l - rho_a ) * radclass(j)**2 / sigma
              ENDIF
 
-             x = LOG( 16.0 * bond * py / 3.0_wp )
-             y = 0.0
+             x = LOG( 16.0_wp * bond * py / 3.0_wp )
+             y = 0.0_wp
 
              DO  i = 1, 6
@@ -702,8 +697,8 @@
              xrey = py * EXP( y )
 
-             IF ( radclass(j) > 0.0035 )  THEN
-                winf(j) = xrey * eta / ( 2.0 * rho_a * 0.0035_wp )
+             IF ( radclass(j) > 0.0035_wp )  THEN
+                winf(j) = xrey * eta / ( 2.0_wp * rho_a * 0.0035_wp )
              ELSE
-                winf(j) = xrey * eta / ( 2.0 * rho_a * radclass(j) )
+                winf(j) = xrey * eta / ( 2.0_wp * rho_a * radclass(j) )
              ENDIF
 
@@ -752,52 +747,76 @@
 
          first = .FALSE.
-         r0  = (/ 6.0, 8.0, 10.0, 15.0, 20.0, 25.0, 30.0, 40.0, 50.0, 60., &
-                  70.0, 100.0, 150.0, 200.0, 300.0 /)
-         rat = (/ 0.00, 0.05, 0.10, 0.15, 0.20, 0.25, 0.30, 0.35, 0.40, 0.45, &
-                  0.50, 0.55, 0.60, 0.65, 0.70, 0.75, 0.80, 0.85, 0.90, 0.95, &
-                  1.00 /)
-
-         ecoll(:,1) = (/0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, &
-                        0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001/)
-         ecoll(:,2) = (/0.003, 0.003, 0.003, 0.004, 0.005, 0.005, 0.005, &
-                        0.010, 0.100, 0.050, 0.200, 0.500, 0.770, 0.870, 0.970/)
-         ecoll(:,3) = (/0.007, 0.007, 0.007, 0.008, 0.009, 0.010, 0.010, &
-                        0.070, 0.400, 0.430, 0.580, 0.790, 0.930, 0.960, 1.000/)
-         ecoll(:,4) = (/0.009, 0.009, 0.009, 0.012, 0.015, 0.010, 0.020, &
-                        0.280, 0.600, 0.640, 0.750, 0.910, 0.970, 0.980, 1.000/)
-         ecoll(:,5) = (/0.014, 0.014, 0.014, 0.015, 0.016, 0.030, 0.060, &
-                        0.500, 0.700, 0.770, 0.840, 0.950, 0.970, 1.000, 1.000/)
-         ecoll(:,6) = (/0.017, 0.017, 0.017, 0.020, 0.022, 0.060, 0.100, &
-                        0.620, 0.780, 0.840, 0.880, 0.950, 1.000, 1.000, 1.000/)
-         ecoll(:,7) = (/0.030, 0.030, 0.024, 0.022, 0.032, 0.062, 0.200, &
-                        0.680, 0.830, 0.870, 0.900, 0.950, 1.000, 1.000, 1.000/)
-         ecoll(:,8) = (/0.025, 0.025, 0.025, 0.036, 0.043, 0.130, 0.270, &
-                        0.740, 0.860, 0.890, 0.920, 1.000, 1.000, 1.000, 1.000/)
-         ecoll(:,9) = (/0.027, 0.027, 0.027, 0.040, 0.052, 0.200, 0.400, &
-                        0.780, 0.880, 0.900, 0.940, 1.000, 1.000, 1.000, 1.000/)
-         ecoll(:,10)= (/0.030, 0.030, 0.030, 0.047, 0.064, 0.250, 0.500, &
-                        0.800, 0.900, 0.910, 0.950, 1.000, 1.000, 1.000, 1.000/)
-         ecoll(:,11)= (/0.040, 0.040, 0.033, 0.037, 0.068, 0.240, 0.550, &
-                        0.800, 0.900, 0.910, 0.950, 1.000, 1.000, 1.000, 1.000/)
-         ecoll(:,12)= (/0.035, 0.035, 0.035, 0.055, 0.079, 0.290, 0.580, &
-                        0.800, 0.900, 0.910, 0.950, 1.000, 1.000, 1.000, 1.000/)
-         ecoll(:,13)= (/0.037, 0.037, 0.037, 0.062, 0.082, 0.290, 0.590, &
-                        0.780, 0.900, 0.910, 0.950, 1.000, 1.000, 1.000, 1.000/)
-         ecoll(:,14)= (/0.037, 0.037, 0.037, 0.060, 0.080, 0.290, 0.580, &
-                        0.770, 0.890, 0.910, 0.950, 1.000, 1.000, 1.000, 1.000/)
-         ecoll(:,15)= (/0.037, 0.037, 0.037, 0.041, 0.075, 0.250, 0.540, &
-                        0.760, 0.880, 0.920, 0.950, 1.000, 1.000, 1.000, 1.000/)
-         ecoll(:,16)= (/0.037, 0.037, 0.037, 0.052, 0.067, 0.250, 0.510, &
-                        0.770, 0.880, 0.930, 0.970, 1.000, 1.000, 1.000, 1.000/)
-         ecoll(:,17)= (/0.037, 0.037, 0.037, 0.047, 0.057, 0.250, 0.490, &
-                        0.770, 0.890, 0.950, 1.000, 1.000, 1.000, 1.000, 1.000/)
-         ecoll(:,18)= (/0.036, 0.036, 0.036, 0.042, 0.048, 0.230, 0.470, &
-                        0.780, 0.920, 1.000, 1.020, 1.020, 1.020, 1.020, 1.020/)
-         ecoll(:,19)= (/0.040, 0.040, 0.035, 0.033, 0.040, 0.112, 0.450, &
-                        0.790, 1.010, 1.030, 1.040, 1.040, 1.040, 1.040, 1.040/)
-         ecoll(:,20)= (/0.033, 0.033, 0.033, 0.033, 0.033, 0.119, 0.470, &
-                        0.950, 1.300, 1.700, 2.300, 2.300, 2.300, 2.300, 2.300/)
-         ecoll(:,21)= (/0.027, 0.027, 0.027, 0.027, 0.027, 0.125, 0.520, &
-                        1.400, 2.300, 3.000, 4.000, 4.000, 4.000, 4.000, 4.000/)
+         r0  = (/   6.0_wp,   8.0_wp,  10.0_wp, 15.0_wp,  20.0_wp,  25.0_wp,  &
+                   30.0_wp,  40.0_wp,  50.0_wp, 60.0_wp,  70.0_wp, 100.0_wp,  &
+                  150.0_wp, 200.0_wp, 300.0_wp /)
+
+         rat = (/ 0.00_wp, 0.05_wp, 0.10_wp, 0.15_wp, 0.20_wp, 0.25_wp,       &
+                  0.30_wp, 0.35_wp, 0.40_wp, 0.45_wp, 0.50_wp, 0.55_wp,       &
+                  0.60_wp, 0.65_wp, 0.70_wp, 0.75_wp, 0.80_wp, 0.85_wp,       &
+                  0.90_wp, 0.95_wp, 1.00_wp /)
+
+         ecoll(:,1)  = (/ 0.001_wp, 0.001_wp, 0.001_wp, 0.001_wp, 0.001_wp, &
+                          0.001_wp, 0.001_wp, 0.001_wp, 0.001_wp, 0.001_wp, &
+                          0.001_wp, 0.001_wp, 0.001_wp, 0.001_wp, 0.001_wp /)
+         ecoll(:,2)  = (/ 0.003_wp, 0.003_wp, 0.003_wp, 0.004_wp, 0.005_wp, &
+                          0.005_wp, 0.005_wp, 0.010_wp, 0.100_wp, 0.050_wp, &
+                          0.200_wp, 0.500_wp, 0.770_wp, 0.870_wp, 0.970_wp /)
+         ecoll(:,3)  = (/ 0.007_wp, 0.007_wp, 0.007_wp, 0.008_wp, 0.009_wp, &
+                          0.010_wp, 0.010_wp, 0.070_wp, 0.400_wp, 0.430_wp, &
+                          0.580_wp, 0.790_wp, 0.930_wp, 0.960_wp, 1.000_wp /)
+         ecoll(:,4)  = (/ 0.009_wp, 0.009_wp, 0.009_wp, 0.012_wp, 0.015_wp, &
+                          0.010_wp, 0.020_wp, 0.280_wp, 0.600_wp, 0.640_wp, &
+                          0.750_wp, 0.910_wp, 0.970_wp, 0.980_wp, 1.000_wp /)
+         ecoll(:,5)  = (/ 0.014_wp, 0.014_wp, 0.014_wp, 0.015_wp, 0.016_wp, &
+                          0.030_wp, 0.060_wp, 0.500_wp, 0.700_wp, 0.770_wp, &
+                          0.840_wp, 0.950_wp, 0.970_wp, 1.000_wp, 1.000_wp /)
+         ecoll(:,6)  = (/ 0.017_wp, 0.017_wp, 0.017_wp, 0.020_wp, 0.022_wp, &
+                          0.060_wp, 0.100_wp, 0.620_wp, 0.780_wp, 0.840_wp, &
+                          0.880_wp, 0.950_wp, 1.000_wp, 1.000_wp, 1.000_wp /)
+         ecoll(:,7)  = (/ 0.030_wp, 0.030_wp, 0.024_wp, 0.022_wp, 0.032_wp, &
+                          0.062_wp, 0.200_wp, 0.680_wp, 0.830_wp, 0.870_wp, &
+                          0.900_wp, 0.950_wp, 1.000_wp, 1.000_wp, 1.000_wp /)
+         ecoll(:,8)  = (/ 0.025_wp, 0.025_wp, 0.025_wp, 0.036_wp, 0.043_wp, &
+                          0.130_wp, 0.270_wp, 0.740_wp, 0.860_wp, 0.890_wp, &
+                          0.920_wp, 1.000_wp, 1.000_wp, 1.000_wp, 1.000_wp /)
+         ecoll(:,9)  = (/ 0.027_wp, 0.027_wp, 0.027_wp, 0.040_wp, 0.052_wp, &
+                          0.200_wp, 0.400_wp, 0.780_wp, 0.880_wp, 0.900_wp, &
+                          0.940_wp, 1.000_wp, 1.000_wp, 1.000_wp, 1.000_wp /)
+         ecoll(:,10) = (/ 0.030_wp, 0.030_wp, 0.030_wp, 0.047_wp, 0.064_wp, &
+                          0.250_wp, 0.500_wp, 0.800_wp, 0.900_wp, 0.910_wp, &
+                          0.950_wp, 1.000_wp, 1.000_wp, 1.000_wp, 1.000_wp /)
+         ecoll(:,11) = (/ 0.040_wp, 0.040_wp, 0.033_wp, 0.037_wp, 0.068_wp, &
+                          0.240_wp, 0.550_wp, 0.800_wp, 0.900_wp, 0.910_wp, &
+                          0.950_wp, 1.000_wp, 1.000_wp, 1.000_wp, 1.000_wp /)
+         ecoll(:,12) = (/ 0.035_wp, 0.035_wp, 0.035_wp, 0.055_wp, 0.079_wp, &
+                          0.290_wp, 0.580_wp, 0.800_wp, 0.900_wp, 0.910_wp, &
+                          0.950_wp, 1.000_wp, 1.000_wp, 1.000_wp, 1.000_wp /)
+         ecoll(:,13) = (/ 0.037_wp, 0.037_wp, 0.037_wp, 0.062_wp, 0.082_wp, &
+                          0.290_wp, 0.590_wp, 0.780_wp, 0.900_wp, 0.910_wp, &
+                          0.950_wp, 1.000_wp, 1.000_wp, 1.000_wp, 1.000_wp /)
+         ecoll(:,14) = (/ 0.037_wp, 0.037_wp, 0.037_wp, 0.060_wp, 0.080_wp, &
+                          0.290_wp, 0.580_wp, 0.770_wp, 0.890_wp, 0.910_wp, &
+                          0.950_wp, 1.000_wp, 1.000_wp, 1.000_wp, 1.000_wp /)
+         ecoll(:,15) = (/ 0.037_wp, 0.037_wp, 0.037_wp, 0.041_wp, 0.075_wp, &
+                          0.250_wp, 0.540_wp, 0.760_wp, 0.880_wp, 0.920_wp, &
+                          0.950_wp, 1.000_wp, 1.000_wp, 1.000_wp, 1.000_wp /)
+         ecoll(:,16) = (/ 0.037_wp, 0.037_wp, 0.037_wp, 0.052_wp, 0.067_wp, &
+                          0.250_wp, 0.510_wp, 0.770_wp, 0.880_wp, 0.930_wp, &
+                          0.970_wp, 1.000_wp, 1.000_wp, 1.000_wp, 1.000_wp /)
+         ecoll(:,17) = (/ 0.037_wp, 0.037_wp, 0.037_wp, 0.047_wp, 0.057_wp, &
+                          0.250_wp, 0.490_wp, 0.770_wp, 0.890_wp, 0.950_wp, &
+                          1.000_wp, 1.000_wp, 1.000_wp, 1.000_wp, 1.000_wp /)
+         ecoll(:,18) = (/ 0.036_wp, 0.036_wp, 0.036_wp, 0.042_wp, 0.048_wp, &
+                          0.230_wp, 0.470_wp, 0.780_wp, 0.920_wp, 1.000_wp, &
+                          1.020_wp, 1.020_wp, 1.020_wp, 1.020_wp, 1.020_wp /)
+         ecoll(:,19) = (/ 0.040_wp, 0.040_wp, 0.035_wp, 0.033_wp, 0.040_wp, &
+                          0.112_wp, 0.450_wp, 0.790_wp, 1.010_wp, 1.030_wp, &
+                          1.040_wp, 1.040_wp, 1.040_wp, 1.040_wp, 1.040_wp /)
+         ecoll(:,20) = (/ 0.033_wp, 0.033_wp, 0.033_wp, 0.033_wp, 0.033_wp, &
+                          0.119_wp, 0.470_wp, 0.950_wp, 1.300_wp, 1.700_wp, &
+                          2.300_wp, 2.300_wp, 2.300_wp, 2.300_wp, 2.300_wp /)
+         ecoll(:,21) = (/ 0.027_wp, 0.027_wp, 0.027_wp, 0.027_wp, 0.027_wp, &
+                          0.125_wp, 0.520_wp, 1.400_wp, 2.300_wp, 3.000_wp, &
+                          4.000_wp, 4.000_wp, 4.000_wp, 4.000_wp, 4.000_wp /)
        ENDIF
 
@@ -832,20 +851,21 @@
                    pp = ( ( radclass(j) * 1.0E06_wp ) - r0(ir-1) ) / &
                         ( r0(ir) - r0(ir-1) )
-                   qq = ( rq- rat(iq-1) ) / ( rat(iq) - rat(iq-1) )
-                   ec(j,i) = ( 1.0-pp ) * ( 1.0-qq ) * ecoll(ir-1,iq-1)  &
-                             + pp * ( 1.0-qq ) * ecoll(ir,iq-1)          &
-                             + qq * ( 1.0-pp ) * ecoll(ir-1,iq)          &
+                   qq = ( rq - rat(iq-1) ) / ( rat(iq) - rat(iq-1) )
+                   ec(j,i) = ( 1.0_wp - pp ) * ( 1.0_wp - qq )                 &
+                             * ecoll(ir-1,iq-1)                                &
+                             + pp * ( 1.0_wp - qq ) * ecoll(ir,iq-1)           &
+                             + qq * ( 1.0_wp - pp ) * ecoll(ir-1,iq)           &
                              + pp * qq * ecoll(ir,iq)
                 ELSE
                    qq = ( rq - rat(iq-1) ) / ( rat(iq) - rat(iq-1) )
-                   ec(j,i) = (1.0-qq) * ecoll(1,iq-1) + qq * ecoll(1,iq)
+                   ec(j,i) = ( 1.0_wp - qq ) * ecoll(1,iq-1) + qq * ecoll(1,iq)
                 ENDIF
              ELSE
                 qq = ( rq - rat(iq-1) ) / ( rat(iq) - rat(iq-1) )
-                ek = ( 1.0 - qq ) * ecoll(15,iq-1) + qq * ecoll(15,iq)
+                ek = ( 1.0_wp - qq ) * ecoll(15,iq-1) + qq * ecoll(15,iq)
                 ec(j,i) = MIN( ek, 1.0_wp )
              ENDIF
 
-             IF ( ec(j,i) < 1.0E-20 )  ec(j,i) = 0.0
+             IF ( ec(j,i) < 1.0E-20_wp )  ec(j,i) = 0.0_wp
 
              ec(i,j) = ec(j,i)
@@ -901,32 +921,57 @@
           first = .FALSE.
 
-          r0  = (/ 10.0, 20.0, 30.0, 40.0, 50.0, 60.0, 100.0 /)
-          rat = (/ 0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0 /)
+          r0  = (/  10.0_wp, 20.0_wp, 30.0_wp, 40.0_wp, 50.0_wp, 60.0_wp,  &
+                   100.0_wp /)
+
+          rat = (/ 0.0_wp, 0.1_wp, 0.2_wp, 0.3_wp, 0.4_wp, 0.5_wp, 0.6_wp, &
+                   0.7_wp, 0.8_wp, 0.9_wp, 1.0_wp /)
 !
 !--       for 100 cm**2/s**3
-          ecoll_100(:,1) = (/1.74,  1.74,  1.773, 1.49,  1.207,  1.207,  1.0 /)
-          ecoll_100(:,2) = (/1.46,  1.46,  1.421, 1.245, 1.069,  1.069,  1.0 /)
-          ecoll_100(:,3) = (/1.32,  1.32,  1.245, 1.123, 1.000,  1.000,  1.0 /)
-          ecoll_100(:,4) = (/1.250, 1.250, 1.148, 1.087, 1.025,  1.025,  1.0 /)
-          ecoll_100(:,5) = (/1.186, 1.186, 1.066, 1.060, 1.056,  1.056,  1.0 /)
-          ecoll_100(:,6) = (/1.045, 1.045, 1.000, 1.014, 1.028,  1.028,  1.0 /)
-          ecoll_100(:,7) = (/1.070, 1.070, 1.030, 1.038, 1.046,  1.046,  1.0 /)
-          ecoll_100(:,8) = (/1.000, 1.000, 1.054, 1.042, 1.029,  1.029,  1.0 /)
-          ecoll_100(:,9) = (/1.223, 1.223, 1.117, 1.069, 1.021,  1.021,  1.0 /)
-          ecoll_100(:,10)= (/1.570, 1.570, 1.244, 1.166, 1.088,  1.088,  1.0 /)
-          ecoll_100(:,11)= (/20.3,  20.3,  14.6 , 8.61,  2.60,   2.60 ,  1.0 /)
+          ecoll_100(:,1)  = (/  1.74_wp,   1.74_wp,   1.773_wp, 1.49_wp,  &
+                                1.207_wp,  1.207_wp,  1.0_wp /)
+          ecoll_100(:,2)  = (/  1.46_wp,   1.46_wp,   1.421_wp, 1.245_wp, &
+                                1.069_wp,  1.069_wp,  1.0_wp /)
+          ecoll_100(:,3)  = (/  1.32_wp,   1.32_wp,   1.245_wp, 1.123_wp, &
+                                1.000_wp,  1.000_wp,  1.0_wp /)
+          ecoll_100(:,4)  = (/  1.250_wp,  1.250_wp,  1.148_wp, 1.087_wp, &
+                                1.025_wp,  1.025_wp,  1.0_wp /)
+          ecoll_100(:,5)  = (/  1.186_wp,  1.186_wp,  1.066_wp, 1.060_wp, &
+                                1.056_wp,  1.056_wp,  1.0_wp /)
+          ecoll_100(:,6)  = (/  1.045_wp,  1.045_wp,  1.000_wp, 1.014_wp, &
+                                1.028_wp,  1.028_wp,  1.0_wp /)
+          ecoll_100(:,7)  = (/  1.070_wp,  1.070_wp,  1.030_wp, 1.038_wp, &
+                                1.046_wp,  1.046_wp,  1.0_wp /)
+          ecoll_100(:,8)  = (/  1.000_wp,  1.000_wp,  1.054_wp, 1.042_wp, &
+                                1.029_wp,  1.029_wp,  1.0_wp /)
+          ecoll_100(:,9)  = (/  1.223_wp,  1.223_wp,  1.117_wp, 1.069_wp, &
+                                1.021_wp,  1.021_wp,  1.0_wp /)
+          ecoll_100(:,10) = (/  1.570_wp,  1.570_wp,  1.244_wp, 1.166_wp, &
+                                1.088_wp,  1.088_wp,  1.0_wp /)
+          ecoll_100(:,11) = (/ 20.3_wp,   20.3_wp,   14.6_wp,  8.61_wp,  &
+                                2.60_wp,   2.60_wp,   1.0_wp /)
 !
 !--       for 400 cm**2/s**3
-          ecoll_400(:,1) = (/4.976, 4.976,  3.593, 2.519, 1.445,  1.445,  1.0 /)
-          ecoll_400(:,2) = (/2.984, 2.984,  2.181, 1.691, 1.201,  1.201,  1.0 /)
-          ecoll_400(:,3) = (/1.988, 1.988,  1.475, 1.313, 1.150,  1.150,  1.0 /)
-          ecoll_400(:,4) = (/1.490, 1.490,  1.187, 1.156, 1.126,  1.126,  1.0 /)
-          ecoll_400(:,5) = (/1.249, 1.249,  1.088, 1.090, 1.092,  1.092,  1.0 /)
-          ecoll_400(:,6) = (/1.139, 1.139,  1.130, 1.091, 1.051,  1.051,  1.0 /)
-          ecoll_400(:,7) = (/1.220, 1.220,  1.190, 1.138, 1.086,  1.086,  1.0 /)
-          ecoll_400(:,8) = (/1.325, 1.325,  1.267, 1.165, 1.063,  1.063,  1.0 /)
-          ecoll_400(:,9) = (/1.716, 1.716,  1.345, 1.223, 1.100,  1.100,  1.0 /)
-          ecoll_400(:,10)= (/3.788, 3.788,  1.501, 1.311, 1.120,  1.120,  1.0 /)
-          ecoll_400(:,11)= (/36.52, 36.52,  19.16, 22.80,  26.0,   26.0,  1.0 /)
+          ecoll_400(:,1)  = (/  4.976_wp,  4.976_wp,  3.593_wp,  2.519_wp, &
+                                1.445_wp,  1.445_wp,  1.0_wp /)
+          ecoll_400(:,2)  = (/  2.984_wp,  2.984_wp,  2.181_wp,  1.691_wp, &
+                                1.201_wp,  1.201_wp,  1.0_wp /)
+          ecoll_400(:,3)  = (/  1.988_wp,  1.988_wp,  1.475_wp,  1.313_wp, &
+                                1.150_wp,  1.150_wp,  1.0_wp /)
+          ecoll_400(:,4)  = (/  1.490_wp,  1.490_wp,  1.187_wp,  1.156_wp, &
+                                1.126_wp,  1.126_wp,  1.0_wp /)
+          ecoll_400(:,5)  = (/  1.249_wp,  1.249_wp,  1.088_wp,  1.090_wp, &
+                                1.092_wp,  1.092_wp,  1.0_wp /)
+          ecoll_400(:,6)  = (/  1.139_wp,  1.139_wp,  1.130_wp,  1.091_wp, &
+                                1.051_wp,  1.051_wp,  1.0_wp /)
+          ecoll_400(:,7)  = (/  1.220_wp,  1.220_wp,  1.190_wp,  1.138_wp, &
+                                1.086_wp,  1.086_wp,  1.0_wp /)
+          ecoll_400(:,8)  = (/  1.325_wp,  1.325_wp,  1.267_wp,  1.165_wp, &
+                                1.063_wp,  1.063_wp,  1.0_wp /)
+          ecoll_400(:,9)  = (/  1.716_wp,  1.716_wp,  1.345_wp,  1.223_wp, &
+                                1.100_wp,  1.100_wp,  1.0_wp /)
+          ecoll_400(:,10) = (/  3.788_wp,  3.788_wp,  1.501_wp,  1.311_wp, &
+                                1.120_wp,  1.120_wp,  1.0_wp /)
+          ecoll_400(:,11) = (/ 36.52_wp,  36.52_wp,  19.16_wp,  22.80_wp,  &
+                               26.0_wp,   26.0_wp,    1.0_wp /)
 
        ENDIF
@@ -964,42 +1009,42 @@
              ENDDO
 
-             y1 = 0.0001      ! for 0 m**2/s**3
+             y1 = 0.0001_wp      ! for 0 m**2/s**3
 
              IF ( ir < 8 )  THEN
                 IF ( ir >= 2 )  THEN
-                   pp = ( radclass(j)*1.0E6 - r0(ir-1) ) / ( r0(ir) - r0(ir-1) )
+                   pp = ( radclass(j)*1.0E6_wp - r0(ir-1) ) / ( r0(ir) - r0(ir-1) )
                    qq = ( rq - rat(iq-1) ) / ( rat(iq) - rat(iq-1) )
-                   y2 = ( 1.0-pp ) * ( 1.0-qq ) * ecoll_100(ir-1,iq-1) +  &
-                                pp * ( 1.0-qq ) * ecoll_100(ir,iq-1)   +  &
-                                qq * ( 1.0-pp ) * ecoll_100(ir-1,iq)   +  &
-                                pp * qq         * ecoll_100(ir,iq)
-                   y3 = ( 1.0-pp ) * ( 1.0-qq ) * ecoll_400(ir-1,iq-1) +  &
-                                pp * ( 1.0-qq ) * ecoll_400(ir,iq-1)   +  &
-                                qq * ( 1.0-pp ) * ecoll_400(ir-1,iq)   +  &
-                                pp * qq         * ecoll_400(ir,iq)
+                   y2 = ( 1.0_wp - pp ) * ( 1.0_wp - qq ) * ecoll_100(ir-1,iq-1) + &
+                                pp * ( 1.0_wp - qq ) * ecoll_100(ir,iq-1)        + &
+                                qq * ( 1.0_wp - pp ) * ecoll_100(ir-1,iq)        + &
+                                pp * qq              * ecoll_100(ir,iq)
+                   y3 = ( 1.0-pp ) * ( 1.0_wp - qq ) * ecoll_400(ir-1,iq-1)      + &
+                                pp * ( 1.0_wp - qq ) * ecoll_400(ir,iq-1)        + &
+                                qq * ( 1.0_wp - pp ) * ecoll_400(ir-1,iq)        + &
+                                pp * qq              * ecoll_400(ir,iq)
                 ELSE
                    qq = ( rq - rat(iq-1) ) / ( rat(iq) - rat(iq-1) )
-                   y2 = ( 1.0-qq ) * ecoll_100(1,iq-1) + qq * ecoll_100(1,iq)
-                   y3 = ( 1.0-qq ) * ecoll_400(1,iq-1) + qq * ecoll_400(1,iq)
+                   y2 = ( 1.0_wp - qq ) * ecoll_100(1,iq-1) + qq * ecoll_100(1,iq)
+                   y3 = ( 1.0_wp - qq ) * ecoll_400(1,iq-1) + qq * ecoll_400(1,iq)
                 ENDIF
              ELSE
                 qq = ( rq - rat(iq-1) ) / ( rat(iq) - rat(iq-1) )
-                y2 = ( 1.0-qq ) * ecoll_100(7,iq-1) + qq * ecoll_100(7,iq)
-                y3 = ( 1.0-qq ) * ecoll_400(7,iq-1) + qq * ecoll_400(7,iq)
+                y2 = ( 1.0_wp - qq ) * ecoll_100(7,iq-1) + qq * ecoll_100(7,iq)
+                y3 = ( 1.0_wp - qq ) * ecoll_400(7,iq-1) + qq * ecoll_400(7,iq)
              ENDIF
 !
 !--          Linear interpolation of dissipation rate in m**2/s**3
-             IF ( epsilon <= 0.01 )  THEN
-                ecf(j,i) = ( epsilon - 0.01 ) / (   0.0 - 0.01 ) * y1 &
-                         + ( epsilon -   0.0 ) / ( 0.01 -   0.0 ) * y2
-             ELSEIF ( epsilon <= 0.06 )  THEN
-                ecf(j,i) = ( epsilon - 0.04 ) / ( 0.01 - 0.04 ) * y2 &
-                         + ( epsilon - 0.01 ) / ( 0.04 - 0.01 ) * y3
+             IF ( epsilon <= 0.01_wp )  THEN
+                ecf(j,i) = ( epsilon - 0.01_wp ) / ( 0.0_wp  - 0.01_wp ) * y1 &
+                         + ( epsilon - 0.0_wp  ) / ( 0.01_wp - 0.0_wp  ) * y2
+             ELSEIF ( epsilon <= 0.06_wp )  THEN
+                ecf(j,i) = ( epsilon - 0.04_wp ) / ( 0.01_wp - 0.04_wp ) * y2 &
+                         + ( epsilon - 0.01_wp ) / ( 0.04_wp - 0.01_wp ) * y3
              ELSE
-                ecf(j,i) = (   0.06 - 0.04 ) / ( 0.01 - 0.04 ) * y2 &
-                         + (   0.06 - 0.01 ) / ( 0.04 - 0.01 ) * y3
+                ecf(j,i) = ( 0.06_wp - 0.04_wp ) / ( 0.01_wp - 0.04_wp ) * y2 &
+                         + ( 0.06_wp - 0.01_wp ) / ( 0.04_wp - 0.01_wp ) * y3
              ENDIF
 
-             IF ( ecf(j,i) < 1.0 )  ecf(j,i) = 1.0
+             IF ( ecf(j,i) < 1.0_wp )  ecf(j,i) = 1.0_wp
 
              ecf(i,j) = ecf(j,i)
@@ -1041,9 +1086,9 @@
        REAL(wp)      ::  y       !:
  
-       REAL(wp), DIMENSION(1:9), SAVE      ::  collected_r = 0.0 !:
+       REAL(wp), DIMENSION(1:9), SAVE      ::  collected_r = 0.0_wp !:
        
-       REAL(wp), DIMENSION(1:19), SAVE     ::  collector_r = 0.0 !:
+       REAL(wp), DIMENSION(1:19), SAVE     ::  collector_r = 0.0_wp !:
        
-       REAL(wp), DIMENSION(1:9,1:19), SAVE ::  ef = 0.0          !:
+       REAL(wp), DIMENSION(1:9,1:19), SAVE ::  ef = 0.0_wp          !:
 
        mean_rm = mean_r * 1.0E06_wp
@@ -1052,29 +1097,49 @@
        IF ( first )  THEN
 
-          collected_r = (/ 2.0, 3.0, 4.0, 6.0, 8.0, 10.0, 15.0, 20.0, 25.0 /)
-          collector_r = (/ 10.0, 20.0, 30.0, 40.0, 50.0, 60.0, 80.0, 100.0,  &
-                           150.0, 200.0, 300.0, 400.0, 500.0, 600.0, 1000.0, &
-                           1400.0, 1800.0, 2400.0, 3000.0 /)
-
-          ef(:,1) = (/0.017, 0.027, 0.037, 0.052, 0.052, 0.052, 0.052, 0.0, &
-                      0.0 /)
-          ef(:,2) = (/0.001, 0.016, 0.027, 0.060, 0.12, 0.17, 0.17, 0.17, 0.0 /)
-          ef(:,3) = (/0.001, 0.001, 0.02,  0.13,  0.28, 0.37, 0.54, 0.55, 0.47/)
-          ef(:,4) = (/0.001, 0.001, 0.02,  0.23,  0.4,  0.55, 0.7,  0.75, 0.75/)
-          ef(:,5) = (/0.01,  0.01,  0.03,  0.3,   0.4,  0.58, 0.73, 0.75, 0.79/)
-          ef(:,6) = (/0.01,  0.01,  0.13,  0.38,  0.57, 0.68, 0.80, 0.86, 0.91/)
-          ef(:,7) = (/0.01,  0.085, 0.23,  0.52,  0.68, 0.76, 0.86, 0.92, 0.95/)
-          ef(:,8) = (/0.01,  0.14,  0.32,  0.60,  0.73, 0.81, 0.90, 0.94, 0.96/)
-          ef(:,9) = (/0.025, 0.25,  0.43,  0.66,  0.78, 0.83, 0.92, 0.95, 0.96/)
-          ef(:,10)= (/0.039, 0.3,   0.46,  0.69,  0.81, 0.87, 0.93, 0.95, 0.96/)
-          ef(:,11)= (/0.095, 0.33,  0.51,  0.72,  0.82, 0.87, 0.93, 0.96, 0.97/)
-          ef(:,12)= (/0.098, 0.36,  0.51,  0.73,  0.83, 0.88, 0.93, 0.96, 0.97/)
-          ef(:,13)= (/0.1,   0.36,  0.52,  0.74,  0.83, 0.88, 0.93, 0.96, 0.97/)
-          ef(:,14)= (/0.17,  0.4,   0.54,  0.72,  0.83, 0.88, 0.94, 0.98, 1.0 /)
-          ef(:,15)= (/0.15,  0.37,  0.52,  0.74,  0.82, 0.88, 0.94, 0.98, 1.0 /)
-          ef(:,16)= (/0.11,  0.34,  0.49,  0.71,  0.83, 0.88, 0.94, 0.95, 1.0 /)
-          ef(:,17)= (/0.08,  0.29,  0.45,  0.68,  0.8,  0.86, 0.96, 0.94, 1.0 /)
-          ef(:,18)= (/0.04,  0.22,  0.39,  0.62,  0.75, 0.83, 0.92, 0.96, 1.0 /)
-          ef(:,19)= (/0.02,  0.16,  0.33,  0.55,  0.71, 0.81, 0.90, 0.94, 1.0 /)
+          collected_r = (/    2.0_wp,    3.0_wp,    4.0_wp,    6.0_wp,    8.0_wp, &
+                             10.0_wp,   15.0_wp,   20.0_wp,   25.0_wp /)
+          collector_r = (/   10.0_wp,   20.0_wp,   30.0_wp,   40.0_wp,   50.0_wp, &
+                             60.0_wp,   80.0_wp,  100.0_wp,  150.0_wp,  200.0_wp, &
+                            300.0_wp,  400.0_wp,  500.0_wp,  600.0_wp, 1000.0_wp, &
+                           1400.0_wp, 1800.0_wp, 2400.0_wp, 3000.0_wp /)
+
+          ef(:,1)  = (/ 0.017_wp, 0.027_wp, 0.037_wp, 0.052_wp, 0.052_wp,      &
+                        0.052_wp, 0.052_wp, 0.0_wp,   0.0_wp /)
+          ef(:,2)  = (/ 0.001_wp, 0.016_wp, 0.027_wp, 0.060_wp, 0.12_wp,       &
+                        0.17_wp,  0.17_wp,  0.17_wp,  0.0_wp /)
+          ef(:,3)  = (/ 0.001_wp, 0.001_wp, 0.02_wp,  0.13_wp,  0.28_wp,       &
+                        0.37_wp,  0.54_wp,  0.55_wp,  0.47_wp/)
+          ef(:,4)  = (/ 0.001_wp, 0.001_wp, 0.02_wp,  0.23_wp,  0.4_wp,        &
+                        0.55_wp,  0.7_wp,   0.75_wp,  0.75_wp/)
+          ef(:,5)  = (/ 0.01_wp,  0.01_wp,  0.03_wp,  0.3_wp,   0.4_wp,        &
+                        0.58_wp,  0.73_wp,  0.75_wp,  0.79_wp/)
+          ef(:,6)  = (/ 0.01_wp,  0.01_wp,  0.13_wp,  0.38_wp,  0.57_wp,       &
+                        0.68_wp,  0.80_wp,  0.86_wp,  0.91_wp/)
+          ef(:,7)  = (/ 0.01_wp,  0.085_wp, 0.23_wp,  0.52_wp,  0.68_wp,       &
+                        0.76_wp,  0.86_wp,  0.92_wp,  0.95_wp/)
+          ef(:,8)  = (/ 0.01_wp,  0.14_wp,  0.32_wp,  0.60_wp,  0.73_wp,       &
+                        0.81_wp,  0.90_wp,  0.94_wp,  0.96_wp/)
+          ef(:,9)  = (/ 0.025_wp, 0.25_wp,  0.43_wp,  0.66_wp,  0.78_wp,       &
+                        0.83_wp,  0.92_wp,  0.95_wp,  0.96_wp/)
+          ef(:,10) = (/ 0.039_wp, 0.3_wp,   0.46_wp,  0.69_wp,  0.81_wp,       &
+                        0.87_wp,  0.93_wp,  0.95_wp,  0.96_wp/)
+          ef(:,11) = (/ 0.095_wp, 0.33_wp,  0.51_wp,  0.72_wp,  0.82_wp,       &
+                        0.87_wp,  0.93_wp,  0.96_wp,  0.97_wp/)
+          ef(:,12) = (/ 0.098_wp, 0.36_wp,  0.51_wp,  0.73_wp,  0.83_wp,       &
+                        0.88_wp,  0.93_wp,  0.96_wp,  0.97_wp/)
+          ef(:,13) = (/ 0.1_wp,   0.36_wp,  0.52_wp,  0.74_wp,  0.83_wp,       &
+                        0.88_wp,  0.93_wp,  0.96_wp,  0.97_wp/)
+          ef(:,14) = (/ 0.17_wp,  0.4_wp,   0.54_wp,  0.72_wp,  0.83_wp,       &
+                        0.88_wp,  0.94_wp,  0.98_wp,  1.0_wp /)
+          ef(:,15) = (/ 0.15_wp,  0.37_wp,  0.52_wp,  0.74_wp,  0.82_wp,       &
+                        0.88_wp,  0.94_wp,  0.98_wp,  1.0_wp /)
+          ef(:,16) = (/ 0.11_wp,  0.34_wp,  0.49_wp,  0.71_wp,  0.83_wp,       &
+                        0.88_wp,  0.94_wp,  0.95_wp,  1.0_wp /)
+          ef(:,17) = (/ 0.08_wp,  0.29_wp,  0.45_wp,  0.68_wp,  0.8_wp,        &
+                        0.86_wp,  0.96_wp,  0.94_wp,  1.0_wp /)
+          ef(:,18) = (/ 0.04_wp,  0.22_wp,  0.39_wp,  0.62_wp,  0.75_wp,       &
+                        0.83_wp,  0.92_wp,  0.96_wp,  1.0_wp /)
+          ef(:,19) = (/ 0.02_wp,  0.16_wp,  0.33_wp,  0.55_wp,  0.71_wp,       &
+                        0.81_wp,  0.90_wp,  0.94_wp,  1.0_wp /)
 
        ENDIF
@@ -1088,23 +1153,23 @@
        ENDDO
 
-       IF ( rm < 10.0 )  THEN
-          e = 0.0
-       ELSEIF ( mean_rm < 2.0 )  THEN
-          e = 0.001
-       ELSEIF ( mean_rm >= 25.0 )  THEN
-          IF( j <= 2 )  e = 0.0
-          IF( j == 3 )  e = 0.47
-          IF( j == 4 )  e = 0.8
-          IF( j == 5 )  e = 0.9
-          IF( j >=6  )  e = 1.0
-       ELSEIF ( rm >= 3000.0 )  THEN
-          IF( i == 1 )  e = 0.02
-          IF( i == 2 )  e = 0.16
-          IF( i == 3 )  e = 0.33
-          IF( i == 4 )  e = 0.55
-          IF( i == 5 )  e = 0.71
-          IF( i == 6 )  e = 0.81
-          IF( i == 7 )  e = 0.90
-          IF( i >= 8 )  e = 0.94
+       IF ( rm < 10.0_wp )  THEN
+          e = 0.0_wp
+       ELSEIF ( mean_rm < 2.0_wp )  THEN
+          e = 0.001_wp
+       ELSEIF ( mean_rm >= 25.0_wp )  THEN
+          IF( j <= 2 )  e = 0.0_wp
+          IF( j == 3 )  e = 0.47_wp
+          IF( j == 4 )  e = 0.8_wp
+          IF( j == 5 )  e = 0.9_wp
+          IF( j >=6  )  e = 1.0_wp
+       ELSEIF ( rm >= 3000.0_wp )  THEN
+          IF( i == 1 )  e = 0.02_wp
+          IF( i == 2 )  e = 0.16_wp
+          IF( i == 3 )  e = 0.33_wp
+          IF( i == 4 )  e = 0.55_wp
+          IF( i == 5 )  e = 0.71_wp
+          IF( i == 6 )  e = 0.81_wp
+          IF( i == 7 )  e = 0.90_wp
+          IF( i >= 8 )  e = 0.94_wp
        ELSE
           x  = mean_rm - collected_r(i)
@@ -1119,5 +1184,5 @@
 
           e = ( (gg-aa)*ef(i,j) + (gg-bb)*ef(i+1,j) + (gg-cc)*ef(i,j+1) + &
-                (gg-dd)*ef(i+1,j+1) ) / (3.0*gg)
+                (gg-dd)*ef(i+1,j+1) ) / (3.0_wp * gg)
        ENDIF
 
