Index: palm/trunk/INSTALL/example_cbl_rc
===================================================================
--- palm/trunk/INSTALL/example_cbl_rc	(revision 1690)
+++ palm/trunk/INSTALL/example_cbl_rc	(revision 1691)
@@ -1,10 +1,10 @@
 
  ******************************    --------------------------------------------
- * PALM 4.0  Rev: 1655        *    atmosphere - 3D - run without 1D - prerun
+ * PALM 4.0  Rev: 1689M       *    atmosphere - 3D - run without 1D - prerun
  ******************************    --------------------------------------------
 
- Date:                 17-09-15    Run:       example_cbl         
- Time:                 11:51:15    Run-No.:   00
- Run on host:           lccrayb
+ Date:                 26-10-15    Run:       example_cbl         
+ Time:                 17:10:19    Run-No.:   00
+ Run on host:           lccrayh
  Number of PEs:               8    Processor grid (x,y): (   2,   4) calculated
  ------------------------------------------------------------------------------
@@ -91,5 +91,5 @@
 
        zp =  25.00 m   z0 = 0.1000 m   z0h = 0.10000 m   kappa = 0.40
-       Rif value range:    -5.00 <= rif <=  1.00
+       Rif value range:   ****** <= rif <= 20.00
 
 
@@ -129,5 +129,5 @@
 
 
-       Profile: pt, w"pt", w*pt*, wpt, w*2, pt*2,                 
+       Profile: pt, w"pt", w*pt*, wpt, w*2, pt*2,                            
        Output every               900.00 s
        Time averaged over         600.00 s
@@ -227,255 +227,255 @@
 ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
   0      0 00:00:00.00  20.0000A  -0.2192D -0.2169D -0.1214  0.000  1.38   0.000E+00    800.  0.106E-02  0.000E+00  0.000E+00  0.000E+00   11  32   5    5  37  29    4  26   0    0.000    0.000       0
-  0      1 00:00:20.00  20.0000A  -0.2192  -0.2169  -0.1214  0.001  0.69  -0.124E+03    100.  0.105E-02  0.948E-03  0.491E-05  0.355E-15   11  32   5    5  37  29    4  26   0    0.000    0.000       0
-  0      2 00:00:40.00  20.0000D  -0.2151  -0.2176  -0.1209  0.001  0.69  -0.125E+03    100.  0.104E-02  0.940E-03  0.802E-05  0.359E-15   11  32   5    5  37  29    4  26   0    0.000    0.000       0
-  0      3 00:01:00.00  20.0000D  -0.2107  -0.2178  -0.1204  0.001  0.69  -0.125E+03    100.  0.103E-02  0.932E-03  0.111E-04  0.363E-15   11  32   5    5  37  29    4  26   0    0.000    0.000       0
-  0      4 00:01:20.00  20.0000D  -0.2060  -0.2177  -0.1199  0.001  0.69  -0.126E+03    100.  0.102E-02  0.924E-03  0.142E-04  0.366E-15   11  32   5    4   5   2    4  26   0    0.000    0.000       0
-  0      5 00:01:40.00  20.0000D  -0.2011  -0.2184  -0.1193  0.001  0.93  -0.125E+03    250.  0.101E-02  0.916E-03  0.173E-04  0.368E-15   11  32   5    4   5   2    4  26   0    0.000    0.000       0
-  0      6 00:02:00.00  20.0000D  -0.1959  -0.2186  -0.1188  0.001  0.93  -0.124E+03    250.  0.100E-02  0.908E-03  0.204E-04  0.370E-15   11  32   5    4   5   2    4  26   0    0.000    0.000       0
-  0      7 00:02:20.00  20.0000D  -0.1942  -0.2184  -0.1182  0.001  1.22  -0.123E+03    550.  0.994E-03  0.900E-03  0.235E-04  0.371E-15   11  32   4    4   5   2    4  26   0    0.000    0.000       0
-  0      8 00:02:40.00  20.0000D  -0.1948D -0.2177D -0.1175  0.002  1.22  -0.126E+03    550.  0.204E-02  0.892E-03  0.516E-03  0.735E-13   11  32   4    4   5   2    4  26   0    0.000    0.000       0
-  0      9 00:03:00.00  20.0000D   0.3635  -0.2778  -0.1533  0.002  1.22  -0.969E+02    550.  0.201E-02  0.182E-02  0.321E-04  0.742E-15    4  35   4    7  14  12    5  10  39    0.000    0.000       0
-  0     10 00:03:20.00  20.0000D   0.3563  -0.2763  -0.1517  0.002  1.22  -0.925E+02    550.  0.198E-02  0.180E-02  0.351E-04  0.739E-15    4  35   4    7  14  12    5  10  39    0.000    0.000       0
-  0     11 00:03:40.00  20.0000D   0.3475  -0.2747  -0.1498  0.002  1.22  -0.887E+02    550.  0.195E-02  0.177E-02  0.380E-04  0.739E-15    4  35   4    6  29  30    5  10  39    0.000    0.000       0
-  0     12 00:04:00.00  20.0000D   0.3374  -0.2747  -0.1476  0.002  1.22  -0.856E+02    550.  0.193E-02  0.175E-02  0.410E-04  0.741E-15    4  35   4    6  29  30    5  10  39    0.000    0.000       0
-  0     13 00:04:20.00  20.0000D   0.3262  -0.2735  -0.1451  0.002  1.22  -0.926E+02    550.  0.190E-02  0.173E-02  0.439E-04  0.744E-15    4  35   4    6  29  30    5  10  39    0.000    0.000       0
-  0     14 00:04:40.00  20.0000D   0.3249  -0.2712  -0.1455  0.002  1.22  -0.766E+02    550.  0.188E-02  0.171E-02  0.468E-04  0.749E-15    4  35   5    6  29  30    6  23   4    0.000    0.000       0
-  0     15 00:05:00.00  20.0000D   0.3275D -0.2694D -0.1470  0.002  1.22  -0.703E+02    550.  0.293E-02  0.169E-02  0.529E-03  0.720E-13    4  35   5    7  13  38    6  23   4    0.000    0.000       0
-  0     16 00:05:20.00  20.0000D   0.3782  -0.3667  -0.2151  0.003  1.22  -0.600E+02    550.  0.288E-02  0.262E-02  0.546E-04  0.110E-14   11  16  39    7  13  12    8  21  26    0.000    0.000       0
-  0     17 00:05:40.00  20.0000D   0.3741  -0.3587  -0.2156  0.003  1.22  -0.562E+02    550.  0.284E-02  0.258E-02  0.573E-04  0.110E-14   11  16  39    7  15  26    8  21  26    0.000    0.000       0
-  0     18 00:06:00.00  20.0000D   0.3717  -0.3525  -0.2156  0.003  1.22  -0.520E+02    550.  0.279E-02  0.255E-02  0.600E-04  0.111E-14    6   3  26    7  15  26    8  21  26    0.000    0.000       0
-  0     19 00:06:20.00  20.0000D  -0.3700  -0.3448  -0.2153  0.003  1.22  -0.482E+02    550.  0.276E-02  0.251E-02  0.626E-04  0.112E-14    6  12  31    7  15  26    8  21  26    0.000    0.000       0
-  0     20 00:06:40.00  20.0000D  -0.3674  -0.3439  -0.2146  0.004  1.22  -0.433E+02    550.  0.273E-02  0.249E-02  0.652E-04  0.114E-14    6  12  31    8  34  19    8  21  26    0.000    0.000       0
-  0     21 00:07:00.00  20.0000D  -0.3632  -0.3493  -0.2134  0.004  1.22  -0.399E+02    550.  0.270E-02  0.246E-02  0.677E-04  0.116E-14    6  12  31    7  14  26    8  21  26    0.000    0.000       0
-  0     22 00:07:20.00  20.0000D  -0.3577  -0.3559   0.2292  0.005  1.22  -0.374E+02    550.  0.269E-02  0.245E-02  0.701E-04  0.120E-14    6  12  31    7  14  26    2  15  28    0.000    0.000       0
-  0     23 00:07:40.00  20.0000D  -0.3509D -0.3603D  0.2560  0.005  1.22  -0.331E+02    550.  0.377E-02  0.244E-02  0.552E-03  0.750E-13    6  12  31    7  14  26    2  15  28    0.000    0.000       0
-  0     24 00:08:00.00  20.0000D   0.4111   0.4185   0.3167  0.006  1.18  -0.251E+02    500.  0.374E-02  0.341E-02  0.770E-04  0.163E-14    8  36  11   10  34  34    2  15  28    0.000    0.000       0
-  0     25 00:08:20.00  20.0000D  -0.4110   0.4103   0.3500  0.007  1.18  -0.224E+02    500.  0.374E-02  0.340E-02  0.792E-04  0.168E-14    5  15  27   10  34  34    2  15  28    0.000    0.000       0
-  0     26 00:08:40.00  20.0000D  -0.4162   0.3992   0.3893  0.008  1.18  -0.200E+02    500.  0.375E-02  0.342E-02  0.812E-04  0.175E-14    5  15  27   10  34  34    2  15  28    0.000    0.000       0
-  0     27 00:09:00.00  20.0000D  -0.4207   0.3858   0.4347  0.009  1.18  -0.177E+02    500.  0.381E-02  0.347E-02  0.832E-04  0.184E-14    5  15  27   10  34  34    2  15  28    0.000    0.000       0
-  0     28 00:09:20.00  20.0000D  -0.4246  -0.3825   0.4864  0.010  1.18  -0.157E+02    500.  0.390E-02  0.355E-02  0.850E-04  0.195E-14    5  15  27    9  21  22    2  15  28    0.000    0.000       0
-  0     29 00:09:40.00  20.0000D  -0.4283  -0.3813   0.5443  0.011  1.18  -0.143E+02    500.  0.405E-02  0.368E-02  0.866E-04  0.209E-14    5  15  27    9  21  22    2  15  28    0.000    0.000       0
-  0     30 00:10:00.00  20.0000D  -0.4322D -0.3772D  0.6082  0.013  1.18  -0.125E+02    500.  0.530E-02  0.387E-02  0.555E-03  0.730E-13    5  15  27    9  21  22    2  15  28    0.000    0.000       0
-  0     31 00:10:20.00  20.0000D  -0.4451   0.4333   0.6835  0.014  1.18  -0.125E+02    500.  0.557E-02  0.505E-02  0.911E-04  0.276E-14    6  11  30    9  20  25    3  14  27    0.000    0.000       0
-  0     32 00:10:40.00  20.0000D  -0.4498   0.4329   0.7743  0.016  1.18  -0.995E+01    500.  0.598E-02  0.541E-02  0.920E-04  0.300E-14    6  11  30    9  20  25    3  14  27    0.000    0.000       0
-  0     33 00:11:00.00  20.0000D  -0.4499   0.4284   0.8794  0.018  1.18  -0.865E+01    500.  0.655E-02  0.591E-02  0.925E-04  0.329E-14    6  11  30    9  20  25    3  15  28    0.000    0.000       0
-  0     34 00:11:20.00  20.0000D  -0.4686   0.4203   1.0077  0.020  1.18  -0.770E+01    500.  0.733E-02  0.660E-02  0.926E-04  0.365E-14    1  15  30    9  20  25    3  15  28    0.000    0.000       0
-  0     35 00:11:40.00  20.0000A  -0.5131   0.4390   1.1411  0.023  1.18  -0.677E+01    500.  0.839E-02  0.754E-02  0.924E-04  0.407E-14    5  15  26    1  13  27    3  15  28    0.000    0.000       0
-  0     36 00:12:00.00  20.0000A  -0.5579   0.4874   1.2860  0.026  1.18  -0.602E+01    500.  0.980E-02  0.879E-02  0.919E-04  0.459E-14    1  14  30    1  17  36    3  20  36    0.000    0.000       0
-  0     37 00:12:20.00  20.0000A  -0.6069   0.5356   1.4354  0.028  1.18  -0.548E+01    500.  0.117E-01  0.104E-01  0.913E-04  0.519E-14    1  14  30    1  17  36    3  19  36    0.000    0.000       0
-  0     38 00:12:40.00  20.0000A  -0.6537   0.5816   1.6319  0.031  1.05  -0.512E+01    350.  0.141E-01  0.126E-01  0.907E-04  0.591E-14    1  14  30    1  17  36    4  20  36    0.000    0.000       0
-  0     39 00:13:00.00  20.0000A  -0.6962   0.6231   1.8563  0.034  1.18  -0.448E+01    500.  0.171E-01  0.153E-01  0.907E-04  0.675E-14    1  14  30    1  17  36    4  20  36    0.000    0.000       0
-  0     40 00:13:20.00  20.0000A  -0.7336   0.6662   2.0403  0.038  1.09  -0.414E+01    400.  0.210E-01  0.188E-01  0.916E-04  0.772E-14    1  16  29    1  29  28    4  19  36    0.000    0.000       0
-  0     41 00:13:40.00  20.0000A  -0.7826   0.7271   2.2419  0.041  1.09  -0.385E+01    400.  0.259E-01  0.232E-01  0.939E-04  0.884E-14    1  16  29    1  20  22    5  19  36    0.000    0.000       0
-  0     42 00:13:58.00  18.0000A  -0.8274   0.7915   2.4938  0.044  1.14  -0.346E+01    450.  0.312E-01  0.283E-01  0.874E-04  0.902E-14    1  15  29    1  20  22    5  19  36    0.000    0.000       0
-  0     43 00:14:14.70  16.7000A  -0.8825   0.8465   2.6922  0.046  1.14  -0.327E+01    450.  0.370E-01  0.339E-01  0.846E-04  0.939E-14    1   2  23    1  20  22    5  19  36    0.000    0.000       0
-  0     44 00:14:30.20  15.5000A  -0.9373   0.8934   2.8940  0.048  1.18  -0.311E+01    500.  0.432E-01  0.399E-01  0.822E-04  0.968E-14    1   2  23    1  20  22    6  19  36    0.000    0.000       0
-  0     45 00:14:44.70  14.5000A  -0.9840   0.9319   3.1005  0.050  1.18  -0.302E+01    500.  0.497E-01  0.462E-01  0.810E-04  0.997E-14    1   2  23    1  20  22    6  19  36    0.000    0.000       0
-  0     46 00:14:58.50  13.8000A  -1.0209   0.9629   3.2577  0.052  1.22  -0.317E+01    550.  0.566E-01  0.529E-01  0.813E-04  0.104E-13    1   2  23    1  20  22    6  19  36    0.000    0.000       0
-  0     47 00:15:11.50  13.0000A   1.0590   0.9874   3.4608  0.053  1.22  -0.294E+01    550.  0.637E-01  0.599E-01  0.809E-04  0.106E-13    1  31  18    1  20  22    7  19  36    0.000    0.000       0
-  0     48 00:15:23.90  12.4000A   1.1029   1.0076   3.6147  0.055  1.28  -0.287E+01    650.  0.711E-01  0.671E-01  0.815E-04  0.109E-13    1  31  18    1  29  28    7  19  36    0.000    0.000       0
-  0     49 00:15:35.90  12.0000A   1.1393   1.0350   3.7578  0.056  1.28  -0.277E+01    650.  0.787E-01  0.746E-01  0.832E-04  0.113E-13    1  31  18    1  20  23    8  19  36    0.000    0.000       0
-  0     50 00:15:47.40  11.5000A   1.1689   1.0620   3.9096  0.057  1.29  -0.265E+01    650.  0.865E-01  0.822E-01  0.842E-04  0.116E-13    1  31  18    1  20  23    8  19  36    0.000    0.000       0
-  0     51 00:15:58.70  11.3000A   1.1914   1.0868   3.9957  0.058  1.29  -0.255E+01    650.  0.945E-01  0.900E-01  0.870E-04  0.121E-13    1  31  18    1  20  23    9  19  36    0.000    0.000       0
-  0     52 00:16:09.60  10.9000A   1.2072   1.1100   4.1423  0.059  1.29  -0.247E+01    650.  0.103E+00  0.980E-01  0.882E-04  0.124E-13    1  31  18    1  20  23    9  19  36    0.000    0.000       0
-  0     53 00:16:20.30  10.7000A   1.2163   1.1311   4.2098  0.059  1.38  -0.241E+01    800.  0.111E+00  0.106E+00  0.907E-04  0.129E-13    1  31  18    1  20  23    9  19  36    0.000    0.000       0
-  0     54 00:16:30.70  10.4000A   1.2230   1.1501   4.3170  0.060  1.38  -0.239E+01    800.  0.119E+00  0.114E+00  0.923E-04  0.132E-13    1  30  18    1  20  23   10  19  36    0.000    0.000       0
-  0     55 00:16:40***  10.3000A   1.2285   1.1668   4.3818  0.061  1.38  -0.237E+01    800.  0.127E+00  0.122E+00  0.954E-04  0.137E-13    1  30  18    1  20  23   10  19  36    0.000    0.000       0
-  0     56 00:16:51.10  10.1000A   1.2378   1.2243   4.4452  0.061  1.38  -0.237E+01    800.  0.136E+00  0.131E+00  0.977E-04  0.140E-13    1  37  15    7  12   8   11  19  36    0.000    0.000       0
-  0     57 00:17:01.09   9.9900A   1.2531   1.2263   4.5048  0.062  1.38  -0.241E+01    800.  0.144E+00  0.139E+00  0.101E-03  0.145E-13    1  37  15    6  20  34   11  19  36    0.000    0.000       0
-  0     58 00:17:11.04   9.9500A  -1.3217   1.2613   4.5240  0.062  1.38  -0.242E+01    800.  0.153E+00  0.147E+00  0.104E-03  0.150E-13    4  35   3   10  17   2   12  19  36    0.000    0.000       0
-  0     59 00:17:20.87   9.8300A  -1.3776   1.3448   4.5770  0.063  1.38  -0.239E+01    800.  0.161E+00  0.156E+00  0.107E-03  0.155E-13    4  35   3   10  17   2   12  19  36    0.000    0.000       0
-  0     60 00:17:30.73   9.8600A  -1.4186   1.2882   4.5631  0.063  1.38  -0.240E+01    800.  0.170E+00  0.164E+00  0.111E-03  0.161E-13    4  35   3    9  16   3   13  19  36    0.000    0.000       0
-  0     61 00:17:40.50   9.7700A  -1.4466   1.4232   4.6056  0.064  1.41  -0.243E+01    850.  0.178E+00  0.173E+00  0.114E-03  0.166E-13    4  35   3   11  17   2   13  19  36    0.000    0.000       0
-  0     62 00:17:50.32   9.8200A  -1.4630   1.4757   4.5817  0.064  1.41  -0.251E+01    850.  0.186E+00  0.181E+00  0.119E-03  0.173E-13    4  35   3   11  17   2   13  19  36    0.000    0.000       0
-  0     63 00:18:00.12   9.8000A  -1.4689  -1.4758   4.5924  0.064  1.41  -0.244E+01    850.  0.195E+00  0.189E+00  0.122E-03  0.178E-13    4  35   3    9   4  39   14  19  36    0.000    0.000       0
-  0     64 00:18:09.98   9.8600A  -1.4900   1.5484   4.5623  0.065  1.41  -0.254E+01    850.  0.203E+00  0.198E+00  0.127E-03  0.185E-13    4  35   2   12  17   2   14  19  36    0.000    0.000       0
-  0     65 00:18:19.93   9.9500A  -1.5149   1.5649   4.5234  0.065  1.41  -0.240E+01    850.  0.211E+00  0.206E+00  0.132E-03  0.193E-13    5  35   2   12  17   2   15  19  36    0.000    0.000       0
-  0     66 00:18:29.90   9.9700A  -1.5562  -1.6149   4.5130  0.066  1.41  -0.230E+01    850.  0.219E+00  0.214E+00  0.136E-03  0.199E-13    5  35   2   10   4  39   15  15  27    0.000    0.000       0
-  0     67 00:18:39.84   9.9400A  -1.5803  -1.6213   4.5279  0.066  1.41  -0.227E+01    850.  0.227E+00  0.221E+00  0.140E-03  0.205E-13    5  35   2   10   4  39   12  15   1    0.000    0.000       0
-  0     68 00:18:49.80   9.9600A  -1.5944  -1.5975   4.5161  0.067  1.41  -0.222E+01    850.  0.234E+00  0.229E+00  0.144E-03  0.211E-13    5  35   2    9   5  38   12  15   1    0.000    0.000       0
-  0     69 00:18:59.73   9.9300A  -1.6046  -1.6886   4.5325  0.067  1.41  -0.221E+01    850.  0.241E+00  0.236E+00  0.148E-03  0.216E-13    5  35   2    9   5  38   13  15   1    0.000    0.000       0
-  0     70 00:19:09.63   9.9000A  -1.6147  -1.8090   4.5451  0.067  1.41  -0.225E+01    850.  0.247E+00  0.242E+00  0.151E-03  0.221E-13    5  35   2   10   4  38   13  15   1    0.000    0.000       0
-  0     71 00:19:19.63  10.0000A  -1.6261  -1.8785   4.4972  0.068  1.41  -0.232E+01    850.  0.253E+00  0.249E+00  0.156E-03  0.229E-13    5  35   2   10   4  38   13  15   1    0.000    0.000       0
-  0     72 00:19:29.63  10.0000A  -1.6387  -1.8839   4.4921  0.068  1.41  -0.241E+01    850.  0.259E+00  0.254E+00  0.160E-03  0.234E-13    5  35   2   10   4  38   14  15   1    0.000    0.000       0
-  0     73 00:19:39.73  10.1000A  -1.6503  -1.9429   4.4673  0.069  1.41  -0.218E+01    850.  0.264E+00  0.260E+00  0.166E-03  0.242E-13    5  35   2   11   4  38   14  15   1    0.000    0.000       0
-  0     74 00:19:49.93  10.2000A  -1.6583  -2.0326   4.3937  0.069  1.41  -0.215E+01    850.  0.269E+00  0.265E+00  0.171E-03  0.249E-13    5  35   2   11   4  38   14  15   1    0.000    0.000       0
-  0     75 00:20:00.23  10.3000A  -1.7171  -2.0769   4.3835  0.070  1.41  -0.208E+01    850.  0.273E+00  0.269E+00  0.177E-03  0.257E-13   12  36  39   12   3  38   12  35  25    0.000    0.000       0
-  0     76 00:20:10.43  10.2000A  -1.7567  -2.1408   4.4178  0.070  1.41  -0.210E+01    850.  0.277E+00  0.273E+00  0.179E-03  0.259E-13   12  36  39   12   3  38   13  35  25    0.000    0.000       0
-  0     77 00:20:20.53  10.1000A  -1.7527  -2.1271   4.4670  0.071  1.41  -0.208E+01    850.  0.280E+00  0.277E+00  0.180E-03  0.261E-13   12  36  39   12   3  38   13  35  25    0.000    0.000       0
-  0     78 00:20:30.73  10.2000A  -1.8161  -2.1682   4.4292  0.071  1.41  -0.221E+01    850.  0.283E+00  0.280E+00  0.185E-03  0.267E-13   13  36  38   13   3  38   14  35  25    0.000    0.000       0
-  0     79 00:20:40.73  10.0000A  -1.8889  -2.1900   4.4840  0.072  1.41  -0.198E+01    850.  0.285E+00  0.282E+00  0.185E-03  0.266E-13   13  36  38   13   3  38   14  35  25    0.000    0.000       0
-  0     80 00:20:50.83  10.1000A  -1.9297  -2.1973   4.4481  0.073  1.41  -0.194E+01    850.  0.286E+00  0.284E+00  0.190E-03  0.272E-13   13  36  38   14   2  38   14  35  25    0.000    0.000       0
-  0     81 00:21:01.13  10.3000A  -1.9368  -2.2598   4.3901  0.073  1.41  -0.192E+01    850.  0.288E+00  0.285E+00  0.196E-03  0.280E-13   13  36  38   14   2  38   15  35  25    0.000    0.000       0
-  0     82 00:21:11.43  10.3000A  -1.9076  -2.1711   4.3540  0.074  1.41  -0.191E+01    850.  0.288E+00  0.286E+00  0.198E-03  0.284E-13   13  36  38   14   2  38   15  35  25    0.000    0.000       0
-  0     83 00:21:22.03  10.6000A  -1.9439  -2.1446   4.2332  0.075  1.41  -0.190E+01    850.  0.288E+00  0.286E+00  0.206E-03  0.295E-13   14  36  38   15   2  38   15  35  25    0.000    0.000       0
-  0     84 00:21:33.13  11.1000A  -1.9810  -2.1166   4.0656  0.076  1.41  -0.190E+01    850.  0.288E+00  0.286E+00  0.218E-03  0.311E-13   14  36  38   15   2  38   16  35  25    0.000    0.000       0
-  0     85 00:21:44.53  11.4000A  -1.9978  -2.0805   3.9358  0.076  1.41  -0.188E+01    850.  0.288E+00  0.286E+00  0.226E-03  0.322E-13   14  36  38   15   1  38   16  35  25    0.000    0.000       0
-  0     86 00:21:56.53  12.0000A  -1.9911  -1.9954   3.7411  0.077  1.38  -0.188E+01    800.  0.287E+00  0.285E+00  0.240E-03  0.342E-13   14  36  38   15   2  38   16  35  25    0.000    0.000       0
-  0     87 00:22:09.33  12.8000A  -1.9587  -2.0083   3.5118  0.078  1.38  -0.184E+01    800.  0.286E+00  0.285E+00  0.258E-03  0.367E-13   14  36  38   17  38   9   12   6  38    0.000    0.000       0
-  0     88 00:22:22.23  12.9000A  -1.8968  -2.0019   3.4815  0.079  1.38  -0.182E+01    800.  0.285E+00  0.283E+00  0.263E-03  0.372E-13   14  36  38   17  38   9   13  20   6    0.000    0.000       0
-  0     89 00:22:35.43  13.2000A  -1.8835  -1.9266   3.4165  0.081  1.38  -0.182E+01    800.  0.283E+00  0.282E+00  0.271E-03  0.382E-13   15  35  38   17  38   9   14  36  16    0.000    0.000       0
-  0     90 00:22:48.73  13.3000A  -1.8964  -1.9624   3.3714  0.082  1.38  -0.177E+01    800.  0.281E+00  0.281E+00  0.275E-03  0.386E-13   16  35  37   10  14  36   14  36  16    0.000    0.000       0
-  0     91 00:23:02.53  13.8000A  -1.9119  -1.7922   3.2564  0.083  1.38  -0.176E+01    800.  0.280E+00  0.279E+00  0.286E-03  0.401E-13   16  35  36   10  14  36   14  36  14    0.000    0.000       0
-  0     92 00:23:16.73  14.2000A  -1.9743  -1.7683   3.1765  0.084  1.35  -0.171E+01    750.  0.277E+00  0.277E+00  0.293E-03  0.412E-13   16  35  36   11  14  36   14  19   6    0.000    0.000       0
-  0     93 00:23:31.43  14.7000A  -1.9862  -1.8340   3.0522  0.086  1.35  -0.166E+01    750.  0.275E+00  0.275E+00  0.303E-03  0.426E-13   16  35  36   11  14  36   14  19   6    0.000    0.000       0
-  0     94 00:23:46.43  15.0000A  -1.9412  -1.6691   2.9938  0.087  1.35  -0.163E+01    750.  0.272E+00  0.273E+00  0.308E-03  0.433E-13   16  35  36   11  14  36   16  18   6    0.000    0.000       0
-  0     95 00:24:01.33  14.9000A  -1.8521  -1.7158   3.0103  0.088  1.35  -0.159E+01    750.  0.269E+00  0.270E+00  0.303E-03  0.428E-13   16  35  35   11  14  32   11  22  10    0.000    0.000       0
-  0     96 00:24:16.13  14.8000A  -1.8021  -1.7470   3.0382  0.090  1.35  -0.156E+01    750.  0.266E+00  0.267E+00  0.299E-03  0.421E-13    7  20  10   11  14  32   11  22  10    0.000    0.000       0
-  0     97 00:24:31.03  14.9000A  -1.8736  -1.7532   3.0227  0.091  1.32  -0.153E+01    700.  0.263E+00  0.264E+00  0.297E-03  0.419E-13    8  20  10    1  22  29   12  22  10    0.000    0.000       0
-  0     98 00:24:45.93  14.9000A  -1.8942  -1.7566   3.0293  0.092  1.32  -0.149E+01    700.  0.259E+00  0.261E+00  0.295E-03  0.414E-13    8  20  10    1  22  29   12  22  10    0.000    0.000       0
-  0     99 00:25:00.93  15.0000A  -1.9088   1.7638   3.0033  0.094  1.32  -0.146E+01    700.  0.256E+00  0.258E+00  0.294E-03  0.411E-13    8  20   9    1   7  14   12  22  10    0.000    0.000       0
-  0    100 00:25:15.93  15.0000A  -1.9789   1.8127   3.0007  0.095  1.32  -0.147E+01    700.  0.252E+00  0.255E+00  0.292E-03  0.406E-13    8  20   9    1   7  14   13  22  10    0.000    0.000       0
-  0    101 00:25:31.03  15.1000A  -1.9401   1.8502   2.9834  0.096  1.32  -0.150E+01    700.  0.249E+00  0.252E+00  0.292E-03  0.404E-13    8  20   9    1   7  14   13  22  10    0.000    0.000       0
-  0    102 00:25:46.43  15.4000A  -1.8588   1.8909   2.9152  0.097  1.32  -0.145E+01    700.  0.245E+00  0.249E+00  0.295E-03  0.406E-13    9  20   9    1   8  13   13  22  10    0.000    0.000       0
-  0    103 00:26:01.93  15.5000A   1.8657   1.9566   2.8848  0.098  1.32  -0.144E+01    700.  0.242E+00  0.245E+00  0.295E-03  0.403E-13    8   0  24    1   8  13   14  22  10    0.000    0.000       0
-  0    104 00:26:17.53  15.6000A   1.8883   2.0109   2.8229  0.099  1.32  -0.141E+01    700.  0.238E+00  0.242E+00  0.294E-03  0.400E-13    9   0  24    1   8  14   14  22  10    0.000    0.000       0
-  0    105 00:26:33.33  15.8000A   1.8054   2.0547   2.7633  0.100  1.32  -0.137E+01    700.  0.234E+00  0.239E+00  0.296E-03  0.400E-13    9   0  24    1   8  14    8  10  12    0.000    0.000       0
-  0    106 00:26:49.33  16.0000A   1.7700   2.0820   2.7515  0.101  1.29  -0.137E+01    650.  0.231E+00  0.236E+00  0.297E-03  0.400E-13   10   0  24    1   8  14   12   8  17    0.000    0.000       0
-  0    107 00:27:04.93  15.6000A   1.7047   2.0951   2.7189  0.102  1.29  -0.157E+01    650.  0.227E+00  0.232E+00  0.287E-03  0.385E-13   10   0  24    1   8  14   12   8  17    0.000    0.000       0
-  0    108 00:27:19.33  14.4000A  -1.6865   2.1380   2.6514  0.103  1.29  -0.141E+01    650.  0.224E+00  0.229E+00  0.263E-03  0.352E-13    8  37  33    1   9  14   12   8  17    0.000    0.000       0
-  0    109 00:27:32.93  13.6000A   1.7101   2.1750   2.6464  0.103  1.29  -0.138E+01    650.  0.221E+00  0.226E+00  0.246E-03  0.328E-13   10  10   4    1   9  14    6  12   0    0.000    0.000       0
-  0    110 00:27:46.33  13.4000A   1.7037   2.1976   2.6700  0.103  1.32  -0.136E+01    700.  0.218E+00  0.224E+00  0.240E-03  0.319E-13   10  10   4    1   9  14    9  10  11    0.000    0.000       0
-  0    111 00:27:59.43  13.1000A  -1.7529   2.2135   2.6476  0.103  1.32  -0.139E+01    700.  0.216E+00  0.221E+00  0.233E-03  0.309E-13    5  36  26    1   9  14    9  10  11    0.000    0.000       0
-  0    112 00:28:12.53  13.1000A  -1.7808   2.2249   2.6316  0.103  1.35  -0.141E+01    750.  0.213E+00  0.219E+00  0.230E-03  0.305E-13    5  36  26    1   9  14    9   9  18    0.000    0.000       0
-  0    113 00:28:26.13  13.6000A  -1.7741   2.2303   2.6725  0.103  1.35  -0.138E+01    750.  0.211E+00  0.216E+00  0.237E-03  0.313E-13    7  35  25    1   9  14    9   9  18    0.000    0.000       0
-  0    114 00:28:40.63  14.5000A  -1.8334   2.2235   2.6508  0.103  1.35  -0.137E+01    750.  0.208E+00  0.214E+00  0.250E-03  0.329E-13    7  35  25    1   9  14    9   9  18    0.000    0.000       0
-  0    115 00:28:55.53  14.9000A  -1.8662   2.2176   2.6175  0.103  1.35  -0.138E+01    750.  0.206E+00  0.212E+00  0.254E-03  0.333E-13    7  35  25    1  10  14   10   9  18    0.000    0.000       0
-  0    116 00:29:10.03  14.5000A  -1.9194   2.1970   2.5512  0.102  1.35  -0.136E+01    750.  0.203E+00  0.209E+00  0.244E-03  0.320E-13    6  35  25    1  10  14   10  11  11    0.000    0.000       0
-  0    117 00:29:24.93  14.9000A  -1.9643   2.1498   2.4976  0.102  1.35  -0.137E+01    750.  0.201E+00  0.207E+00  0.248E-03  0.324E-13    6  35  25    1  10  14   13  35   7    0.000    0.000       0
-  0    118 00:29:40.63  15.7000A  -1.9574   2.1155   2.5043  0.101  1.35  -0.135E+01    750.  0.199E+00  0.205E+00  0.259E-03  0.336E-13    6  35  25    1  10  15   13  35   7    0.000    0.000       0
-  0    119 00:29:57.63  17.0000A  -1.8768   2.0720   2.4627  0.100  1.35  -0.137E+01    750.  0.197E+00  0.203E+00  0.276E-03  0.356E-13    6  35  25    1  10  16   14  35   7    0.000    0.000       0
-  0    120 00:30:15.93  18.3000A  -1.8639   2.0444   2.4602  0.099  1.35  -0.139E+01    750.  0.195E+00  0.200E+00  0.293E-03  0.375E-13    5  35  25    1  10  16    9  11   0    0.000    0.000       0
-  0    121 00:30:33.53  17.6000A  -1.8397   2.0035   2.5563  0.099  1.38  -0.140E+01    800.  0.193E+00  0.199E+00  0.278E-03  0.354E-13    5  35  25    1  10  16    9   0  35    0.000    0.000       0
-  0    122 00:30:50.83  17.3000A   1.8017   1.9547   2.6063  0.098  1.38  -0.137E+01    800.  0.192E+00  0.197E+00  0.270E-03  0.342E-13    1  22   8    1  10  17    9   0  35    0.000    0.000       0
-  0    123 00:31:07.63  16.8000A   1.8102   1.9365   2.6768  0.097  1.38  -0.135E+01    800.  0.191E+00  0.196E+00  0.260E-03  0.327E-13    1  22   8    1  10  17   10   0  35    0.000    0.000       0
-  0    124 00:31:24.03  16.4000A   1.7964   1.9013   2.7394  0.096  1.38  -0.137E+01    800.  0.190E+00  0.195E+00  0.251E-03  0.314E-13    1  22   8    1  10  17   10   0  35    0.000    0.000       0
-  0    125 00:31:40.33  16.3000A   1.7732   1.9071   2.7604  0.096  1.38  -0.140E+01    800.  0.190E+00  0.194E+00  0.248E-03  0.309E-13    1  22   9    1  10  11   10   0  35    0.000    0.000       0
-  0    126 00:31:56.63  16.3000A   1.7798   1.9172   2.7606  0.095  1.38  -0.141E+01    800.  0.189E+00  0.193E+00  0.247E-03  0.306E-13    1  22   9    1  10  11   11   0  35    0.000    0.000       0
-  0    127 00:32:12.93  16.3000A   1.7648   1.9124   2.7688  0.094  1.38  -0.145E+01    800.  0.189E+00  0.193E+00  0.247E-03  0.304E-13    1  22   9    1  11  10   11   0  35    0.000    0.000       0
-  0    128 00:32:29.23  16.3000A   1.7373   1.9408   2.7543  0.094  1.38  -0.147E+01    800.  0.189E+00  0.193E+00  0.247E-03  0.302E-13    1  22   9    1  11  11   11  39  35    0.000    0.000       0
-  0    129 00:32:45.33  16.1000A   1.7135   1.9425   2.7997  0.093  1.38  -0.148E+01    800.  0.189E+00  0.193E+00  0.244E-03  0.298E-13    1  21   9    1  11  11   12  39  35    0.000    0.000       0
-  0    130 00:33:01.23  15.9000A   1.6901   1.9076   2.8378  0.093  1.38  -0.147E+01    800.  0.190E+00  0.193E+00  0.242E-03  0.293E-13    1  21   9    1  12  11   12  39  35    0.000    0.000       0
-  0    131 00:33:17.03  15.8000A   1.6621   1.9401   2.8413  0.092  1.38  -0.148E+01    800.  0.190E+00  0.194E+00  0.240E-03  0.291E-13    1  22   9    1  12  11   12  39  35    0.000    0.000       0
-  0    132 00:33:33.03  16.0000A   1.6506   1.9292   2.8142  0.092  1.38  -0.149E+01    800.  0.191E+00  0.194E+00  0.244E-03  0.295E-13    1  22   9    1  12  11   12  39  35    0.000    0.000       0
-  0    133 00:33:49.13  16.1000A   1.6428   1.8765   2.7978  0.091  1.35  -0.150E+01    750.  0.191E+00  0.195E+00  0.246E-03  0.297E-13    1  22   9    1  12  11   12  39  38    0.000    0.000       0
-  0    134 00:34:05.13  16.0000A   1.6340   1.8514   2.8169  0.091  1.35  -0.154E+01    750.  0.192E+00  0.196E+00  0.245E-03  0.295E-13    1  22   9    1  13  11   13  39  38    0.000    0.000       0
-  0    135 00:34:20.53  15.4000A   1.6193   1.8427   2.9195  0.091  1.35  -0.151E+01    750.  0.193E+00  0.196E+00  0.237E-03  0.285E-13    1  22   9    1  13  11   10  25  21    0.000    0.000       0
-  0    136 00:34:35.73  15.2000A   1.6398   1.8299   2.9692  0.090  1.35  -0.151E+01    750.  0.193E+00  0.197E+00  0.234E-03  0.282E-13    7  28  15    1  13  10   11  25  21    0.000    0.000       0
-  0    137 00:34:50.83  15.1000A   1.5726   1.8722   2.9776  0.090  1.35  -0.152E+01    750.  0.194E+00  0.197E+00  0.233E-03  0.281E-13    8  28  15    5  28  13   11  25  21    0.000    0.000       0
-  0    138 00:35:06.23  15.4000A   1.6086   1.8828   2.9160  0.090  1.41  -0.152E+01    850.  0.195E+00  0.198E+00  0.239E-03  0.287E-13    7  29  15    5  28  13   12  25  22    0.000    0.000       0
-  0    139 00:35:21.33  15.1000A   1.6597   1.8593   2.9792  0.089  1.41  -0.151E+01    850.  0.195E+00  0.198E+00  0.235E-03  0.283E-13    7  29  15    6  29  14   13  24  21    0.000    0.000       0
-  0    140 00:35:36.13  14.8000A   1.6300   1.8733   3.0332  0.089  1.41  -0.149E+01    850.  0.196E+00  0.199E+00  0.231E-03  0.278E-13    7  29  15    6  29  14   13  24  21    0.000    0.000       0
-  0    141 00:35:50.63  14.5000A   1.5729   1.8689   3.1043  0.089  1.41  -0.148E+01    850.  0.197E+00  0.200E+00  0.228E-03  0.273E-13    7  30  16    6  29  13   14  24  21    0.000    0.000       0
-  0    142 00:36:05.23  14.6000A   1.6148   1.9109   3.0728  0.088  1.41  -0.161E+01    850.  0.197E+00  0.200E+00  0.230E-03  0.276E-13    7  30  16    6  29  13   14  24  22    0.000    0.000       0
-  0    143 00:36:20.23  15.0000A  -1.5863   1.9488   3.0092  0.088  1.41  -0.150E+01    850.  0.198E+00  0.201E+00  0.238E-03  0.285E-13    5  10  18    5  29  12   14  24  22    0.000    0.000       0
-  0    144 00:36:35.43  15.2000A  -1.6091   1.9169   2.9513  0.088  1.41  -0.154E+01    850.  0.199E+00  0.201E+00  0.242E-03  0.290E-13    5  10  18    5  29  12   15  24  22    0.000    0.000       0
-  0    145 00:36:50.53  15.1000A  -1.6253   1.8606   2.9742  0.088  1.41  -0.156E+01    850.  0.199E+00  0.202E+00  0.242E-03  0.289E-13    5  10  18    6  29  13   14  24  23    0.000    0.000       0
-  0    146 00:37:05.33  14.8000A   1.6733   1.8247   3.0435  0.088  1.41  -0.157E+01    850.  0.200E+00  0.202E+00  0.238E-03  0.283E-13   10   2   1    6  30  13   15  24  23    0.000    0.000       0
-  0    147 00:37:20.43  15.1000A   1.6830   1.8252   2.9896  0.088  1.41  -0.160E+01    850.  0.201E+00  0.203E+00  0.243E-03  0.289E-13   10   2   1    6  29  12   15  24  23    0.000    0.000       0
-  0    148 00:37:35.73  15.3000A   1.7228   1.8007   2.9340  0.088  1.41  -0.152E+01    850.  0.201E+00  0.203E+00  0.247E-03  0.293E-13   10   2   2    6  30  12   12  26  16    0.000    0.000       0
-  0    149 00:37:51.03  15.3000A   1.7699   1.7905   2.9399  0.088  1.41  -0.150E+01    850.  0.202E+00  0.204E+00  0.249E-03  0.294E-13   10   2   2    6  30  12   12  26  16    0.000    0.000       0
-  0    150 00:38:06.43  15.4000A   1.7813   1.6850   2.9239  0.088  1.41  -0.150E+01    850.  0.203E+00  0.205E+00  0.251E-03  0.296E-13   10   2   2   10  31  16   12  26  16    0.000    0.000       0
-  0    151 00:38:21.93  15.5000A   1.7704   1.7084   2.9002  0.088  1.41  -0.151E+01    850.  0.203E+00  0.205E+00  0.254E-03  0.298E-13   10   2   2   15  31  16   13  26  16    0.000    0.000       0
-  0    152 00:38:37.63  15.7000A  -1.7634   1.7338   2.8703  0.088  1.38  -0.160E+01    800.  0.204E+00  0.206E+00  0.259E-03  0.303E-13    6  11  17   15  31  16   13  26  16    0.000    0.000       0
-  0    153 00:38:53.63  16.0000A  -1.7422   1.7364   2.8097  0.089  1.38  -0.156E+01    800.  0.205E+00  0.207E+00  0.265E-03  0.309E-13    6  11  17   15  31  16   13  26  16    0.000    0.000       0
-  0    154 00:39:09.83  16.2000A  -1.7319   1.7003   2.7847  0.089  1.38  -0.157E+01    800.  0.206E+00  0.207E+00  0.269E-03  0.313E-13    6  10  16   15  31  16   12  19  11    0.000    0.000       0
-  0    155 00:39:25.83  16.0000A  -1.6881   1.7217   2.8044  0.089  1.38  -0.151E+01    800.  0.207E+00  0.208E+00  0.266E-03  0.309E-13    6  10  16   16  32  16    6  38  37    0.000    0.000       0
-  0    156 00:39:41.43  15.6000A   1.6873   1.7292   2.8834  0.090  1.38  -0.151E+01    800.  0.208E+00  0.209E+00  0.261E-03  0.302E-13    7  13  11   16  32  16    7  38  37    0.000    0.000       0
-  0    157 00:39:56.83  15.4000A   1.6931   1.7043   2.9213  0.090  1.38  -0.151E+01    800.  0.209E+00  0.210E+00  0.258E-03  0.299E-13    7  13  11   15  32  17    7  38  37    0.000    0.000       0
-  0    158 00:40:12.03  15.2000A  -1.7631   1.6749   2.9664  0.090  1.38  -0.152E+01    800.  0.210E+00  0.211E+00  0.257E-03  0.297E-13    7  10  18   15  32  17    8  38  36    0.000    0.000       0
-  0    159 00:40:26.73  14.7000A  -1.8237   1.7154   3.0609  0.091  1.38  -0.151E+01    800.  0.211E+00  0.212E+00  0.249E-03  0.289E-13    7  10  18   15  33  17    9  38  36    0.000    0.000       0
-  0    160 00:40:41.03  14.3000A  -1.8252   1.7108   3.1425  0.091  1.38  -0.152E+01    800.  0.212E+00  0.213E+00  0.244E-03  0.283E-13    7  10  18   15  33  17    9  38  36    0.000    0.000       0
-  0    161 00:40:54.83  13.8000A  -1.8469   1.6486   3.2591  0.091  1.38  -0.148E+01    800.  0.213E+00  0.214E+00  0.237E-03  0.275E-13    7  10  17   15  33  17   10  38  36    0.000    0.000       0
-  0    162 00:41:08.43  13.6000A  -1.8831   1.6711   3.3158  0.092  1.38  -0.146E+01    800.  0.214E+00  0.216E+00  0.234E-03  0.272E-13    7  10  17   16  34  17   10  38  36    0.000    0.000       0
-  0    163 00:41:21.93  13.5000A  -1.8756   1.6558   3.3246  0.092  1.38  -0.144E+01    800.  0.216E+00  0.217E+00  0.233E-03  0.271E-13    9   9  17   16  34  17   11  38  36    0.000    0.000       0
-  0    164 00:41:35.23  13.3000A  -1.9099   1.5999   3.3883  0.092  1.38  -0.145E+01    800.  0.217E+00  0.218E+00  0.230E-03  0.267E-13    9   9  17   16  34  17   11  38  36    0.000    0.000       0
-  0    165 00:41:48.63  13.4000A  -1.9272   1.6343   3.3563  0.093  1.38  -0.148E+01    800.  0.219E+00  0.220E+00  0.232E-03  0.269E-13    9   9  17   11  17  11   11  37  36    0.000    0.000       0
-  0    166 00:42:01.73  13.1000A  -1.9304   1.6460   3.4318  0.093  1.38  -0.153E+01    800.  0.220E+00  0.221E+00  0.227E-03  0.263E-13    9   9  17   11  17  11   12  37  36    0.000    0.000       0
-  0    167 00:42:14.83  13.1000A  -1.9369   1.6727   3.4408  0.093  1.38  -0.153E+01    800.  0.222E+00  0.223E+00  0.227E-03  0.262E-13    9   9  16    6  13  23   12  37  36    0.000    0.000       0
-  0    168 00:42:27.93  13.1000A  -1.9583   1.7244   3.4359  0.094  1.38  -0.153E+01    800.  0.224E+00  0.225E+00  0.227E-03  0.262E-13    9   9  16    6  13  23   13  38  35    0.000    0.000       0
-  0    169 00:42:40.83  12.9000A  -1.9542   1.6652   3.4799  0.094  1.38  -0.148E+01    800.  0.226E+00  0.226E+00  0.224E-03  0.257E-13    9   9  16    6  13  23   13  37  35    0.000    0.000       0
-  0    170 00:42:53.43  12.6000A  -1.9277   1.6484   3.5802  0.094  1.41  -0.149E+01    850.  0.227E+00  0.228E+00  0.218E-03  0.251E-13    9   9  16    7  13  23   13  37  35    0.000    0.000       0
-  0    171 00:43:05.53  12.1000A  -1.9744   1.7970   3.7067  0.094  1.41  -0.147E+01    850.  0.229E+00  0.230E+00  0.210E-03  0.241E-13   16  38  33    7  13  23   14  37  35    0.000    0.000       0
-  0    172 00:43:17.53  12.0000A  -1.9712   1.7847   3.7576  0.094  1.41  -0.144E+01    850.  0.231E+00  0.232E+00  0.208E-03  0.239E-13   16  38  32    7  13  23   14  37  35    0.000    0.000       0
-  0    173 00:43:29.53  12.0000A  -1.9522   1.6696   3.7489  0.095  1.41  -0.143E+01    850.  0.233E+00  0.234E+00  0.207E-03  0.238E-13   16  38  32    6  13  24   13  35  37    0.000    0.000       0
-  0    174 00:43:41.43  11.9000A  -1.9097   1.6401   3.7698  0.095  1.43  -0.144E+01    900.  0.235E+00  0.236E+00  0.206E-03  0.236E-13   16  37  34    9  37  34   13  35  37    0.000    0.000       0
-  0    175 00:43:53.43  12.0000A  -1.9635   1.7114   3.7561  0.095  1.43  -0.150E+01    900.  0.237E+00  0.238E+00  0.207E-03  0.238E-13   17  37  33    7  13  24   13  35  37    0.000    0.000       0
-  0    176 00:44:05.33  11.9000A  -1.9575   1.7504   3.7690  0.095  1.43  -0.148E+01    900.  0.239E+00  0.240E+00  0.206E-03  0.236E-13   17  36  34   13  30  13   14  35  37    0.000    0.000       0
-  0    177 00:44:17.33  12.0000A  -1.9934  -1.7824   3.7510  0.095  1.43  -0.149E+01    900.  0.241E+00  0.242E+00  0.207E-03  0.237E-13   17  36  34    7   3   0   14  35  37    0.000    0.000       0
-  0    178 00:44:29.53  12.2000A  -1.9613  -1.7779   3.7032  0.095  1.43  -0.151E+01    900.  0.243E+00  0.244E+00  0.211E-03  0.241E-13   17  35  34    7   3   0   14  35  37    0.000    0.000       0
-  0    179 00:44:41.93  12.4000A  -2.0902  -1.7806   3.6302  0.095  1.43  -0.150E+01    900.  0.245E+00  0.246E+00  0.215E-03  0.245E-13   18  36  33    7   2   0   14  35  37    0.000    0.000       0
-  0    180 00:44:54.63  12.7000A  -2.1697   1.7640   3.5391  0.095  1.43  -0.150E+01    900.  0.247E+00  0.248E+00  0.220E-03  0.251E-13   18  36  33   14  30  13   14  35  37    0.000    0.000       0
-  0    181 00:45:07.73  13.1000A  -2.1866   1.8097   3.4378  0.095  1.43  -0.150E+01    900.  0.250E+00  0.250E+00  0.228E-03  0.258E-13   18  36  32   14  30  13   14  35  37    0.000    0.000       0
-  0    182 00:45:20.93  13.2000A  -2.1004   1.8603   3.4167  0.095  1.43  -0.148E+01    900.  0.252E+00  0.253E+00  0.230E-03  0.261E-13   18  36  32   14  31  13   12  27  19    0.000    0.000       0
-  0    183 00:45:33.93  13.0000A  -2.1511   1.8803   3.4715  0.095  1.43  -0.148E+01    900.  0.254E+00  0.255E+00  0.228E-03  0.257E-13   18  35  33   14  31  13   12  27  19    0.000    0.000       0
-  0    184 00:45:46.73  12.8000A  -2.0333   1.8484   3.5034  0.094  1.41  -0.148E+01    850.  0.257E+00  0.258E+00  0.226E-03  0.254E-13   18  35  33   14  31  13   13  27  19    0.000    0.000       0
-  0    185 00:45:59.43  12.7000A  -1.9856   1.7671   3.5422  0.094  1.41  -0.147E+01    850.  0.259E+00  0.260E+00  0.225E-03  0.253E-13   19  36  32   14  31  13   13  27  19    0.000    0.000       0
-  0    186 00:46:12.13  12.7000A  -1.9793   1.8141   3.5472  0.095  1.41  -0.148E+01    850.  0.261E+00  0.262E+00  0.226E-03  0.254E-13   19  36  31   15  31  13   13  27  19    0.000    0.000       0
-  0    187 00:46:24.83  12.7000A  -2.0450   1.8636   3.5335  0.095  1.41  -0.147E+01    850.  0.264E+00  0.265E+00  0.227E-03  0.255E-13   19  36  31   15  32  12   14  27  19    0.000    0.000       0
-  0    188 00:46:37.23  12.4000A  -1.9751   1.8908   3.6233  0.095  1.41  -0.146E+01    850.  0.266E+00  0.267E+00  0.223E-03  0.250E-13   19  34  34   15  32  12   12  27  17    0.000    0.000       0
-  0    189 00:46:49.33  12.1000A  -1.9859   1.8800   3.7117  0.095  1.41  -0.147E+01    850.  0.268E+00  0.270E+00  0.218E-03  0.245E-13   19  34  35   15  32  13   12  27  17    0.000    0.000       0
-  0    190 00:47:01.23  11.9000A  -1.9649   1.8669   3.7906  0.095  1.43  -0.153E+01    900.  0.270E+00  0.272E+00  0.215E-03  0.243E-13   19  34  35   15  32  13   13  27  17    0.000    0.000       0
-  0    191 00:47:12.83  11.6000A  -1.9177   1.8155   3.8747  0.095  1.43  -0.152E+01    900.  0.272E+00  0.274E+00  0.210E-03  0.238E-13   19  34  35   15  33  12   13  27  17    0.000    0.000       0
-  0    192 00:47:24.33  11.5000A  -1.9172   1.8023   3.9215  0.095  1.43  -0.149E+01    900.  0.274E+00  0.276E+00  0.209E-03  0.237E-13   19  33  33   15  33  12   13  27  17    0.000    0.000       0
-  0    193 00:47:35.63  11.3000A  -1.9288   1.7679   3.9898  0.095  1.43  -0.153E+01    900.  0.275E+00  0.278E+00  0.205E-03  0.234E-13   19  33  34   17  31  16   14  27  17    0.000    0.000       0
-  0    194 00:47:46.83  11.2000A  -1.9283   1.7499   4.0174  0.095  1.43  -0.158E+01    900.  0.277E+00  0.279E+00  0.203E-03  0.233E-13   19  33  34   17  31  16   14  27  17    0.000    0.000       0
-  0    195 00:47:57.93  11.1000A  -1.9260   1.8121   4.0520  0.096  1.43  -0.156E+01    900.  0.278E+00  0.280E+00  0.202E-03  0.232E-13   19  33  33   18  31  16   15  27  17    0.000    0.000       0
-  0    196 00:48:09.03  11.1000A   1.9138   1.8812   4.0589  0.096  1.43  -0.151E+01    900.  0.279E+00  0.282E+00  0.202E-03  0.233E-13   19  26  23   18  31  16   15  27  17    0.000    0.000       0
-  0    197 00:48:20.23  11.2000A   1.9491   1.8188   4.0098  0.096  1.43  -0.165E+01    900.  0.279E+00  0.283E+00  0.204E-03  0.236E-13   19  26  23   10  18   8   15  27  17    0.000    0.000       0
-  0    198 00:48:31.53  11.3000A   1.9486   1.8243   3.9990  0.096  1.43  -0.154E+01    900.  0.280E+00  0.283E+00  0.206E-03  0.240E-13   19  26  23   18  32  16   16  27  17    0.000    0.000       0
-  0    199 00:48:43.03  11.5000A   1.9928   1.8240   3.9242  0.097  1.43  -0.147E+01    900.  0.280E+00  0.284E+00  0.210E-03  0.245E-13   19  25  23   18  32  16   16  27  17    0.000    0.000       0
-  0    200 00:48:54.93  11.9000A   2.0447  -1.8354   3.7936  0.097  1.43  -0.147E+01    900.  0.281E+00  0.284E+00  0.218E-03  0.255E-13   19  25  23   11  39   1   16  27  17    0.000    0.000       0
-  0    201 00:49:06.83  11.9000A   2.0545  -1.8822   3.7669  0.097  1.43  -0.154E+01    900.  0.281E+00  0.284E+00  0.219E-03  0.256E-13   19  25  23   11  39   1   16  26  17    0.000    0.000       0
-  0    202 00:49:18.93  12.1000A   2.0294  -1.8918   3.7184  0.098  1.43  -0.146E+01    900.  0.281E+00  0.284E+00  0.224E-03  0.261E-13   19  25  23   11  39   1   16  26  17    0.000    0.000       0
-  0    203 00:49:30.93  12.0000A   2.0628  -1.8742   3.7491  0.098  1.43  -0.143E+01    900.  0.281E+00  0.284E+00  0.223E-03  0.260E-13   19  24  23   11  39   1   10  14  22    0.000    0.000       0
-  0    204 00:49:42.93  12.0000A   2.0971  -1.8691   3.7547  0.098  1.43  -0.143E+01    900.  0.281E+00  0.284E+00  0.225E-03  0.260E-13   19  24  23   12  38   1   10  14  22    0.000    0.000       0
-  0    205 00:49:55.03  12.1000A  -2.0862  -1.9102   3.7240  0.099  1.43  -0.143E+01    900.  0.281E+00  0.284E+00  0.228E-03  0.263E-13   17  37  32   12  38   1   11  14  22    0.000    0.000       0
-  0    206 00:50:07.23  12.2000A  -2.0905  -1.9145   3.7023  0.099  1.41  -0.137E+01    850.  0.281E+00  0.284E+00  0.231E-03  0.266E-13   17  37  32   12  38   1   11  14  22    0.000    0.000       0
-  0    207 00:50:19.73  12.5000A  -2.1722  -1.9829   3.6048  0.099  1.41  -0.135E+01    850.  0.281E+00  0.284E+00  0.238E-03  0.274E-13   17  36  31   16  11  21   12  14  22    0.000    0.000       0
-  0    208 00:50:32.33  12.6000A  -2.2555  -2.0562   3.5616  0.100  1.41  -0.135E+01    850.  0.281E+00  0.285E+00  0.241E-03  0.277E-13   17  36  31   16  11  21   12  14  22    0.000    0.000       0
-  0    209 00:50:45.33  13.0000A  -2.2942  -2.0814   3.4709  0.100  1.41  -0.135E+01    850.  0.281E+00  0.285E+00  0.250E-03  0.286E-13   17  36  31   16  11  21   11  14  21    0.000    0.000       0
-  0    210 00:50:58.23  12.9000A  -2.2962  -2.0729   3.4884  0.101  1.41  -0.134E+01    850.  0.281E+00  0.285E+00  0.249E-03  0.285E-13   17  36  31   16  11  21   13  13  21    0.000    0.000       0
-  0    211 00:51:11.13  12.9000A  -2.2708  -2.1941   3.4777  0.101  1.41  -0.133E+01    850.  0.282E+00  0.285E+00  0.250E-03  0.285E-13   17  36  31   17  10  21   13  13  21    0.000    0.000       0
-  0    212 00:51:24.53  13.4000A  -2.2516  -2.2734   3.3579  0.101  1.38  -0.133E+01    800.  0.282E+00  0.286E+00  0.261E-03  0.296E-13   17  36  30   17  10  21   13  13  21    0.000    0.000       0
-  0    213 00:51:37.63  13.1000A  -2.3359  -2.3003   3.4415  0.101  1.38  -0.132E+01    800.  0.282E+00  0.286E+00  0.255E-03  0.289E-13   16  36  29   17  10  21   10  29  22    0.000    0.000       0
-  0    214 00:51:50.73  13.1000A  -2.3172  -2.2864   3.4327  0.101  1.38  -0.131E+01    800.  0.283E+00  0.286E+00  0.255E-03  0.289E-13   16  36  29   17  10  20   10  29  22    0.000    0.000       0
-  0    215 00:52:03.93  13.2000A  -2.3376  -2.2619   3.4039  0.102  1.38  -0.130E+01    800.  0.283E+00  0.287E+00  0.257E-03  0.291E-13   16  36  28   17  10  20   11  15  20    0.000    0.000       0
-  0    216 00:52:17.33  13.4000A  -2.3173  -2.2088   3.3700  0.102  1.38  -0.129E+01    800.  0.283E+00  0.287E+00  0.261E-03  0.295E-13   16  36  28   18   9  21   11  15  20    0.000    0.000       0
-  0    217 00:52:30.53  13.2000A  -2.2072  -2.2495   3.4138  0.102  1.38  -0.129E+01    800.  0.284E+00  0.287E+00  0.256E-03  0.291E-13   16  36  28   18   9  21   12  15  20    0.000    0.000       0
-  0    218 00:52:43.93  13.4000A  -2.1856  -2.2585   3.3599  0.102  1.38  -0.129E+01    800.  0.284E+00  0.288E+00  0.260E-03  0.295E-13   16  35  28   18   9  21   12  15  20    0.000    0.000       0
-  0    219 00:52:57.13  13.2000A  -2.1054  -2.2597   3.3981  0.101  1.38  -0.130E+01    800.  0.285E+00  0.288E+00  0.256E-03  0.290E-13   16  35  28   18   8  21   13  15  20    0.000    0.000       0
-  0    220 00:53:10.63  13.5000A  -2.0659  -2.2661   3.3364  0.101  1.38  -0.131E+01    800.  0.285E+00  0.289E+00  0.261E-03  0.296E-13   16  35  27   18   8  21   13  15  20    0.000    0.000       0
-  0    221 00:53:24.03  13.4000A  -2.0469  -2.2412   3.3682  0.101  1.38  -0.136E+01    800.  0.286E+00  0.289E+00  0.260E-03  0.293E-13   15  36  26   18   8  21   14  15  20    0.000    0.000       0
-  0    222 00:53:37.63  13.6000A  -2.0226   2.2442   3.3003  0.101  1.38  -0.134E+01    800.  0.287E+00  0.290E+00  0.264E-03  0.298E-13   15  36  26   11   1  33   14  15  20    0.000    0.000       0
-  0    223 00:53:51.33  13.7000A  -2.0032   2.2579   3.2736  0.100  1.38  -0.134E+01    800.  0.288E+00  0.291E+00  0.267E-03  0.300E-13   15  35  26   11   1  33   15  15  20    0.000    0.000       0
-  0    224 00:54:05.33  14.0000A  -1.9354   2.2267   3.2037  0.100  1.43  -0.135E+01    900.  0.289E+00  0.292E+00  0.274E-03  0.306E-13   15  35  26   11   1  33   15  15  20    0.000    0.000       0
-  0    225 00:54:19.33  14.0000A   1.8526   2.1765   3.2042  0.100  1.43  -0.137E+01    900.  0.290E+00  0.292E+00  0.275E-03  0.306E-13   18  37   3   12   2  33    8  24  19    0.000    0.000       0
-  0    226 00:54:33.33  14.0000A   1.8286   2.1939   3.2118  0.099  1.43  -0.137E+01    900.  0.291E+00  0.293E+00  0.276E-03  0.306E-13   18  37   4   13   2  32    9  24  19    0.000    0.000       0
-  0    227 00:54:47.03  13.7000A  -1.8187   2.2026   3.2762  0.099  1.43  -0.137E+01    900.  0.291E+00  0.294E+00  0.271E-03  0.300E-13   14  34  34   13   2  32    7  24  19    0.000    0.000       0
-  0    228 00:55:00.63  13.6000A  -1.9592   2.2377   3.3122  0.099  1.43  -0.141E+01    900.  0.292E+00  0.294E+00  0.269E-03  0.299E-13   14  35  33   12   2  32    7  24  19    0.000    0.000       0
-  0    229 00:55:13.83  13.2000A  -2.0859   2.2217   3.4151  0.098  1.43  -0.136E+01    900.  0.292E+00  0.295E+00  0.262E-03  0.291E-13   14  35  33   12   2  32    8  24  19    0.000    0.000       0
-  0    230 00:55:26.83  13.0000A  -2.1155   2.1620   3.4681  0.098  1.43  -0.135E+01    900.  0.293E+00  0.295E+00  0.259E-03  0.287E-13   14  35  33   12   2  32    8  24  19    0.000    0.000       0
-  0    231 00:55:39.83  13.0000A  -2.1634   2.1815   3.4743  0.097  1.43  -0.138E+01    900.  0.293E+00  0.296E+00  0.259E-03  0.288E-13   14  36  32   12   3  32    8  24  19    0.000    0.000       0
-  0    232 00:55:52.63  12.8000A  -2.2142   2.2026   3.5212  0.097  1.43  -0.136E+01    900.  0.294E+00  0.296E+00  0.256E-03  0.284E-13   14  36  32   12   3  32    9  24  19    0.000    0.000       0
-  0    233 00:56:05.13  12.5000A  -2.2226   2.1848   3.5908  0.097  1.43  -0.134E+01    900.  0.294E+00  0.296E+00  0.251E-03  0.278E-13   14  36  32   12   3  32    9  24  19    0.000    0.000       0
-  0    234 00:56:17.53  12.4000A  -2.1962   2.1370   3.6283  0.096  1.43  -0.135E+01    900.  0.295E+00  0.297E+00  0.250E-03  0.277E-13   14  36  32   12   3  32    9  24  19    0.000    0.000       0
-  0    235 00:56:29.73  12.2000A  -2.1538   2.0662   3.6908  0.096  1.43  -0.137E+01    900.  0.295E+00  0.297E+00  0.246E-03  0.273E-13   14  37  32   12   3  32   10  24  20    0.000    0.000       0
-  0    236 00:56:41.63  11.9000A   2.2926   1.9795   3.7819  0.096  1.40  -0.141E+01    850.  0.296E+00  0.298E+00  0.241E-03  0.266E-13   13  23  23   12   4  32   10  24  20    0.000    0.000       0
-  0    237 00:56:53.53  11.9000A   2.4879  -2.0658   3.7914  0.096  1.40  -0.156E+01    850.  0.296E+00  0.298E+00  0.241E-03  0.266E-13   13  23  23   15  14  18   10  24  20    0.000    0.000       0
-  0    238 00:57:05.23  11.7000A   2.5308  -2.0787   3.8604  0.095  1.40  -0.139E+01    850.  0.296E+00  0.298E+00  0.237E-03  0.262E-13   13  23  23   15  14  18   11  24  20    0.000    0.000       0
-  0    239 00:57:16.83  11.6000A   2.4543  -2.0061   3.8780  0.095  1.40  -0.136E+01    850.  0.297E+00  0.299E+00  0.235E-03  0.260E-13   13  23  23   15  14  18   11  24  20    0.000    0.000       0
-  0    240 00:57:28.53  11.7000A   2.5765  -1.9509   3.8404  0.095  1.43  -0.135E+01    900.  0.297E+00  0.299E+00  0.237E-03  0.261E-13   14  23  24   15  14  17   11  24  20    0.000    0.000       0
-  0    241 00:57:40.43  11.9000A   2.7843  -1.9425   3.7828  0.094  1.43  -0.135E+01    900.  0.297E+00  0.299E+00  0.241E-03  0.265E-13   14  23  24   15  13  17   11  24  20    0.000    0.000       0
-  0    242 00:57:52.43  12.0000A   2.7850  -1.9770   3.7573  0.094  1.43  -0.136E+01    900.  0.297E+00  0.299E+00  0.243E-03  0.267E-13   14  23  24   15  13  17   12  24  20    0.000    0.000       0
-  0    243 00:58:04.43  12.0000A   2.6600  -1.9775   3.7358  0.094  1.43  -0.137E+01    900.  0.296E+00  0.298E+00  0.243E-03  0.267E-13   14  23  25   17  38   6   12  24  20    0.000    0.000       0
-  0    244 00:58:16.63  12.2000A   2.5855  -1.9419   3.6974  0.093  1.43  -0.138E+01    900.  0.296E+00  0.298E+00  0.247E-03  0.271E-13   15  23  24   17  38   6   12  24  20    0.000    0.000       0
-  0    245 00:58:28.83  12.2000A   2.6669   1.9855   3.6789  0.093  1.43  -0.138E+01    900.  0.295E+00  0.298E+00  0.247E-03  0.272E-13   15  23  25    9  17  24   11  23  18    0.000    0.000       0
-  0    246 00:58:40.83  12.0000A   2.5808   2.0433   3.7357  0.092  1.43  -0.140E+01    900.  0.295E+00  0.297E+00  0.243E-03  0.267E-13   15  23  25    9  17  24   11  23  18    0.000    0.000       0
-  0    247 00:58:52.83  12.0000A   2.4882   2.0625   3.7551  0.092  1.43  -0.142E+01    900.  0.294E+00  0.296E+00  0.243E-03  0.268E-13   15  23  26    9  17  24   11  23  18    0.000    0.000       0
-  0    248 00:59:04.73  11.9000A   2.3305   2.0541   3.7681  0.092  1.43  -0.142E+01    900.  0.293E+00  0.296E+00  0.241E-03  0.266E-13   15  23  26    9  17  24   12  23  18    0.000    0.000       0
-  0    249 00:59:16.63  11.9000A  -2.2770   2.0301   3.7872  0.091  1.43  -0.145E+01    900.  0.293E+00  0.295E+00  0.242E-03  0.266E-13   15  23  12    9  17  24   12  23  18    0.000    0.000       0
-  0    250 00:59:28.33  11.7000A  -2.3207  -2.0141   3.8619  0.091  1.43  -0.143E+01    900.  0.292E+00  0.294E+00  0.238E-03  0.262E-13   17  18  13   16  36   7   11  22  18    0.000    0.000       0
-  0    251 00:59:39.73  11.4000A  -2.3017   2.0035   3.9583  0.091  1.43  -0.144E+01    900.  0.291E+00  0.293E+00  0.232E-03  0.256E-13   17  18  13    9  18  24   12  22  18    0.000    0.000       0
-  0    252 00:59:50.93  11.2000A  -2.2327   2.0003   4.0168  0.091  1.43  -0.152E+01    900.  0.290E+00  0.292E+00  0.229E-03  0.252E-13   16  23  11    9  18  24   13  22  18    0.000    0.000       0
-  0    253 01:00:01.93  11.0000A  -2.2037   1.9839   4.0832  0.090  1.43  -0.147E+01    900.  0.289E+00  0.291E+00  0.225E-03  0.248E-13   16  23  11    9  18  24   13  22  18    0.000    0.000       0
+  0      1 00:00:20.00  20.0000A  -0.2192  -0.2169  -0.1214  0.007  0.69  -0.209E+02    100.  0.105E-02  0.948E-03  0.491E-05  0.355E-15   11  32   5    5  37  29    4  26   0    0.000    0.000       0
+  0      2 00:00:40.00  20.0000D  -0.2151  -0.2176  -0.1209  0.007  0.69  -0.211E+02    100.  0.104E-02  0.940E-03  0.803E-05  0.359E-15   11  32   5    5  37  29    4  26   0    0.000    0.000       0
+  0      3 00:01:00.00  20.0000D  -0.2107  -0.2178  -0.1204  0.007  0.69  -0.212E+02    100.  0.103E-02  0.932E-03  0.111E-04  0.363E-15   11  32   5    5  37  29    4  26   0    0.000    0.000       0
+  0      4 00:01:20.00  20.0000D  -0.2060  -0.2177  -0.1199  0.007  0.69  -0.212E+02    100.  0.102E-02  0.924E-03  0.142E-04  0.366E-15   11  32   5    4   5   2    4  26   0    0.000    0.000       0
+  0      5 00:01:40.00  20.0000D  -0.2011  -0.2184  -0.1194  0.007  0.93  -0.212E+02    250.  0.101E-02  0.916E-03  0.173E-04  0.369E-15   11  32   5    4   5   2    4  26   0    0.000    0.000       0
+  0      6 00:02:00.00  20.0000D  -0.1959  -0.2186  -0.1188  0.007  0.93  -0.210E+02    250.  0.100E-02  0.908E-03  0.204E-04  0.370E-15   11  32   5    4   5   2    4  26   0    0.000    0.000       0
+  0      7 00:02:20.00  20.0000D  -0.1942  -0.2183  -0.1182  0.007  1.22  -0.208E+02    550.  0.994E-03  0.900E-03  0.235E-04  0.371E-15   11  32   4    4   5   2    4  26   0    0.000    0.000       0
+  0      8 00:02:40.00  20.0000D  -0.1948D -0.2177D -0.1175  0.009  1.22  -0.172E+02    550.  0.204E-02  0.892E-03  0.516E-03  0.735E-13   11  32   4    4   5   2    4  26   0    0.000    0.000       0
+  0      9 00:03:00.00  20.0000D   0.3635  -0.2778  -0.1533  0.009  1.22  -0.163E+02    550.  0.201E-02  0.182E-02  0.321E-04  0.743E-15    4  35   4    7  14  12    5  10  39    0.000    0.000       0
+  0     10 00:03:20.00  20.0000D   0.3563  -0.2763  -0.1517  0.010  1.22  -0.156E+02    550.  0.198E-02  0.180E-02  0.351E-04  0.740E-15    4  35   4    7  14  12    5  10  39    0.000    0.000       0
+  0     11 00:03:40.00  20.0000D   0.3475  -0.2747  -0.1498  0.010  1.22  -0.150E+02    550.  0.195E-02  0.177E-02  0.381E-04  0.740E-15    4  35   4    6  29  30    5  10  39    0.000    0.000       0
+  0     12 00:04:00.00  20.0000D   0.3374  -0.2747  -0.1476  0.010  1.22  -0.146E+02    550.  0.193E-02  0.175E-02  0.410E-04  0.742E-15    4  35   4    6  29  30    5  10  39    0.000    0.000       0
+  0     13 00:04:20.00  20.0000D   0.3262  -0.2735  -0.1451  0.011  1.22  -0.156E+02    550.  0.190E-02  0.173E-02  0.439E-04  0.745E-15    4  35   4    6  29  30    5  10  39    0.000    0.000       0
+  0     14 00:04:40.00  20.0000D   0.3249  -0.2712  -0.1455  0.012  1.22  -0.129E+02    550.  0.188E-02  0.171E-02  0.468E-04  0.750E-15    4  35   5    6  29  30    6  23   4    0.000    0.000       0
+  0     15 00:05:00.00  20.0000D   0.3275D -0.2694D -0.1470  0.013  1.22  -0.110E+02    550.  0.293E-02  0.169E-02  0.529E-03  0.720E-13    4  35   5    7  13  38    6  23   4    0.000    0.000       0
+  0     16 00:05:20.00  20.0000D   0.3781  -0.3667  -0.2151  0.014  1.22  -0.105E+02    550.  0.288E-02  0.262E-02  0.547E-04  0.110E-14   11  16  39    7  13  12    8  21  26    0.000    0.000       0
+  0     17 00:05:40.00  20.0000D   0.3741  -0.3587  -0.2156  0.014  1.22  -0.994E+01    550.  0.284E-02  0.258E-02  0.574E-04  0.110E-14   11  16  39    7  15  26    8  21  26    0.000    0.000       0
+  0     18 00:06:00.00  20.0000D   0.3717  -0.3525  -0.2156  0.015  1.22  -0.934E+01    550.  0.279E-02  0.255E-02  0.600E-04  0.111E-14    6   3  26    7  15  26    8  21  26    0.000    0.000       0
+  0     19 00:06:20.00  20.0000D  -0.3700  -0.3447  -0.2153  0.016  1.22  -0.884E+01    550.  0.276E-02  0.251E-02  0.627E-04  0.112E-14    6  12  31    7  15  26    8  21  26    0.000    0.000       0
+  0     20 00:06:40.00  20.0000D  -0.3674  -0.3439  -0.2146  0.018  1.22  -0.790E+01    550.  0.273E-02  0.249E-02  0.652E-04  0.114E-14    6  12  31    8  34  19    8  21  26    0.000    0.000       0
+  0     21 00:07:00.00  20.0000D  -0.3633  -0.3493  -0.2135  0.019  1.22  -0.754E+01    550.  0.270E-02  0.246E-02  0.678E-04  0.117E-14    6  12  31    7  14  26    8  21  26    0.000    0.000       0
+  0     22 00:07:20.00  20.0000D  -0.3577  -0.3559   0.2347  0.020  1.22  -0.721E+01    550.  0.268E-02  0.245E-02  0.703E-04  0.120E-14    6  12  31    7  14  26    2  15  28    0.000    0.000       0
+  0     23 00:07:40.00  20.0000D  -0.3509D -0.3603D  0.2630  0.022  1.22  -0.561E+01    550.  0.377E-02  0.244E-02  0.553E-03  0.750E-13    6  12  31    7  14  26    2  15  28    0.000    0.000       0
+  0     24 00:08:00.00  20.0000D   0.4111   0.4184   0.3257  0.023  1.18  -0.518E+01    500.  0.374E-02  0.341E-02  0.772E-04  0.164E-14    8  36  11   10  34  34    2  15  28    0.000    0.000       0
+  0     25 00:08:20.00  20.0000D  -0.4114   0.4102   0.3617  0.025  1.18  -0.480E+01    500.  0.373E-02  0.340E-02  0.794E-04  0.169E-14    5  15  27   10  34  34    2  15  28    0.000    0.000       0
+  0     26 00:08:40.00  20.0000D  -0.4168   0.3992   0.4044  0.027  1.18  -0.447E+01    500.  0.375E-02  0.342E-02  0.815E-04  0.176E-14    5  15  27   10  34  34    2  15  28    0.000    0.000       0
+  0     27 00:09:00.00  20.0000D  -0.4215   0.3858   0.4541  0.029  1.18  -0.410E+01    500.  0.380E-02  0.346E-02  0.836E-04  0.185E-14    5  15  27   10  34  34    2  15  28    0.000    0.000       0
+  0     28 00:09:20.00  20.0000D  -0.4258  -0.3825   0.5110  0.031  1.18  -0.380E+01    500.  0.390E-02  0.354E-02  0.855E-04  0.196E-14    5  15  27    9  21  22    2  15  28    0.000    0.000       0
+  0     29 00:09:40.00  20.0000D  -0.4301  -0.3813   0.5753  0.033  1.18  -0.356E+01    500.  0.405E-02  0.368E-02  0.872E-04  0.210E-14    5  15  27    9  21  22    2  15  28    0.000    0.000       0
+  0     30 00:10:00.00  20.0000D  -0.4347D -0.3771D  0.6466  0.036  1.18  -0.330E+01    500.  0.530E-02  0.387E-02  0.556E-03  0.730E-13    5  15  27    9  21  22    2  15  28    0.000    0.000       0
+  0     31 00:10:20.00  20.0000D  -0.4450   0.4334   0.7023  0.039  1.18  -0.309E+01    500.  0.558E-02  0.505E-02  0.922E-04  0.278E-14    6  11  30    9  20  25    3  14  27    0.000    0.000       0
+  0     32 00:10:40.00  20.0000D  -0.4498   0.4330   0.8056  0.041  1.18  -0.281E+01    500.  0.600E-02  0.542E-02  0.932E-04  0.303E-14    6  11  30    9  20  25    3  15  28    0.000    0.000       0
+  0     33 00:11:00.00  20.0000D  -0.4498   0.4286   0.9351  0.044  1.18  -0.261E+01    500.  0.658E-02  0.593E-02  0.941E-04  0.333E-14    6  11  30    9  20  25    3  15  28    0.000    0.000       0
+  0     34 00:11:20.00  20.0000A  -0.4721   0.4204   1.0744  0.047  1.18  -0.245E+01    500.  0.740E-02  0.665E-02  0.946E-04  0.370E-14    5  15  26    9  20  25    3  15  28    0.000    0.000       0
+  0     35 00:11:40.00  20.0000A  -0.5211   0.4566   1.2184  0.051  1.18  -0.226E+01    500.  0.850E-02  0.762E-02  0.949E-04  0.414E-14    5  15  26    1  13  27    3  15  28    0.000    0.000       0
+  0     36 00:12:00.00  20.0000A  -0.5629   0.5020   1.3740  0.054  1.18  -0.211E+01    500.  0.997E-02  0.892E-02  0.951E-04  0.468E-14    5  15  26    1  13  27    3  20  36    0.000    0.000       0
+  0     37 00:12:20.00  20.0000A  -0.6025   0.5465   1.5323  0.057  1.18  -0.199E+01    500.  0.119E-01  0.106E-01  0.952E-04  0.531E-14    1  14  30    1  13  27    3  20  36    0.000    0.000       0
+  0     38 00:12:40.00  20.0000A  -0.6550   0.5883   1.7521  0.061  1.05  -0.187E+01    350.  0.145E-01  0.129E-01  0.956E-04  0.605E-14    1  15  29    1  13  27    4  20  36    0.000    0.000       0
+  0     39 00:13:00.00  20.0000A  -0.7118   0.6253   1.9777  0.064  1.18  -0.178E+01    500.  0.177E-01  0.158E-01  0.965E-04  0.692E-14    1  15  29    1  13  27    4  20  36    0.000    0.000       0
+  0     40 00:13:20.00  20.0000A  -0.7645   0.6669   2.1611  0.067  1.09  -0.170E+01    400.  0.218E-01  0.195E-01  0.984E-04  0.793E-14    1  15  29    1  39   9    4  19  36    0.000    0.000       0
+  0     41 00:13:38.80  18.8000A  -0.8108   0.7281   2.3881  0.070  1.28  -0.162E+01    650.  0.267E-01  0.240E-01  0.953E-04  0.849E-14    1  15  29    1  39   8    5  19  36    0.000    0.000       0
+  0     42 00:13:56.00  17.2000A  -0.8467   0.7877   2.6238  0.073  1.14  -0.156E+01    450.  0.320E-01  0.291E-01  0.903E-04  0.874E-14    1  15  29    7  22  36    5  19  36    0.000    0.000       0
+  0     43 00:14:12.00  16.0000A  -0.8738   0.8207   2.8178  0.075  1.14  -0.151E+01    450.  0.378E-01  0.346E-01  0.875E-04  0.908E-14    1  14   4    1  39   8    5  19  36    0.000    0.000       0
+  0     44 00:14:26.90  14.9000A  -0.9242   0.8536   3.0242  0.077  1.18  -0.148E+01    500.  0.440E-01  0.406E-01  0.851E-04  0.935E-14    1  14   4    1  20  22    6  19  36    0.000    0.000       0
+  0     45 00:14:40.90  14.0000A  -0.9628   0.8865   3.2222  0.079  1.18  -0.146E+01    500.  0.505E-01  0.469E-01  0.839E-04  0.964E-14    1  14   4    1  20  22    6  19  36    0.000    0.000       0
+  0     46 00:14:54.20  13.3000A  -0.9907   0.9133   3.3786  0.081  1.22  -0.144E+01    550.  0.575E-01  0.536E-01  0.837E-04  0.997E-14    1  14   4    1  20  22    7  19  36    0.000    0.000       0
+  0     47 00:15:06.80  12.6000A  -1.0091   0.9363   3.5748  0.082  1.22  -0.145E+01    550.  0.646E-01  0.606E-01  0.834E-04  0.102E-13    1  14   4    1  29  28    7  19  36    0.000    0.000       0
+  0     48 00:15:18.90  12.1000A   1.0505   0.9826   3.7136  0.083  1.28  -0.139E+01    650.  0.720E-01  0.679E-01  0.840E-04  0.106E-13    1  31  18    7   3   7    7  19  36    0.000    0.000       0
+  0     49 00:15:30.50  11.6000A   1.0861   1.0067   3.8638  0.084  1.28  -0.137E+01    650.  0.797E-01  0.753E-01  0.847E-04  0.109E-13    1  31  18    7   3   7    8  19  36    0.000    0.000       0
+  0     50 00:15:41.80  11.3000A   1.1153  -1.0250   3.9976  0.085  1.28  -0.135E+01    650.  0.875E-01  0.830E-01  0.866E-04  0.113E-13    1  31  18    1   9  25    8  19  36    0.000    0.000       0
+  0     51 00:15:52.80  11.0000A   1.1385   1.0648   4.0926  0.086  1.28  -0.132E+01    650.  0.956E-01  0.909E-01  0.885E-04  0.117E-13    1  31  18    7   2   6    9  19  36    0.000    0.000       0
+  0     52 00:16:03.50  10.7000A   1.1555   1.1097   4.2202  0.087  1.29  -0.131E+01    650.  0.104E+00  0.989E-01  0.901E-04  0.121E-13    1  31  18    8   3   7    9  19  36    0.000    0.000       0
+  0     53 00:16:14.00  10.5000A   1.1658   1.1534   4.2697  0.087  1.38  -0.130E+01    800.  0.112E+00  0.107E+00  0.924E-04  0.125E-13    1  31  18    8  16   2    9  19  36    0.000    0.000       0
+  0     54 00:16:24.30  10.3000A   1.1690  -1.1220   4.3849  0.088  1.38  -0.129E+01    800.  0.121E+00  0.115E+00  0.947E-04  0.129E-13    1  31  18    1   9  25   10  19  36    0.000    0.000       0
+  0     55 00:16:34.50  10.2000A   1.1707   1.2039   4.4322  0.088  1.38  -0.130E+01    800.  0.129E+00  0.124E+00  0.978E-04  0.134E-13    1  37  15    9  16   2   10  19  36    0.000    0.000       0
+  0     56 00:16:44.49   9.9900A   1.1799   1.2838   4.5053  0.089  1.38  -0.128E+01    800.  0.138E+00  0.132E+00  0.999E-04  0.138E-13    1  37  15    9  16   2   11  19  36    0.000    0.000       0
+  0     57 00:16:54.39   9.9000A  -1.2237   1.2380   4.5461  0.089  1.38  -0.127E+01    800.  0.146E+00  0.141E+00  0.103E-03  0.143E-13    4  35   3    6  20  34   11  19  36    0.000    0.000       0
+  0     58 00:17:04.22   9.8300A  -1.3001   1.2974   4.5765  0.090  1.38  -0.127E+01    800.  0.155E+00  0.149E+00  0.106E-03  0.148E-13    4  35   3   10  17   2   12  19  36    0.000    0.000       0
+  0     59 00:17:13.98   9.7600A  -1.3624   1.4342   4.6103  0.090  1.38  -0.126E+01    800.  0.164E+00  0.158E+00  0.109E-03  0.153E-13    4  35   3   10  17   2   12  19  36    0.000    0.000       0
+  0     60 00:17:23.74   9.7600A  -1.4114   1.3960   4.6084  0.090  1.38  -0.126E+01    800.  0.172E+00  0.166E+00  0.113E-03  0.158E-13    4  35   3   10  17   2   13  19  36    0.000    0.000       0
+  0     61 00:17:33.45   9.7100A  -1.4485   1.4836   4.6323  0.091  1.41  -0.127E+01    850.  0.181E+00  0.175E+00  0.116E-03  0.164E-13    4  35   3   11  17   2   13  19  36    0.000    0.000       0
+  0     62 00:17:43.22   9.7700A  -1.4746   1.5825   4.6041  0.091  1.41  -0.126E+01    850.  0.189E+00  0.183E+00  0.121E-03  0.171E-13    4  35   3   11  17   2   14  19  36    0.000    0.000       0
+  0     63 00:17:52.98   9.7600A  -1.4903   1.5018   4.6129  0.091  1.41  -0.125E+01    850.  0.198E+00  0.192E+00  0.124E-03  0.176E-13    4  35   3   11  17   2   14  19  36    0.000    0.000       0
+  0     64 00:18:02.84   9.8600A  -1.5183   1.6243   4.5619  0.092  1.41  -0.126E+01    850.  0.206E+00  0.200E+00  0.130E-03  0.184E-13    4  35   2   12  17   2   14  15  27    0.000    0.000       0
+  0     65 00:18:12.72   9.8800A  -1.5480   1.6763   4.5548  0.092  1.41  -0.125E+01    850.  0.214E+00  0.209E+00  0.134E-03  0.190E-13    4  35   2   12  17   2   15  15  27    0.000    0.000       0
+  0     66 00:18:22.54   9.8200A  -1.5675  -1.6066   4.5845  0.092  1.41  -0.124E+01    850.  0.222E+00  0.217E+00  0.137E-03  0.195E-13    4  35   2   10   4  39   15  15  27    0.000    0.000       0
+  0     67 00:18:32.44   9.9000A  -1.5761   1.6829   4.5438  0.093  1.41  -0.124E+01    850.  0.230E+00  0.224E+00  0.142E-03  0.203E-13    4  35   2   13  17   2   15  15  27    0.000    0.000       0
+  0     68 00:18:42.44  10.0000A  -1.5817   1.6896   4.4919  0.093  1.41  -0.123E+01    850.  0.238E+00  0.232E+00  0.147E-03  0.210E-13    5  35   2   13  17   2   16  15  27    0.000    0.000       0
+  0     69 00:18:52.44  10.0000A  -1.5997  -1.6703   4.4803  0.094  1.41  -0.122E+01    850.  0.245E+00  0.239E+00  0.151E-03  0.216E-13    5  35   2   11   4  39   13  32  12    0.000    0.000       0
+  0     70 00:19:02.44  10.0000A  -1.6172  -1.7243   4.4949  0.094  1.41  -0.122E+01    850.  0.251E+00  0.246E+00  0.155E-03  0.222E-13    5  35   2   11   4  39   13  32  12    0.000    0.000       0
+  0     71 00:19:12.54  10.1000A  -1.6362  -1.7556   4.4526  0.094  1.41  -0.123E+01    850.  0.257E+00  0.252E+00  0.160E-03  0.230E-13    5  35   2   11   4  39   14  32  12    0.000    0.000       0
+  0     72 00:19:22.54  10.0000A  -1.6566  -1.7482   4.4782  0.095  1.41  -0.121E+01    850.  0.263E+00  0.258E+00  0.162E-03  0.233E-13    5  35   2   10   4  38   14  32  12    0.000    0.000       0
+  0     73 00:19:32.74  10.2000A  -1.6763  -1.8456   4.4123  0.095  1.41  -0.121E+01    850.  0.268E+00  0.264E+00  0.169E-03  0.243E-13    5  35   2   11   4  38   14  32  12    0.000    0.000       0
+  0     74 00:19:43.04  10.3000A  -1.6925  -1.9453   4.3884  0.096  1.41  -0.121E+01    850.  0.273E+00  0.269E+00  0.175E-03  0.251E-13    5  35   2   11   4  38   15  32  12    0.000    0.000       0
+  0     75 00:19:53.44  10.4000A  -1.7022  -1.9807   4.3245  0.096  1.41  -0.120E+01    850.  0.278E+00  0.273E+00  0.180E-03  0.258E-13   12  36  39   11   4  38   15  32  12    0.000    0.000       0
+  0     76 00:20:03.94  10.5000A  -1.7412  -2.0400   4.2986  0.097  1.41  -0.119E+01    850.  0.282E+00  0.277E+00  0.186E-03  0.266E-13   12  36  39   12   3  38   13  35  25    0.000    0.000       0
+  0     77 00:20:14.24  10.3000A  -1.7452  -2.0579   4.3534  0.097  1.41  -0.118E+01    850.  0.285E+00  0.281E+00  0.186E-03  0.265E-13   13  36  38   12   3  38   13  35  25    0.000    0.000       0
+  0     78 00:20:24.54  10.3000A  -1.8346  -2.1363   4.3483  0.098  1.41  -0.116E+01    850.  0.287E+00  0.284E+00  0.189E-03  0.269E-13   13  36  38   13   3  38   13  35  25    0.000    0.000       0
+  0     79 00:20:34.84  10.3000A  -1.8961  -2.1678   4.3601  0.098  1.41  -0.115E+01    850.  0.289E+00  0.286E+00  0.192E-03  0.273E-13   13  36  38   13   3  38   14  35  25    0.000    0.000       0
+  0     80 00:20:45.14  10.3000A  -1.9260  -2.1615   4.3616  0.099  1.41  -0.114E+01    850.  0.291E+00  0.288E+00  0.196E-03  0.277E-13   13  36  38   13   3  38   14  35  25    0.000    0.000       0
+  0     81 00:20:55.64  10.5000A  -1.9202  -2.2099   4.2801  0.099  1.41  -0.114E+01    850.  0.292E+00  0.289E+00  0.202E-03  0.286E-13   13  36  38   14   2  38   16  35  24    0.000    0.000       0
+  0     82 00:21:06.14  10.5000A  -1.8948  -2.1384   4.2718  0.100  1.41  -0.113E+01    850.  0.293E+00  0.290E+00  0.204E-03  0.289E-13   14  36  38   14   2  38   16  35  24    0.000    0.000       0
+  0     83 00:21:16.94  10.8000A  -1.9464  -2.1511   4.1795  0.100  1.41  -0.113E+01    850.  0.293E+00  0.290E+00  0.212E-03  0.300E-13   14  36  38   15   2  38   15  35  25    0.000    0.000       0
+  0     84 00:21:28.14  11.2000A  -1.9812  -2.0942   4.0252  0.101  1.41  -0.113E+01    850.  0.293E+00  0.291E+00  0.223E-03  0.314E-13   14  36  38   15   1  38   15  35  25    0.000    0.000       0
+  0     85 00:21:39.74  11.6000A  -1.9947  -2.0557   3.8901  0.102  1.38  -0.112E+01    800.  0.293E+00  0.290E+00  0.233E-03  0.328E-13   14  36  38   15   1  38   16  35  25    0.000    0.000       0
+  0     86 00:21:51.84  12.1000A  -1.9830  -2.0152   3.7283  0.102  1.38  -0.113E+01    800.  0.292E+00  0.290E+00  0.245E-03  0.345E-13   14  36  38   16   1  38   16  35  25    0.000    0.000       0
+  0     87 00:22:04.34  12.5000A  -1.9429  -2.0249   3.5951  0.103  1.38  -0.112E+01    800.  0.291E+00  0.289E+00  0.256E-03  0.359E-13   14  36  38   16   1  38   14  21   6    0.000    0.000       0
+  0     88 00:22:17.04  12.7000A  -1.9063  -1.9516   3.5480  0.104  1.38  -0.110E+01    800.  0.289E+00  0.288E+00  0.262E-03  0.366E-13   15  36  37   10  15  36   13  20   6    0.000    0.000       0
+  0     89 00:22:30.14  13.1000A  -1.9100  -2.0465   3.4410  0.105  1.38  -0.108E+01    800.  0.288E+00  0.286E+00  0.272E-03  0.379E-13   15  36  37   10  14  36   13  20   6    0.000    0.000       0
+  0     90 00:22:43.54  13.4000A  -1.8937  -2.0518   3.3663  0.106  1.38  -0.106E+01    800.  0.286E+00  0.285E+00  0.279E-03  0.389E-13   15  36  37   10  14  36   14  36  16    0.000    0.000       0
+  0     91 00:22:57.24  13.7000A  -1.9071  -1.8372   3.2748  0.107  1.38  -0.105E+01    800.  0.284E+00  0.283E+00  0.286E-03  0.397E-13   16  35  37   10  14  36   14  36  14    0.000    0.000       0
+  0     92 00:23:11.34  14.1000A  -1.9416  -1.9547   3.1838  0.108  1.35  -0.104E+01    750.  0.282E+00  0.281E+00  0.293E-03  0.409E-13   16  35  36   11  14  36   15  36  16    0.000    0.000       0
+  0     93 00:23:26.24  14.9000A  -1.9802  -1.9555   3.0297  0.109  1.35  -0.105E+01    750.  0.279E+00  0.279E+00  0.308E-03  0.430E-13   16  35  36   11  14  36   13  22  11    0.000    0.000       0
+  0     94 00:23:41.34  15.1000A  -1.9702  -1.7559   2.9746  0.110  1.35  -0.102E+01    750.  0.276E+00  0.276E+00  0.310E-03  0.434E-13   16  35  36   11  13  36   11  22  11    0.000    0.000       0
+  0     95 00:23:56.14  14.8000A  -1.9185  -1.7020   3.0501  0.112  1.35  -0.101E+01    750.  0.273E+00  0.273E+00  0.301E-03  0.421E-13    8  20  10   11  15  32   11  22  10    0.000    0.000       0
+  0     96 00:24:10.64  14.5000A  -1.9608  -1.7329   3.1096  0.113  1.35  -0.994E+00    750.  0.270E+00  0.270E+00  0.292E-03  0.409E-13    8  20  10   11  14  32   12  22  10    0.000    0.000       0
+  0     97 00:24:24.94  14.3000A  -1.9163  -1.7571   3.1418  0.114  1.32  -0.989E+00    700.  0.267E+00  0.268E+00  0.286E-03  0.399E-13    8  20   9   11  14  32   12  22  10    0.000    0.000       0
+  0     98 00:24:39.34  14.4000A  -1.9918  -1.7605   3.1222  0.115  1.32  -0.975E+00    700.  0.263E+00  0.265E+00  0.285E-03  0.397E-13    8  20   9   11  14  32   13  22  10    0.000    0.000       0
+  0     99 00:24:53.74  14.4000A  -1.9613  -1.7471   3.1274  0.116  1.32  -0.964E+00    700.  0.260E+00  0.262E+00  0.282E-03  0.392E-13    8  20   9   11  14  32   13  22  10    0.000    0.000       0
+  0    100 00:25:08.24  14.5000A  -1.9684   1.7325   3.1001  0.117  1.32  -0.956E+00    700.  0.257E+00  0.259E+00  0.282E-03  0.390E-13    9  20   9    2   7  14   13  22  10    0.000    0.000       0
+  0    101 00:25:23.14  14.9000A  -1.9750   1.7496   3.0218  0.118  1.32  -0.956E+00    700.  0.253E+00  0.256E+00  0.287E-03  0.396E-13    9  20   9    1   7  14   13  22  10    0.000    0.000       0
+  0    102 00:25:38.44  15.3000A  -1.9199   1.7855   2.9490  0.119  1.32  -0.938E+00    700.  0.250E+00  0.253E+00  0.293E-03  0.401E-13    9  20   9    1   7  14   10  32  24    0.000    0.000       0
+  0    103 00:25:54.04  15.6000A  -1.8332   1.8449   2.8847  0.120  1.32  -0.929E+00    700.  0.246E+00  0.249E+00  0.296E-03  0.403E-13    9  20   9    1   8  14   14  22  10    0.000    0.000       0
+  0    104 00:26:10.04  16.0000A  -1.7270   1.9080   2.8121  0.120  1.32  -0.926E+00    700.  0.242E+00  0.246E+00  0.301E-03  0.408E-13    9  20   9    1   8  14    8  10  12    0.000    0.000       0
+  0    105 00:26:26.14  16.1000A   1.7201   1.9638   2.7900  0.121  1.32  -0.917E+00    700.  0.238E+00  0.242E+00  0.301E-03  0.407E-13    8   0  24    1   8  14    9  32  24    0.000    0.000       0
+  0    106 00:26:42.24  16.1000A   1.6836   2.0068   2.8008  0.122  1.32  -0.916E+00    700.  0.234E+00  0.239E+00  0.300E-03  0.402E-13    8   7   9    1   8  14    6  12   0    0.000    0.000       0
+  0    107 00:26:58.24  16.0000A  -1.7905   2.0315   2.8127  0.123  1.32  -0.911E+00    700.  0.230E+00  0.235E+00  0.296E-03  0.394E-13    9  37  33    1   8  14    6  12   0    0.000    0.000       0
+  0    108 00:27:14.24  16.0000A  -1.8278   2.0394   2.8140  0.123  1.32  -0.912E+00    700.  0.227E+00  0.232E+00  0.293E-03  0.389E-13    9  37  33    1   8  14    6  12   0    0.000    0.000       0
+  0    109 00:27:30.24  16.0000A  -1.7839   2.0835   2.8061  0.123  1.32  -0.913E+00    700.  0.223E+00  0.228E+00  0.290E-03  0.383E-13    9  37  33    1   9  14    6  12   0    0.000    0.000       0
+  0    110 00:27:46.14  15.9000A   1.7602   2.1070   2.8304  0.124  1.35  -0.911E+00    750.  0.220E+00  0.225E+00  0.285E-03  0.374E-13    1  22   6    1   9  14    7  12   0    0.000    0.000       0
+  0    111 00:28:01.94  15.8000A   1.7735   2.1145   2.8454  0.124  1.35  -0.928E+00    750.  0.216E+00  0.222E+00  0.280E-03  0.367E-13    1  22   6    1   9  14    7  12   0    0.000    0.000       0
+  0    112 00:28:17.74  15.8000A   1.7663   2.1147   2.8408  0.124  1.35  -0.926E+00    750.  0.213E+00  0.219E+00  0.277E-03  0.361E-13    1  22   6    1   9  14    7  12   0    0.000    0.000       0
+  0    113 00:28:33.74  16.0000A   1.8032   2.1100   2.8133  0.123  1.35  -0.915E+00    750.  0.210E+00  0.216E+00  0.277E-03  0.360E-13    1  23   7    1   9  15    7  12   0    0.000    0.000       0
+  0    114 00:28:50.04  16.3000A   1.8238   2.1007   2.7643  0.123  1.35  -0.917E+00    750.  0.207E+00  0.213E+00  0.279E-03  0.361E-13    1  23   7    1   9  15    7  12   0    0.000    0.000       0
+  0    115 00:29:06.34  16.3000A   1.8325   2.0750   2.7601  0.123  1.35  -0.923E+00    750.  0.205E+00  0.210E+00  0.275E-03  0.354E-13    1  22   7    1   9  15    8  11   0    0.000    0.000       0
+  0    116 00:29:22.64  16.3000A   1.8328   2.0313   2.7540  0.122  1.35  -0.919E+00    750.  0.202E+00  0.208E+00  0.271E-03  0.348E-13    1  22   7    1  10  15    9  11   0    0.000    0.000       0
+  0    117 00:29:38.64  16.0000A   1.8361   1.9884   2.8157  0.122  1.35  -0.920E+00    750.  0.200E+00  0.205E+00  0.263E-03  0.336E-13    1  23   8    1  10  15    9  11   0    0.000    0.000       0
+  0    118 00:29:54.54  15.9000A   1.8446   1.9452   2.8254  0.121  1.38  -0.922E+00    800.  0.198E+00  0.203E+00  0.258E-03  0.328E-13    1  23   8    1  10  16    9  11   0    0.000    0.000       0
+  0    119 00:30:10.54  16.0000A   1.8613   1.9155   2.8076  0.121  1.38  -0.929E+00    800.  0.196E+00  0.201E+00  0.257E-03  0.324E-13    1  22   8    1   9  11   10  11   0    0.000    0.000       0
+  0    120 00:30:26.44  15.9000A   1.8571   1.9075   2.8259  0.120  1.38  -0.996E+00    800.  0.195E+00  0.199E+00  0.253E-03  0.317E-13    1  22   8    1   9  11   10  11   0    0.000    0.000       0
+  0    121 00:30:42.54  16.1000A   1.8347   1.9131   2.8011  0.119  1.38  -0.938E+00    800.  0.194E+00  0.198E+00  0.254E-03  0.316E-13    1  22   8    1  10  11   10  11   0    0.000    0.000       0
+  0    122 00:30:58.74  16.2000A   1.8241   1.9151   2.7694  0.118  1.38  -0.941E+00    800.  0.193E+00  0.196E+00  0.254E-03  0.314E-13    1  22   9    1  10  11   11  11   0    0.000    0.000       0
+  0    123 00:31:15.14  16.4000A   1.8287   1.8975   2.7400  0.118  1.38  -0.947E+00    800.  0.192E+00  0.195E+00  0.256E-03  0.314E-13    1  22   9    1  10  11   11  11   0    0.000    0.000       0
+  0    124 00:31:31.54  16.4000A   1.8088   1.9164   2.7498  0.117  1.38  -0.956E+00    800.  0.191E+00  0.195E+00  0.255E-03  0.312E-13    1  22   9    1  11  11   11   0  35    0.000    0.000       0
+  0    125 00:31:47.64  16.1000A   1.7734   1.9216   2.7910  0.116  1.38  -0.965E+00    800.  0.191E+00  0.194E+00  0.250E-03  0.304E-13    1  22   9    1  11  11   11   0  35    0.000    0.000       0
+  0    126 00:32:03.64  16.0000A   1.7415   1.8950   2.8089  0.115  1.38  -0.976E+00    800.  0.190E+00  0.193E+00  0.248E-03  0.301E-13    1  23  10    1  11  11   11   0  35    0.000    0.000       0
+  0    127 00:32:19.44  15.8000A   1.7278   1.8397   2.8409  0.115  1.38  -0.986E+00    800.  0.190E+00  0.193E+00  0.245E-03  0.295E-13    2  22   9    1  11  11   12   0  35    0.000    0.000       0
+  0    128 00:32:35.14  15.7000A   1.7024   1.8403   2.8736  0.114  1.38  -0.996E+00    800.  0.190E+00  0.193E+00  0.243E-03  0.292E-13    2  22   9    1  12  11   12   0  35    0.000    0.000       0
+  0    129 00:32:50.74  15.6000A   1.6689   1.8322   2.8897  0.114  1.38  -0.998E+00    800.  0.190E+00  0.193E+00  0.242E-03  0.290E-13    2  22   9    1  12  11   12   0  35    0.000    0.000       0
+  0    130 00:33:06.34  15.6000A  -1.6434   1.8002   2.8898  0.113  1.38  -0.101E+01    800.  0.190E+00  0.193E+00  0.242E-03  0.289E-13    4  18  31    1  12  11   12   0  35    0.000    0.000       0
+  0    131 00:33:21.84  15.5000A   1.6248   1.7435   2.8990  0.113  1.38  -0.999E+00    800.  0.190E+00  0.193E+00  0.241E-03  0.287E-13    2  22  10    1  12  11   13   0  35    0.000    0.000       0
+  0    132 00:33:37.34  15.5000A   1.6143   1.7172   2.8994  0.113  1.38  -0.100E+01    800.  0.191E+00  0.193E+00  0.241E-03  0.287E-13    2  22  10    1  13  12   13   0  35    0.000    0.000       0
+  0    133 00:33:52.94  15.6000A  -1.6235   1.6873   2.8887  0.113  1.35  -0.101E+01    750.  0.191E+00  0.193E+00  0.243E-03  0.289E-13    4  18  30    1  13  12    8  26  20    0.000    0.000       0
+  0    134 00:34:08.44  15.5000A  -1.6327   1.6528   2.9042  0.112  1.35  -0.100E+01    750.  0.192E+00  0.194E+00  0.243E-03  0.287E-13    4  18  30    9  28  16    9  26  20    0.000    0.000       0
+  0    135 00:34:23.84  15.4000A  -1.6486  -1.6539   2.9170  0.112  1.35  -0.998E+00    750.  0.192E+00  0.194E+00  0.242E-03  0.286E-13    5  18  30    6  27  26   10  26  20    0.000    0.000       0
+  0    136 00:34:39.14  15.3000A  -1.6325   1.6538   2.9454  0.112  1.41  -0.100E+01    850.  0.192E+00  0.194E+00  0.241E-03  0.284E-13    5  18  30   10  29  16   10  25  21    0.000    0.000       0
+  0    137 00:34:54.14  15.0000A  -1.6529   1.6953   2.9927  0.112  1.41  -0.102E+01    850.  0.193E+00  0.195E+00  0.237E-03  0.279E-13    8   6  19   10  29  16   11  25  21    0.000    0.000       0
+  0    138 00:35:09.34  15.2000A  -1.6712   1.6926   2.9584  0.112  1.41  -0.991E+00    850.  0.193E+00  0.195E+00  0.241E-03  0.283E-13   15  27  18   11  29  16   12  25  21    0.000    0.000       0
+  0    139 00:35:24.54  15.2000A  -1.6535   1.6915   2.9678  0.112  1.41  -0.988E+00    850.  0.193E+00  0.195E+00  0.242E-03  0.283E-13   15  27  18   11  29  16   12  25  21    0.000    0.000       0
+  0    140 00:35:39.94  15.4000A  -1.5996   1.7523   2.9153  0.112  1.41  -0.986E+00    850.  0.194E+00  0.195E+00  0.246E-03  0.287E-13   16  27  18    8  39  39   12  25  21    0.000    0.000       0
+  0    141 00:35:55.44  15.5000A  -1.7133   1.7361   2.9079  0.112  1.41  -0.986E+00    850.  0.194E+00  0.196E+00  0.248E-03  0.289E-13   16  27  18    8  39  39   12  24  22    0.000    0.000       0
+  0    142 00:36:10.74  15.3000A  -1.7479   1.8395   2.9490  0.112  1.41  -0.984E+00    850.  0.195E+00  0.196E+00  0.245E-03  0.285E-13   16  27  17    9  39  39   13  24  22    0.000    0.000       0
+  0    143 00:36:26.04  15.3000A  -1.7129   1.8816   2.9405  0.112  1.41  -0.983E+00    850.  0.195E+00  0.197E+00  0.245E-03  0.284E-13   16  27  17    9  39  39   13  24  23    0.000    0.000       0
+  0    144 00:36:40.84  14.8000A  -1.5854   1.8749   3.0367  0.113  1.41  -0.976E+00    850.  0.196E+00  0.197E+00  0.238E-03  0.274E-13   16  27  17    9  39  39   14  24  23    0.000    0.000       0
+  0    145 00:36:55.94  15.1000A  -1.5240   1.8633   2.9759  0.113  1.41  -0.973E+00    850.  0.197E+00  0.198E+00  0.243E-03  0.279E-13    1  36   1    9  39  39   15  24  23    0.000    0.000       0
+  0    146 00:37:11.34  15.4000A  -1.5306   1.8671   2.9236  0.113  1.38  -0.971E+00    800.  0.198E+00  0.199E+00  0.248E-03  0.284E-13    7  13  18    9  39  39   15  24  23    0.000    0.000       0
+  0    147 00:37:27.34  16.0000A  -1.5464   1.8917   2.8057  0.113  1.38  -0.973E+00    800.  0.198E+00  0.200E+00  0.258E-03  0.294E-13    7  13  18    9  39  39   11  27  16    0.000    0.000       0
+  0    148 00:37:42.64  15.3000A  -1.5744   1.9273   2.9328  0.113  1.38  -0.972E+00    800.  0.199E+00  0.201E+00  0.247E-03  0.282E-13   17  18   5    9  39  39   11  27  16    0.000    0.000       0
+  0    149 00:37:57.64  15.0000A  -1.5915   1.9433   2.9950  0.113  1.38  -0.967E+00    800.  0.200E+00  0.201E+00  0.243E-03  0.277E-13    8  13  17    9  39  39   11  27  16    0.000    0.000       0
+  0    150 00:38:12.04  14.4000A  -1.6045   1.9131   3.1175  0.113  1.38  -0.962E+00    800.  0.201E+00  0.202E+00  0.234E-03  0.266E-13    8  13  17    9  39  39   12  27  16    0.000    0.000       0
+  0    151 00:38:26.24  14.2000A  -1.5931   1.8957   3.1647  0.113  1.38  -0.960E+00    800.  0.202E+00  0.203E+00  0.232E-03  0.263E-13    8  13  17   16  31  16   12  27  16    0.000    0.000       0
+  0    152 00:38:40.54  14.3000A  -1.5642   1.8981   3.1423  0.113  1.38  -0.966E+00    800.  0.203E+00  0.204E+00  0.235E-03  0.265E-13    8  13  17   16  32  16   13  27  16    0.000    0.000       0
+  0    153 00:38:54.74  14.2000A  -1.6766   1.8809   3.1766  0.113  1.41  -0.962E+00    850.  0.204E+00  0.205E+00  0.234E-03  0.264E-13   10  14  11   16  32  16   13  27  16    0.000    0.000       0
+  0    154 00:39:09.14  14.4000A  -1.7293   1.8304   3.1223  0.113  1.41  -0.958E+00    850.  0.205E+00  0.206E+00  0.239E-03  0.269E-13   10  14  11   16  33  16   13  27  16    0.000    0.000       0
+  0    155 00:39:24.04  14.9000A  -1.7275   1.9699   3.0188  0.113  1.41  -0.957E+00    850.  0.206E+00  0.207E+00  0.249E-03  0.279E-13   10  14  11   17  32  16    9  24  19    0.000    0.000       0
+  0    156 00:39:38.74  14.7000A   1.7255   1.9569   3.0555  0.113  1.41  -0.958E+00    850.  0.207E+00  0.208E+00  0.248E-03  0.276E-13   10   0   1   17  33  16    9  38  37    0.000    0.000       0
+  0    157 00:39:53.34  14.6000A   1.7409   2.0114   3.0796  0.113  1.41  -0.963E+00    850.  0.208E+00  0.209E+00  0.248E-03  0.276E-13   11   0   1   17  33  16    7  37  37    0.000    0.000       0
+  0    158 00:40:07.84  14.5000A   1.7898   1.8919   3.1125  0.113  1.41  -0.956E+00    850.  0.210E+00  0.210E+00  0.248E-03  0.275E-13   11   1   2   17  33  16    7  37  37    0.000    0.000       0
+  0    159 00:40:22.24  14.4000A   1.8885   1.8871   3.1226  0.114  1.41  -0.955E+00    850.  0.211E+00  0.211E+00  0.248E-03  0.275E-13   11   1   2   17  34  16    8  37  37    0.000    0.000       0
+  0    160 00:40:36.34  14.1000A   1.9262  -1.7861   3.1822  0.114  1.41  -0.954E+00    850.  0.212E+00  0.213E+00  0.244E-03  0.270E-13   11   1   2   11  23  21    8  37  37    0.000    0.000       0
+  0    161 00:40:50.34  14.0000A   1.8698  -1.8111   3.2164  0.114  1.41  -0.954E+00    850.  0.213E+00  0.214E+00  0.243E-03  0.269E-13   11   1   2   11  23  21    8  37  37    0.000    0.000       0
+  0    162 00:41:04.34  14.0000A   1.9238  -1.7947   3.2225  0.114  1.41  -0.955E+00    850.  0.215E+00  0.215E+00  0.243E-03  0.270E-13   12   1   3    6  12  35    8  37  37    0.000    0.000       0
+  0    163 00:41:18.34  14.0000A   1.9440  -1.8018   3.2068  0.114  1.41  -0.957E+00    850.  0.216E+00  0.217E+00  0.244E-03  0.271E-13   12   1   3    6  12  35    8  37  37    0.000    0.000       0
+  0    164 00:41:32.24  13.9000A  -1.9201  -1.8290   3.2373  0.114  1.41  -0.957E+00    850.  0.218E+00  0.218E+00  0.243E-03  0.270E-13   13  32  37    6  11  35    9  37  37    0.000    0.000       0
+  0    165 00:41:45.94  13.7000A  -1.8482  -1.8558   3.2847  0.114  1.41  -0.958E+00    850.  0.219E+00  0.219E+00  0.240E-03  0.268E-13   13  32  37    6  11  35   13  38  36    0.000    0.000       0
+  0    166 00:41:59.44  13.5000A   1.8362  -1.8657   3.3230  0.114  1.41  -0.962E+00    850.  0.221E+00  0.221E+00  0.238E-03  0.265E-13   13   1   4    6  11  35   13  38  36    0.000    0.000       0
+  0    167 00:42:12.94  13.5000A  -1.9350  -1.8537   3.3415  0.114  1.41  -0.972E+00    850.  0.223E+00  0.223E+00  0.239E-03  0.266E-13   14  32  36    6  11  35   14  38  36    0.000    0.000       0
+  0    168 00:42:26.34  13.4000A  -1.9390  -1.8160   3.3696  0.114  1.41  -0.988E+00    850.  0.224E+00  0.224E+00  0.238E-03  0.265E-13   14  32  36    6  11  35   14  38  36    0.000    0.000       0
+  0    169 00:42:39.74  13.4000A  -1.8355  -1.7866   3.3498  0.114  1.41  -0.972E+00    850.  0.226E+00  0.226E+00  0.239E-03  0.266E-13   14  32  36    6  10  35   14  38  36    0.000    0.000       0
+  0    170 00:42:53.34  13.6000A  -1.8600  -1.7937   3.3107  0.114  1.41  -0.969E+00    850.  0.228E+00  0.228E+00  0.243E-03  0.271E-13   14  31  36    6  11  30   10  37  37    0.000    0.000       0
+  0    171 00:43:06.94  13.6000A  -1.9006  -1.7980   3.2997  0.114  1.41  -0.962E+00    850.  0.230E+00  0.230E+00  0.244E-03  0.272E-13   15  32  35   14  23  22   10  37  37    0.000    0.000       0
+  0    172 00:43:20.54  13.6000A  -1.9281  -1.8409   3.3029  0.114  1.41  -0.961E+00    850.  0.232E+00  0.232E+00  0.244E-03  0.273E-13   15  32  35   14  23  22   11  37  37    0.000    0.000       0
+  0    173 00:43:33.94  13.4000A  -1.8858  -1.8248   3.3472  0.114  1.41  -0.961E+00    850.  0.233E+00  0.233E+00  0.242E-03  0.270E-13   15  32  35   14  23  22    9  15  21    0.000    0.000       0
+  0    174 00:43:47.34  13.4000A  -1.8110  -1.7869   3.3588  0.114  1.41  -0.963E+00    850.  0.235E+00  0.235E+00  0.242E-03  0.272E-13   15  32  35    5  12  30   10  15  21    0.000    0.000       0
+  0    175 00:44:00.44  13.1000A  -1.7544  -1.8592   3.4414  0.114  1.43  -0.968E+00    900.  0.237E+00  0.237E+00  0.238E-03  0.267E-13   15  32  34    5  11  30   10  15  21    0.000    0.000       0
+  0    176 00:44:13.34  12.9000A  -1.7039  -1.8409   3.4809  0.114  1.43  -0.963E+00    900.  0.239E+00  0.239E+00  0.236E-03  0.264E-13   15  32  34    5  11  30   11  16  22    0.000    0.000       0
+  0    177 00:44:25.94  12.6000A   1.6820  -1.7806   3.5627  0.114  1.43  -0.963E+00    900.  0.240E+00  0.240E+00  0.231E-03  0.259E-13   15   1   6    5  13  32   11  16  22    0.000    0.000       0
+  0    178 00:44:38.44  12.5000A  -1.6651  -1.8069   3.5965  0.114  1.43  -0.963E+00    900.  0.242E+00  0.242E+00  0.230E-03  0.258E-13   12   4  35    5  13  32   11  16  22    0.000    0.000       0
+  0    179 00:44:50.84  12.4000A  -1.7245  -1.8197   3.6309  0.114  1.43  -0.962E+00    900.  0.243E+00  0.244E+00  0.229E-03  0.256E-13   12   4  35    5  13  32   12  16  22    0.000    0.000       0
+  0    180 00:45:03.14  12.3000A  -1.7563  -1.8148   3.6549  0.114  1.43  -0.960E+00    900.  0.245E+00  0.245E+00  0.228E-03  0.255E-13   12   4  35    5  13  32   12  16  22    0.000    0.000       0
+  0    181 00:45:15.44  12.3000A  -1.7566  -1.7915   3.6704  0.114  1.43  -0.957E+00    900.  0.246E+00  0.247E+00  0.228E-03  0.255E-13   12   4  35    5  13  32   13  15  21    0.000    0.000       0
+  0    182 00:45:27.44  12.0000A  -1.7247  -1.7526   3.7425  0.114  1.43  -0.957E+00    900.  0.248E+00  0.248E+00  0.223E-03  0.249E-13   12   4  35    5  13  32   12  15  22    0.000    0.000       0
+  0    183 00:45:39.24  11.8000A  -1.6982  -1.7119   3.8148  0.114  1.43  -0.960E+00    900.  0.249E+00  0.249E+00  0.220E-03  0.246E-13    8  14  33    5  12  32   13  15  22    0.000    0.000       0
+  0    184 00:45:50.74  11.5000A  -1.7676  -1.7338   3.8979  0.114  1.43  -0.962E+00    900.  0.250E+00  0.251E+00  0.215E-03  0.240E-13   13  30   0   11   3  25   13  15  22    0.000    0.000       0
+  0    185 00:46:02.24  11.5000A  -1.7606  -1.7702   3.9136  0.115  1.43  -0.956E+00    900.  0.251E+00  0.252E+00  0.215E-03  0.241E-13   13  30   0    9   8   5   13  15  22    0.000    0.000       0
+  0    186 00:46:13.54  11.3000A  -1.7905  -1.7881   3.9814  0.115  1.43  -0.950E+00    900.  0.252E+00  0.253E+00  0.212E-03  0.238E-13    9  14  33    9   8   5   14  15  22    0.000    0.000       0
+  0    187 00:46:24.84  11.3000A  -1.8643  -1.7536   3.9793  0.115  1.43  -0.967E+00    900.  0.253E+00  0.254E+00  0.212E-03  0.239E-13    9  14  33    8   8   6   14  15  22    0.000    0.000       0
+  0    188 00:46:36.24  11.4000A  -1.9195  -1.7096   3.9437  0.115  1.43  -0.943E+00    900.  0.254E+00  0.255E+00  0.214E-03  0.242E-13    9  14  33    8   8   6   15  15  22    0.000    0.000       0
+  0    189 00:46:47.64  11.4000A  -1.9591  -1.6986   3.9397  0.116  1.43  -0.942E+00    900.  0.255E+00  0.256E+00  0.214E-03  0.243E-13    9  14  33    6  30  25   15  15  22    0.000    0.000       0
+  0    190 00:46:59.24  11.6000A  -1.9870  -1.7100   3.8840  0.116  1.43  -0.941E+00    900.  0.255E+00  0.257E+00  0.218E-03  0.248E-13    9  14  33    6  30  25   15  15  22    0.000    0.000       0
+  0    191 00:47:11.14  11.9000A  -2.0069  -1.6942   3.7901  0.116  1.43  -0.939E+00    900.  0.256E+00  0.257E+00  0.225E-03  0.255E-13    9  14  33    6  30  25   15  15  22    0.000    0.000       0
+  0    192 00:47:23.24  12.1000A  -2.0199   1.7267   3.7152  0.116  1.43  -0.939E+00    900.  0.257E+00  0.258E+00  0.229E-03  0.260E-13    9  14  33   11  29  13   16  15  22    0.000    0.000       0
+  0    193 00:47:35.74  12.5000A  -2.0241   1.7604   3.6131  0.117  1.43  -0.941E+00    900.  0.257E+00  0.259E+00  0.236E-03  0.269E-13    9  14  33   11  29  13   16  15  22    0.000    0.000       0
+  0    194 00:47:48.74  13.0000A  -2.0159   1.8096   3.4717  0.117  1.43  -0.945E+00    900.  0.258E+00  0.259E+00  0.246E-03  0.281E-13    9  14  33   12  29  14   16  15  22    0.000    0.000       0
+  0    195 00:48:01.94  13.2000A  -2.0208   1.8347   3.3994  0.117  1.43  -0.946E+00    900.  0.258E+00  0.260E+00  0.251E-03  0.286E-13    9  14  32   12  29  14   16  27  20    0.000    0.000       0
+  0    196 00:48:15.54  13.6000A  -2.0216   1.8136   3.3014  0.117  1.43  -0.942E+00    900.  0.259E+00  0.261E+00  0.259E-03  0.296E-13    9  14  32   12  29  14   16  27  20    0.000    0.000       0
+  0    197 00:48:29.14  13.6000A  -1.9992   1.7816   3.3181  0.118  1.43  -0.934E+00    900.  0.259E+00  0.261E+00  0.260E-03  0.298E-13    9  14  32   19  30  19   16  29  17    0.000    0.000       0
+  0    198 00:48:42.34  13.2000A  -1.9528   1.8058   3.4086  0.118  1.43  -0.930E+00    900.  0.260E+00  0.262E+00  0.253E-03  0.290E-13    9  14  32   13  29  14   16  29  17    0.000    0.000       0
+  0    199 00:48:55.44  13.1000A  -1.8875   1.8596   3.4471  0.118  1.43  -0.928E+00    900.  0.260E+00  0.263E+00  0.252E-03  0.290E-13    9  14  32   13  30  14   16  29  17    0.000    0.000       0
+  0    200 00:49:08.64  13.2000A  -1.8253   1.8874   3.4219  0.119  1.43  -0.925E+00    900.  0.261E+00  0.263E+00  0.255E-03  0.293E-13    9  15  33   13  30  14   16  29  17    0.000    0.000       0
+  0    201 00:49:22.14  13.5000A  -1.7840   1.8558   3.3334  0.119  1.43  -0.923E+00    900.  0.261E+00  0.264E+00  0.262E-03  0.300E-13    4   5   3   13  30  14   16  29  17    0.000    0.000       0
+  0    202 00:49:35.94  13.8000A  -1.7882   1.8614   3.2725  0.119  1.43  -0.924E+00    900.  0.262E+00  0.264E+00  0.268E-03  0.307E-13    4   5   3   14  30  14   17  29  17    0.000    0.000       0
+  0    203 00:49:50.14  14.2000A  -1.7771   1.9038   3.1656  0.119  1.43  -0.924E+00    900.  0.263E+00  0.265E+00  0.277E-03  0.316E-13    4   5   3   14  30  14   17  29  17    0.000    0.000       0
+  0    204 00:50:04.84  14.7000A  -1.7720   1.8878   3.0589  0.119  1.43  -0.924E+00    900.  0.263E+00  0.266E+00  0.287E-03  0.327E-13    5   4   3   14  30  14    7  16  22    0.000    0.000       0
+  0    205 00:50:19.14  14.3000A  -1.7919   1.8335   3.1491  0.119  1.43  -0.926E+00    900.  0.264E+00  0.266E+00  0.280E-03  0.318E-13    5   4   3   15  31  14    8  16  22    0.000    0.000       0
+  0    206 00:50:32.84  13.7000A  -1.7777   1.9040   3.2818  0.120  1.41  -0.928E+00    850.  0.265E+00  0.267E+00  0.269E-03  0.305E-13    5   4   3   15  31  14    8  16  22    0.000    0.000       0
+  0    207 00:50:46.34  13.5000A  -1.7652   1.9180   3.3261  0.120  1.41  -0.929E+00    850.  0.265E+00  0.268E+00  0.266E-03  0.300E-13    5   4   2   15  31  14    8  17  22    0.000    0.000       0
+  0    208 00:50:59.44  13.1000A  -1.7605   1.8841   3.4224  0.120  1.41  -0.929E+00    850.  0.266E+00  0.269E+00  0.258E-03  0.291E-13    5   4   2   15  31  14    9  17  22    0.000    0.000       0
+  0    209 00:51:12.24  12.8000A   1.7723   1.8309   3.5293  0.119  1.41  -0.929E+00    850.  0.267E+00  0.269E+00  0.253E-03  0.283E-13   15  31  24   16  32  14    9  17  22    0.000    0.000       0
+  0    210 00:51:24.74  12.5000A   1.7626   1.8626   3.5965  0.119  1.41  -0.929E+00    850.  0.268E+00  0.270E+00  0.248E-03  0.276E-13   15  31  24   16  32  14   10  17  22    0.000    0.000       0
+  0    211 00:51:37.14  12.4000A  -1.7667   1.8468   3.6340  0.119  1.41  -0.930E+00    850.  0.269E+00  0.271E+00  0.246E-03  0.273E-13    9  35  19   16  32  14   10  17  22    0.000    0.000       0
+  0    212 00:51:49.34  12.2000A   1.7911   1.8026   3.6738  0.119  1.41  -0.931E+00    850.  0.270E+00  0.272E+00  0.243E-03  0.268E-13   10   3   2   16  33  14    9  17  21    0.000    0.000       0
+  0    213 00:52:01.14  11.8000A   1.8046   1.7960   3.8097  0.119  1.41  -0.935E+00    850.  0.271E+00  0.273E+00  0.236E-03  0.259E-13   10   3   2   16  33  14    9  18  21    0.000    0.000       0
+  0    214 00:52:12.64  11.5000A  -1.8438   1.8572   3.9138  0.119  1.41  -0.937E+00    850.  0.272E+00  0.274E+00  0.231E-03  0.252E-13    9  34  19   16  27  20    9  18  21    0.000    0.000       0
+  0    215 00:52:23.84  11.2000A  -1.8347   1.8921   4.0149  0.119  1.41  -0.939E+00    850.  0.273E+00  0.275E+00  0.225E-03  0.245E-13    9  34  19   16  27  20   10  18  21    0.000    0.000       0
+  0    216 00:52:34.84  11.0000A   1.8681   1.8884   4.0912  0.119  1.41  -0.941E+00    850.  0.274E+00  0.276E+00  0.222E-03  0.240E-13   16  15  26   16  27  21   10  18  21    0.000    0.000       0
+  0    217 00:52:45.74  10.9000A   1.9051   1.8536   4.1401  0.119  1.41  -0.946E+00    850.  0.275E+00  0.277E+00  0.220E-03  0.238E-13   15  15  25   16  28  20   11  18  21    0.000    0.000       0
+  0    218 00:52:56.54  10.8000A   1.9250   1.8647   4.1828  0.119  1.40  -0.946E+00    850.  0.276E+00  0.278E+00  0.218E-03  0.235E-13   16  15  26   16  28  21   12  18  21    0.000    0.000       0
+  0    219 00:53:07.24  10.7000A   1.9382   1.9479   4.1926  0.119  1.40  -0.944E+00    850.  0.277E+00  0.279E+00  0.216E-03  0.233E-13   16  15  26   15  22  22   12  18  21    0.000    0.000       0
+  0    220 00:53:17.94  10.7000A   1.9849   1.9429   4.1922  0.119  1.40  -0.942E+00    850.  0.278E+00  0.280E+00  0.216E-03  0.233E-13   16  17  25   15  23  22   13  18  21    0.000    0.000       0
+  0    221 00:53:28.74  10.8000A   2.0639  -1.8490   4.1611  0.119  1.40  -0.943E+00    850.  0.279E+00  0.281E+00  0.218E-03  0.235E-13   16  18  25   15  14  20   13  18  21    0.000    0.000       0
+  0    222 00:53:39.84  11.1000A   2.1304   2.0264   4.0518  0.119  1.40  -0.947E+00    850.  0.279E+00  0.281E+00  0.224E-03  0.241E-13   16  18  25   16  23  22   14  18  21    0.000    0.000       0
+  0    223 00:53:51.04  11.2000A   2.1119   2.0188   4.0274  0.119  1.43  -0.953E+00    900.  0.280E+00  0.282E+00  0.225E-03  0.244E-13   16  18  25   16  23  22   14  18  21    0.000    0.000       0
+  0    224 00:54:02.44  11.4000A   1.9933   2.0240   3.9613  0.119  1.43  -0.947E+00    900.  0.281E+00  0.283E+00  0.229E-03  0.249E-13   16  18  25   16  23  23   13  19  21    0.000    0.000       0
+  0    225 00:54:13.74  11.3000A   1.9802   2.0169   3.9756  0.119  1.43  -0.944E+00    900.  0.281E+00  0.283E+00  0.227E-03  0.247E-13   17  16  26   16  24  23   13  19  21    0.000    0.000       0
+  0    226 00:54:25.04  11.3000A   1.9866   2.0438   3.9757  0.119  1.43  -0.943E+00    900.  0.281E+00  0.284E+00  0.227E-03  0.248E-13   17  16  26   17  24  23   14  19  21    0.000    0.000       0
+  0    227 00:54:36.54  11.5000A  -1.9626   2.1912   3.9100  0.119  1.43  -0.942E+00    900.  0.282E+00  0.284E+00  0.231E-03  0.252E-13    8   0  21   17  24  23   14  19  21    0.000    0.000       0
+  0    228 00:54:48.24  11.7000A   1.9993   2.0586   3.8457  0.119  1.43  -0.939E+00    900.  0.282E+00  0.284E+00  0.234E-03  0.257E-13   17  20  25   17  25  23   15  19  21    0.000    0.000       0
+  0    229 00:55:00.34  12.1000A   2.0148   1.9686   3.7091  0.119  1.43  -0.933E+00    900.  0.282E+00  0.284E+00  0.242E-03  0.266E-13   17  20  25   17  25  24   15  19  21    0.000    0.000       0
+  0    230 00:55:12.74  12.4000A   1.9420   2.1142   3.6188  0.119  1.43  -0.931E+00    900.  0.282E+00  0.284E+00  0.248E-03  0.273E-13   17  21  25   18  25  23   15  22  18    0.000    0.000       0
+  0    231 00:55:25.34  12.6000A   1.9690   2.1214   3.5710  0.119  1.43  -0.931E+00    900.  0.281E+00  0.284E+00  0.252E-03  0.277E-13   18  20  25   18  26  23   15  22  18    0.000    0.000       0
+  0    232 00:55:38.14  12.8000A   1.9871  -2.1545   3.5058  0.119  1.43  -0.932E+00    900.  0.281E+00  0.283E+00  0.256E-03  0.282E-13   18  20  25   19  12  20   12  17  19    0.000    0.000       0
+  0    233 00:55:50.94  12.8000A   1.9316   2.2092   3.5035  0.119  1.43  -0.932E+00    900.  0.280E+00  0.282E+00  0.256E-03  0.282E-13   17  24  26   18  26  24   12  17  19    0.000    0.000       0
+  0    234 00:56:03.74  12.8000A   2.0297  -2.3325   3.5109  0.119  1.43  -0.932E+00    900.  0.279E+00  0.282E+00  0.256E-03  0.282E-13   19  17  24   19  11  20   13  17  19    0.000    0.000       0
+  0    235 00:56:16.54  12.8000A   2.1724  -2.3548   3.5077  0.119  1.43  -0.931E+00    900.  0.279E+00  0.281E+00  0.256E-03  0.283E-13   17  21  24   19  11  20   13  17  19    0.000    0.000       0
+  0    236 00:56:29.44  12.9000A   2.2030  -2.2626   3.4864  0.119  1.40  -0.928E+00    850.  0.278E+00  0.280E+00  0.259E-03  0.285E-13   17  21  24   19  11  20   15  34  38    0.000    0.000       0
+  0    237 00:56:42.34  12.9000A   2.3058   2.1761   3.4854  0.119  1.40  -0.925E+00    850.  0.277E+00  0.279E+00  0.259E-03  0.285E-13   17  22  25   18  28  24   15  34  38    0.000    0.000       0
+  0    238 00:56:55.44  13.1000A   2.2991   2.1994   3.4480  0.119  1.40  -0.923E+00    850.  0.276E+00  0.278E+00  0.264E-03  0.289E-13   17  22  25   18  28  25   13  11  35    0.000    0.000       0
+  0    239 00:57:08.54  13.1000A   2.3016   2.0862   3.4447  0.119  1.40  -0.923E+00    850.  0.275E+00  0.277E+00  0.264E-03  0.289E-13   18  20  25   18  28  25   13  11  35    0.000    0.000       0
+  0    240 00:57:21.54  13.0000A   2.3847   2.0754   3.4715  0.119  1.40  -0.930E+00    850.  0.274E+00  0.277E+00  0.263E-03  0.287E-13   18  21  26   18  28  26   11  10  36    0.000    0.000       0
+  0    241 00:57:34.44  12.9000A   2.4579   2.0616   3.4907  0.119  1.40  -0.929E+00    850.  0.274E+00  0.276E+00  0.262E-03  0.286E-13   18  21  26   17  29  23   11  10  36    0.000    0.000       0
+  0    242 00:57:47.34  12.9000A   2.5289  -2.0981   3.4924  0.119  1.40  -0.931E+00    850.  0.273E+00  0.275E+00  0.262E-03  0.286E-13   18  22  27   19  12  19   12  10  36    0.000    0.000       0
+  0    243 00:58:00.14  12.8000A   2.5557  -2.1094   3.5123  0.119  1.40  -0.932E+00    850.  0.273E+00  0.275E+00  0.261E-03  0.284E-13   18  22  27   19  11  19   12  10  36    0.000    0.000       0
+  0    244 00:58:12.94  12.8000A   2.4804  -2.1399   3.5034  0.119  1.40  -0.933E+00    850.  0.272E+00  0.274E+00  0.261E-03  0.285E-13   18  22  27   19  11  19   12  10  36    0.000    0.000       0
+  0    245 00:58:25.94  13.0000A   2.5240  -2.1239   3.4684  0.118  1.40  -0.934E+00    850.  0.272E+00  0.274E+00  0.266E-03  0.290E-13   18  22  28   19  11  19   12  10  36    0.000    0.000       0
+  0    246 00:58:39.04  13.1000A   2.4933  -2.0731   3.4381  0.118  1.40  -0.935E+00    850.  0.271E+00  0.273E+00  0.268E-03  0.292E-13   18  22  28   19  11  19   10  19  20    0.000    0.000       0
+  0    247 00:58:52.14  13.1000A   2.3695   2.0327   3.4468  0.118  1.40  -0.938E+00    850.  0.271E+00  0.273E+00  0.269E-03  0.293E-13   18  23  29   17  14  36   10  19  20    0.000    0.000       0
+  0    248 00:59:05.04  12.9000A   2.3934   2.0130   3.4751  0.118  1.40  -0.945E+00    850.  0.271E+00  0.273E+00  0.265E-03  0.289E-13   18  23  29   17  14  36   11  19  20    0.000    0.000       0
+  0    249 00:59:17.94  12.9000A   2.3329   2.0083   3.4885  0.117  1.40  -0.943E+00    850.  0.271E+00  0.273E+00  0.266E-03  0.290E-13   18  23  29   17  15  36   11  19  20    0.000    0.000       0
+  0    250 00:59:30.74  12.8000A   2.2181   2.0011   3.5054  0.117  1.40  -0.944E+00    850.  0.271E+00  0.273E+00  0.264E-03  0.288E-13   18  23  29   17  15  36   12  19  20    0.000    0.000       0
+  0    251 00:59:43.54  12.8000A   2.2073  -1.9892   3.5152  0.117  1.40  -0.947E+00    850.  0.271E+00  0.273E+00  0.265E-03  0.289E-13   18  23  30   17  11  16   12  19  20    0.000    0.000       0
+  0    252 00:59:56.34  12.8000A   2.1599  -1.9694   3.5228  0.117  1.40  -0.950E+00    850.  0.271E+00  0.273E+00  0.265E-03  0.289E-13   18  23  30   17  11  16   13  19  20    0.000    0.000       0
+  0    253 01:00:09.14  12.8000A   2.0730  -2.0018   3.5161  0.117  1.40  -0.954E+00    850.  0.271E+00  0.273E+00  0.265E-03  0.289E-13   18  23  30   17  10  16   13  19  20    0.000    0.000       0
Index: palm/trunk/SOURCE/Makefile
===================================================================
--- palm/trunk/SOURCE/Makefile	(revision 1690)
+++ palm/trunk/SOURCE/Makefile	(revision 1691)
@@ -13,5 +13,5 @@
 # PALM. If not, see <http://www.gnu.org/licenses/>.
 #
-# Copyright 1997-2014  Leibniz Universitaet Hannover
+# Copyright 1997-2015  Leibniz Universitaet Hannover
 #--------------------------------------------------------------------------------#
 #
@@ -20,5 +20,6 @@
 # Current revisions:
 # ------------------
-# 
+# Replaced prandtl_fluxes with surface_layer_fluxes. Added radiation_model to 
+# prognostic_equations
 # 
 # Former revisions:
@@ -239,5 +240,5 @@
 	mod_particle_attributes.f90 netcdf.f90 nudging.f90 package_parin.f90 \
 	palm.f90 parin.f90 plant_canopy_model.f90 poisfft.f90 poismg.f90 \
-	poismg_fast.f90 prandtl_fluxes.f90 pres.f90 print_1d.f90 production_e.f90 \
+	poismg_fast.f90 pres.f90 print_1d.f90 production_e.f90 \
 	prognostic_equations.f90 progress_bar.f90 radiation_model.f90 \
 	random_function.f90 random_gauss.f90 random_generator_parallel.f90 \
@@ -245,5 +246,5 @@
 	set_slicer_attributes_dvrp.f90 singleton.f90 sor.f90 \
 	subsidence.f90 sum_up_3d_data.f90 \
-	surface_coupler.f90 swap_timelevel.f90 temperton_fft.f90 \
+	surface_coupler.f90 surface_layer_fluxes.f90 swap_timelevel.f90 temperton_fft.f90 \
 	time_integration.f90 time_to_string.f90 timestep.f90 \
 	timestep_scheme_steering.f90 transpose.f90 tridia_solver.f90 \
@@ -356,5 +357,5 @@
 init_3d_model.o: modules.o cpulog.o mod_kinds.o random_function.o advec_ws.o\
 	land_surface_model.o ls_forcing.o lpm_init.o plant_canopy_model.o\
-        radiation_model.o random_generator_parallel.o
+	radiation_model.o random_generator_parallel.o surface_layer_fluxes.o
 init_advec.o: modules.o mod_kinds.o
 init_cloud_physics.o: modules.o mod_kinds.o
@@ -421,5 +422,4 @@
 poismg.o: modules.o cpulog.o mod_kinds.o
 poismg_fast.o: modules.o cpulog.o mod_kinds.o
-prandtl_fluxes.o: modules.o mod_kinds.o
 pres.o: modules.o cpulog.o mod_kinds.o poisfft.o poismg_fast.o
 print_1d.o: modules.o cpulog.o mod_kinds.o
@@ -430,5 +430,6 @@
 	cpulog.o diffusion_e.o diffusion_s.o diffusion_u.o diffusion_v.o diffusion_w.o \
 	eqn_state_seawater.o impact_of_latent_heat.o mod_kinds.o microphysics.o \
-	nudging.o plant_canopy_model.o production_e.o subsidence.o user_actions.o
+	nudging.o plant_canopy_model.o production_e.o radiation_model.o \
+	subsidence.o user_actions.o
 progress_bar.o: modules.o mod_kinds.o
 radiation_model.o : modules.o mod_particle_attributes.o
@@ -446,6 +447,7 @@
 subsidence.o: modules.o mod_kinds.o
 sum_up_3d_data.o: modules.o cpulog.o mod_kinds.o land_surface_model.o\
-                  radiation_model.o
+                  radiation_model.o 
 surface_coupler.o: modules.o cpulog.o mod_kinds.o
+surface_layer_fluxes.o: modules.o mod_kinds.o land_surface_model.o
 swap_timelevel.o: modules.o cpulog.o mod_kinds.o land_surface_model.o
 temperton_fft.o: modules.o mod_kinds.o
@@ -454,5 +456,5 @@
 	ls_forcing.o mod_kinds.o nudging.o production_e.o \
 	prognostic_equations.o progress_bar.o radiation_model.o \
-	user_actions.o
+	 user_actions.o surface_layer_fluxes.o
 time_to_string.o: mod_kinds.o
 timestep.o: modules.o cpulog.o mod_kinds.o
@@ -492,3 +494,3 @@
                    radiation_model.o random_function.o\
                    random_generator_parallel.o
-write_var_list.o: modules.o mod_kinds.o plant_canopy_model.o
+write_var_list.o: modules.o mod_kinds.o plant_canopy_model.o 
Index: palm/trunk/SOURCE/advec_s_bc.f90
===================================================================
--- palm/trunk/SOURCE/advec_s_bc.f90	(revision 1690)
+++ palm/trunk/SOURCE/advec_s_bc.f90	(revision 1691)
@@ -14,10 +14,10 @@
 ! PALM. If not, see <http://www.gnu.org/licenses/>.
 !
-! Copyright 1997-2014 Leibniz Universitaet Hannover
+! Copyright 1997-2015 Leibniz Universitaet Hannover
 !--------------------------------------------------------------------------------!
 !
 ! Current revisions:
 ! -----------------
-! 
+! Formatting corrections
 ! 
 ! Former revisions:
@@ -464,5 +464,5 @@
                 IF ( sw(k,i+1) == 1.0_wp )  THEN
                    snenn = sk_p(k,j,i) - sk_p(k,j,i+2)
-                   IF ( ABS( snenn ) .LT. 1E-9_wp )  snenn = 1E-9_wp
+                   IF ( ABS( snenn ) < 1E-9_wp )  snenn = 1E-9_wp
                    sterm = ( sk_p(k,j,i+1) - sk_p(k,j,i+2) ) / snenn
                    sterm = MIN( sterm, 0.9999_wp )
@@ -760,5 +760,5 @@
                 IF ( sw(k,j+1) == 1.0_wp )  THEN
                    snenn = sk_p(k,j,i) - sk_p(k,j+2,i)
-                   IF ( ABS( snenn ) .LT. 1E-9_wp )  snenn = 1E-9_wp
+                   IF ( ABS( snenn ) < 1E-9_wp )  snenn = 1E-9_wp
                    sterm = ( sk_p(k,j+1,i) - sk_p(k,j+2,i) ) / snenn
                    sterm = MIN( sterm, 0.9999_wp )
@@ -1209,5 +1209,5 @@
                 IF ( sw(k+1,j) == 1.0_wp )  THEN
                    snenn = sk_p(k,j,i) - sk_p(k+2,j,i)
-                   IF ( ABS( snenn ) .LT. 1E-9_wp )  snenn = 1E-9_wp
+                   IF ( ABS( snenn ) < 1E-9_wp )  snenn = 1E-9_wp
                    sterm = ( sk_p(k+1,j,i) - sk_p(k+2,j,i) ) / snenn
                    sterm = MIN( sterm, 0.9999_wp )
Index: palm/trunk/SOURCE/average_3d_data.f90
===================================================================
--- palm/trunk/SOURCE/average_3d_data.f90	(revision 1690)
+++ palm/trunk/SOURCE/average_3d_data.f90	(revision 1691)
@@ -14,10 +14,10 @@
 ! PALM. If not, see <http://www.gnu.org/licenses/>.
 !
-! Copyright 1997-2014 Leibniz Universitaet Hannover
+! Copyright 1997-2015 Leibniz Universitaet Hannover
 !--------------------------------------------------------------------------------!
 !
 ! Current revisions:
 ! -----------------
-! 
+! Added output of Obukhov length and radiative heating rates for RRTMG. 
 ! 
 ! Former revisions:
@@ -96,6 +96,9 @@
     USE radiation_model_mod,                                                   &
         ONLY:  rad_net, rad_net_av, rad_lw_in, rad_lw_in_av, rad_lw_out,       &
-               rad_lw_out_av, rad_sw_in, rad_sw_in_av, rad_sw_out,             &
-               rad_sw_out_av
+               rad_lw_out_av, rad_lw_cs_hr, rad_lw_cs_hr_av, rad_lw_hr,        &
+               rad_lw_hr_av, rad_sw_in, rad_sw_in_av, rad_sw_out,              &
+               rad_sw_out_av, rad_sw_cs_hr, rad_sw_cs_hr_av, rad_sw_hr,        &
+               rad_sw_hr_av
+
 
     IMPLICIT NONE
@@ -213,4 +216,11 @@
              ENDDO
 
+         CASE ( 'ol*' )
+             DO  i = nxlg, nxrg
+                DO  j = nysg, nyng
+                   ol_av(j,i) = ol_av(j,i) / REAL( average_count_3d, KIND=wp )
+                ENDDO
+             ENDDO
+
           CASE ( 'p' )
              DO  i = nxlg, nxrg
@@ -383,4 +393,22 @@
              ENDDO
 
+          CASE ( 'rad_lw_cs_hr' )
+             DO  i = nxlg, nxrg
+                DO  j = nysg, nyng
+                   DO  k = nzb, nzt+1
+                      rad_lw_cs_hr_av(k,j,i) = rad_lw_cs_hr_av(k,j,i) / REAL( average_count_3d, KIND=wp )
+                   ENDDO
+                ENDDO
+             ENDDO
+
+          CASE ( 'rad_lw_hr' )
+             DO  i = nxlg, nxrg
+                DO  j = nysg, nyng
+                   DO  k = nzb, nzt+1
+                      rad_lw_hr_av(k,j,i) = rad_lw_hr_av(k,j,i) / REAL( average_count_3d, KIND=wp )
+                   ENDDO
+                ENDDO
+             ENDDO
+
           CASE ( 'rad_sw_in' )
              DO  i = nxlg, nxrg
@@ -397,4 +425,22 @@
                    DO  k = nzb, nzt+1
                       rad_sw_out_av(k,j,i) = rad_sw_out_av(k,j,i) / REAL( average_count_3d, KIND=wp )
+                   ENDDO
+                ENDDO
+             ENDDO
+
+          CASE ( 'rad_sw_cs_hr' )
+             DO  i = nxlg, nxrg
+                DO  j = nysg, nyng
+                   DO  k = nzb, nzt+1
+                      rad_sw_cs_hr_av(k,j,i) = rad_sw_cs_hr_av(k,j,i) / REAL( average_count_3d, KIND=wp )
+                   ENDDO
+                ENDDO
+             ENDDO
+
+          CASE ( 'rad_sw_hr' )
+             DO  i = nxlg, nxrg
+                DO  j = nysg, nyng
+                   DO  k = nzb, nzt+1
+                      rad_sw_hr_av(k,j,i) = rad_sw_hr_av(k,j,i) / REAL( average_count_3d, KIND=wp )
                    ENDDO
                 ENDDO
Index: palm/trunk/SOURCE/check_parameters.f90
===================================================================
--- palm/trunk/SOURCE/check_parameters.f90	(revision 1690)
+++ palm/trunk/SOURCE/check_parameters.f90	(revision 1691)
@@ -14,10 +14,11 @@
 ! PALM. If not, see <http://www.gnu.org/licenses/>.
 !
-! Copyright 1997-2014 Leibniz Universitaet Hannover
+! Copyright 1997-2015 Leibniz Universitaet Hannover
 !--------------------------------------------------------------------------------!
 !
 ! Current revisions:
 ! -----------------
-! 
+! Added output of Obukhov length (ol) and radiative heating rates for RRTMG. 
+! Added checks for use of radiation / lsm with topography.
 ! 
 ! Former revisions:
@@ -307,4 +308,5 @@
     USE transpose_indices
 
+
     IMPLICIT NONE
 
@@ -650,6 +652,6 @@
           WRITE( action, '(A)' )  'cloud_droplets = .TRUE.'
        ENDIF
-       IF ( .NOT. prandtl_layer )  THEN
-          WRITE( action, '(A)' )  'prandtl_layer = .FALSE.'
+       IF ( .NOT. constant_flux_layer )  THEN
+          WRITE( action, '(A)' )  'constant_flux_layer = .FALSE.'
        ENDIF
        IF ( action /= ' ' )  THEN
@@ -1007,8 +1009,14 @@
        ENDIF
 
-       IF ( .NOT. prandtl_layer )  THEN
+       IF ( .NOT. constant_flux_layer )  THEN
           message_string = 'lsm requires '//                                   &
-                           'prandtl_layer = .T.'
+                           'constant_flux_layer = .T.'
           CALL message( 'check_parameters', 'PA0400', 1, 2, 0, 6, 0 )
+       ENDIF
+
+       IF ( topography /= 'flat' )  THEN
+          message_string = 'lsm cannot be used ' //  & 
+                           'in combination with  topography /= "flat"'
+          CALL message( 'check_parameters', 'PA0415', 1, 2, 0, 6, 0 )
        ENDIF
 
@@ -1196,7 +1204,10 @@
           CALL message( 'check_parameters', 'PA0411', 1, 2, 0, 6, 0 )
        ENDIF
-
-    ENDIF
-
+       IF ( topography /= 'flat' )  THEN
+          message_string = 'radiation scheme cannot be used ' //  & 
+                           'in combination with  topography /= "flat"'
+          CALL message( 'check_parameters', 'PA0414', 1, 2, 0, 6, 0 )
+       ENDIF
+    ENDIF
 
     IF ( .NOT. ( loop_optimization == 'cache'  .OR.                            &
@@ -1729,5 +1740,5 @@
 !-- In case of using a prandtl-layer, calculated (or prescribed) surface
 !-- fluxes have to be used in the diffusion-terms
-    IF ( prandtl_layer )  use_surface_fluxes = .TRUE.
+    IF ( constant_flux_layer )  use_surface_fluxes = .TRUE.
 
 !
@@ -1796,5 +1807,5 @@
     ELSEIF ( bc_e_b == '(u*)**2+neumann' )  THEN
        ibc_e_b = 2
-       IF ( .NOT. prandtl_layer )  THEN
+       IF ( .NOT. constant_flux_layer )  THEN
           bc_e_b = 'neumann'
           ibc_e_b = 1
@@ -2003,5 +2014,5 @@
        IF ( surface_waterflux == 9999999.9_wp  )  THEN
           constant_waterflux = .FALSE.
-          IF ( large_scale_forcing )  THEN
+          IF ( large_scale_forcing .OR. land_surface )  THEN
              IF ( ibc_q_b == 0 )  THEN
                 constant_waterflux = .FALSE.
@@ -2045,7 +2056,8 @@
     ELSEIF ( bc_uv_b == 'neumann' )  THEN
        ibc_uv_b = 1
-       IF ( prandtl_layer )  THEN
+       IF ( constant_flux_layer )  THEN
           message_string = 'boundary condition: bc_uv_b = "' // &
-               TRIM( bc_uv_b ) // '" is not allowed with prandtl_layer = .TRUE.'
+               TRIM( bc_uv_b ) // '" is not allowed with constant_flux_layer'  &
+               // ' = .TRUE.'
           CALL message( 'check_parameters', 'PA0075', 1, 2, 0, 6, 0 )
        ENDIF
@@ -2356,5 +2368,5 @@
              dopr_unit(i)  = 'm2/s2'
              hom(:,2,12,:) = SPREAD( zw, 2, statistic_regions+1 )
-             IF ( prandtl_layer )  hom(nzb,2,12,:) = zu(1)
+             IF ( constant_flux_layer )  hom(nzb,2,12,:) = zu(1)
 
           CASE ( 'w*u*' )
@@ -2367,5 +2379,5 @@
              dopr_unit(i)  = 'm2/s2'
              hom(:,2,14,:) = SPREAD( zw, 2, statistic_regions+1 )
-             IF ( prandtl_layer )  hom(nzb,2,14,:) = zu(1)
+             IF ( constant_flux_layer )  hom(nzb,2,14,:) = zu(1)
 
           CASE ( 'w*v*' )
@@ -2393,5 +2405,5 @@
              dopr_unit(i)  = 'm2/s2'
              hom(:,2,19,:) = SPREAD( zw, 2, statistic_regions+1 )
-             IF ( prandtl_layer )  hom(nzb,2,19,:) = zu(1)
+             IF ( constant_flux_layer )  hom(nzb,2,19,:) = zu(1)
 
           CASE ( 'wv' )
@@ -2399,5 +2411,5 @@
              dopr_unit(i)  = 'm2/s2'
              hom(:,2,20,:) = SPREAD( zw, 2, statistic_regions+1 )
-             IF ( prandtl_layer )  hom(nzb,2,20,:) = zu(1)
+             IF ( constant_flux_layer )  hom(nzb,2,20,:) = zu(1)
 
           CASE ( 'w*pt*BC' )
@@ -3153,4 +3165,56 @@
              ENDIF
 
+          CASE ( 'rad_lw_cs_hr' )
+             IF ( (.NOT. radiation) .OR. radiation_scheme /= 'rrtmg' )  THEN
+                message_string = 'data_output_pr = ' //                        &
+                                 TRIM( data_output_pr(i) ) // ' is not ava' // &
+                                 'lable for radiation = .FALSE. or ' //        &
+                                 'radiation_scheme /= "rrtmg"'
+                CALL message( 'check_parameters', 'PA0413', 1, 2, 0, 6, 0 )
+             ELSE
+                dopr_index(i) = 106
+                dopr_unit(i)  = 'K/h'
+                hom(:,2,106,:)  = SPREAD( zu, 2, statistic_regions+1 )
+             ENDIF
+
+          CASE ( 'rad_lw_hr' )
+             IF ( (.NOT. radiation) .OR. radiation_scheme /= 'rrtmg' )  THEN
+                message_string = 'data_output_pr = ' //                        &
+                                 TRIM( data_output_pr(i) ) // ' is not ava' // &
+                                 'lable for radiation = .FALSE. or ' //        &
+                                 'radiation_scheme /= "rrtmg"'
+                CALL message( 'check_parameters', 'PA0413', 1, 2, 0, 6, 0 )
+             ELSE
+                dopr_index(i) = 107
+                dopr_unit(i)  = 'K/h'
+                hom(:,2,107,:)  = SPREAD( zu, 2, statistic_regions+1 )
+             ENDIF
+
+          CASE ( 'rad_sw_cs_hr' )
+             IF ( (.NOT. radiation) .OR. radiation_scheme /= 'rrtmg' )  THEN
+                message_string = 'data_output_pr = ' //                        &
+                                 TRIM( data_output_pr(i) ) // ' is not ava' // &
+                                 'lable for radiation = .FALSE. or ' //        &
+                                 'radiation_scheme /= "rrtmg"'
+                CALL message( 'check_parameters', 'PA0413', 1, 2, 0, 6, 0 )
+             ELSE
+                dopr_index(i) = 108
+                dopr_unit(i)  = 'K/h'
+                hom(:,2,108,:)  = SPREAD( zu, 2, statistic_regions+1 )
+             ENDIF
+
+          CASE ( 'rad_sw_hr' )
+             IF ( (.NOT. radiation) .OR. radiation_scheme /= 'rrtmg' )  THEN
+                message_string = 'data_output_pr = ' //                        &
+                                 TRIM( data_output_pr(i) ) // ' is not ava' // &
+                                 'lable for radiation = .FALSE. or ' //        &
+                                 'radiation_scheme /= "rrtmg"'
+                CALL message( 'check_parameters', 'PA0413', 1, 2, 0, 6, 0 )
+             ELSE
+                dopr_index(i) = 109
+                dopr_unit(i)  = 'K/h'
+                hom(:,2,109,:)  = SPREAD( zu, 2, statistic_regions+1 )
+             ENDIF
+
           CASE DEFAULT
 
@@ -3351,8 +3415,8 @@
              unit = 'kg/kg'
 
-
-          CASE ( 'rad_lw_in', 'rad_lw_out', 'rad_sw_in', 'rad_sw_out' )
+          CASE ( 'rad_lw_in', 'rad_lw_out', 'rad_lw_cs_hr', 'rad_lw_hr',       &
+                 'rad_sw_in', 'rad_sw_out', 'rad_sw_cs_hr', 'rad_sw_hr' )
              IF ( .NOT. radiation .OR. radiation_scheme /= 'rrtmg' )  THEN
-                message_string = '"output of "' // TRIM( var ) // '" requi' //  &
+                message_string = '"output of "' // TRIM( var ) // '" requi' // &
                                  'res radiation = .TRUE. and ' //              &
                                  'radiation_scheme = "rrtmg"'
@@ -3395,5 +3459,5 @@
 
           CASE ( 'c_liq*', 'c_soil*', 'c_veg*', 'ghf_eb*', 'lai*', 'lwp*',     &
-                 'm_liq_eb*', 'pra*', 'prr*', 'qsws*', 'qsws_eb*',             &
+                 'm_liq_eb*', 'ol*', 'pra*', 'prr*', 'qsws*', 'qsws_eb*',      &
                  'qsws_liq_eb*', 'qsws_soil_eb*', 'qsws_veg_eb*', 'rad_net*',  &
                  'rrtm_aldif*', 'rrtm_aldir*', 'rrtm_asdif*', 'rrtm_asdir*',   &
@@ -3514,5 +3578,7 @@
              IF ( TRIM( var ) == 'ghf_eb*')  unit = 'W/m2'
              IF ( TRIM( var ) == 'lai*'   )  unit = 'none'
-             IF ( TRIM( var ) == 'lwp*'   )  unit = 'kg/kg*m'
+             IF ( TRIM( var ) == 'lwp*'   )  unit = 'kg/m2'
+             IF ( TRIM( var ) == 'm_liq_eb*'     )  unit = 'm'
+             IF ( TRIM( var ) == 'ol*'   )   unit = 'm'
              IF ( TRIM( var ) == 'pra*'   )  unit = 'mm'
              IF ( TRIM( var ) == 'prr*'   )  unit = 'mm/s'
@@ -3788,7 +3854,7 @@
           constant_diffusion = .TRUE.
 
-          IF ( prandtl_layer )  THEN
-             message_string = 'prandtl_layer is not allowed with fixed ' //    &
-                              'value of km'
+          IF ( constant_flux_layer )  THEN
+             message_string = 'constant_flux_layer is not allowed with fixed ' &
+                              // 'value of km'
              CALL message( 'check_parameters', 'PA0123', 1, 2, 0, 6, 0 )
           ENDIF
@@ -3816,8 +3882,8 @@
 
 !
-!-- Check value range for rif
-    IF ( rif_min >= rif_max )  THEN
-       WRITE( message_string, * )  'rif_min = ', rif_min, ' must be less ',    &
-                                   'than rif_max = ', rif_max
+!-- Check value range for zeta = z/L
+    IF ( zeta_min >= zeta_max )  THEN
+       WRITE( message_string, * )  'zeta_min = ', zeta_min, ' must be less ',  &
+                                   'than zeta_max = ', zeta_max
        CALL message( 'check_parameters', 'PA0125', 1, 2, 0, 6, 0 )
     ENDIF
@@ -4235,4 +4301,14 @@
 
 !
+!-- Check for valid setting of most_method
+    IF ( TRIM( most_method ) /= 'circular'  .AND.                              &
+         TRIM( most_method ) /= 'newton'  .AND.                                &
+         TRIM( most_method ) /= 'lookup' )  THEN
+       message_string = 'most_method = "' // TRIM( most_method ) //      &
+                        '" is unknown'
+       CALL message( 'check_parameters', 'PA0416', 1, 2, 0, 6, 0 )
+    ENDIF
+
+!
 !-- Check &userpar parameters
     CALL user_check_parameters
Index: palm/trunk/SOURCE/data_output_2d.f90
===================================================================
--- palm/trunk/SOURCE/data_output_2d.f90	(revision 1690)
+++ palm/trunk/SOURCE/data_output_2d.f90	(revision 1691)
@@ -14,10 +14,11 @@
 ! PALM. If not, see <http://www.gnu.org/licenses/>.
 !
-! Copyright 1997-2014 Leibniz Universitaet Hannover
+! Copyright 1997-2015 Leibniz Universitaet Hannover
 !--------------------------------------------------------------------------------!
 !
 ! Current revisions:
 ! -----------------
-! 
+! Added output of Obukhov length (ol) and radiative heating rates  for RRTMG. 
+! Formatting corrections.
 ! 
 ! Former revisions:
@@ -112,5 +113,5 @@
 
     USE arrays_3d,                                                             &
-        ONLY:  dzw, e, nr, p, pt, q, qc, ql, ql_c, ql_v, ql_vp, qr, qsws,      &
+        ONLY:  dzw, e, nr, ol, p, pt, q, qc, ql, ql_c, ql_v, ql_vp, qr, qsws,  &
                rho, sa, shf, tend, ts, u, us, v, vpt, w, z0, z0h, zu, zw
         
@@ -162,6 +163,8 @@
     USE radiation_model_mod,                                                   &
         ONLY:  rad_net, rad_net_av, rad_sw_in, rad_sw_in_av, rad_sw_out,       &
-               rad_sw_out_av, rad_lw_in, rad_lw_in_av, rad_lw_out,             &
-               rad_lw_out_av 
+               rad_sw_out_av, rad_sw_cs_hr, rad_sw_cs_hr_av, rad_sw_hr,        &
+               rad_sw_hr_av, rad_lw_in, rad_lw_in_av, rad_lw_out,              &
+               rad_lw_out_av, rad_lw_cs_hr, rad_lw_cs_hr_av, rad_lw_hr,        &
+               rad_lw_hr_av
 
     IMPLICIT NONE
@@ -543,4 +546,22 @@
                 IF ( mode == 'xy' )  level_z = zu
 
+             CASE ( 'ol*_xy' )        ! 2d-array
+                IF ( av == 0 ) THEN
+                   DO  i = nxlg, nxrg
+                      DO  j = nysg, nyng
+                         local_pf(i,j,nzb+1) = ol(j,i)
+                      ENDDO
+                   ENDDO
+                ELSE
+                   DO  i = nxlg, nxrg
+                      DO  j = nysg, nyng
+                         local_pf(i,j,nzb+1) = ol_av(j,i)
+                      ENDDO
+                   ENDDO
+                ENDIF
+                resorted = .TRUE.
+                two_d = .TRUE.
+                level_z(nzb+1) = zu(nzb+1)
+
              CASE ( 'p_xy', 'p_xz', 'p_yz' )
                 IF ( av == 0 )  THEN
@@ -937,4 +958,18 @@
                 ENDIF
 
+             CASE ( 'rad_lw_cs_hr_xy', 'rad_lw_cs_hr_xz', 'rad_lw_cs_hr_yz' )
+                IF ( av == 0 )  THEN
+                   to_be_resorted => rad_lw_cs_hr
+                ELSE
+                   to_be_resorted => rad_lw_cs_hr_av
+                ENDIF
+
+             CASE ( 'rad_lw_hr_xy', 'rad_lw_hr_xz', 'rad_lw_hr_yz' )
+                IF ( av == 0 )  THEN
+                   to_be_resorted => rad_lw_hr
+                ELSE
+                   to_be_resorted => rad_lw_hr_av
+                ENDIF
+
              CASE ( 'rad_sw_in_xy', 'rad_sw_in_xz', 'rad_sw_in_yz' )
                 IF ( av == 0 )  THEN
@@ -949,4 +984,18 @@
                 ELSE
                    to_be_resorted => rad_sw_out_av
+                ENDIF
+
+             CASE ( 'rad_sw_cs_hr_xy', 'rad_sw_cs_hr_xz', 'rad_sw_cs_hr_yz' )
+                IF ( av == 0 )  THEN
+                   to_be_resorted => rad_sw_cs_hr
+                ELSE
+                   to_be_resorted => rad_sw_cs_hr_av
+                ENDIF
+
+             CASE ( 'rad_sw_hr_xy', 'rad_sw_hr_xz', 'rad_sw_hr_yz' )
+                IF ( av == 0 )  THEN
+                   to_be_resorted => rad_sw_hr
+                ELSE
+                   to_be_resorted => rad_sw_hr_av
                 ENDIF
 
@@ -1227,5 +1276,5 @@
 !--                Exit the loop for layers beyond the data output domain
 !--                (used for soil model)
-                   IF ( layer_xy .GT. nzt_do )  THEN 
+                   IF ( layer_xy > nzt_do )  THEN 
                       EXIT loop1
                    ENDIF
Index: palm/trunk/SOURCE/data_output_3d.f90
===================================================================
--- palm/trunk/SOURCE/data_output_3d.f90	(revision 1690)
+++ palm/trunk/SOURCE/data_output_3d.f90	(revision 1691)
@@ -14,10 +14,10 @@
 ! PALM. If not, see <http://www.gnu.org/licenses/>.
 !
-! Copyright 1997-2014 Leibniz Universitaet Hannover
+! Copyright 1997-2015 Leibniz Universitaet Hannover
 !--------------------------------------------------------------------------------!
 !
 ! Current revisions:
 ! ------------------
-! 
+! Added output of radiative heating rates for RRTMG
 ! 
 ! Former revisions:
@@ -138,5 +138,7 @@
     USE radiation_model_mod,                                                   &
         ONLY:  rad_lw_in, rad_lw_in_av, rad_lw_out, rad_lw_out_av,             &
-               rad_sw_in, rad_sw_in_av, rad_sw_out, rad_sw_out_av
+               rad_lw_cs_hr, rad_lw_cs_hr_av, rad_lw_hr, rad_lw_hr_av,         &
+               rad_sw_in, rad_sw_in_av, rad_sw_out, rad_sw_out_av,             &
+               rad_sw_cs_hr, rad_sw_cs_hr_av, rad_sw_hr, rad_sw_hr_av
 
 
@@ -495,4 +497,18 @@
              ENDIF
 
+          CASE ( 'rad_sw_cs_hr' )
+             IF ( av == 0 )  THEN
+                to_be_resorted => rad_sw_cs_hr
+             ELSE
+                to_be_resorted => rad_sw_cs_hr_av
+             ENDIF
+
+          CASE ( 'rad_sw_hr' )
+             IF ( av == 0 )  THEN
+                to_be_resorted => rad_sw_hr
+             ELSE
+                to_be_resorted => rad_sw_hr_av
+             ENDIF
+
           CASE ( 'rad_lw_in' )
              IF ( av == 0 )  THEN
@@ -507,4 +523,18 @@
              ELSE
                 to_be_resorted => rad_lw_out_av
+             ENDIF
+
+          CASE ( 'rad_lw_cs_hr' )
+             IF ( av == 0 )  THEN
+                to_be_resorted => rad_lw_cs_hr
+             ELSE
+                to_be_resorted => rad_lw_cs_hr_av
+             ENDIF
+
+          CASE ( 'rad_lw_hr' )
+             IF ( av == 0 )  THEN
+                to_be_resorted => rad_lw_hr
+             ELSE
+                to_be_resorted => rad_lw_hr_av
              ENDIF
 
Index: palm/trunk/SOURCE/data_output_mask.f90
===================================================================
--- palm/trunk/SOURCE/data_output_mask.f90	(revision 1690)
+++ palm/trunk/SOURCE/data_output_mask.f90	(revision 1691)
@@ -14,10 +14,10 @@
 ! PALM. If not, see <http://www.gnu.org/licenses/>.
 !
-! Copyright 1997-2014 Leibniz Universitaet Hannover
+! Copyright 1997-2015 Leibniz Universitaet Hannover
 !--------------------------------------------------------------------------------!
 !
 ! Current revisions:
 ! -----------------
-! 
+! Added output of radiative heating rates for RRTMG
 ! 
 ! Former revisions:
@@ -119,5 +119,8 @@
     USE radiation_model_mod,                                                   &
         ONLY:  rad_lw_in, rad_lw_in_av, rad_lw_out, rad_lw_out_av,             &
-               rad_sw_in, rad_sw_in_av, rad_sw_out, rad_sw_out_av
+               rad_lw_cs_hr, rad_lw_cs_hr_av, rad_lw_hr, rad_lw_hr_av,         &
+               rad_sw_in, rad_sw_in_av, rad_sw_out, rad_sw_out_av,             &
+               rad_sw_cs_hr, rad_sw_cs_hr_av, rad_sw_hr, rad_sw_hr_av
+
 
     IMPLICIT NONE
@@ -405,4 +408,32 @@
              ENDIF
 
+          CASE ( 'rad_lw_in' )
+             IF ( av == 0 )  THEN
+                to_be_resorted => rad_lw_in
+             ELSE
+                to_be_resorted => rad_lw_in_av
+             ENDIF
+
+          CASE ( 'rad_lw_out' )
+             IF ( av == 0 )  THEN
+                to_be_resorted => rad_lw_out
+             ELSE
+                to_be_resorted => rad_lw_out_av
+             ENDIF
+
+          CASE ( 'rad_lw_cs_hr' )
+             IF ( av == 0 )  THEN
+                to_be_resorted => rad_lw_cs_hr
+             ELSE
+                to_be_resorted => rad_lw_cs_hr_av
+             ENDIF
+
+          CASE ( 'rad_lw_hr' )
+             IF ( av == 0 )  THEN
+                to_be_resorted => rad_lw_hr
+             ELSE
+                to_be_resorted => rad_lw_hr_av
+             ENDIF
+
           CASE ( 'rad_sw_in' )
              IF ( av == 0 )  THEN
@@ -419,16 +450,16 @@
              ENDIF
 
-          CASE ( 'rad_lw_in' )
-             IF ( av == 0 )  THEN
-                to_be_resorted => rad_lw_in
-             ELSE
-                to_be_resorted => rad_lw_in_av
-             ENDIF
-
-          CASE ( 'rad_lw_out' )
-             IF ( av == 0 )  THEN
-                to_be_resorted => rad_lw_out
-             ELSE
-                to_be_resorted => rad_lw_out_av
+          CASE ( 'rad_sw_cs_hr' )
+             IF ( av == 0 )  THEN
+                to_be_resorted => rad_sw_cs_hr
+             ELSE
+                to_be_resorted => rad_sw_cs_hr_av
+             ENDIF
+
+          CASE ( 'rad_sw_hr' )
+             IF ( av == 0 )  THEN
+                to_be_resorted => rad_sw_hr
+             ELSE
+                to_be_resorted => rad_sw_hr_av
              ENDIF
 
Index: palm/trunk/SOURCE/diffusion_s.f90
===================================================================
--- palm/trunk/SOURCE/diffusion_s.f90	(revision 1690)
+++ palm/trunk/SOURCE/diffusion_s.f90	(revision 1691)
@@ -14,10 +14,10 @@
 ! PALM. If not, see <http://www.gnu.org/licenses/>.
 !
-! Copyright 1997-2014 Leibniz Universitaet Hannover
+! Copyright 1997-2015 Leibniz Universitaet Hannover
 !--------------------------------------------------------------------------------!
 !
 ! Current revisions:
 ! ------------------
-! 
+! Formatting corrections.
 ! 
 ! Former revisions:
@@ -144,6 +144,6 @@
 !
 !--          Apply prescribed horizontal wall heatflux where necessary
-             IF ( ( wall_w_x(j,i) .NE. 0.0_wp ) .OR. ( wall_w_y(j,i) .NE. 0.0_wp ) ) &
-             THEN
+             IF ( ( wall_w_x(j,i) /= 0.0_wp ) .OR. ( wall_w_y(j,i) /= 0.0_wp ) &
+                )  THEN
                 DO  k = nzb_s_inner(j,i)+1, nzb_s_outer(j,i)
 
@@ -400,5 +400,5 @@
 !
 !--    Apply prescribed horizontal wall heatflux where necessary
-       IF ( ( wall_w_x(j,i) .NE. 0.0_wp ) .OR. ( wall_w_y(j,i) .NE. 0.0_wp ) )       &
+       IF ( ( wall_w_x(j,i) /= 0.0_wp ) .OR. ( wall_w_y(j,i) /= 0.0_wp ) )     &
        THEN
           DO  k = nzb_s_inner(j,i)+1, nzb_s_outer(j,i)
Index: palm/trunk/SOURCE/diffusion_u.f90
===================================================================
--- palm/trunk/SOURCE/diffusion_u.f90	(revision 1690)
+++ palm/trunk/SOURCE/diffusion_u.f90	(revision 1691)
@@ -14,10 +14,10 @@
 ! PALM. If not, see <http://www.gnu.org/licenses/>.
 !
-! Copyright 1997-2014 Leibniz Universitaet Hannover
+! Copyright 1997-2015 Leibniz Universitaet Hannover
 !--------------------------------------------------------------------------------!
 !
 ! Current revisions:
 ! -----------------
-! 
+! Formatting corrections.
 ! 
 ! Former revisions:
@@ -508,5 +508,5 @@
 !
 !--    Wall functions at the north and south walls, respectively
-       IF ( wall_u(j,i) .NE. 0.0_wp )  THEN
+       IF ( wall_u(j,i) /= 0.0_wp )  THEN
 
 !
Index: palm/trunk/SOURCE/flow_statistics.f90
===================================================================
--- palm/trunk/SOURCE/flow_statistics.f90	(revision 1690)
+++ palm/trunk/SOURCE/flow_statistics.f90	(revision 1691)
@@ -14,10 +14,11 @@
 ! PALM. If not, see <http://www.gnu.org/licenses/>.
 !
-! Copyright 1997-2014 Leibniz Universitaet Hannover
+! Copyright 1997-2015 Leibniz Universitaet Hannover
 !--------------------------------------------------------------------------------!
 !
 ! Current revisions:
 ! -----------------
-! 
+! Revised calculation of Obukhov length. Added output of radiative heating >
+! rates for RRTMG.
 ! 
 ! Former revisions:
@@ -161,8 +162,8 @@
 
     USE arrays_3d,                                                             &
-        ONLY:  ddzu, ddzw, e, hyp, km, kh, nr, p, prho, pt, q, qc, ql, qr, qs, &
-               qsws, qswst, rho, sa, saswsb, saswst, shf, td_lsa_lpt, td_lsa_q,&
-               td_sub_lpt, td_sub_q, time_vert, ts, tswst, u, ug, us, usws,    &
-               uswst, vsws, v, vg, vpt, vswst, w, w_subs, zw
+        ONLY:  ddzu, ddzw, e, hyp, km, kh, nr, ol, p, prho, pt, q, qc, ql, qr, &
+               qs, qsws, qswst, rho, sa, saswsb, saswst, shf, td_lsa_lpt,      &
+               td_lsa_q, td_sub_lpt, td_sub_q, time_vert, ts, tswst, u, ug, us,& 
+               usws, uswst, vsws, v, vg, vpt, vswst, w, w_subs, zw
         
     USE cloud_parameters,                                                      &
@@ -172,6 +173,6 @@
         ONLY:   average_count_pr, cloud_droplets, cloud_physics, do_sum,       &
                 dt_3d, g, humidity, icloud_scheme, kappa, large_scale_forcing, &
-                large_scale_subsidence, max_pr_user, message_string, ocean,    &
-                passive_scalar, precipitation, simulated_time,                 &
+                large_scale_subsidence, max_pr_user, message_string, neutral,  &
+                ocean, passive_scalar, precipitation, simulated_time,          &
                 use_subsidence_tendencies, use_surface_fluxes, use_top_fluxes, &
                 ws_scheme_mom, ws_scheme_sca
@@ -199,5 +200,6 @@
     USE radiation_model_mod,                                                   &
         ONLY:  dots_rad, radiation, radiation_scheme, rad_net,                 &
-               rad_lw_in, rad_lw_out, rad_sw_in, rad_sw_out
+               rad_lw_in, rad_lw_out, rad_lw_cs_hr, rad_lw_hr,                 &
+               rad_sw_in, rad_sw_out, rad_sw_cs_hr, rad_sw_hr
 
 #if defined ( __rrtmg )
@@ -207,4 +209,5 @@
   
     USE statistics
+
 
     IMPLICIT NONE
@@ -240,5 +243,5 @@
     CALL cpu_log( log_point(10), 'flow_statistics', 'start' )
 
-    !$acc update host( km, kh, e, pt, qs, qsws, rif, shf, ts, u, usws, v, vsws, w )
+    !$acc update host( km, kh, e, ol, pt, qs, qsws, shf, ts, u, usws, v, vsws, w )
 
 !
@@ -744,13 +747,19 @@
 !
 !--                   Formula does not work if ql(nzb) /= 0.0
-                      sums_l(nzb,51,tn) = sums_l(nzb,51,tn) + &   ! w"q" (w"qv")
-                                          qsws(j,i) * rmask(j,i,sr)
+                      sums_l(nzb,51,tn) = sums_l(nzb,51,tn) +                  & 
+                                          qsws(j,i) * rmask(j,i,sr) ! w"q" (w"qv")
                    ENDIF
                 ENDIF
                 IF ( passive_scalar )  THEN
-                   sums_l(nzb,48,tn) = sums_l(nzb,48,tn) + &
-                                       qsws(j,i) * rmask(j,i,sr)  ! w"q" (w"qv")
+                   sums_l(nzb,48,tn) = sums_l(nzb,48,tn) +                     &
+                                       qsws(j,i) * rmask(j,i,sr) ! w"q" (w"qv")
                 ENDIF
              ENDIF
+
+             IF ( .NOT. neutral )  THEN
+                sums_l(nzb,114,tn) = sums_l(nzb,114,tn) +                      &
+                                    ol(j,i)  * rmask(j,i,sr) ! L
+             ENDIF
+
 
              IF ( land_surface )  THEN
@@ -774,8 +783,8 @@
 #if defined ( __rrtmg )
                 IF ( radiation_scheme == 'rrtmg' )  THEN
-                   sums_l(nzb,106,tn)  = sums_l(nzb,106,tn)  + rrtm_aldif(0,j,i)
-                   sums_l(nzb,107,tn)  = sums_l(nzb,107,tn)  + rrtm_aldir(0,j,i)
-                   sums_l(nzb,108,tn)  = sums_l(nzb,108,tn)  + rrtm_asdif(0,j,i)
-                   sums_l(nzb,109,tn)  = sums_l(nzb,109,tn)  + rrtm_asdir(0,j,i)
+                   sums_l(nzb,110,tn)  = sums_l(nzb,110,tn)  + rrtm_aldif(0,j,i)
+                   sums_l(nzb,111,tn)  = sums_l(nzb,111,tn)  + rrtm_aldir(0,j,i)
+                   sums_l(nzb,112,tn)  = sums_l(nzb,112,tn)  + rrtm_asdif(0,j,i)
+                   sums_l(nzb,113,tn)  = sums_l(nzb,113,tn)  + rrtm_asdir(0,j,i)
                 ENDIF
 #endif
@@ -997,6 +1006,6 @@
 !--    First calculate the products, then the divergence.
 !--    Calculation is time consuming. Do it only, if profiles shall be plotted.
-       IF ( hom(nzb+1,2,55,0) /= 0.0_wp  .OR.  hom(nzb+1,2,68,0) /= 0.0_wp )  THEN
-
+       IF ( hom(nzb+1,2,55,0) /= 0.0_wp  .OR.  hom(nzb+1,2,68,0) /= 0.0_wp )   &
+       THEN
           sums_ll = 0.0_wp  ! local array
 
@@ -1037,6 +1046,6 @@
 !
 !--    Divergence of vertical flux of SGS TKE and the flux itself (69)
-       IF ( hom(nzb+1,2,57,0) /= 0.0_wp  .OR.  hom(nzb+1,2,69,0) /= 0.0_wp )  THEN
-
+       IF ( hom(nzb+1,2,57,0) /= 0.0_wp  .OR.  hom(nzb+1,2,69,0) /= 0.0_wp )   &
+       THEN
           !$OMP DO
           DO  i = nxl, nxr
@@ -1109,5 +1118,5 @@
 !--    Collect current large scale advection and subsidence tendencies for
 !--    data output
-       IF ( large_scale_forcing  .AND.  ( simulated_time .GT. 0.0_wp ) )  THEN
+       IF ( large_scale_forcing  .AND.  ( simulated_time > 0.0_wp ) )  THEN
 !
 !--       Interpolation in time of LSF_DATA 
@@ -1156,6 +1165,8 @@
              DO  j =  nys, nyn
                 DO  k = nzb_soil, nzt_soil
-                   sums_l(k,89,tn)  = sums_l(k,89,tn)  + t_soil(k,j,i) * rmask(j,i,sr)
-                   sums_l(k,91,tn)  = sums_l(k,91,tn)  + m_soil(k,j,i) * rmask(j,i,sr)
+                   sums_l(k,89,tn)  = sums_l(k,89,tn)  + t_soil(k,j,i)         &
+                                      * rmask(j,i,sr)
+                   sums_l(k,91,tn)  = sums_l(k,91,tn)  + m_soil(k,j,i)         &
+                                      * rmask(j,i,sr)
                 ENDDO
              ENDDO
@@ -1168,8 +1179,20 @@
              DO  j =  nys, nyn
                 DO  k = nzb_s_inner(j,i)+1, nzt+1
-                   sums_l(k,102,tn)  = sums_l(k,102,tn)  + rad_lw_in(k,j,i) * rmask(j,i,sr)
-                   sums_l(k,103,tn)  = sums_l(k,103,tn)  + rad_lw_out(k,j,i) * rmask(j,i,sr)
-                   sums_l(k,104,tn)  = sums_l(k,104,tn)  + rad_sw_in(k,j,i) * rmask(j,i,sr)
-                   sums_l(k,105,tn)  = sums_l(k,105,tn)  + rad_sw_out(k,j,i) * rmask(j,i,sr)
+                   sums_l(k,102,tn)  = sums_l(k,102,tn)  + rad_lw_in(k,j,i)    &
+                                       * rmask(j,i,sr)
+                   sums_l(k,103,tn)  = sums_l(k,103,tn)  + rad_lw_out(k,j,i)   &
+                                       * rmask(j,i,sr)
+                   sums_l(k,104,tn)  = sums_l(k,104,tn)  + rad_sw_in(k,j,i)    &
+                                       * rmask(j,i,sr)
+                   sums_l(k,105,tn)  = sums_l(k,105,tn)  + rad_sw_out(k,j,i)   &
+                                       * rmask(j,i,sr)
+                   sums_l(k,106,tn)  = sums_l(k,106,tn)  + rad_lw_cs_hr(k,j,i) &
+                                       * rmask(j,i,sr)
+                   sums_l(k,107,tn)  = sums_l(k,107,tn)  + rad_lw_hr(k,j,i)    &
+                                       * rmask(j,i,sr)
+                   sums_l(k,108,tn)  = sums_l(k,108,tn)  + rad_sw_cs_hr(k,j,i) &
+                                       * rmask(j,i,sr)
+                   sums_l(k,109,tn)  = sums_l(k,108,tn)  + rad_sw_hr(k,j,i)    &
+                                       * rmask(j,i,sr)
                 ENDDO
              ENDDO
@@ -1374,14 +1397,22 @@
           hom(:,1,105,sr) = sums(:,105)            ! rad_sw_out
 
+          IF ( radiation_scheme == 'rrtmg' )  THEN
+             hom(:,1,106,sr) = sums(:,106)            ! rad_lw_cs_hr
+             hom(:,1,107,sr) = sums(:,107)            ! rad_lw_hr
+             hom(:,1,108,sr) = sums(:,108)            ! rad_sw_cs_hr
+             hom(:,1,109,sr) = sums(:,109)            ! rad_sw_hr
+
 #if defined ( __rrtmg )
-          IF ( radiation_scheme == 'rrtmg' )  THEN
-             hom(:,1,106,sr) = sums(:,106)            ! rrtm_aldif
-             hom(:,1,107,sr) = sums(:,107)            ! rrtm_aldir
-             hom(:,1,108,sr) = sums(:,108)            ! rrtm_asdif
-             hom(:,1,109,sr) = sums(:,109)            ! rrtm_asdir
+             hom(:,1,110,sr) = sums(:,110)            ! rrtm_aldif
+             hom(:,1,111,sr) = sums(:,111)            ! rrtm_aldir
+             hom(:,1,112,sr) = sums(:,112)            ! rrtm_asdif
+             hom(:,1,113,sr) = sums(:,113)            ! rrtm_asdir
+#endif
           ENDIF
-#endif
-
-       ENDIF
+
+
+       ENDIF
+
+       hom(:,1,114,sr) = sums(:,114)            !: L
 
        hom(:,1,pr_palm-1,sr) = sums(:,pr_palm-1)
@@ -1520,8 +1551,14 @@
        ts_value(20,sr) = hom(nzb+2,1,pr_palm,sr)    ! v'w'    at k=0
        ts_value(21,sr) = hom(nzb,1,48,sr)           ! w"q"    at k=0
-
+ 
+!
+!--    Calculate obukhov length
        IF ( ts_value(5,sr) /= 0.0_wp )  THEN
-          ts_value(22,sr) = ts_value(4,sr)**2 / &
-                            ( kappa * g * ts_value(5,sr) / ts_value(18,sr) ) ! L
+!           IF ( most_method == 'circular' )  THEN
+!              ts_value(22,sr) = ts_value(4,sr)**2 /                             &
+!                           ( kappa * g * ts_value(5,sr) / ts_value(18,sr) ) 
+!           ELSE
+             ts_value(22,sr) = hom(nzb,1,114,sr)  
+!          ENDIF     
        ELSE
           ts_value(22,sr) = 10000.0_wp
@@ -1553,8 +1590,8 @@
 #if defined ( __rrtmg )
           IF ( radiation_scheme == 'rrtmg' )  THEN
-             ts_value(dots_rad+5,sr) = hom(nzb,1,106,sr)          ! rrtm_aldif
-             ts_value(dots_rad+6,sr) = hom(nzb,1,107,sr)          ! rrtm_aldir
-             ts_value(dots_rad+7,sr) = hom(nzb,1,108,sr)          ! rrtm_asdif
-             ts_value(dots_rad+8,sr) = hom(nzb,1,109,sr)          ! rrtm_asdir
+             ts_value(dots_rad+5,sr) = hom(nzb,1,110,sr)          ! rrtm_aldif
+             ts_value(dots_rad+6,sr) = hom(nzb,1,111,sr)          ! rrtm_aldir
+             ts_value(dots_rad+7,sr) = hom(nzb,1,112,sr)          ! rrtm_asdif
+             ts_value(dots_rad+8,sr) = hom(nzb,1,113,sr)          ! rrtm_asdir
           ENDIF
 #endif
@@ -1642,5 +1679,6 @@
 #if defined ( __rrtmg )
     USE radiation_model_mod,                                                   &
-        ONLY:  rrtm_aldif, rrtm_aldir, rrtm_asdif, rrtm_asdir
+        ONLY:  rrtm_aldif, rrtm_aldir, rrtm_asdif, rrtm_asdir, rad_lw_cs_hr,   &
+               rad_lw_hr,  rad_sw_cs_hr, rad_sw_hr
 #endif
 
@@ -3063,5 +3101,5 @@
 !--    Collect current large scale advection and subsidence tendencies for
 !--    data output
-       IF ( large_scale_forcing  .AND.  ( simulated_time .GT. 0.0_wp ) )  THEN
+       IF ( large_scale_forcing  .AND.  ( simulated_time > 0.0_wp ) )  THEN
 !
 !--       Interpolation in time of LSF_DATA 
@@ -3110,6 +3148,8 @@
              DO  j =  nys, nyn
                 DO  k = nzb_soil, nzt_soil
-                   sums_l(k,89,tn)  = sums_l(k,89,tn)  + t_soil(k,j,i) * rmask(j,i,sr)
-                   sums_l(k,91,tn)  = sums_l(k,91,tn)  + m_soil(k,j,i) * rmask(j,i,sr)
+                   sums_l(k,89,tn)  = sums_l(k,89,tn)  + t_soil(k,j,i)         &
+                                      * rmask(j,i,sr)
+                   sums_l(k,91,tn)  = sums_l(k,91,tn)  + m_soil(k,j,i)         &
+                                      * rmask(j,i,sr)
                 ENDDO
              ENDDO
@@ -3123,8 +3163,22 @@
              DO  j =  nys, nyn
                 DO  k = nzb_s_inner(j,i)+1, nzt+1
-                   sums_l(k,102,tn)  = sums_l(k,102,tn)  + rad_lw_in(k,j,i) * rmask(j,i,sr)
-                   sums_l(k,103,tn)  = sums_l(k,103,tn)  + rad_lw_out(k,j,i) * rmask(j,i,sr)
-                   sums_l(k,104,tn)  = sums_l(k,104,tn)  + rad_sw_in(k,j,i) * rmask(j,i,sr)
-                   sums_l(k,105,tn)  = sums_l(k,105,tn)  + rad_sw_out(k,j,i) * rmask(j,i,sr)
+                   sums_l(k,102,tn)  = sums_l(k,102,tn)  + rad_lw_in(k,j,i)    &
+                                       * rmask(j,i,sr)
+                   sums_l(k,103,tn)  = sums_l(k,103,tn)  + rad_lw_out(k,j,i)   &
+                                       * rmask(j,i,sr)
+                   sums_l(k,104,tn)  = sums_l(k,104,tn)  + rad_sw_in(k,j,i)    &
+                                       * rmask(j,i,sr)
+                   sums_l(k,105,tn)  = sums_l(k,105,tn)  + rad_sw_out(k,j,i)   &
+                                       * rmask(j,i,sr)
+#if defined ( __rrtmg )
+                   sums_l(k,106,tn)  = sums_l(k,106,tn)  + rad_lw_cs_hr(k,j,i) &
+                                       * rmask(j,i,sr)
+                   sums_l(k,107,tn)  = sums_l(k,107,tn)  + rad_lw_hr(k,j,i)    &
+                                       * rmask(j,i,sr)
+                   sums_l(k,108,tn)  = sums_l(k,108,tn)  + rad_sw_cs_hr(k,j,i) &
+                                       * rmask(j,i,sr)
+                   sums_l(k,109,tn)  = sums_l(k,109,tn)  + rad_sw_hr(k,j,i)    &
+                                       * rmask(j,i,sr)
+#endif
                 ENDDO
              ENDDO
@@ -3193,6 +3247,7 @@
           sums(k,70:80)           = sums(k,70:80)       / ngp_2dh_s_inner(k,sr)
           sums(k,81:88)           = sums(k,81:88)       / ngp_2dh(sr)
-          sums(k,89:105)           = sums(k,89:105)     / ngp_2dh(sr)
-          sums(k,106:pr_palm-2)    = sums(k,106:pr_palm-2)/ ngp_2dh_s_inner(k,sr)
+          sums(k,89:114)           = sums(k,89:114)     / ngp_2dh(sr)
+          sums(k,115:pr_palm-2)    = sums(k,115:pr_palm-2)/ ngp_2dh_s_inner(k,sr)
+
        ENDDO
 
@@ -3446,6 +3501,5 @@
 
        IF ( ts_value(5,sr) /= 0.0_wp )  THEN
-          ts_value(22,sr) = ts_value(4,sr)**2_wp / &
-                            ( kappa * g * ts_value(5,sr) / ts_value(18,sr) ) ! L
+          ts_value(22,sr) = hom(nzb,1,114,sr)
        ELSE
           ts_value(22,sr) = 10000.0_wp
Index: palm/trunk/SOURCE/header.f90
===================================================================
--- palm/trunk/SOURCE/header.f90	(revision 1690)
+++ palm/trunk/SOURCE/header.f90	(revision 1691)
@@ -14,10 +14,11 @@
 ! PALM. If not, see <http://www.gnu.org/licenses/>.
 !
-! Copyright 1997-2014 Leibniz Universitaet Hannover
+! Copyright 1997-2015 Leibniz Universitaet Hannover
 !--------------------------------------------------------------------------------!
 !
 ! Current revisions:
 ! -----------------
-! 
+! Renamed prandtl_layer to constant_flux_layer, renames rif_min/rif_max to
+! zeta_min/zeta_max.
 ! 
 ! Former revisions:
@@ -1118,8 +1119,8 @@
     ENDIF
 
-    IF ( prandtl_layer )  THEN
-       WRITE ( io, 305 )  (zu(1)-zu(0)), roughness_length, &
-                          z0h_factor*roughness_length, kappa, &
-                          rif_min, rif_max
+    IF ( constant_flux_layer )  THEN
+       WRITE ( io, 305 )  (zu(1)-zu(0)), roughness_length,                     &
+                          z0h_factor*roughness_length, kappa,                  &
+                          zeta_min, zeta_max
        IF ( .NOT. constant_heatflux )  WRITE ( io, 308 )
        IF ( humidity  .AND.  .NOT. constant_waterflux )  THEN
@@ -1131,5 +1132,5 @@
     ELSE
        IF ( INDEX(initializing_actions, 'set_1d-model_profiles') /= 0 )  THEN
-          WRITE ( io, 310 )  rif_min, rif_max
+          WRITE ( io, 310 )  zeta_min, zeta_max
        ENDIF
     ENDIF
Index: palm/trunk/SOURCE/init_1d_model.f90
===================================================================
--- palm/trunk/SOURCE/init_1d_model.f90	(revision 1690)
+++ palm/trunk/SOURCE/init_1d_model.f90	(revision 1691)
@@ -14,10 +14,10 @@
 ! PALM. If not, see <http://www.gnu.org/licenses/>.
 !
-! Copyright 1997-2014 Leibniz Universitaet Hannover
+! Copyright 1997-2015 Leibniz Universitaet Hannover
 !--------------------------------------------------------------------------------!
 !
 ! Current revisions:
 ! -----------------
-! 
+! Renamed prandtl_layer to constant_flux_layer. rif is replaced by ol and zeta.
 ! 
 ! Former revisions:
@@ -72,4 +72,6 @@
 !> of the wind profile is being computed.
 !> All subroutines required can be found within this file.
+!>
+!> @todo harmonize code with new surface_layer_fluxes module
 !------------------------------------------------------------------------------!
  SUBROUTINE init_1d_model
@@ -90,8 +92,7 @@
     
     USE control_parameters,                                                    &
-        ONLY:  constant_diffusion, f, humidity, kappa, km_constant,            &
-               mixing_length_1d, passive_scalar, prandtl_layer,                &
-               prandtl_number, roughness_length, simulated_time_chr,           &
-               z0h_factor
+        ONLY:  constant_diffusion, constant_flux_layer, f, humidity, kappa,    &
+               km_constant, mixing_length_1d, passive_scalar, prandtl_number,  &
+               roughness_length, simulated_time_chr, z0h_factor
 
     IMPLICIT NONE
@@ -166,5 +167,5 @@
 !
 !-- For u*, theta* and the momentum fluxes plausible values are set
-    IF ( prandtl_layer )  THEN
+    IF ( constant_flux_layer )  THEN
        us1d = 0.1_wp   ! without initial friction the flow would not change
     ELSE
@@ -213,9 +214,9 @@
         
     USE control_parameters,                                                    &
-        ONLY:  constant_diffusion, dissipation_1d, humidity,                   &
-               intermediate_timestep_count, intermediate_timestep_count_max,   &
-               f, g, ibc_e_b, kappa, mixing_length_1d, passive_scalar,         &
-               prandtl_layer, rif_max, rif_min, simulated_time_chr,            &
-               timestep_scheme, tsc
+        ONLY:  constant_diffusion, constant_flux_layer, dissipation_1d,        &
+               humidity, intermediate_timestep_count,                          &
+               intermediate_timestep_count_max, f, g, ibc_e_b, kappa,          &  
+               mixing_length_1d, passive_scalar,                               &
+               simulated_time_chr, timestep_scheme, tsc, zeta_max, zeta_min
                 
     USE indices,                                                               &
@@ -334,5 +335,5 @@
 !--       Finite differences of the momentum fluxes are computed using half the 
 !--       normal grid length (2.0*ddzw(k)) for the sake of enhanced accuracy 
-          IF ( prandtl_layer )  THEN
+          IF ( constant_flux_layer )  THEN
 
              k = nzb+1
@@ -465,5 +466,5 @@
 !
 !--          First compute the vertical fluxes in the Prandtl-layer
-             IF ( prandtl_layer )  THEN
+             IF ( constant_flux_layer )  THEN
 !
 !--             Compute theta* using Rif numbers of the previous time step
@@ -498,5 +499,5 @@
                 ENDIF
 
-             ENDIF    ! prandtl_layer
+             ENDIF    ! constant_flux_layer
 
 !
@@ -506,5 +507,5 @@
 !--          the rif-numbers of the previous time step are used.
 
-             IF ( prandtl_layer )  THEN
+             IF ( constant_flux_layer )  THEN
                 IF ( .NOT. humidity )  THEN
                    pt_0 = pt_init(nzb+1)
@@ -547,10 +548,10 @@
 !--          range. It is exceeded excessively for very small velocities
 !--          (u,v --> 0).
-             WHERE ( rif1d < rif_min )  rif1d = rif_min
-             WHERE ( rif1d > rif_max )  rif1d = rif_max
+             WHERE ( rif1d < zeta_min )  rif1d = zeta_min
+             WHERE ( rif1d > zeta_max )  rif1d = zeta_max
 
 !
 !--          Compute u* from the absolute velocity value
-             IF ( prandtl_layer )  THEN
+             IF ( constant_flux_layer )  THEN
                 uv_total = SQRT( u1d(nzb+1)**2 + v1d(nzb+1)**2 )
 
@@ -639,5 +640,5 @@
                 ENDIF             
 
-             ENDIF   !  prandtl_layer
+             ENDIF   !  constant_flux_layer
 
 !
@@ -673,5 +674,5 @@
 !--          computed via the adiabatic mixing length, for the unstability has
 !--          already been taken account of via the TKE (cf. also Diss.).
-             IF ( prandtl_layer )  THEN
+             IF ( constant_flux_layer )  THEN
                 IF ( rif1d(nzb+1) >= 0.0_wp )  THEN
                    km1d(nzb+1) = us1d * kappa * zu(nzb+1) /                    &
@@ -805,5 +806,5 @@
 
        uv_total = SQRT( u1d(nzb+1)**2 + v1d(nzb+1)**2 )
-       IF ( ABS( v1d(nzb+1) ) .LT. 1.0E-5_wp )  THEN
+       IF ( ABS( v1d(nzb+1) ) < 1.0E-5_wp )  THEN
           alpha = ACOS( SIGN( 1.0_wp , u1d(nzb+1) ) )
        ELSE
Index: palm/trunk/SOURCE/init_3d_model.f90
===================================================================
--- palm/trunk/SOURCE/init_3d_model.f90	(revision 1690)
+++ palm/trunk/SOURCE/init_3d_model.f90	(revision 1691)
@@ -14,10 +14,10 @@
 ! PALM. If not, see <http://www.gnu.org/licenses/>.
 !
-! Copyright 1997-2014 Leibniz Universitaet Hannover
+! Copyright 1997-2015 Leibniz Universitaet Hannover
 !--------------------------------------------------------------------------------!
 !
 ! Current revisions:
 ! ------------------
-! 
+! Call to init_surface_layer added. rif is replaced by ol and zeta.
 ! 
 ! Former revisions:
@@ -266,5 +266,8 @@
                sums_l_l, sums_up_fraction_l, sums_wsts_bc_l, ts_value,         &
                var_d, weight_pres, weight_substep 
-    
+ 
+    USE surface_layer_fluxes_mod,                                              &
+        ONLY:  init_surface_layer_fluxes
+   
     USE transpose_indices 
 
@@ -313,5 +316,5 @@
     ALLOCATE( ptdf_x(nxlg:nxrg), ptdf_y(nysg:nyng) )
 
-    ALLOCATE( rif(nysg:nyng,nxlg:nxrg), shf(nysg:nyng,nxlg:nxrg),     &
+    ALLOCATE( ol(nysg:nyng,nxlg:nxrg), shf(nysg:nyng,nxlg:nxrg),      &
               ts(nysg:nyng,nxlg:nxrg), tswst(nysg:nyng,nxlg:nxrg),    &
               us(nysg:nyng,nxlg:nxrg), usws(nysg:nyng,nxlg:nxrg),     &
@@ -714,6 +717,6 @@
              hom(:,1,25,:) = SPREAD( l1d, 2, statistic_regions+1 )
 
-             IF ( prandtl_layer )  THEN
-                rif  = rif1d(nzb+1)
+             IF ( constant_flux_layer )  THEN
+                ol   = ( zu(nzb+1) - zw(nzb) ) / rif1d(nzb+1)
                 ts   = 0.0_wp  ! could actually be computed more accurately in the
                                ! 1D model. Update when opportunity arises.
@@ -723,5 +726,5 @@
              ELSE
                 ts   = 0.0_wp  ! must be set, because used in
-                rif  = 0.0_wp  ! flowste
+                ol   = ( zu(nzb+1) - zw(nzb) ) / zeta_min  ! flowste
                 us   = 0.0_wp
                 usws = 0.0_wp
@@ -731,5 +734,5 @@
           ELSE
              e    = 0.0_wp  ! must be set, because used in
-             rif  = 0.0_wp  ! flowste
+             ol   = ( zu(nzb+1) - zw(nzb) ) / zeta_min  ! flowste
              ts   = 0.0_wp
              us   = 0.0_wp
@@ -886,5 +889,5 @@
              e    = 0.0_wp
           ENDIF
-          rif   = 0.0_wp
+          ol    = ( zu(nzb+1) - zw(nzb) ) / zeta_min
           ts    = 0.0_wp
           us    = 0.0_wp
@@ -1095,5 +1098,5 @@
 !
 !--    Initialize Prandtl layer quantities
-       IF ( prandtl_layer )  THEN
+       IF ( constant_flux_layer )  THEN
 
           z0 = roughness_length
@@ -1103,5 +1106,5 @@
 !
 !--          Surface temperature is prescribed. Here the heat flux cannot be
-!--          simply estimated, because therefore rif, u* and theta* would have
+!--          simply estimated, because therefore ol, u* and theta* would have
 !--          to be computed by iteration. This is why the heat flux is assumed
 !--          to be zero before the first time step. It approaches its correct
@@ -1624,4 +1627,13 @@
        CALL location_message( 'initializing land surface model', .FALSE. )
        CALL init_lsm
+       CALL location_message( 'finished', .TRUE. )
+    ENDIF
+
+!
+!-- Initialize surface layer (done after LSM as roughness length are required
+!-- for initialization
+    IF ( constant_flux_layer )  THEN
+       CALL location_message( 'initializing surface layer', .FALSE. )
+       CALL init_surface_layer_fluxes
        CALL location_message( 'finished', .TRUE. )
     ENDIF
Index: palm/trunk/SOURCE/init_cloud_physics.f90
===================================================================
--- palm/trunk/SOURCE/init_cloud_physics.f90	(revision 1690)
+++ palm/trunk/SOURCE/init_cloud_physics.f90	(revision 1691)
@@ -14,10 +14,10 @@
 ! PALM. If not, see <http://www.gnu.org/licenses/>.
 !
-! Copyright 1997-2014 Leibniz Universitaet Hannover
+! Copyright 1997-2015 Leibniz Universitaet Hannover
 !--------------------------------------------------------------------------------!
 !
 ! Current revisions:
 ! -----------------
-! 
+! Removed typo
 ! 
 ! Former revisions:
@@ -117,5 +117,5 @@
     dpirho_l = 1.0_wp / pirho_l
 !
-!-- constant fot the sedimentation of cloud water (2-moment cloud physics)
+!-- constant for the sedimentation of cloud water (2-moment cloud physics)
     sed_qc_const = k_st * ( 3.0_wp / ( 4.0_wp * pi * rho_l )                   &
                           )**( 2.0_wp / 3.0_wp ) *                             &
Index: palm/trunk/SOURCE/init_grid.f90
===================================================================
--- palm/trunk/SOURCE/init_grid.f90	(revision 1690)
+++ palm/trunk/SOURCE/init_grid.f90	(revision 1691)
@@ -14,10 +14,10 @@
 ! PALM. If not, see <http://www.gnu.org/licenses/>.
 !
-! Copyright 1997-2014 Leibniz Universitaet Hannover
+! Copyright 1997-2015 Leibniz Universitaet Hannover
 !--------------------------------------------------------------------------------!
 !
 ! Current revisions:
 ! -----------------
-! 
+! Renamed prandtl_layer to constant_flux_layer.
 ! 
 ! Former revisions:
@@ -144,12 +144,13 @@
                building_length_y, building_wall_left, building_wall_south,     &
                canyon_height, canyon_wall_left, canyon_wall_south,             &
-               canyon_width_x, canyon_width_y, coupling_char, dp_level_ind_b,  &
-               dz, dz_max, dz_stretch_factor, dz_stretch_level,                &
-               dz_stretch_level_index, ibc_uv_b, io_blocks, io_group,          &
-               inflow_l, inflow_n, inflow_r, inflow_s, masking_method,         &
-               maximum_grid_level, message_string, momentum_advec, ocean,      &
-               outflow_l, outflow_n, outflow_r, outflow_s, prandtl_layer,      &
-               psolver, scalar_advec, topography, topography_grid_convention,  &
-               use_surface_fluxes, use_top_fluxes, wall_adjustment_factor 
+               canyon_width_x, canyon_width_y, constant_flux_layer,            &
+               coupling_char, dp_level_ind_b, dz, dz_max, dz_stretch_factor,   &
+               dz_stretch_level, dz_stretch_level_index, ibc_uv_b, io_blocks,  &
+               io_group, inflow_l, inflow_n, inflow_r, inflow_s,               &
+               masking_method, maximum_grid_level, message_string,             &
+               momentum_advec, ocean, outflow_l, outflow_n, outflow_r,         &
+               outflow_s, psolver, scalar_advec, topography,                   &
+               topography_grid_convention, use_surface_fluxes, use_top_fluxes, &
+               wall_adjustment_factor 
         
     USE grid_variables,                                                        &
@@ -477,5 +478,5 @@
 !-- Define vertical gridpoint from (or to) which on the usual finite difference
 !-- form (which does not use surface fluxes) is applied 
-    IF ( prandtl_layer  .OR.  use_surface_fluxes )  THEN
+    IF ( constant_flux_layer  .OR.  use_surface_fluxes )  THEN
        nzb_diff = nzb + 2
     ELSE
@@ -955,5 +956,5 @@
 !-- the usual finite difference form (which does not use surface fluxes) is
 !-- applied 
-    IF ( prandtl_layer  .OR.  use_surface_fluxes )  THEN
+    IF ( constant_flux_layer  .OR.  use_surface_fluxes )  THEN
        nzb_diff_u         = nzb_u_inner + 2
        nzb_diff_v         = nzb_v_inner + 2
Index: palm/trunk/SOURCE/land_surface_model.f90
===================================================================
--- palm/trunk/SOURCE/land_surface_model.f90	(revision 1690)
+++ palm/trunk/SOURCE/land_surface_model.f90	(revision 1691)
@@ -14,10 +14,13 @@
 ! PALM. If not, see <http://www.gnu.org/licenses/>.
 !
-! Copyright 1997-2014 Leibniz Universitaet Hannover
+! Copyright 1997-2015 Leibniz Universitaet Hannover
 !--------------------------------------------------------------------------------!
 !
 ! Current revisions:
 ! -----------------
-! 
+! Added skip_time_do_lsm to allow for spin-ups without LSM. Various bugfixes:
+! Soil temperatures are now defined at the edges of the layers, calculation of
+! shb_eb corrected, prognostic equation for skin temperature corrected. Surface
+! fluxes are now directly transfered to atmosphere
 ! 
 ! Former revisions:
@@ -73,42 +76,51 @@
 !> DALES and UCLA-LES models.
 !>
-!> @todo Check dewfall parametrization for fog simulations.
-!> @todo Consider partial absorption of the net shortwave radiation by the surface layer.
-!> @todo Allow for water surfaces, check performance for bare soils.
-!> @todo Invert indices (running from -3 to 0. Currently: nzb_soil=0, nzt_soil=3)).
-!> @todo Implement surface runoff model (required when performing long-term LES with
-!>       considerable precipitation.
+!> @todo Consider partial absorption of the net shortwave radiation by the 
+!>       surface layer.
+!> @todo Allow for water surfaces
+!> @todo Invert indices (running from -3 to 0. Currently: nzb_soil=0, 
+!>       nzt_soil=3)).
+!> @todo Implement surface runoff model (required when performing long-term LES 
+!>       with considerable precipitation.
 !>
-!> @note  No time step criterion is required as long as the soil layers do not become
-!>        too thin.
+!> @note  No time step criterion is required as long as the soil layers do not 
+!>        become too thin.
 !------------------------------------------------------------------------------!
  MODULE land_surface_model_mod
  
-     USE arrays_3d,                                                            &
-         ONLY:  pt, pt_p, q_p, qsws, rif, shf, ts, us, z0, z0h
-
-     USE cloud_parameters,                                                     &
-         ONLY:  cp, l_d_r, l_v, precipitation_rate, rho_l, r_d, r_v
-
-     USE control_parameters,                                                   &
-         ONLY:  cloud_physics, dt_3d, humidity, intermediate_timestep_count,   &
-                initializing_actions, intermediate_timestep_count_max,         &
-                max_masks, precipitation, pt_surface, rho_surface,             &
-                roughness_length, surface_pressure, timestep_scheme, tsc,      &
-                z0h_factor, time_since_reference_point
-
-     USE indices,                                                              &
-         ONLY:  nbgp, nxlg, nxrg, nyng, nysg, nzb, nzb_s_inner 
-
-     USE kinds
+    USE arrays_3d,                                                             &
+        ONLY:  hyp, pt, pt_p, q, q_p, ql, qsws, rif, shf, ts, us, vpt, z0, z0h
+
+    USE cloud_parameters,                                                      &
+        ONLY:  cp, hyrho, l_d_cp, l_d_r, l_v, prr, pt_d_t, rho_l, r_d, r_v
+
+    USE control_parameters,                                                    &
+        ONLY:  cloud_physics, dt_3d, humidity, intermediate_timestep_count,    &
+               initializing_actions, intermediate_timestep_count_max,          &
+               max_masks, precipitation, pt_surface, rho_surface,              &
+               roughness_length, surface_pressure, timestep_scheme, tsc,       &
+               z0h_factor, time_since_reference_point
+
+    USE indices,                                                               &
+        ONLY:  nbgp, nxlg, nxrg, nyng, nysg, nzb, nzb_s_inner 
+
+    USE kinds
 
     USE netcdf_control,                                                        &
         ONLY:  dots_label, dots_num, dots_unit
 
-     USE radiation_model_mod,                                                  &
-         ONLY:  radiation_scheme, rad_net, rad_sw_in, sigma_sb
-
-     USE statistics,                                                           &
-         ONLY:  hom, statistic_regions
+    USE pegrid
+
+    USE radiation_model_mod,                                                   &
+        ONLY:  force_radiation_call, radiation_scheme, rad_net, rad_sw_in,     &
+               rad_lw_out, sigma_sb
+        
+#if defined ( __rrtmg )
+    USE radiation_model_mod,                                                   &
+        ONLY:  rrtm_lwuflx_dt, rrtm_idrv
+#endif
+
+    USE statistics,                                                            &
+        ONLY:  hom, statistic_regions
 
     IMPLICIT NONE
@@ -144,7 +156,8 @@
                     soil_type = 3    !< soil type, 0: user-defined, 1-6: generic (see list)
 
-    LOGICAL :: conserve_water_content = .TRUE., & !< open or closed bottom surface for the soil model
-               dewfall = .TRUE.,                & !< allow/inhibit dewfall
-               land_surface = .FALSE.             !< flag parameter indicating wheather the lsm is used
+    LOGICAL :: conserve_water_content = .TRUE.,  & !< open or closed bottom surface for the soil model
+               dewfall = .TRUE.,                 & !< allow/inhibit dewfall
+               force_radiation_call_l = .FALSE., & !< flag parameter for unscheduled radiation model calls
+               land_surface = .FALSE.              !< flag parameter indicating wheather the lsm is used
 
 !   value 9999999.9_wp -> generic available or user-defined value must be set
@@ -160,4 +173,5 @@
                 hydraulic_conductivity = 9999999.9_wp,  & !< NAMELIST gamma_w_sat
                 ke = 0.0_wp,                            & !< Kersten number
+                lambda_h_sat = 0.0_wp,                  & !< heat conductivity for saturated soil
                 lambda_surface_stable = 9999999.9_wp,   & !< NAMELIST lambda_surface_s
                 lambda_surface_unstable = 9999999.9_wp, & !< NAMELIST lambda_surface_u
@@ -174,15 +188,14 @@
                 rd_d_rv,                                & !< r_d / r_v
                 saturation_moisture = 9999999.9_wp,     & !< NAMELIST m_sat
+                skip_time_do_lsm = 0.0_wp,              & !< LSM is not called before this time
                 vegetation_coverage = 9999999.9_wp,     & !< NAMELIST c_veg
                 wilting_point = 9999999.9_wp,           & !< NAMELIST m_wilt
                 z0_eb  = 9999999.9_wp,                  & !< NAMELIST z0 (lsm_par)
-                z0h_eb = 9999999.9_wp                    !< NAMELIST z0h (lsm_par)
+                z0h_eb = 9999999.9_wp                     !< NAMELIST z0h (lsm_par)
 
     REAL(wp), DIMENSION(nzb_soil:nzt_soil) :: &
-              ddz_soil,                     & !< 1/dz_soil
-              ddz_soil_stag,                & !< 1/dz_soil_stag
-              dz_soil,                      & !< soil grid spacing (center-center)
-              dz_soil_stag,                 & !< soil grid spacing (edge-edge) 
-              root_extr = 0.0_wp,           & !< root extraction
+              ddz_soil_stag,                  & !< 1/dz_soil_stag
+              dz_soil_stag,                   & !< soil grid spacing (center-center)
+              root_extr = 0.0_wp,             & !< root extraction
               root_fraction = (/9999999.9_wp, 9999999.9_wp,    &
                                 9999999.9_wp, 9999999.9_wp /), & !< distribution of root surface area to the individual soil layers
@@ -191,6 +204,8 @@
 
     REAL(wp), DIMENSION(nzb_soil:nzt_soil+1) ::   &
-              soil_temperature = (/290.0_wp, 287.0_wp, 285.0_wp,  283.0_wp,    &
-                                   283.0_wp /) !< soil temperature (K)
+              soil_temperature = (/290.0_wp, 287.0_wp, 285.0_wp,  283.0_wp,    & !< soil temperature (K)
+                                   283.0_wp /),                                &                                   
+              ddz_soil,                                                        & !< 1/dz_soil
+              dz_soil                                                            !< soil grid spacing (edge-edge)
 
 #if defined( __nopointer )
@@ -218,5 +233,5 @@
 !
 !-- Energy balance variables                
-    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::                                   &
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE :: &
               alpha_vg,         & !< coef. of Van Genuchten
               c_liq,            & !< liquid water coverage (of vegetated area)
@@ -232,7 +247,6 @@
               lai,              & !< leaf area index
               lai_av,           & !< average of lai
-              lambda_h_sat,     & !< heat conductivity for dry soil
-              lambda_surface_s,    & !< coupling between surface and soil (depends on vegetation type)
-              lambda_surface_u,    & !< coupling between surface and soil (depends on vegetation type)
+              lambda_surface_s, & !< coupling between surface and soil (depends on vegetation type)
+              lambda_surface_u, & !< coupling between surface and soil (depends on vegetation type)
               l_vg,             & !< coef. of Van Genuchten
               m_fc,             & !< soil moisture at field capacity (m3/m3)
@@ -253,11 +267,12 @@
               r_a_av,           & !< avergae of r_a
               r_canopy,         & !< canopy resistance
-              r_soil,           & !< soil resitance
+              r_soil,           & !< soil resistance
               r_soil_min,       & !< minimum soil resistance
               r_s,              & !< total surface resistance (combination of r_soil and r_canopy)
-              r_s_av,           & !< avergae of r_s
+              r_s_av,           & !< average of r_s
               r_canopy_min,     & !< minimum canopy (stomatal) resistance
               shf_eb,           & !< surface flux of sensible heat
               shf_eb_av           !< average of shf_eb
+
 
     REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::                                 &
@@ -472,7 +487,8 @@
            lsm_swap_timelevel, l_vangenuchten, min_canopy_resistance,          &
            min_soil_resistance, n_vangenuchten, residual_moisture, rho_cp,     &
-           rho_lv, root_fraction, saturation_moisture, soil_moisture,          &
-           soil_temperature, soil_type, soil_type_name, vegetation_coverage,   &
-           veg_type, veg_type_name, wilting_point, z0_eb, z0h_eb
+           rho_lv, root_fraction, saturation_moisture, skip_time_do_lsm,       &
+           soil_moisture, soil_temperature, soil_type, soil_type_name,         &
+           vegetation_coverage, veg_type, veg_type_name, wilting_point, z0_eb, &
+           z0h_eb
 
 !
@@ -483,5 +499,4 @@
            zs
 
-
 !
 !-- Public 2D output variables
@@ -490,5 +505,4 @@
            qsws_soil_eb, qsws_soil_eb_av, qsws_veg_eb, qsws_veg_eb_av,         &
            r_a, r_a_av, r_s, r_s_av, shf_eb, shf_eb_av
-
 
 !
@@ -565,5 +579,4 @@
        ALLOCATE ( lai(nysg:nyng,nxlg:nxrg) )
        ALLOCATE ( l_vg(nysg:nyng,nxlg:nxrg) )
-       ALLOCATE ( lambda_h_sat(nysg:nyng,nxlg:nxrg) )
        ALLOCATE ( lambda_surface_u(nysg:nyng,nxlg:nxrg) )
        ALLOCATE ( lambda_surface_s(nysg:nyng,nxlg:nxrg) )
@@ -612,8 +625,10 @@
        INTEGER(iwp) ::  k !< running index
 
+       REAL(wp) :: pt_1   !< potential temperature at first grid level
+
 
 !
 !--    Calculate Exner function
-       exn       = ( surface_pressure / 1000.0_wp )**0.286_wp
+       exn = ( surface_pressure / 1000.0_wp )**0.286_wp
 
 
@@ -674,16 +689,17 @@
 !
 !--    Calculate grid spacings. Temperature and moisture are defined at
-!--    the center of the soil layers, whereas gradients/fluxes are defined
-!--    at the edges (_stag)
-       dz_soil_stag(nzb_soil) = zs(nzb_soil)
-
-       DO k = nzb_soil+1, nzt_soil
-          dz_soil_stag(k) = zs(k) - zs(k-1)
+!--    the edges of the soil layers (_stag), whereas gradients/fluxes are defined
+!--    at the centers
+       dz_soil(nzb_soil) = zs(nzb_soil)
+
+       DO  k = nzb_soil+1, nzt_soil
+          dz_soil(k) = zs(k) - zs(k-1)
        ENDDO
-
-       DO k = nzb_soil, nzt_soil-1
-          dz_soil(k) = 0.5 * (dz_soil_stag(k+1) + dz_soil_stag(k))
+       dz_soil(nzt_soil+1) = dz_soil(nzt_soil)
+
+       DO  k = nzb_soil, nzt_soil-1
+          dz_soil_stag(k) = 0.5_wp * (dz_soil(k+1) + dz_soil(k))
        ENDDO
-       dz_soil(nzt_soil) = dz_soil_stag(nzt_soil)
+       dz_soil_stag(nzt_soil) = dz_soil(nzt_soil)
 
        ddz_soil      = 1.0_wp / dz_soil
@@ -752,5 +768,5 @@
 !--       (make sure that the soil moisture does not drop below the permanent
 !--       wilting point) -> problems with devision by zero)
-          DO k = nzb_soil, nzt_soil
+          DO  k = nzb_soil, nzt_soil
              t_soil(k,:,:)    = soil_temperature(k)
              m_soil(k,:,:)    = MAX(soil_moisture(k),m_wilt(:,:))
@@ -761,5 +777,6 @@
 !
 !--       Calculate surface temperature
-          t_surface = pt_surface * exn
+          t_surface   = pt_surface * exn
+          t_surface_p = t_surface
 
 !
@@ -770,11 +787,16 @@
                 k = nzb_s_inner(j,i)
 
+                IF ( cloud_physics )  THEN
+                   pt_1 = pt(k+1,j,i) + l_d_cp * pt_d_t(k+1) * ql(k+1,j,i)
+                ELSE
+                   pt_1 = pt(k+1,j,i)
+                ENDIF
+
 !
 !--             Assure that r_a cannot be zero at model start
-                IF ( pt(k+1,j,i) == pt(k,j,i) )  pt(k+1,j,i) = pt(k+1,j,i)     &
-                                                 + 1.0E-10_wp
-
-                us(j,i) = 0.1_wp
-                ts(j,i) = (pt(k+1,j,i) - pt(k,j,i)) / r_a(j,i)
+                IF ( pt_1 == pt(k,j,i) )  pt_1 = pt_1 + 1.0E-10_wp
+
+                us(j,i)  = 0.1_wp
+                ts(j,i)  = (pt_1 - pt(k,j,i)) / r_a(j,i)
                 shf(j,i) = - us(j,i) * ts(j,i)
              ENDDO
@@ -794,13 +816,5 @@
        ENDIF
 
-!
-!--    Calculate saturation soil heat conductivity
-       lambda_h_sat(:,:) = lambda_h_sm ** (1.0_wp - m_sat(:,:)) *              &
-                           lambda_h_water ** m_sat(:,:)
-
-
-
-
-       DO k = nzb_soil, nzt_soil
+       DO  k = nzb_soil, nzt_soil
           root_fr(k,:,:) = root_fraction(k)
        ENDDO
@@ -838,5 +852,5 @@
 
           IF ( ANY( root_fraction == 9999999.9_wp ) )  THEN
-             DO k = nzb_soil, nzt_soil
+             DO  k = nzb_soil, nzt_soil
                 root_fr(k,:,:) = root_distribution(k,veg_type)
                 root_fraction(k) = root_distribution(k,veg_type)
@@ -886,28 +900,19 @@
 
 !
-!--    Calculate humidity at the surface
-       IF ( humidity )  THEN
-          CALL calc_q_surface
-       ENDIF
-
-
-
-!
 !--    Add timeseries for land surface model
-
-       dots_label(dots_num+1) = "ghf_eb"
-       dots_label(dots_num+2) = "shf_eb"
-       dots_label(dots_num+3) = "qsws_eb"
-       dots_label(dots_num+4) = "qsws_liq_eb"
-       dots_label(dots_num+5) = "qsws_soil_eb"
-       dots_label(dots_num+6) = "qsws_veg_eb"
-       dots_unit(dots_num+1:dots_num+6) = "W/m2"
-
-       dots_label(dots_num+7) = "r_a"
-       dots_label(dots_num+8) = "r_s"
-       dots_unit(dots_num+7:dots_num+8) = "s/m"
-
        dots_soil = dots_num + 1
        dots_num  = dots_num + 8
+
+       dots_label(dots_soil) = "ghf_eb"
+       dots_label(dots_soil+1) = "shf_eb"
+       dots_label(dots_soil+2) = "qsws_eb"
+       dots_label(dots_soil+3) = "qsws_liq_eb"
+       dots_label(dots_soil+4) = "qsws_soil_eb"
+       dots_label(dots_soil+5) = "qsws_veg_eb"
+       dots_label(dots_soil+6) = "r_a"
+       dots_label(dots_soil+7) = "r_s"
+
+       dots_unit(dots_soil:dots_soil+5) = "W/m2"
+       dots_unit(dots_soil+6:dots_soil+7) = "s/m"
 
        RETURN
@@ -921,9 +926,4 @@
 ! ------------
 !> Solver for the energy balance at the surface.
-!> @note Surface fluxes are calculated in the land surface model, but these are
-!>       not used in the atmospheric code. The fluxes are calculated afterwards in
-!>       prandtl_fluxes using the surface values of temperature and humidity as
-!>       provided by the land surface model. In this way, the fluxes in the land
-!>       surface model are not equal to the ones calculated in prandtl_fluxes
 !------------------------------------------------------------------------------!
     SUBROUTINE lsm_energy_balance
@@ -940,5 +940,4 @@
                    f3,          & !< resistance correction term 3
                    m_min,       & !< minimum soil moisture
-                   T_1,         & !< actual temperature at first grid point
                    e,           & !< water vapour pressure
                    e_s,         & !< water vapour saturation pressure
@@ -954,6 +953,7 @@
                    f_shf,       & !< factor for shf_eb
                    lambda_surface, & !< Current value of lambda_surface
-                   m_liq_eb_max   !< maxmimum value of the liq. water reservoir
-
+                   m_liq_eb_max,   & !< maxmimum value of the liq. water reservoir
+                   pt_1,        & !< potential temperature at first grid level
+                   qv_1           !< specific humidity at first grid level
 
 !
@@ -961,8 +961,6 @@
        exn = ( surface_pressure / 1000.0_wp )**0.286_wp
 
-       
-
-       DO i = nxlg, nxrg
-          DO j = nysg, nyng
+       DO  i = nxlg, nxrg
+          DO  j = nysg, nyng
              k = nzb_s_inner(j,i)
 
@@ -980,6 +978,13 @@
 !--          time step is used here. Note that this formulation is the
 !--          equivalent to the ECMWF formulation using drag coefficients
-             r_a(j,i) = (pt(k+1,j,i) - pt(k,j,i)) / (ts(j,i) * us(j,i) +       &
-                         1.0E-20_wp)
+             IF ( cloud_physics )  THEN
+                pt_1 = pt(k+1,j,i) + l_d_cp * pt_d_t(k+1) * ql(k+1,j,i)
+                qv_1 = q(k+1,j,i) - ql(k+1,j,i)
+             ELSE
+                pt_1 = pt(k+1,j,i)
+                qv_1 = q(k+1,j,i)
+             ENDIF
+
+             r_a(j,i) = (pt_1 - pt(k,j,i)) / (ts(j,i) * us(j,i) + 1.0E-20_wp)
 
 !
@@ -1002,12 +1007,12 @@
 !--          f2 = 0 for very dry soils
              m_total = 0.0_wp
-             DO ks = nzb_soil, nzt_soil
+             DO  ks = nzb_soil, nzt_soil
                  m_total = m_total + root_fr(ks,j,i)                           &
                            * MAX(m_soil(ks,j,i),m_wilt(j,i))
              ENDDO 
 
-             IF ( m_total .GT. m_wilt(j,i) .AND. m_total .LT. m_fc(j,i) )  THEN
+             IF ( m_total > m_wilt(j,i) .AND. m_total < m_fc(j,i) )  THEN
                 f2 = ( m_total - m_wilt(j,i) ) / (m_fc(j,i) - m_wilt(j,i) )
-             ELSEIF ( m_total .GE. m_fc(j,i) )  THEN
+             ELSEIF ( m_total >= m_fc(j,i) )  THEN
                 f2 = 1.0_wp
              ELSE
@@ -1025,5 +1030,5 @@
 !
 !--             Calculate vapour pressure
-                e  = q_p(k+1,j,i) * surface_pressure / 0.622_wp
+                e  = qv_1 * surface_pressure / 0.622_wp
                 f3 = EXP ( -g_d(j,i) * (e_s - e) )
              ELSE
@@ -1067,8 +1072,8 @@
 !--          In case of dewfall, set evapotranspiration to zero
 !--          All super-saturated water is then removed from the air
-             IF ( humidity .AND. dewfall .AND. q_s .LE. q_p(k+1,j,i) )  THEN
+             IF ( humidity .AND. q_s <= qv_1 )  THEN
                 r_canopy(j,i) = 0.0_wp
                 r_soil(j,i)   = 0.0_wp
-             ENDIF 
+             ENDIF
 
 !
@@ -1085,5 +1090,5 @@
 !--          If soil moisture is below wilting point, plants do no longer
 !--          transpirate.
-!              IF ( m_soil(k,j,i) .LT. m_wilt(j,i) )  THEN
+!              IF ( m_soil(k,j,i) < m_wilt(j,i) )  THEN
 !                 f_qsws_veg = 0.0_wp
 !              ENDIF
@@ -1094,5 +1099,5 @@
 !--          air.
              IF ( humidity )  THEN
-                IF ( q_s .LE. q_p(k+1,j,i) )  THEN
+                IF ( q_s <= qv_1 )  THEN
                    IF ( .NOT. dewfall )  THEN
                       f_qsws_veg  = 0.0_wp
@@ -1114,16 +1119,16 @@
              dq_s_dt = 0.622_wp * e_s_dt / surface_pressure
 
-             T_1 = pt_p(k+1,j,i) * exn
-
 !
 !--          Add LW up so that it can be removed in prognostic equation
-             rad_net_l(j,i) = rad_net(j,i) + sigma_sb * t_surface(j,i) ** 4
+             rad_net_l(j,i) = rad_net(j,i) + rad_lw_out(nzb,j,i)
+
 
              IF ( humidity )  THEN
-
+#if defined ( __rrtmg )
 !
 !--             Numerator of the prognostic equation
-                coef_1 = rad_net_l(j,i) + 3.0_wp * sigma_sb * t_surface(j,i) ** 4&
-                         + f_shf / exn * T_1 + f_qsws * ( q_p(k+1,j,i) - q_s   &
+                coef_1 = rad_net_l(j,i) + rrtm_lwuflx_dt(0,nzb)                &
+                         * t_surface(j,i) - rad_lw_out(nzb,j,i)                &
+                         + f_shf * pt_1 + f_qsws * ( qv_1 - q_s                &
                          + dq_s_dt * t_surface(j,i) ) + lambda_surface         &
                          * t_soil(nzb_soil,j,i)
@@ -1131,14 +1136,42 @@
 !
 !--             Denominator of the prognostic equation
-                coef_2 = 4.0_wp * sigma_sb * t_surface(j,i) ** 3 + f_qsws      &
-                         * dq_s_dt + lambda_surface + f_shf / exn
-
+                coef_2 = rrtm_lwuflx_dt(0,nzb) + f_qsws * dq_s_dt              &
+                         + lambda_surface + f_shf / exn
+#else
+
+!
+!--             Numerator of the prognostic equation
+                coef_1 = rad_net_l(j,i) + 3.0_wp * sigma_sb                    &
+                         * t_surface(j,i) ** 4                                 &
+                         + f_shf * pt_1 + f_qsws * ( qv_1                      &
+                         - q_s + dq_s_dt * t_surface(j,i) )                    &
+                         + lambda_surface * t_soil(nzb_soil,j,i)
+
+!
+!--                Denominator of the prognostic equation
+                   coef_2 = 4.0_wp * sigma_sb * t_surface(j,i) ** 3 + f_qsws   &
+                            * dq_s_dt + lambda_surface + f_shf / exn
+ 
+#endif
              ELSE
 
+#if defined ( __rrtmg )
 !
 !--             Numerator of the prognostic equation
-                coef_1 = rad_net_l(j,i) + 3.0_wp * sigma_sb * t_surface(j,i) ** 4&
-                         + f_shf / exn * T_1 + lambda_surface                  &
+                coef_1 = rad_net_l(j,i) + rrtm_lwuflx_dt(0,nzb)                &
+                         * t_surface(j,i) - rad_lw_out(nzb,j,i)                &
+                         + f_shf * pt_1  + lambda_surface                      &
                          * t_soil(nzb_soil,j,i)
+
+!
+!--             Denominator of the prognostic equation
+                coef_2 = rrtm_lwuflx_dt(0,nzb) + lambda_surface + f_shf / exn
+#else
+
+!
+!--             Numerator of the prognostic equation
+                coef_1 = rad_net_l(j,i) + 3.0_wp * sigma_sb                    &
+                          * t_surface(j,i) ** 4 + f_shf * pt_1                 &
+                          + lambda_surface * t_soil(nzb_soil,j,i)
 
 !
@@ -1146,6 +1179,7 @@
                 coef_2 = 4.0_wp * sigma_sb * t_surface(j,i) ** 3               &
                          + lambda_surface + f_shf / exn
-
-             ENDIF
+#endif
+             ENDIF
+
 
              tend = 0.0_wp
@@ -1159,56 +1193,87 @@
 !
 !--          Add RK3 term
-             t_surface_p(j,i) = t_surface_p(j,i) + dt_3d * tsc(3)              &
-                                * tt_surface_m(j,i)
-
-!
-!--          Calculate true tendency
-             tend = (t_surface_p(j,i) - t_surface(j,i) - dt_3d * tsc(3)        &
-                    * tt_surface_m(j,i)) / (dt_3d  * tsc(2))
-!
-!--          Calculate t_surface tendencies for the next Runge-Kutta step
-             IF ( timestep_scheme(1:5) == 'runge' )  THEN
-                IF ( intermediate_timestep_count == 1 )  THEN
-                   tt_surface_m(j,i) = tend
-                ELSEIF ( intermediate_timestep_count <                         &
-                         intermediate_timestep_count_max )  THEN
-                   tt_surface_m(j,i) = -9.5625_wp * tend + 5.3125_wp           &
-                                       * tt_surface_m(j,i)
+             IF ( c_surface /= 0.0_wp )  THEN
+
+                t_surface_p(j,i) = t_surface_p(j,i) + dt_3d * tsc(3)           &
+                                   * tt_surface_m(j,i)
+
+!
+!--             Calculate true tendency
+                tend = (t_surface_p(j,i) - t_surface(j,i) - dt_3d * tsc(3)     &
+                       * tt_surface_m(j,i)) / (dt_3d  * tsc(2))
+!
+!--             Calculate t_surface tendencies for the next Runge-Kutta step
+                IF ( timestep_scheme(1:5) == 'runge' )  THEN
+                   IF ( intermediate_timestep_count == 1 )  THEN
+                      tt_surface_m(j,i) = tend
+                   ELSEIF ( intermediate_timestep_count <                      &
+                            intermediate_timestep_count_max )  THEN
+                      tt_surface_m(j,i) = -9.5625_wp * tend + 5.3125_wp        &
+                                          * tt_surface_m(j,i)
+                   ENDIF
                 ENDIF
-             ENDIF
-
-             pt_p(k,j,i) = t_surface_p(j,i) / exn
+
+             ENDIF
+
+!
+!--          In case of fast changes in the skin temperature, it is required to
+!--          update the radiative fluxes in order to keep the solution stable
+             IF ( ABS( t_surface_p(j,i) - t_surface(j,i) ) > 0.2_wp )  THEN
+                force_radiation_call_l = .TRUE.
+             ENDIF
+
+             pt(k,j,i) = t_surface_p(j,i) / exn
+
 !
 !--          Calculate fluxes
-             rad_net_l(j,i)   = rad_net_l(j,i) + 3.0_wp * sigma_sb                 &
-                              * t_surface(j,i)**4 - 4.0_wp * sigma_sb          &
-                              * t_surface(j,i)**3 * t_surface_p(j,i)
+#if defined ( __rrtmg )
+             rad_net_l(j,i)   = rad_net_l(j,i) + rrtm_lwuflx_dt(0,nzb)         &
+                                * t_surface(j,i) - rad_lw_out(nzb,j,i)         &
+                                - rrtm_lwuflx_dt(0,nzb) * t_surface_p(j,i)
+
+             IF ( rrtm_idrv == 1 )  THEN
+                rad_net(j,i) = rad_net_l(j,i)
+                rad_lw_out(nzb,j,i) = rad_lw_out(nzb,j,i)                      &
+                                      + rrtm_lwuflx_dt(0,nzb)                  &
+                                      * ( t_surface_p(j,i) - t_surface(j,i) )
+             ENDIF
+#else
+             rad_net_l(j,i)   = rad_net_l(j,i) + 3.0_wp * sigma_sb             &
+                                * t_surface(j,i)**4 - 4.0_wp * sigma_sb        &
+                                * t_surface(j,i)**3 * t_surface_p(j,i)
+             rad_net(j,i) = rad_net_l(j,i)
+#endif
+
              ghf_eb(j,i)    = lambda_surface * (t_surface_p(j,i)               &
                               - t_soil(nzb_soil,j,i))
-             shf_eb(j,i)    = - f_shf  * ( pt_p(k+1,j,i) - pt_p(k,j,i) )
+
+             shf_eb(j,i)    = - f_shf * ( pt_1 - pt(k,j,i) )
+
+             shf(j,i) = shf_eb(j,i) / rho_cp
 
              IF ( humidity )  THEN
-                qsws_eb(j,i)  = - f_qsws    * ( q_p(k+1,j,i) - q_s + dq_s_dt   &
+                qsws_eb(j,i)  = - f_qsws    * ( qv_1 - q_s + dq_s_dt           &
                                 * t_surface(j,i) - dq_s_dt * t_surface_p(j,i) )
 
-                qsws_veg_eb(j,i)  = - f_qsws_veg  * ( q_p(k+1,j,i) - q_s       &
+                qsws(j,i) = qsws_eb(j,i) / rho_lv
+
+                qsws_veg_eb(j,i)  = - f_qsws_veg  * ( qv_1 - q_s               &
                                     + dq_s_dt * t_surface(j,i) - dq_s_dt       &
                                     * t_surface_p(j,i) )
 
-                qsws_soil_eb(j,i) = - f_qsws_soil * ( q_p(k+1,j,i) - q_s       &
+                qsws_soil_eb(j,i) = - f_qsws_soil * ( qv_1 - q_s               &
                                     + dq_s_dt * t_surface(j,i) - dq_s_dt       &
                                     * t_surface_p(j,i) )
 
-                qsws_liq_eb(j,i)  = - f_qsws_liq  * ( q_p(k+1,j,i) - q_s       &
+                qsws_liq_eb(j,i)  = - f_qsws_liq  * ( qv_1 - q_s               &
                                     + dq_s_dt * t_surface(j,i) - dq_s_dt       &
                                     * t_surface_p(j,i) )
              ENDIF
-
 !
 !--          Calculate the true surface resistance
-             IF ( qsws_eb(j,i) .EQ. 0.0_wp )  THEN
+             IF ( qsws_eb(j,i) == 0.0_wp )  THEN
                 r_s(j,i) = 1.0E10_wp
              ELSE
-                r_s(j,i) = - rho_lv * ( q_p(k+1,j,i) - q_s + dq_s_dt           &
+                r_s(j,i) = - rho_lv * ( qv_1 - q_s + dq_s_dt                   &
                            * t_surface(j,i) - dq_s_dt * t_surface_p(j,i) )     &
                            / qsws_eb(j,i) - r_a(j,i)
@@ -1228,11 +1293,11 @@
 !--                Add precipitation to liquid water reservoir, if possible.
 !--                Otherwise, add the water to bare soil fraction.
-                   IF ( m_liq_eb(j,i) .EQ. m_liq_eb_max )  THEN
+                   IF ( m_liq_eb(j,i) /= m_liq_eb_max )  THEN
                       qsws_liq_eb(j,i) = qsws_liq_eb(j,i)                      &
-                                       + c_veg(j,i) * precipitation_rate(j,i)  &
+                                       + c_veg(j,i) * prr(k,j,i) * hyrho(k)    &
                                        * 0.001_wp * rho_l * l_v
                    ELSE
                       qsws_soil_eb(j,i) = qsws_soil_eb(j,i)                    &
-                                        + c_veg(j,i) * precipitation_rate(j,i) &
+                                        + c_veg(j,i) * prr(k,j,i) * hyrho(k)   &
                                         * 0.001_wp * rho_l * l_v
                    ENDIF
@@ -1241,10 +1306,12 @@
 !--                coverage.
                    qsws_soil_eb(j,i) = qsws_soil_eb(j,i) * (1.0_wp             &
-                                       - c_veg(j,i)) * precipitation_rate(j,i) &
+                                       - c_veg(j,i)) * prr(k,j,i) * hyrho(k)   &
                                        * 0.001_wp * rho_l * l_v
                 ENDIF
+
 !
 !--             If the air is saturated, check the reservoir water level
-                IF ( q_s .LE. q_p(k+1,j,i))  THEN
+                IF ( qsws_eb(j,i) < 0.0_wp )  THEN
+
 !
 !--                Check if reservoir is full (avoid values > m_liq_eb_max)
@@ -1252,5 +1319,5 @@
 !--                case qsws_veg_eb is zero anyway (because c_liq = 1),       
 !--                so that tend is zero and no further check is needed
-                   IF ( m_liq_eb(j,i) .EQ. m_liq_eb_max )  THEN
+                   IF ( m_liq_eb(j,i) == m_liq_eb_max )  THEN
                       qsws_soil_eb(j,i) = qsws_soil_eb(j,i)                    &
                                            + qsws_liq_eb(j,i)
@@ -1262,5 +1329,5 @@
 !--                let the water enter the liquid water reservoir as dew on the
 !--                plant
-                   IF ( qsws_veg_eb(j,i) .LT. 0.0_wp )  THEN
+                   IF ( qsws_veg_eb(j,i) < 0.0_wp )  THEN
                       qsws_liq_eb(j,i) = qsws_liq_eb(j,i) + qsws_veg_eb(j,i)
                       qsws_veg_eb(j,i) = 0.0_wp
@@ -1301,4 +1368,21 @@
        ENDDO
 
+#if defined( __parallel )
+!
+!--    Make a logical OR for all processes. Force radiation call if at
+!--    least one processor
+       IF ( intermediate_timestep_count == intermediate_timestep_count_max-1 )&
+       THEN
+
+          IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
+          CALL MPI_ALLREDUCE( force_radiation_call_l, force_radiation_call,    &
+                              1, MPI_LOGICAL, MPI_LOR, comm2d, ierr )
+#else
+          force_radiation_call = force_radiation_call_l
+#endif
+          force_radiation_call_l = .FALSE.
+       ENDIF
+
+
     END SUBROUTINE lsm_energy_balance
 
@@ -1322,10 +1406,10 @@
 
        REAL(wp), DIMENSION(nzb_soil:nzt_soil) :: gamma_temp,  & !< temp. gamma
-                                               lambda_temp, & !< temp. lambda
-                                               tend           !< tendency
-
-       DO i = nxlg, nxrg    
-          DO j = nysg, nyng
-             DO k = nzb_soil, nzt_soil
+                                                 lambda_temp, & !< temp. lambda
+                                                 tend           !< tendency
+
+       DO  i = nxlg, nxrg
+          DO  j = nysg, nyng
+             DO  k = nzb_soil, nzt_soil
 !
 !--             Calculate volumetric heat capacity of the soil, taking into 
@@ -1335,8 +1419,12 @@
 
 !
-!--             Calculate soil heat conductivity at the center of the soil 
+!--             Calculate soil heat conductivity at the center of the soil
 !--             layers
+                lambda_h_sat = lambda_h_sm ** (1.0_wp - m_sat(j,i)) *          &
+                               lambda_h_water ** m_soil(k,j,i)
+
                 ke = 1.0_wp + LOG10(MAX(0.1_wp,m_soil(k,j,i) / m_sat(j,i)))
-                lambda_temp(k) = ke * (lambda_h_sat(j,i) + lambda_h_dry) +     &
+
+                lambda_temp(k) = ke * (lambda_h_sat - lambda_h_dry) +          &
                                  lambda_h_dry
 
@@ -1346,10 +1434,6 @@
 !--          Calculate soil heat conductivity (lambda_h) at the _stag level 
 !--          using linear interpolation
-             DO k = nzb_soil, nzt_soil-1
-                  
-                lambda_h(k,j,i) = lambda_temp(k) +                             &
-                                  ( lambda_temp(k+1) - lambda_temp(k) )        &
-                                  * 0.5 * dz_soil_stag(k) * ddz_soil(k+1)
-
+             DO  k = nzb_soil, nzt_soil-1
+                lambda_h(k,j,i) = ( lambda_temp(k+1) + lambda_temp(k) ) * 0.5_wp
              ENDDO
              lambda_h(nzt_soil,j,i) = lambda_temp(nzt_soil)
@@ -1358,17 +1442,20 @@
 !--          Prognostic equation for soil temperature t_soil
              tend(:) = 0.0_wp
-             tend(0) = (1.0_wp/rho_c_total(nzb_soil,j,i)) *                    &
+             tend(nzb_soil) = (1.0_wp/rho_c_total(nzb_soil,j,i)) *             &
                        ( lambda_h(nzb_soil,j,i) * ( t_soil(nzb_soil+1,j,i)     &
-                         - t_soil(nzb_soil,j,i) ) * ddz_soil(nzb_soil)         &
+                         - t_soil(nzb_soil,j,i) ) * ddz_soil(nzb_soil+1)       &
                          + ghf_eb(j,i) ) * ddz_soil_stag(nzb_soil)
 
-             DO  k = 1, nzt_soil
+
+
+
+             DO  k = nzb_soil+1, nzt_soil
                 tend(k) = (1.0_wp/rho_c_total(k,j,i))                          &
                           * (   lambda_h(k,j,i)                                &
                               * ( t_soil(k+1,j,i) - t_soil(k,j,i) )            &
-                              * ddz_soil(k)                                    &
+                              * ddz_soil(k+1)                                  &
                               - lambda_h(k-1,j,i)                              &
                               * ( t_soil(k,j,i) - t_soil(k-1,j,i) )            &
-                              * ddz_soil(k-1)                                  &
+                              * ddz_soil(k)                                    &
                             ) * ddz_soil_stag(k)
              ENDDO
@@ -1396,5 +1483,5 @@
 
 
-             DO k = nzb_soil, nzt_soil
+             DO  k = nzb_soil, nzt_soil
 
 !
@@ -1414,4 +1501,5 @@
                               / (n_vg(j,i)-1.0_wp)) - 1.0_wp                   &
                           )**(1.0_wp/n_vg(j,i)) / alpha_vg(j,i)
+
 
                    gamma_temp(k) = gamma_w_sat(j,i) * ( ( (1.0_wp +            &
@@ -1438,12 +1526,10 @@
 !--             using linear interpolation. To do: replace this with
 !--             ECMWF-IFS Eq. 8.81
-                DO k = nzb_soil, nzt_soil-1
+                DO  k = nzb_soil, nzt_soil-1
                      
-                   lambda_w(k,j,i) = lambda_temp(k) +                          &
-                                     ( lambda_temp(k+1) - lambda_temp(k) )     &
-                                     * 0.5_wp * dz_soil_stag(k) * ddz_soil(k+1)
-                   gamma_w(k,j,i)  = gamma_temp(k) +                           &
-                                     ( gamma_temp(k+1) - gamma_temp(k) )       &
-                                     * 0.5_wp * dz_soil_stag(k) * ddz_soil(k+1)                 
+                   lambda_w(k,j,i) = ( lambda_temp(k+1) + lambda_temp(k) )     &
+                                     * 0.5_wp
+                   gamma_w(k,j,i)  = ( gamma_temp(k+1) + gamma_temp(k) )       &
+                                     * 0.5_wp
 
                 ENDDO
@@ -1457,5 +1543,5 @@
                    gamma_w(nzt_soil,j,i) = 0.0_wp
                 ELSE
-                   gamma_w(nzt_soil,j,i) = lambda_temp(nzt_soil)
+                   gamma_w(nzt_soil,j,i) = gamma_temp(nzt_soil)
                 ENDIF     
 
@@ -1470,23 +1556,22 @@
 
 !
-!--             Calculate the root extraction (ECMWF 7.69, modified so that the
-!--             sum of root_extr = 1). The energy balance solver guarantees a 
-!--             positive transpiration, so that there is no need for an 
-!--             additional check.
-
-                m_total = 0.0_wp
-                DO k = nzb_soil, nzt_soil
-                    IF ( m_soil(k,j,i) .GT. m_wilt(j,i) )  THEN
+!--             Calculate the root extraction (ECMWF 7.69, the sum of root_extr
+!--             = 1). The energy balance solver guarantees a positive
+!--             transpiration, so that there is no need for an additional check.
+                DO  k = nzb_soil, nzt_soil
+                    IF ( m_soil(k,j,i) > m_wilt(j,i) )  THEN
                        m_total = m_total + root_fr(k,j,i) * m_soil(k,j,i)
                     ENDIF
                 ENDDO  
 
-                DO k = nzb_soil, nzt_soil 
-                   IF ( m_soil(k,j,i) .GT. m_wilt(j,i) )  THEN
-                      root_extr(k) = root_fr(k,j,i) * m_soil(k,j,i) / m_total
-                   ELSE
-                      root_extr(k) = 0.0_wp
-                   ENDIF
-                ENDDO
+                IF ( m_total > 0.0_wp )  THEN
+                   DO  k = nzb_soil, nzt_soil
+                      IF ( m_soil(k,j,i) > m_wilt(j,i) )  THEN
+                         root_extr(k) = root_fr(k,j,i) * m_soil(k,j,i) / m_total
+                      ELSE
+                         root_extr(k) = 0.0_wp
+                      ENDIF
+                   ENDDO
+                ENDIF
 
 !
@@ -1495,5 +1580,5 @@
                 tend(nzb_soil) = ( lambda_w(nzb_soil,j,i) * (                  &
                             m_soil(nzb_soil+1,j,i) - m_soil(nzb_soil,j,i) )    &
-                            * ddz_soil(nzb_soil) - gamma_w(nzb_soil,j,i) - (   &
+                            * ddz_soil(nzb_soil+1) - gamma_w(nzb_soil,j,i) - ( &
                             root_extr(nzb_soil) * qsws_veg_eb(j,i)             &
                             + qsws_soil_eb(j,i) ) * drho_l_lv )                &
@@ -1502,9 +1587,9 @@
                 DO  k = nzb_soil+1, nzt_soil-1
                    tend(k) = ( lambda_w(k,j,i) * ( m_soil(k+1,j,i)             &
-                               - m_soil(k,j,i) ) * ddz_soil(k) - gamma_w(k,j,i)&
-                               - lambda_w(k-1,j,i) * (m_soil(k,j,i) -          &
-                               m_soil(k-1,j,i)) * ddz_soil(k-1)                &
-                               + gamma_w(k-1,j,i) - (root_extr(k)              &
-                               * qsws_veg_eb(j,i) * drho_l_lv)                 &
+                             - m_soil(k,j,i) ) * ddz_soil(k+1) - gamma_w(k,j,i)&
+                             - lambda_w(k-1,j,i) * (m_soil(k,j,i) -            &
+                             m_soil(k-1,j,i)) * ddz_soil(k)                    &
+                             + gamma_w(k-1,j,i) - (root_extr(k)                &
+                             * qsws_veg_eb(j,i) * drho_l_lv)                   &
                              ) * ddz_soil_stag(k)
 
@@ -1514,5 +1599,5 @@
                                         * (m_soil(nzt_soil,j,i)                &
                                         - m_soil(nzt_soil-1,j,i))              &
-                                        * ddz_soil(nzt_soil-1)                 &
+                                        * ddz_soil(nzt_soil)                   &
                                         + gamma_w(nzt_soil-1,j,i) - (          &
                                           root_extr(nzt_soil)                  &
@@ -1573,13 +1658,12 @@
        REAL(wp) :: resistance    !< aerodynamic and soil resistance term
 
-       DO i = nxlg, nxrg    
-          DO j = nysg, nyng
+       DO  i = nxlg, nxrg    
+          DO  j = nysg, nyng
              k = nzb_s_inner(j,i)
 
 !
 !--          Calculate water vapour pressure at saturation
-             e_s = 0.01_wp * 610.78_wp * EXP( 17.269_wp * ( t_surface(j,i)     &
-                                              - 273.16_wp ) / ( t_surface(j,i) &
-                                              - 35.86_wp ) )
+             e_s = 0.01_wp * 610.78_wp * EXP( 17.269_wp * ( t_surface_p(j,i)   &
+                   - 273.16_wp ) / ( t_surface_p(j,i) - 35.86_wp ) )
 
 !
@@ -1587,11 +1671,19 @@
              q_s = 0.622_wp * e_s / surface_pressure
 
-
              resistance = r_a(j,i) / (r_a(j,i) + r_s(j,i))
 
 !
 !--          Calculate specific humidity at surface
-             q_p(k,j,i) = resistance * q_s + (1.0_wp - resistance)             &
-                          * q_p(k+1,j,i)
+             IF ( cloud_physics )  THEN
+                q(k,j,i) = resistance * q_s + (1.0_wp - resistance)            &
+                             * ( q(k+1,j,i) - ql(k+1,j,i) )
+             ELSE
+                q(k,j,i) = resistance * q_s + (1.0_wp - resistance)            &
+                             * q(k+1,j,i)
+             ENDIF
+
+!
+!--          Update virtual potential temperature
+             vpt(k,j,i) = pt(k,j,i) * ( 1.0_wp + 0.61_wp * q(k,j,i) )
 
           ENDDO
Index: palm/trunk/SOURCE/lpm_advec.f90
===================================================================
--- palm/trunk/SOURCE/lpm_advec.f90	(revision 1690)
+++ palm/trunk/SOURCE/lpm_advec.f90	(revision 1691)
@@ -14,10 +14,10 @@
 ! PALM. If not, see <http://www.gnu.org/licenses/>.
 !
-! Copyright 1997-2014 Leibniz Universitaet Hannover
+! Copyright 1997-2015 Leibniz Universitaet Hannover
 !--------------------------------------------------------------------------------!
 !
 ! Current revisions:
 ! ------------------
-!
+! Renamed prandtl_layer to constant_flux_layer.
 !
 ! Former revisions:
@@ -83,6 +83,6 @@
 
     USE control_parameters,                                                    &
-        ONLY:  atmos_ocean_sign, cloud_droplets, dt_3d, dt_3d_reached_l, dz,   &
-               g, kappa, molecular_viscosity, prandtl_layer, topography,       &
+        ONLY:  atmos_ocean_sign, cloud_droplets, constant_flux_layer, dt_3d,   &
+               dt_3d_reached_l, dz, g, kappa, molecular_viscosity, topography, &
                u_gtrans, v_gtrans, simulated_time
 
@@ -224,5 +224,5 @@
 !--       First, check if particle is located below first vertical grid level 
 !--       (Prandtl-layer height)
-          IF ( prandtl_layer  .AND.  particles(n)%z < z_p )  THEN
+          IF ( constant_flux_layer  .AND.  particles(n)%z < z_p )  THEN
 !
 !--          Resolved-scale horizontal particle velocity is zero below z0. 
@@ -294,5 +294,5 @@
        DO  n = start_index(nb), end_index(nb)
 
-          IF ( prandtl_layer  .AND.  particles(n)%z < z_p )  THEN
+          IF ( constant_flux_layer  .AND.  particles(n)%z < z_p )  THEN
 
              IF ( particles(n)%z < z0_av_global )  THEN
Index: palm/trunk/SOURCE/lpm_exchange_horiz.f90
===================================================================
--- palm/trunk/SOURCE/lpm_exchange_horiz.f90	(revision 1690)
+++ palm/trunk/SOURCE/lpm_exchange_horiz.f90	(revision 1691)
@@ -14,10 +14,10 @@
 ! PALM. If not, see <http://www.gnu.org/licenses/>.
 !
-! Copyright 1997-2014 Leibniz Universitaet Hannover
+! Copyright 1997-2015 Leibniz Universitaet Hannover
 !--------------------------------------------------------------------------------!
 !
 ! Current revisions:
 ! ------------------
-! 
+! Formatting corrections.
 !
 ! Former revisions:
@@ -1208,5 +1208,5 @@
              ENDDO
 
-             IF ( n_start .GE. 0 )  THEN
+             IF ( n_start >= 0 )  THEN
                 pack_done = .FALSE.
                 DO  n = n_start, np_old_cell
Index: palm/trunk/SOURCE/lpm_init.f90
===================================================================
--- palm/trunk/SOURCE/lpm_init.f90	(revision 1690)
+++ palm/trunk/SOURCE/lpm_init.f90	(revision 1691)
@@ -14,10 +14,10 @@
 ! PALM. If not, see <http://www.gnu.org/licenses/>.
 !
-! Copyright 1997-2014 Leibniz Universitaet Hannover
+! Copyright 1997-2015 Leibniz Universitaet Hannover
 !--------------------------------------------------------------------------------!
 !
 ! Current revisions:
 ! -----------------
-! 
+! Renamed prandtl_layer to constant_flux_layer.
 !
 ! Former revisions:
@@ -100,7 +100,7 @@
 
     USE control_parameters,                                                    &
-        ONLY:  cloud_droplets, current_timestep_number, dz,                    &
-               initializing_actions, message_string, netcdf_data_format,       &
-               ocean, prandtl_layer, simulated_time
+        ONLY:  cloud_droplets, constant_flux_layer, current_timestep_number,   &
+               dz, initializing_actions, message_string, netcdf_data_format,   &
+               ocean, simulated_time
 
     USE dvrp_variables,                                                        &
@@ -295,5 +295,5 @@
 !-- To obtain exact height levels of particles, linear interpolation is applied
 !-- (see lpm_advec.f90).
-    IF ( prandtl_layer )  THEN
+    IF ( constant_flux_layer )  THEN
        
        ALLOCATE ( log_z_z0(0:number_of_sublayers) ) 
Index: palm/trunk/SOURCE/microphysics.f90
===================================================================
--- palm/trunk/SOURCE/microphysics.f90	(revision 1690)
+++ palm/trunk/SOURCE/microphysics.f90	(revision 1691)
@@ -14,10 +14,11 @@
 ! PALM. If not, see <http://www.gnu.org/licenses/>.
 !
-! Copyright 1997-2014 Leibniz Universitaet Hannover
+! Copyright 1997-2015 Leibniz Universitaet Hannover
 !--------------------------------------------------------------------------------!
 !
 ! Current revisions:
 ! ------------------
-! 
+! Added new routine calc_precipitation_amount. The routine now allows to account
+! for precipitation due to sedimenation of cloud (fog) droplets
 ! 
 ! Former revisions:
@@ -130,4 +131,10 @@
     END INTERFACE sedimentation_rain
 
+    INTERFACE calc_precipitation_amount
+       MODULE PROCEDURE calc_precipitation_amount
+       MODULE PROCEDURE calc_precipitation_amount_ij
+    END INTERFACE calc_precipitation_amount
+
+
  CONTAINS
 
@@ -208,4 +215,8 @@
 
        IF ( drizzle )  CALL sedimentation_cloud
+
+       IF ( precipitation )  THEN
+          CALL calc_precipitation_amount
+       ENDIF
 
     END SUBROUTINE microphysics_control
@@ -726,5 +737,5 @@
 
        USE cloud_parameters,                                                   &
-           ONLY:  eps_sb, hyrho, l_d_cp, nc_const, pt_d_t, sed_qc_const
+           ONLY:  eps_sb, hyrho, l_d_cp, nc_const, prr, pt_d_t, sed_qc_const
 
        USE constants,                                                          &
@@ -732,5 +743,6 @@
 
        USE control_parameters,                                                 &
-           ONLY:  dt_do2d_xy, dt_micro, intermediate_timestep_count
+           ONLY:  call_microphysics_at_all_substeps, dt_micro,                 &
+                  intermediate_timestep_count, precipitation
 
        USE cpulog,                                                             &
@@ -741,5 +753,9 @@
 
        USE kinds
-       
+
+       USE statistics,                                                         &
+           ONLY:  weight_substep
+    
+
        IMPLICIT NONE
 
@@ -777,4 +793,15 @@
                                         pt_d_t(k) * dt_micro
 
+!
+!--             Compute the precipitation rate due to cloud (fog) droplets
+                IF ( precipitation )  THEN
+                   IF ( call_microphysics_at_all_substeps )  THEN
+                      prr(k,j,i) = prr(k,j,i) +  sed_qc(k) / hyrho(k)          &
+                                   * weight_substep(intermediate_timestep_count)
+                   ELSE
+                      prr(k,j,i) = prr(k,j,i) + sed_qc(k) / hyrho(k)
+                   ENDIF
+                ENDIF
+
              ENDDO
           ENDDO
@@ -799,13 +826,9 @@
        USE cloud_parameters,                                                   &
            ONLY:  a_term, b_term, c_term, cof, dpirho_l, eps_sb, hyrho,        &
-                  limiter_sedimentation, l_d_cp, precipitation_amount, prr,    &
-                  pt_d_t, stp
+                  limiter_sedimentation, l_d_cp, prr,  pt_d_t, stp
 
        USE control_parameters,                                                 &
-           ONLY:  call_microphysics_at_all_substeps, dt_do2d_xy, dt_micro,     &
-                  dt_3d, intermediate_timestep_count,                          &
-                  intermediate_timestep_count_max,                             &
-                  precipitation_amount_interval, time_do2d_xy
-
+           ONLY:  call_microphysics_at_all_substeps, dt_micro,                 &
+                  intermediate_timestep_count
        USE cpulog,                                                             &
            ONLY:  cpu_log, log_point_s
@@ -1005,8 +1028,8 @@
 !--             Compute the rain rate
                 IF ( call_microphysics_at_all_substeps )  THEN
-                   prr(k,j,i) = prr(k,j,i) + sed_qr(k) / hyrho(k) *            &
-                                weight_substep(intermediate_timestep_count)
+                   prr(k,j,i) = prr(k,j,i) + sed_qr(k) / hyrho(k)             &
+                                * weight_substep(intermediate_timestep_count)
                 ELSE
-                   prr(k,j,i) = sed_qr(k) / hyrho(k)
+                   prr(k,j,i) = prr(k,j,i) + sed_qr(k) / hyrho(k)
                 ENDIF
 
@@ -1015,21 +1038,53 @@
        ENDDO
 
-!
-!--    Precipitation amount
-       IF ( intermediate_timestep_count == intermediate_timestep_count_max     &
-            .AND.  ( dt_do2d_xy - time_do2d_xy ) <                             &
-                   precipitation_amount_interval )  THEN
+       CALL cpu_log( log_point_s(60), 'sed_rain', 'stop' )
+
+    END SUBROUTINE sedimentation_rain
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Computation of the precipitation amount due to gravitational settling of
+!> rain and cloud (fog) droplets
+!------------------------------------------------------------------------------!
+    SUBROUTINE calc_precipitation_amount
+
+       USE cloud_parameters,                                                   &
+           ONLY:  hyrho, precipitation_amount, prr
+
+       USE control_parameters,                                                 &
+           ONLY:  call_microphysics_at_all_substeps, dt_do2d_xy, dt_3d,        &
+                  intermediate_timestep_count, intermediate_timestep_count_max,&
+                  precipitation_amount_interval, time_do2d_xy
+
+       USE indices,                                                            &
+           ONLY:  nxl, nxr, nys, nyn, nzb_s_inner
+
+       USE kinds
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i                          !:
+       INTEGER(iwp) ::  j                          !:
+
+
+       IF ( ( dt_do2d_xy - time_do2d_xy ) < precipitation_amount_interval .AND.&
+            ( .NOT. call_microphysics_at_all_substeps .OR.                     &
+            intermediate_timestep_count == intermediate_timestep_count_max ) ) &
+       THEN
+
           DO  i = nxl, nxr
              DO  j = nys, nyn
+
                 precipitation_amount(j,i) = precipitation_amount(j,i) +        &
                                             prr(nzb_s_inner(j,i)+1,j,i) *      &
                                             hyrho(nzb_s_inner(j,i)+1) * dt_3d
+
              ENDDO
           ENDDO
        ENDIF
 
-       CALL cpu_log( log_point_s(60), 'sed_rain', 'stop' )
-
-    END SUBROUTINE sedimentation_rain
+    END SUBROUTINE calc_precipitation_amount
 
 
@@ -1121,4 +1176,8 @@
 
        IF ( drizzle )  CALL sedimentation_cloud( i,j )
+
+       IF ( precipitation )  THEN
+          CALL calc_precipitation_amount( i,j )
+       ENDIF
 
 !
@@ -1591,5 +1650,5 @@
 
        USE cloud_parameters,                                                   &
-           ONLY:  eps_sb, hyrho, l_d_cp, pt_d_t, sed_qc_const
+           ONLY:  eps_sb, hyrho, l_d_cp, prr, pt_d_t, sed_qc_const
 
        USE constants,                                                          &
@@ -1597,5 +1656,6 @@
 
        USE control_parameters,                                                 &
-           ONLY:  dt_do2d_xy, dt_micro, intermediate_timestep_count
+           ONLY:  call_microphysics_at_all_substeps, dt_do2d_xy, dt_micro,     &
+                  intermediate_timestep_count, precipitation
 
        USE indices,                                                            &
@@ -1604,4 +1664,7 @@
        USE kinds
        
+       USE statistics,                                                         &
+           ONLY:  weight_substep
+
        IMPLICIT NONE
 
@@ -1632,4 +1695,15 @@
           pt_1d(k) = pt_1d(k) - ( sed_qc(k+1) - sed_qc(k) ) * ddzu(k+1) /      &
                                 hyrho(k) * l_d_cp * pt_d_t(k) * dt_micro
+
+!
+!--       Compute the precipitation rate of cloud (fog) droplets
+          IF ( precipitation )  THEN
+             IF ( call_microphysics_at_all_substeps )  THEN
+                prr(k,j,i) = prr(k,j,i) + sed_qc(k) / hyrho(k) *               &
+                             weight_substep(intermediate_timestep_count)
+             ELSE
+                prr(k,j,i) = prr(k,j,i) +  sed_qc(k) / hyrho(k)
+             ENDIF
+          ENDIF
 
        ENDDO
@@ -1837,17 +1911,47 @@
 !--       Compute the rain rate
           IF ( call_microphysics_at_all_substeps )  THEN
-             prr(k,j,i) = prr(k,j,i) + sed_qr(k) / hyrho(k) *                  &
-                          weight_substep(intermediate_timestep_count)
+             prr(k,j,i) = prr(k,j,i) + sed_qr(k) / hyrho(k)                    &
+                          * weight_substep(intermediate_timestep_count)
           ELSE
-             prr(k,j,i) = sed_qr(k) / hyrho(k)
+             prr(k,j,i) = prr(k,j,i) + sed_qr(k) / hyrho(k)
           ENDIF
 
        ENDDO
 
-!
-!--    Precipitation amount
-       IF ( intermediate_timestep_count == intermediate_timestep_count_max     &
-            .AND.  ( dt_do2d_xy - time_do2d_xy ) <                             &
-                   precipitation_amount_interval )  THEN
+    END SUBROUTINE sedimentation_rain_ij
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> This subroutine computes the precipitation amount due to gravitational
+!> settling of rain and cloud (fog) droplets
+!------------------------------------------------------------------------------!
+    SUBROUTINE calc_precipitation_amount_ij( i, j )
+
+       USE cloud_parameters,                                                   &
+           ONLY:  hyrho, precipitation_amount, prr
+
+       USE control_parameters,                                                 &
+           ONLY:  call_microphysics_at_all_substeps, dt_do2d_xy, dt_3d,        &
+                  intermediate_timestep_count, intermediate_timestep_count_max,&
+                  precipitation_amount_interval,         &
+                  time_do2d_xy
+
+       USE indices,                                                            &
+           ONLY:  nzb_s_inner
+
+       USE kinds
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i                          !:
+       INTEGER(iwp) ::  j                          !:
+
+
+       IF ( ( dt_do2d_xy - time_do2d_xy ) < precipitation_amount_interval .AND.&
+            ( .NOT. call_microphysics_at_all_substeps .OR.                     &
+            intermediate_timestep_count == intermediate_timestep_count_max ) ) &
+       THEN
 
           precipitation_amount(j,i) = precipitation_amount(j,i) +              &
@@ -1856,7 +1960,6 @@
        ENDIF
 
-    END SUBROUTINE sedimentation_rain_ij
-
-    
+    END SUBROUTINE calc_precipitation_amount_ij
+
 !------------------------------------------------------------------------------!
 ! Description:
Index: palm/trunk/SOURCE/modules.f90
===================================================================
--- palm/trunk/SOURCE/modules.f90	(revision 1690)
+++ palm/trunk/SOURCE/modules.f90	(revision 1691)
@@ -14,10 +14,13 @@
 ! PALM. If not, see <http://www.gnu.org/licenses/>.
 !
-! Copyright 1997-2014 Leibniz Universitaet Hannover
+! Copyright 1997-2015 Leibniz Universitaet Hannover
 !--------------------------------------------------------------------------------!
 !
 ! Current revisions:
 ! ------------------
-! 
+! Renamed Obukhov length. Added ol, removed rif. Increased number of profiles 
+! (pr_palm). Changed default values for dissipation_1d to 'detering' and 
+! (mixing_length_1d to 'blackadar'. Added most_method. rif_min and rif_max
+! renamed to zeta_min and zeta_max and new values assigned.
 ! 
 ! Former revisions:
@@ -300,4 +303,14 @@
 !
 !
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Definition of all variables
+!>
+!> @todo Add description for each variable
+!------------------------------------------------------------------------------!
+
+
+!------------------------------------------------------------------------------!
 ! Description:
 ! ------------
@@ -338,5 +351,7 @@
           flux_s_e, flux_s_nr, flux_s_pt, flux_s_q, flux_s_qr, flux_s_sa,      &
           flux_s_u, flux_s_v, flux_s_w, f1_mg, f2_mg, f3_mg,                   &
-          mean_inflow_profiles, nrs, nrsws, nrswst, ptnudge, pt_slope_ref,     &
+          mean_inflow_profiles, nrs, nrsws, nrswst,                            &
+          ol,                                                                  & !< Obukhov length
+          ptnudge, pt_slope_ref,                                               &
           qnudge, qs, qsws, qswst, qswst_remote, qrs, qrsws, qrswst, rif,      &
           saswsb, saswst, shf, tnudge, td_lsa_lpt, td_lsa_q, td_sub_lpt,       &
@@ -390,7 +405,13 @@
     USE kinds
 
-    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  lwp_av, precipitation_rate_av,   &
-                                          qsws_av, shf_av,ts_av, us_av, z0_av, &
-                                          z0h_av
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  lwp_av,                & !> Avg. liquid water path
+                                              precipitation_rate_av, & !> Avg. of precipitation rate
+                                              ol_av,                 & !> Avg. of Obukhov length
+                                              qsws_av,               & !> Avg. of surface moisture flux
+                                              shf_av,                & !> Avg. of surface heat flux
+                                              ts_av,                 & !> Avg. of characteristic temperature scale
+                                              us_av,                 & !> Avg. of friction velocity
+                                              z0_av,                 & !> Avg. of roughness length for momentum
+                                              z0h_av                   !> Avg. of roughness length for heat and moisture
 
     REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::                         &
@@ -541,5 +562,7 @@
     CHARACTER (LEN=2)    ::  coupling_char = ''
     CHARACTER (LEN=5)    ::  write_binary = 'false'
-    CHARACTER (LEN=8)    ::  run_date, run_time
+    CHARACTER (LEN=8)    ::  most_method = 'lookup', & !< NAMELIST parameter defining method to be used to calculate Okukhov length, 
+                             run_date,               & !< 
+                             run_time                  !< 
     CHARACTER (LEN=9)    ::  simulated_time_chr
     CHARACTER (LEN=11)   ::  topography_grid_convention = ' '
@@ -563,7 +586,7 @@
                              coupling_mode = 'uncoupled', &
                              coupling_mode_remote = 'uncoupled', &
-                             dissipation_1d = 'as_in_3d_model', &
+                             dissipation_1d = 'detering', &
                              fft_method = 'system-specific', &
-                             mixing_length_1d = 'as_in_3d_model', &
+                             mixing_length_1d = 'blackadar', &
                              random_generator = 'numerical-recipes', &
                              reference_state = 'initial_profile', &
@@ -653,4 +676,5 @@
                 cloud_top_radiation = .FALSE., &
                 conserve_volume_flow = .FALSE., constant_diffusion = .FALSE., &
+                constant_flux_layer = .TRUE., &
                 constant_heatflux = .TRUE., constant_top_heatflux = .TRUE., &
                 constant_top_momentumflux = .FALSE., &
@@ -679,5 +703,4 @@
                 outflow_l = .FALSE., outflow_n = .FALSE., outflow_r = .FALSE., &
                 outflow_s = .FALSE., passive_scalar = .FALSE., &
-                prandtl_layer = .TRUE., &
                 precipitation = .FALSE., &
                 random_heatflux = .FALSE., recycling_yshift = .FALSE.,&
@@ -745,5 +768,5 @@
                  recycling_width = 9999999.9_wp, residual_limit = 1.0E-4_wp, &
                  restart_time = 9999999.9_wp, rho_reference, rho_surface, &
-                 rif_max = 1.0_wp, rif_min = -5.0_wp, roughness_length = 0.1_wp, &
+                 roughness_length = 0.1_wp, &
                  sa_surface = 35.0_wp, &
                  simulated_time = 0.0_wp, simulated_time_at_begin, sin_alpha_surface, &
@@ -768,4 +791,6 @@
                  vg_surface = 0.0_wp, vpt_reference = 9999999.9_wp, &
                  v_bulk = 0.0_wp, v_gtrans = 0.0_wp, wall_adjustment_factor = 1.8_wp, &
+                 zeta_max = 20.0_wp,    & !< Maximum value of zeta = z/L
+                 zeta_min = -9990.0_wp, & !< Minimum value of zeta = z/L
                  z_max_do2d = -1.0_wp, z0h_factor = 1.0_wp
 
@@ -1149,5 +1174,5 @@
              'wpt          ', 'pt(0)        ', 'pt(zp)       ',                &
              'w"u"0        ', 'w"v"0        ', 'w"q"0        ',                &
-             'mo_L         ', 'q*           ',                                 &
+             'ol           ', 'q*           ',                                 &
              ( 'unknown      ', i9 = 1, dots_max-23 ) /)
 
@@ -1429,5 +1454,5 @@
 
     CHARACTER (LEN=40) ::  region(0:9)
-    INTEGER(iwp) ::  pr_palm = 120, statistic_regions = 0
+    INTEGER(iwp) ::  pr_palm = 130, statistic_regions = 0
     INTEGER(iwp) ::  u_max_ijk(3) = -1, v_max_ijk(3) = -1, w_max_ijk(3) = -1
     LOGICAL ::  flow_statistics_called = .FALSE.
Index: palm/trunk/SOURCE/netcdf.f90
===================================================================
--- palm/trunk/SOURCE/netcdf.f90	(revision 1690)
+++ palm/trunk/SOURCE/netcdf.f90	(revision 1691)
@@ -14,10 +14,11 @@
 ! PALM. If not, see <http://www.gnu.org/licenses/>.
 !
-! Copyright 1997-2014 Leibniz Universitaet Hannover
+! Copyright 1997-2015 Leibniz Universitaet Hannover
 !--------------------------------------------------------------------------------!
 !
 ! Current revisions:
 ! ------------------
-! 
+! Added output of radiative heating rates for RRTMG. Corrected output of 
+! radiative fluxes
 ! 
 ! Former revisions:
@@ -116,24 +117,26 @@
 #if defined( __netcdf )
 
-    USE arrays_3d,                                                              &
+    USE arrays_3d,                                                             &
         ONLY:  zu, zw
 
-    USE constants,                                                              &
+    USE constants,                                                             &
         ONLY:  pi
 
-    USE control_parameters,                                                     &
-        ONLY:  averaging_interval, averaging_interval_pr, averaging_interval_sp,&
-        data_output_pr,  domask,  dopr_n,dopr_time_count, dopts_time_count,     &
-        dots_time_count, dosp_time_count, do2d, do2d_xz_time_count, do3d,       &
-        do2d_yz_time_count, mask_size, do2d_xy_time_count, do3d_time_count,     &
-        domask_time_count, mask_i_global, mask_j_global,mask_k_global,          &
-        message_string, mid, netcdf_data_format, netcdf_precision, ntdim_2d_xy, &
-        ntdim_2d_xz, ntdim_2d_yz, ntdim_3d, nz_do3d, prt_time_count,            &
-        run_description_header, section, simulated_time, topography
-
-    USE grid_variables,                                                         &
+    USE control_parameters,                                                    &
+        ONLY:  averaging_interval, averaging_interval_pr,                      &
+               averaging_interval_sp, data_output_pr,  domask,  dopr_n,        &
+               dopr_time_count, dopts_time_count, dots_time_count,             &
+               dosp_time_count, do2d, do2d_xz_time_count, do3d,                &
+               do2d_yz_time_count, mask_size, do2d_xy_time_count,              &
+               do3d_time_count, domask_time_count, mask_i_global,              &
+               mask_j_global, mask_k_global, message_string, mid,              &
+               netcdf_data_format, netcdf_precision, ntdim_2d_xy,              &
+               ntdim_2d_xz, ntdim_2d_yz, ntdim_3d, nz_do3d, prt_time_count,    &
+              run_description_header, section, simulated_time, topography
+
+    USE grid_variables,                                                        &
         ONLY:  dx, dy, zu_s_inner, zw_w_inner
 
-    USE indices,                                                                &
+    USE indices,                                                               &
         ONLY:  nx, ny, nz ,nzb, nzt
 
@@ -150,17 +153,19 @@
     USE pegrid
 
-    USE particle_attributes,                                                    &
+    USE particle_attributes,                                                   &
         ONLY:  maximum_number_of_particles, number_of_particle_groups
 
-    USE profil_parameter,                                                       &
-        ONLY:  crmax, cross_profiles, dopr_index,profile_columns, profile_rows
-
-    USE radiation_model_mod,                                                    &
-        ONLY:  rad_lw_in, rad_lw_out, rad_sw_in, rad_sw_out
-
-    USE spectrum,                                                               &
+    USE profil_parameter,                                                      &
+        ONLY:  crmax, cross_profiles, dopr_index, profile_columns, profile_rows
+
+    USE radiation_model_mod,                                                   &
+        ONLY:  rad_lw_in, rad_lw_out, rad_lw_cs_hr, rad_lw_hr,                 &
+               rad_sw_in, rad_sw_out, rad_sw_cs_hr, rad_sw_hr
+
+
+    USE spectrum,                                                              &
         ONLY:  comp_spectra_level, data_output_sp, spectra_direction
 
-    USE statistics,                                                             &
+    USE statistics,                                                            &
         ONLY:  hom, statistic_regions
 
@@ -531,8 +536,8 @@
 !
 !--             Most variables are defined on the scalar grid
-                CASE ( 'e', 'lpt', 'nr', 'p', 'pc', 'pr', 'prr', 'pt', 'q',&
-                       'qc', 'ql', 'ql_c', 'ql_v', 'ql_vp', 'qr', 'qv',    &
-                       'rho', 's', 'sa', 'vpt', 'rad_lw_in', 'rad_lw_out', &
-                       'rad_sw_in', 'rad_sw_out' )
+                CASE ( 'e', 'lpt', 'nr', 'p', 'pc', 'pr', 'prr', 'pt', 'q',    &
+                       'qc', 'ql', 'ql_c', 'ql_v', 'ql_vp', 'qr', 'qv',        &
+                       'rad_lw_cs_hr', 'rad_lw_hr', 'rad_sw_cs_hr',            &
+                       'rad_sw_hr', 'rho', 's', 'sa', 'vpt'  )
 
                    grid_x = 'x'
@@ -555,5 +560,6 @@
 !
 !--             w grid
-                CASE ( 'w' )
+                CASE ( 'rad_lw_in', 'rad_lw_out', 'rad_sw_in', 'rad_sw_out',   &
+                       'w' )
 
                    grid_x = 'x'
@@ -562,5 +568,5 @@
 !
 !--             soil grid
-                CASE ( 't_soil', 'm_soil' )
+                CASE ( 'm_soil', 't_soil' )
 
                    grid_x = 'x'
@@ -1112,8 +1118,8 @@
 !
 !--             Most variables are defined on the scalar grid
-                CASE ( 'e', 'lpt', 'nr', 'p', 'pc', 'pr', 'prr', 'pt', 'q',   &
-                       'qc', 'ql', 'ql_c', 'ql_v', 'ql_vp', 'qr', 'qv', 'rho',&
-                       's', 'sa', 'vpt' , 'rad_lw_in', 'rad_lw_out',          &
-                       'rad_sw_in', 'rad_sw_out' )
+                CASE ( 'e', 'lpt', 'nr', 'p', 'pc', 'pr', 'prr', 'pt', 'q',    &
+                       'qc', 'ql', 'ql_c', 'ql_v', 'ql_vp', 'qr', 'qv', 'rho', &
+                       's', 'sa', 'vpt' , 'rad_lw_cs_hr', 'rad_lw_hr',         &
+                       'rad_sw_cs_hr', 'rad_sw_hr' )
 
                    grid_x = 'x'
@@ -1136,5 +1142,6 @@
 !
 !--             w grid
-                CASE ( 'w' )
+                CASE ( 'rad_lw_in', 'rad_lw_out', 'rad_sw_in', 'rad_sw_out',   &
+                       'w' )
 
                    grid_x = 'x'
@@ -1143,5 +1150,5 @@
 !
 !--             soil grid
-                CASE ( 't_soil', 'm_soil' )
+                CASE ( 'm_soil', 't_soil' )
 
                    grid_x = 'x'
@@ -1765,9 +1772,10 @@
 !
 !--                   Most variables are defined on the zu grid
-                      CASE ( 'e_xy', 'lpt_xy', 'nr_xy', 'p_xy', 'pc_xy', 'pr_xy',&
-                             'prr_xy', 'pt_xy', 'q_xy', 'qc_xy', 'ql_xy',        &
-                             'ql_c_xy', 'ql_v_xy', 'ql_vp_xy', 'qr_xy', 'qv_xy', &
-                             'rho_xy', 's_xy', 'sa_xy', 'vpt_xy', 'rad_lw_in_xy',&
-                             'rad_lw_out_xy', 'rad_sw_in_xy', 'rad_sw_out_xy' )
+                      CASE ( 'e_xy', 'lpt_xy', 'nr_xy', 'p_xy', 'pc_xy',       &
+                             'pr_xy', 'prr_xy', 'pt_xy', 'q_xy', 'qc_xy',      &
+                             'ql_xy', 'ql_c_xy', 'ql_v_xy', 'ql_vp_xy',        &
+                             'qr_xy', 'qv_xy', 'rad_lw_cs_hr_xy',              &
+                             'rad_lw_hr_xy', 'rad_sw_cs_hr_xy', 'rad_sw_hr_xy',& 
+                             'rho_xy', 's_xy', 'sa_xy', 'vpt_xy' )
 
                          grid_x = 'x'
@@ -1790,5 +1798,6 @@
 !
 !--                   w grid
-                      CASE ( 'w_xy' )
+                      CASE ( 'rad_lw_in_xy', 'rad_lw_out_xy', 'rad_sw_in_xy',  &
+                             'rad_sw_out_xy' , 'w_xy' )
 
                          grid_x = 'x'
@@ -1797,5 +1806,5 @@
 !
 !--                   soil grid
-                      CASE ( 't_soil_xy', 'm_soil_xy' )
+                      CASE ( 'm_soil_xy', 't_soil_xy' )
                          grid_x = 'x'
                          grid_y = 'y'
@@ -2452,6 +2461,7 @@
                           'prr_xz', 'pt_xz', 'q_xz', 'qc_xz', 'ql_xz',         &
                           'ql_c_xz', 'ql_v_xz', 'ql_vp_xz', 'qr_xz', 'qv_xz',  &
-                          'rho_xz', 's_xz', 'sa_xz', 'vpt_xz' , 'rad_lw_in_xz',&
-                             'rad_lw_out_xz', 'rad_sw_in_xz', 'rad_sw_out_xz' )
+                          'rad_lw_cs_hr_xz', 'rad_lw_hr_xz',                   &
+                          'rad_sw_cs_hr_xz', 'rad_sw_hr_xz''rho_xz', 's_xz',   &
+                          'sa_xz', 'vpt_xz' )
 
                       grid_x = 'x'
@@ -2474,5 +2484,6 @@
 !
 !--                w grid
-                   CASE ( 'w_xz' )
+                   CASE ( 'rad_lw_in_xz', 'rad_lw_out_xz', 'rad_sw_in_xz',     &
+                          'rad_sw_out_xz', 'w_xz' )
 
                       grid_x = 'x'
@@ -2482,5 +2493,5 @@
 !
 !--                soil grid
-                   CASE ( 't_soil_xz', 'm_soil_xz' )
+                   CASE ( 'm_soil_xz', 't_soil_xz' )
 
                       grid_x = 'x'
@@ -3126,9 +3137,10 @@
 !
 !--                Most variables are defined on the zu grid
-                   CASE ( 'e_yz', 'lpt_yz', 'nr_yz', 'p_yz', 'pc_yz', 'pr_yz',&
-                          'prr_yz', 'pt_yz', 'q_yz', 'qc_yz', 'ql_yz',        &
-                          'ql_c_yz', 'ql_v_yz', 'ql_vp_yz', 'qr_yz', 'qv_yz', &
-                          'rho_yz', 's_yz', 'sa_yz', 'vpt_yz', 'rad_lw_in_yz',&
-                             'rad_lw_out_yz', 'rad_sw_in_yz', 'rad_sw_out_yz' )
+                   CASE ( 'e_yz', 'lpt_yz', 'nr_yz', 'p_yz', 'pc_yz', 'pr_yz', &
+                          'prr_yz', 'pt_yz', 'q_yz', 'qc_yz', 'ql_yz',         &
+                          'ql_c_yz', 'ql_v_yz', 'ql_vp_yz', 'qr_yz', 'qv_yz',  &
+                          'rad_lw_cs_hr_yz', 'rad_lw_hr_yz',                   &
+                          'rad_sw_cs_hr_yz', 'rad_sw_hr_yz''rho_yz', 's_yz',   &
+                          'sa_yz', 'vpt_yz' )
 
                       grid_x = 'x'
@@ -3151,5 +3163,6 @@
 !
 !--                w grid
-                   CASE ( 'w_yz' )
+                   CASE ( 'rad_lw_in_yz', 'rad_lw_out_yz', 'rad_sw_in_yz',     &
+                          'rad_sw_out_yz', 'w_yz' )
 
                       grid_x = 'x'
@@ -3158,5 +3171,5 @@
 !
 !--                soil grid
-                   CASE ( 't_soil_yz', 'm_soil_yz' )
+                   CASE ( 'm_soil_yz', 't_soil_yz' )
 
                       grid_x = 'x'
Index: palm/trunk/SOURCE/package_parin.f90
===================================================================
--- palm/trunk/SOURCE/package_parin.f90	(revision 1690)
+++ palm/trunk/SOURCE/package_parin.f90	(revision 1691)
@@ -14,10 +14,10 @@
 ! PALM. If not, see <http://www.gnu.org/licenses/>.
 !
-! Copyright 1997-2014 Leibniz Universitaet Hannover
+! Copyright 1997-2015 Leibniz Universitaet Hannover
 !--------------------------------------------------------------------------------!
 !
 ! Current revisions:
 ! -----------------
-! 
+! Added skip_time_do_lsm, skip_time_do_radiation, and emissivity
 ! 
 ! Former revisions:
@@ -92,4 +92,7 @@
 !> This subroutine reads from the NAMELIST file variables controling model
 !> software packages which are used optionally in the run.
+!>
+!> @todo Perform all actions in the respective submodules and remove 
+!>       package_parin
 !------------------------------------------------------------------------------!
  SUBROUTINE package_parin
@@ -117,12 +120,12 @@
     USE land_surface_model_mod,                                                &
         ONLY: alpha_vangenuchten, c_surface, canopy_resistance_coefficient,    &
-              conserve_water_content, dewfall, f_shortwave_incoming,           &
-              hydraulic_conductivity, lambda_surface_stable,                   &
-              lambda_surface_unstable,                                         &
-              leaf_area_index, land_surface, l_vangenuchten,                   &
-              min_canopy_resistance, min_soil_resistance, field_capacity,      &
-              residual_moisture, saturation_moisture, wilting_point,           &
-              n_vangenuchten, root_fraction, soil_moisture, soil_temperature,  &
-              soil_type, vegetation_coverage, veg_type, z0_eb, z0h_eb, zs
+              conserve_water_content, dewfall, field_capacity,                 &
+              f_shortwave_incoming, hydraulic_conductivity,                    &
+              lambda_surface_stable, lambda_surface_unstable, leaf_area_index, &
+              land_surface, l_vangenuchten, min_canopy_resistance,             &
+              min_soil_resistance, n_vangenuchten, residual_moisture,          &
+              root_fraction, saturation_moisture, wilting_point,               &
+              skip_time_do_lsm, soil_moisture, soil_temperature, soil_type,    &
+              vegetation_coverage, veg_type, zs, z0_eb, z0h_eb
 
     USE kinds
@@ -152,7 +155,8 @@
     USE radiation_model_mod,                                                   &
         ONLY: albedo, albedo_type, albedo_lw_dif, albedo_lw_dir, albedo_sw_dif,&
-              albedo_sw_dir, day_init, constant_albedo, dt_radiation, lambda,  &
-              lw_radiation, net_radiation, radiation, radiation_scheme,        &
-              sw_radiation, time_utc_init
+              albedo_sw_dir, constant_albedo, day_init, dt_radiation,          &
+              emissivity, lambda, lw_radiation, net_radiation, radiation,      &
+              radiation_scheme, skip_time_do_radiation, sw_radiation,          &
+              time_utc_init
                 
 
@@ -200,6 +204,6 @@
                                   min_soil_resistance, n_vangenuchten,         &
                                   residual_moisture, root_fraction,            &
-                                  saturation_moisture, soil_moisture,          &
-                                  soil_temperature, soil_type,                 &
+                                  saturation_moisture, skip_time_do_lsm,       &
+                                  soil_moisture, soil_temperature, soil_type,  &
                                   vegetation_coverage, veg_type, wilting_point,& 
                                   zs, z0_eb, z0h_eb
@@ -234,5 +238,6 @@
                                   constant_albedo, day_init, dt_radiation,     &
                                   lambda, lw_radiation, net_radiation,         &
-                                  radiation_scheme, sw_radiation, time_utc_init 
+                                  radiation_scheme, skip_time_do_radiation,    &
+                                  sw_radiation, time_utc_init 
 
     NAMELIST /spectra_par/        averaging_interval_sp, comp_spectra_level,   &
Index: palm/trunk/SOURCE/parin.f90
===================================================================
--- palm/trunk/SOURCE/parin.f90	(revision 1690)
+++ palm/trunk/SOURCE/parin.f90	(revision 1691)
@@ -14,10 +14,10 @@
 ! PALM. If not, see <http://www.gnu.org/licenses/>.
 !
-! Copyright 1997-2014 Leibniz Universitaet Hannover
+! Copyright 1997-2015 Leibniz Universitaet Hannover
 !--------------------------------------------------------------------------------!
 !
 ! Current revisions:
 ! -----------------
-! 
+! Added parameter most_method. Renamed prandtl_layer to constant_flux_layer.
 ! 
 ! Former revisions:
@@ -185,5 +185,6 @@
                cloud_droplets, cloud_physics, cloud_scheme,                    &
                cloud_top_radiation, conserve_volume_flow,                      &
-               conserve_volume_flow_mode, coupling_start_time,                 &
+               conserve_volume_flow_mode, constant_flux_layer,                 &
+               coupling_start_time,                                            &
                create_disturbances, cycle_mg, data_output, data_output_masks,  &
                data_output_pr, data_output_2d_on_each_pe,                      &
@@ -210,8 +211,9 @@
                maximum_parallel_io_streams, max_pr_user, message_string,       &
                mg_cycles, mg_switch_to_pe0_level, mixing_length_1d,            &
-               momentum_advec, netcdf_data_format, netcdf_precision, neutral,  &
-               ngsrb, normalizing_region, nsor, nsor_ini, nudging, ocean,      &
+               momentum_advec, most_method, netcdf_data_format,                &
+               netcdf_precision, neutral, ngsrb, normalizing_region, nsor,     &
+               nsor_ini, nudging, ocean,                                       &
                omega, omega_sor, passive_scalar, phi, nz_do3d,                 &
-               prandtl_layer, prandtl_number, precipitation,                   &
+               prandtl_number, precipitation,                                  &
                precipitation_amount_interval, psolver, pt_damping_factor,      &
                pt_damping_width, pt_reference, pt_surface,                     &
@@ -224,5 +226,5 @@
                reference_state, residual_limit,                                &
                restart_time, return_addres, return_username,                   &
-               revision, rif_max, rif_min, roughness_length, runnr,            &
+               revision, roughness_length, runnr,                              &
                run_identifier, sa_surface, sa_vertical_gradient,               &
                sa_vertical_gradient_level, scalar_advec,                       &
@@ -246,5 +248,6 @@
                vg_vertical_gradient_level, v_bulk, v_profile,                  &
                wall_adjustment, wall_heatflux, wall_humidityflux,              &
-               wall_scalarflux, write_binary, z0h_factor, z_max_do2d
+               wall_scalarflux, write_binary, zeta_max, zeta_min, z0h_factor,  &
+               z_max_do2d
 
     USE cpulog,                                                                &
@@ -274,4 +277,5 @@
     USE statistics,                                                            &
         ONLY:  hom, hom_sum, pr_palm, region, statistic_regions
+
 
     IMPLICIT NONE
@@ -291,5 +295,6 @@
              cloud_physics, cloud_scheme, cloud_top_radiation,                 &
              collective_wait, conserve_volume_flow,                            &
-             conserve_volume_flow_mode, coupling_start_time,                   &
+             conserve_volume_flow_mode, constant_flux_layer,                   &
+             coupling_start_time,                                              &
              curvature_solution_effects, cycle_mg, damp_level_1d,              &
              dissipation_1d,                                                   &
@@ -306,7 +311,7 @@
              loop_optimization, masking_method, mg_cycles,                     &
              mg_switch_to_pe0_level, mixing_length_1d, momentum_advec,         &
-             nc_const, netcdf_precision, neutral, ngsrb,                       &
+             most_method, nc_const, netcdf_precision, neutral, ngsrb,          &
              nsor, nsor_ini, nudging, nx, ny, nz, ocean, omega, omega_sor,     &
-             passive_scalar, phi, prandtl_layer,                               &
+             passive_scalar, phi,                                              &
              prandtl_number, precipitation, psolver, pt_damping_factor,        &
              pt_damping_width, pt_reference, pt_surface,                       &
@@ -318,5 +323,5 @@
              recycling_width, recycling_yshift,                                &
              reference_state, residual_limit,                                  &
-             rif_max, rif_min, roughness_length, sa_surface,                   &
+             roughness_length, sa_surface,                                     &
              sa_vertical_gradient, sa_vertical_gradient_level, scalar_advec,   &
              scalar_rayleigh_damping,                                          &
@@ -335,5 +340,5 @@
              vg_vertical_gradient_level, v_bulk, v_profile, ventilation_effect,&
              wall_adjustment, wall_heatflux, wall_humidityflux,                &
-             wall_scalarflux, z0h_factor
+             wall_scalarflux, zeta_max, zeta_min, z0h_factor
       
     NAMELIST /d3par/  averaging_interval, averaging_interval_pr,               &
Index: palm/trunk/SOURCE/prandtl_fluxes.f90
===================================================================
--- palm/trunk/SOURCE/prandtl_fluxes.f90	(revision 1690)
+++ 	(revision )
@@ -1,548 +1,0 @@
-!> @file prandtl_fluxes.f90
-!--------------------------------------------------------------------------------!
-! This file is part of PALM.
-!
-! PALM is free software: you can redistribute it and/or modify it under the terms
-! of the GNU General Public License as published by the Free Software Foundation,
-! either version 3 of the License, or (at your option) any later version.
-!
-! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
-! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
-! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
-!
-! You should have received a copy of the GNU General Public License along with
-! PALM. If not, see <http://www.gnu.org/licenses/>.
-!
-! Copyright 1997-2014 Leibniz Universitaet Hannover
-!--------------------------------------------------------------------------------!
-!
-! Current revisions:
-! -----------------
-! 
-! 
-! Former revisions:
-! -----------------
-! $Id$
-!
-! 1682 2015-10-07 23:56:08Z knoop
-! Code annotations made doxygen readable 
-! 
-! 1551 2015-03-03 14:18:16Z maronga
-! Removed land surface model part. The surface fluxes are now always calculated
-! within prandtl_fluxes, based on the given surface temperature/humidity (which 
-! is either provided by the land surface model, by large scale forcing data, or
-! directly prescribed by the user.
-! 
-! 1496 2014-12-02 17:25:50Z maronga
-! Adapted for land surface model
-! 
-! 1494 2014-11-21 17:14:03Z maronga
-! Bugfixes: qs is now calculated before calculation of Rif. Ccalculation of 
-! buoyancy flux in Rif corrected (added missing humidity term), allow use of 
-! topography for coupled runs (not tested)
-! 
-! 1361 2014-04-16 15:17:48Z hoffmann
-! Bugfix: calculation of turbulent fluxes of rain water content (qrsws) and rain 
-! drop concentration (nrsws) added
-! 
-! 1340 2014-03-25 19:45:13Z kanani
-! REAL constants defined as wp-kind
-!
-! 1320 2014-03-20 08:40:49Z raasch
-! 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
-!
-! 1276 2014-01-15 13:40:41Z heinze
-! Use LSF_DATA also in case of Dirichlet bottom boundary condition for scalars
-!
-! 1257 2013-11-08 15:18:40Z raasch
-! openACC "kernels do" replaced by "kernels loop", "loop independent" added
-!
-! 1036 2012-10-22 13:43:42Z raasch
-! code put under GPL (PALM 3.9)
-!
-! 1015 2012-09-27 09:23:24Z raasch
-! OpenACC statements added
-!
-! 978 2012-08-09 08:28:32Z fricke
-! roughness length for scalar quantities z0h added
-!
-! Revision 1.1  1998/01/23 10:06:06  raasch
-! Initial revision
-!
-!
-! Description:
-! ------------
-!> Diagnostic computation of vertical fluxes in the Prandtl layer from the
-!> values of the variables at grid point k=1
-!------------------------------------------------------------------------------!
- SUBROUTINE prandtl_fluxes
- 
-
-    USE arrays_3d,                                                             &
-        ONLY:  e, nr, nrs, nrsws, pt, q, qr, qrs, qrsws, qs, qsws, rif, shf,   &
-               ts, u, us, usws, v, vpt, vsws, zu, zw, z0, z0h
-
-    USE control_parameters,                                                    &
-        ONLY:  cloud_physics, constant_heatflux, constant_waterflux,           &
-               coupling_mode, g, humidity, ibc_e_b, icloud_scheme, kappa,      &
-               large_scale_forcing, lsf_surf, passive_scalar, precipitation,   &
-               pt_surface, q_surface, rif_max, rif_min, run_coupled,           &
-               surface_pressure
-
-    USE indices,                                                               &
-        ONLY:  nxl, nxlg, nxr, nxrg, nys, nysg, nyn, nyng, nzb_s_inner,        &
-               nzb_u_inner, nzb_v_inner
-
-    USE kinds
-
-    IMPLICIT NONE
-
-    INTEGER(iwp) ::  i            !<
-    INTEGER(iwp) ::  j            !<
-    INTEGER(iwp) ::  k            !<
-
-    LOGICAL      ::  coupled_run  !<
-
-    REAL(wp)     ::  a            !<
-    REAL(wp)     ::  b            !<
-    REAL(wp)     ::  e_q          !<
-    REAL(wp)     ::  rifm         !<
-    REAL(wp)     ::  uv_total     !<
-    REAL(wp)     ::  z_p          !<
-
-!
-!-- Data information for accelerators
-    !$acc data present( e, nrsws, nzb_u_inner, nzb_v_inner, nzb_s_inner, pt )  &
-    !$acc      present( q, qs, qsws, qrsws, rif, shf, ts, u, us, usws, v )     &
-    !$acc      present( vpt, vsws, zu, zw, z0, z0h )
-! 
-!-- Compute theta*
-    IF ( constant_heatflux )  THEN
-
-!
-!--    For a given heat flux in the Prandtl layer:
-!--    for u* use the value from the previous time step
-       !$OMP PARALLEL DO
-       !$acc kernels loop
-       DO  i = nxlg, nxrg
-          DO  j = nysg, nyng
-             ts(j,i) = -shf(j,i) / ( us(j,i) + 1E-30_wp )
-!
-!--          ts must be limited, because otherwise overflow may occur in case of
-!--          us=0 when computing rif further below
-             IF ( ts(j,i) < -1.05E5_wp )  ts(j,i) = -1.0E5_wp
-             IF ( ts(j,i) >   1.0E5_wp )  ts(j,i) =  1.0E5_wp
-          ENDDO
-       ENDDO
-
-    ELSE
-!
-!--    For a given surface temperature:
-!--    (the Richardson number is still the one from the previous time step) 
-       IF ( large_scale_forcing .AND. lsf_surf )  THEN
-          !$OMP PARALLEL DO
-          !$acc kernels loop
-          DO  i = nxlg, nxrg
-             DO  j = nysg, nyng
-                k = nzb_s_inner(j,i)
-                pt(k,j,i) = pt_surface
-             ENDDO
-          ENDDO
-       ENDIF
-
-       !$OMP PARALLEL DO PRIVATE( a, b, k, z_p )
-       !$acc kernels loop
-       DO  i = nxlg, nxrg
-          DO  j = nysg, nyng
-
-             k   = nzb_s_inner(j,i)
-             z_p = zu(k+1) - zw(k)
-
-             IF ( rif(j,i) >= 0.0_wp )  THEN
-!
-!--             Stable stratification
-                ts(j,i) = kappa * ( pt(k+1,j,i) - pt(k,j,i) ) / (           &
-                                  LOG( z_p / z0h(j,i) ) +                   &
-                                  5.0_wp * rif(j,i) * ( z_p - z0h(j,i) ) / z_p &
-                                                                )
-             ELSE
-!
-!--             Unstable stratification
-                a = SQRT( 1.0_wp - 16.0_wp * rif(j,i) )
-                b = SQRT( 1.0_wp - 16.0_wp * rif(j,i) * z0h(j,i) / z_p )
-
-                ts(j,i) = kappa * ( pt(k+1,j,i) - pt(k,j,i) ) /  (             &
-                          LOG( z_p / z0h(j,i) ) -                              &
-                          2.0_wp * LOG( ( 1.0_wp + a ) / ( 1.0_wp + b ) ) )
-             ENDIF
-
-          ENDDO
-       ENDDO
-    ENDIF
-
-!
-!-- If required compute q*
-    IF ( humidity  .OR.  passive_scalar )  THEN
-       IF ( constant_waterflux )  THEN
-!
-!--       For a given water flux in the Prandtl layer:
-          !$OMP PARALLEL DO
-          !$acc kernels loop
-          DO  i = nxlg, nxrg
-             DO  j = nysg, nyng
-                qs(j,i) = -qsws(j,i) / ( us(j,i) + 1E-30_wp )
-             ENDDO
-          ENDDO
-          
-       ELSE
-          coupled_run = ( coupling_mode == 'atmosphere_to_ocean' .AND. run_coupled )
-
-           IF ( large_scale_forcing .AND. lsf_surf )  THEN
-                !$OMP PARALLEL DO
-                !$acc kernels loop
-                 DO  i = nxlg, nxrg
-                    DO  j = nysg, nyng
-                       k = nzb_s_inner(j,i)
-                       q(k,j,i) = q_surface
-                    ENDDO
-                 ENDDO
-           ENDIF
-
-          !$OMP PARALLEL DO PRIVATE( a, b, k, z_p )
-          !$acc kernels loop independent
-          DO  i = nxlg, nxrg
-             !$acc loop independent
-             DO  j = nysg, nyng
-
-                k   = nzb_s_inner(j,i)
-                z_p = zu(k+1) - zw(k)
-
-!
-!--             Assume saturation for atmosphere coupled to ocean (but not
-!--             in case of precursor runs)
-                IF ( coupled_run )  THEN
-                   e_q = 6.1_wp * &
-                           EXP( 0.07_wp * ( MIN(pt(k,j,i),pt(k+1,j,i)) - 273.15_wp ) )
-                   q(k,j,i) = 0.622_wp * e_q / ( surface_pressure - e_q )
-                ENDIF
-                IF ( rif(j,i) >= 0.0_wp )  THEN
-!
-!--                Stable stratification
-                   qs(j,i) = kappa * ( q(k+1,j,i) - q(k,j,i) ) / (             &
-                                  LOG( z_p / z0h(j,i) ) +                      &
-                                  5.0_wp * rif(j,i) * ( z_p - z0h(j,i) ) / z_p &
-                                                                 )
-                ELSE
-!
-!--                Unstable stratification
-                   a = SQRT( 1.0_wp - 16.0_wp * rif(j,i) ) 
-                   b = SQRT( 1.0_wp - 16.0_wp * rif(j,i) * z0h(j,i) / z_p ) 
- 
-                   qs(j,i) = kappa * ( q(k+1,j,i) - q(k,j,i) ) /   (           &
-                             LOG( z_p / z0h(j,i) ) -                           &
-                              2.0_wp * LOG( (1.0_wp + a ) / ( 1.0_wp + b ) ) )
-                ENDIF
-
-             ENDDO
-          ENDDO
-       ENDIF
-    ENDIF
-
-!
-!-- Compute z_p/L (corresponds to the Richardson-flux number)
-    IF ( .NOT. humidity )  THEN
-       !$OMP PARALLEL DO PRIVATE( k, z_p )
-       !$acc kernels loop
-       DO  i = nxlg, nxrg
-          DO  j = nysg, nyng
-             k   = nzb_s_inner(j,i)
-             z_p = zu(k+1) - zw(k)
-             rif(j,i) = z_p * kappa * g * ts(j,i) / &
-                        ( pt(k+1,j,i) * ( us(j,i)**2 + 1E-30_wp ) )
-!
-!--          Limit the value range of the Richardson numbers.
-!--          This is necessary for very small velocities (u,v --> 0), because
-!--          the absolute value of rif can then become very large, which in
-!--          consequence would result in very large shear stresses and very
-!--          small momentum fluxes (both are generally unrealistic).
-             IF ( rif(j,i) < rif_min )  rif(j,i) = rif_min
-             IF ( rif(j,i) > rif_max )  rif(j,i) = rif_max
-          ENDDO
-       ENDDO
-    ELSE
-       !$OMP PARALLEL DO PRIVATE( k, z_p )
-       !$acc kernels loop
-       DO  i = nxlg, nxrg
-          DO  j = nysg, nyng
-             k   = nzb_s_inner(j,i)
-             z_p = zu(k+1) - zw(k)
-             rif(j,i) = z_p * kappa * g *                                      &
-                        ( ts(j,i) + 0.61_wp * pt(k+1,j,i) * qs(j,i) + 0.61_wp  &
-                          * q(k+1,j,i) * ts(j,i)) /                            &
-                        ( vpt(k+1,j,i) * ( us(j,i)**2 + 1E-30_wp ) )
-!
-!--          Limit the value range of the Richardson numbers.
-!--          This is necessary for very small velocities (u,v --> 0), because
-!--          the absolute value of rif can then become very large, which in
-!--          consequence would result in very large shear stresses and very
-!--          small momentum fluxes (both are generally unrealistic).
-             IF ( rif(j,i) < rif_min )  rif(j,i) = rif_min
-             IF ( rif(j,i) > rif_max )  rif(j,i) = rif_max
-          ENDDO
-       ENDDO       
-    ENDIF
-
-!
-!-- Compute u* at the scalars' grid points
-    !$OMP PARALLEL DO PRIVATE( a, b, k, uv_total, z_p )
-    !$acc kernels loop
-    DO  i = nxl, nxr
-       DO  j = nys, nyn
-
-          k   = nzb_s_inner(j,i)
-          z_p = zu(k+1) - zw(k)
-
-!
-!--       Compute the absolute value of the horizontal velocity 
-!--       (relative to the surface)
-          uv_total = SQRT( ( 0.5_wp * ( u(k+1,j,i) + u(k+1,j,i+1)              &
-                                      - u(k,j,i)   - u(k,j,i+1) ) )**2 +       &
-                           ( 0.5_wp * ( v(k+1,j,i) + v(k+1,j+1,i)              &
-                                      - v(k,j,i)   - v(k,j+1,i) ) )**2 )    
-
-
-          IF ( rif(j,i) >= 0.0_wp )  THEN
-!
-!--          Stable stratification
-             us(j,i) = kappa * uv_total / (                                    &
-                                  LOG( z_p / z0(j,i) ) +                       &
-                                  5.0_wp * rif(j,i) * ( z_p - z0(j,i) ) / z_p  &
-                                          )
-          ELSE
-!
-!--          Unstable stratification
-             a = SQRT( SQRT( 1.0_wp - 16.0_wp * rif(j,i) ) )
-             b = SQRT( SQRT( 1.0_wp - 16.0_wp * rif(j,i) / z_p * z0(j,i) ) )
-
-             us(j,i) = kappa * uv_total / (                                    &
-                       LOG( z_p / z0(j,i) ) -                                  &
-                       LOG( ( 1.0_wp + a )**2 * ( 1.0_wp + a**2 ) / (          &
-                            ( 1.0_wp + b )**2 * ( 1.0_wp + b**2 )   ) ) +      &
-                               2.0_wp * ( ATAN( a ) - ATAN( b ) )              &
-                                           )
-          ENDIF
-       ENDDO
-    ENDDO
-
-!
-!-- Values of us at ghost point locations are needed for the evaluation of usws 
-!-- and vsws.
-    !$acc update host( us )
-    CALL exchange_horiz_2d( us )
-    !$acc update device( us )
-
-!
-!-- Compute u'w' for the total model domain.
-!-- First compute the corresponding component of u* and square it.
-    !$OMP PARALLEL DO PRIVATE( a, b, k, rifm, z_p )
-    !$acc kernels loop
-    DO  i = nxl, nxr
-       DO  j = nys, nyn
-
-          k   = nzb_u_inner(j,i)
-          z_p = zu(k+1) - zw(k)
-
-!
-!--       Compute Richardson-flux number for this point
-          rifm = 0.5_wp * ( rif(j,i-1) + rif(j,i) )
-          IF ( rifm >= 0.0_wp )  THEN
-!
-!--          Stable stratification
-             usws(j,i) = kappa * ( u(k+1,j,i) - u(k,j,i) )/ (                  &
-                                     LOG( z_p / z0(j,i) ) +                    &
-                                     5.0_wp * rifm * ( z_p - z0(j,i) ) / z_p   &
-                                                            )
-          ELSE
-!
-!--          Unstable stratification
-             a = SQRT( SQRT( 1.0_wp - 16.0_wp * rifm ) )
-             b = SQRT( SQRT( 1.0_wp - 16.0_wp * rifm / z_p * z0(j,i) ) )
-
-             usws(j,i) = kappa * ( u(k+1,j,i) - u(k,j,i) ) / (                 &
-                         LOG( z_p / z0(j,i) ) -                                &
-                         LOG( (1.0_wp + a )**2 * ( 1.0_wp + a**2 ) / (         &
-                              (1.0_wp + b )**2 * ( 1.0_wp + b**2 )   ) ) +     &
-                                 2.0_wp * ( ATAN( a ) - ATAN( b ) )            &
-                                                 )
-          ENDIF
-          usws(j,i) = -usws(j,i) * 0.5_wp * ( us(j,i-1) + us(j,i) )
-       ENDDO
-    ENDDO
-
-!
-!-- Compute v'w' for the total model domain.
-!-- First compute the corresponding component of u* and square it.
-    !$OMP PARALLEL DO PRIVATE( a, b, k, rifm, z_p )
-    !$acc kernels loop
-    DO  i = nxl, nxr
-       DO  j = nys, nyn
-
-          k   = nzb_v_inner(j,i)
-          z_p = zu(k+1) - zw(k)
-
-!
-!--       Compute Richardson-flux number for this point
-          rifm = 0.5_wp * ( rif(j-1,i) + rif(j,i) )
-          IF ( rifm >= 0.0_wp )  THEN
-!
-!--          Stable stratification
-             vsws(j,i) = kappa * ( v(k+1,j,i) -  v(k,j,i) ) / (                &
-                                     LOG( z_p / z0(j,i) ) +                    &
-                                     5.0_wp * rifm * ( z_p - z0(j,i) ) / z_p   &
-                                                              )
-          ELSE
-!
-!--          Unstable stratification
-             a = SQRT( SQRT( 1.0_wp - 16.0_wp * rifm ) )
-             b = SQRT( SQRT( 1.0_wp - 16.0_wp * rifm / z_p * z0(j,i) ) )
-
-             vsws(j,i) = kappa * ( v(k+1,j,i) - v(k,j,i) ) / (                 &
-                         LOG( z_p / z0(j,i) ) -                                &
-                         LOG( (1.0_wp + a )**2 * ( 1.0_wp + a**2 ) / (         &
-                              (1.0_wp + b )**2 * ( 1.0_wp + b**2 )   ) ) +     &
-                                 2.0_wp * ( ATAN( a ) - ATAN( b ) )            &
-                                                 )
-          ENDIF
-          vsws(j,i) = -vsws(j,i) * 0.5_wp * ( us(j-1,i) + us(j,i) )
-       ENDDO
-    ENDDO
-
-!
-!-- If required compute qr* and nr*
-    IF ( cloud_physics .AND. icloud_scheme == 0 .AND. precipitation )  THEN
-
-       !$OMP PARALLEL DO PRIVATE( a, b, k, z_p )
-       !$acc kernels loop independent
-       DO  i = nxlg, nxrg
-          !$acc loop independent
-          DO  j = nysg, nyng
-
-             k   = nzb_s_inner(j,i)
-             z_p = zu(k+1) - zw(k)
-
-             IF ( rif(j,i) >= 0.0 )  THEN
-!
-!--             Stable stratification
-                qrs(j,i) = kappa * ( qr(k+1,j,i) - qr(k,j,i) ) / (             &
-                               LOG( z_p / z0h(j,i) ) +                         &
-                               5.0 * rif(j,i) * ( z_p - z0h(j,i) ) / z_p )
-                nrs(j,i) = kappa * ( nr(k+1,j,i) - nr(k,j,i) ) / (             &
-                               LOG( z_p / z0h(j,i) ) +                         &
-                               5.0 * rif(j,i) * ( z_p - z0h(j,i) ) / z_p )
-
-             ELSE
-!
-!--             Unstable stratification
-                a = SQRT( 1.0 - 16.0 * rif(j,i) ) 
-                b = SQRT( 1.0 - 16.0 * rif(j,i) * z0h(j,i) / z_p ) 
- 
-                qrs(j,i) = kappa * ( qr(k+1,j,i) - qr(k,j,i) ) /   (           &
-                          LOG( z_p / z0h(j,i) ) -                              &
-                          2.0 * LOG( (1.0 + a ) / ( 1.0 + b ) ) )
-                nrs(j,i) = kappa * ( nr(k+1,j,i) - nr(k,j,i) ) /   (           &
-                          LOG( z_p / z0h(j,i) ) -                              &
-                          2.0 * LOG( (1.0 + a ) / ( 1.0 + b ) ) )
-
-             ENDIF
-
-          ENDDO
-       ENDDO
-
-    ENDIF
-
-!
-!-- Exchange the boundaries for the momentum fluxes (only for sake of 
-!-- completeness)
-    !$acc update host( usws, vsws )
-    CALL exchange_horiz_2d( usws )
-    CALL exchange_horiz_2d( vsws )
-    !$acc update device( usws, vsws )
-    IF ( humidity  .OR.  passive_scalar )  THEN
-       !$acc update host( qsws )
-       CALL exchange_horiz_2d( qsws )
-       !$acc update device( qsws )
-       IF ( cloud_physics  .AND.  icloud_scheme == 0  .AND.  &
-            precipitation )  THEN
-          !$acc update host( qrsws, nrsws )
-          CALL exchange_horiz_2d( qrsws )
-          CALL exchange_horiz_2d( nrsws )
-          !$acc update device( qrsws, nrsws )
-       ENDIF
-    ENDIF
-
-!
-!-- Compute the vertical kinematic heat flux
-    IF ( .NOT. constant_heatflux  )  THEN
-       !$OMP PARALLEL DO
-       !$acc kernels loop independent
-       DO  i = nxlg, nxrg
-          !$acc loop independent
-          DO  j = nysg, nyng
-             shf(j,i) = -ts(j,i) * us(j,i)
-          ENDDO
-       ENDDO
-    ENDIF
-
-!
-!-- Compute the vertical water/scalar flux
-    IF ( .NOT. constant_waterflux .AND. ( humidity .OR. passive_scalar ) )  THEN
-       !$OMP PARALLEL DO
-       !$acc kernels loop independent
-       DO  i = nxlg, nxrg
-          !$acc loop independent
-          DO  j = nysg, nyng
-             qsws(j,i) = -qs(j,i) * us(j,i)
-          ENDDO
-       ENDDO
-    ENDIF
-
-!
-!-- Compute (turbulent) fluxes of rain water content and rain drop concentartion
-    IF ( cloud_physics  .AND.  icloud_scheme == 0  .AND.  precipitation )  THEN
-       !$OMP PARALLEL DO
-       !$acc kernels loop independent
-       DO  i = nxlg, nxrg
-          !$acc loop independent
-          DO  j = nysg, nyng
-             qrsws(j,i) = -qrs(j,i) * us(j,i)
-             nrsws(j,i) = -nrs(j,i) * us(j,i)
-          ENDDO
-       ENDDO
-    ENDIF
-
-!
-!-- Bottom boundary condition for the TKE
-    IF ( ibc_e_b == 2 )  THEN
-       !$OMP PARALLEL DO
-       !$acc kernels loop independent
-       DO  i = nxlg, nxrg
-          !$acc loop independent
-          DO  j = nysg, nyng
-             e(nzb_s_inner(j,i)+1,j,i) = ( us(j,i) / 0.1_wp )**2
-!
-!--          As a test: cm = 0.4
-!            e(nzb_s_inner(j,i)+1,j,i) = ( us(j,i) / 0.4_wp )**2
-             e(nzb_s_inner(j,i),j,i)   = e(nzb_s_inner(j,i)+1,j,i)
-          ENDDO
-       ENDDO
-    ENDIF
-
-    !$acc end data
-
- END SUBROUTINE prandtl_fluxes
Index: palm/trunk/SOURCE/production_e.f90
===================================================================
--- palm/trunk/SOURCE/production_e.f90	(revision 1690)
+++ palm/trunk/SOURCE/production_e.f90	(revision 1691)
@@ -14,10 +14,10 @@
 ! PALM. If not, see <http://www.gnu.org/licenses/>.
 !
-! Copyright 1997-2014 Leibniz Universitaet Hannover
+! Copyright 1997-2015 Leibniz Universitaet Hannover
 !--------------------------------------------------------------------------------!
 !
 ! Current revisions:
 ! -----------------
-! 
+! Renamed prandtl_layer to constant_flux_layer.
 ! 
 ! Former revisions:
@@ -78,5 +78,5 @@
 ! ------------
 !> Production terms (shear + buoyancy) of the TKE.
-!> @warning The case with prandtl_layer = F and use_surface_fluxes = T is
+!> @warning The case with constant_flux_layer = F and use_surface_fluxes = T is
 !>          not considered well!
 !------------------------------------------------------------------------------!
@@ -128,8 +128,8 @@
 
        USE control_parameters,                                                 &
-           ONLY:  cloud_droplets, cloud_physics, g, humidity, kappa, neutral,  &
-                  ocean, prandtl_layer, pt_reference, rho_reference,           &
-                  use_single_reference_value, use_surface_fluxes,              &
-                  use_top_fluxes
+           ONLY:  cloud_droplets, cloud_physics, constant_flux_layer, g,       &
+                  humidity, kappa, neutral, ocean, pt_reference,               &
+                  rho_reference, use_single_reference_value,                   &
+                  use_surface_fluxes, use_top_fluxes
 
        USE grid_variables,                                                     &
@@ -217,5 +217,5 @@
           ENDDO
 
-          IF ( prandtl_layer )  THEN
+          IF ( constant_flux_layer )  THEN
 
 !
@@ -734,8 +734,8 @@
 
        USE control_parameters,                                                 &
-           ONLY:  cloud_droplets, cloud_physics, g, humidity, kappa, neutral,  &
-                  ocean, prandtl_layer, pt_reference, rho_reference,           &
-                  topography, use_single_reference_value, use_surface_fluxes,  &
-                  use_top_fluxes
+           ONLY:  cloud_droplets, cloud_physics, constant_flux_layer, g,       &
+                  humidity, kappa, neutral, ocean, pt_reference,               &
+                  rho_reference, topography, use_single_reference_value,       &
+                  use_surface_fluxes, use_top_fluxes
 
        USE grid_variables,                                                     &
@@ -832,5 +832,5 @@
        ENDDO
 
-       IF ( prandtl_layer )  THEN
+       IF ( constant_flux_layer )  THEN
 
 !
@@ -1402,8 +1402,8 @@
 
        USE control_parameters,                                                 &
-           ONLY:  cloud_droplets, cloud_physics, g, humidity, kappa, neutral,  &
-                  ocean, prandtl_layer, pt_reference, rho_reference,           &
-                  use_single_reference_value, use_surface_fluxes,              &
-                  use_top_fluxes
+           ONLY:  cloud_droplets, cloud_physics, constant_flux_layer, g,       &
+                  humidity, kappa, neutral, ocean, pt_reference,               &
+                  rho_reference, use_single_reference_value,                   &
+                  use_surface_fluxes, use_top_fluxes
 
        USE grid_variables,                                                     &
@@ -1473,5 +1473,5 @@
        ENDDO
 
-       IF ( prandtl_layer )  THEN
+       IF ( constant_flux_layer )  THEN
 
           IF ( ( wall_e_x(j,i) /= 0.0_wp ) .OR. ( wall_e_y(j,i) /= 0.0_wp ) )  THEN
@@ -1924,5 +1924,5 @@
 
        USE control_parameters,                                                 &
-           ONLY:  kappa, prandtl_layer
+           ONLY:  constant_flux_layer, kappa
 
        USE indices,                                                            &
@@ -1937,5 +1937,5 @@
        INTEGER(iwp) ::  kv  !<
 
-       IF ( prandtl_layer )  THEN
+       IF ( constant_flux_layer )  THEN
 
           IF ( first_call )  THEN
Index: palm/trunk/SOURCE/prognostic_equations.f90
===================================================================
--- palm/trunk/SOURCE/prognostic_equations.f90	(revision 1690)
+++ palm/trunk/SOURCE/prognostic_equations.f90	(revision 1691)
@@ -14,10 +14,11 @@
 ! PALM. If not, see <http://www.gnu.org/licenses/>.
 !
-! Copyright 1997-2014 Leibniz Universitaet Hannover
+! Copyright 1997-2015 Leibniz Universitaet Hannover
 !--------------------------------------------------------------------------------!
 !
 ! Current revisions:
 ! ------------------
-! 
+! Added optional model spin-up without radiation / land surface model calls.
+! Formatting corrections.
 ! 
 ! Former revisions:
@@ -286,5 +287,6 @@
 
     USE radiation_model_mod,                                                   &
-        ONLY:  radiation, radiation_scheme, radiation_tendency
+        ONLY:  radiation, radiation_scheme, radiation_tendency,                &
+               skip_time_do_radiation
 
     USE statistics,                                                            &
@@ -410,5 +412,5 @@
 !
 !--          Nudging
-             IF ( nudging )  CALL nudge( i, j, simulated_time, 'u' ) 
+             IF ( nudging )  CALL nudge( i, j, simulated_time, 'u' )
 
              CALL user_actions( i, j, 'u-tendency' )
@@ -469,5 +471,5 @@
 !
 !--          Nudging
-             IF ( nudging )  CALL nudge( i, j, simulated_time, 'v' ) 
+             IF ( nudging )  CALL nudge( i, j, simulated_time, 'v' )
 
              CALL user_actions( i, j, 'v-tendency' )
@@ -610,5 +612,6 @@
 !
 !--          If required, add tendency due to radiative heating/cooling
-             IF ( radiation .AND. radiation_scheme == 'rrtmg' )  THEN
+             IF ( radiation .AND. radiation_scheme == 'rrtmg' .AND.            &
+                  simulated_time > skip_time_do_radiation )  THEN
                 CALL radiation_tendency ( i, j, tend )
              ENDIF
@@ -718,5 +721,5 @@
              ENDIF
              CALL diffusion_s( i, j, q, qsws, qswst, wall_qflux )
-     
+
 !
 !--          If required compute decrease of total water content due to
@@ -724,6 +727,7 @@
              IF ( cloud_physics  .AND.  icloud_scheme == 1  .AND.              &
                   precipitation )  THEN
-                CALL calc_precipitation( i, j )             
-             ENDIF
+                CALL calc_precipitation( i, j )
+             ENDIF
+
 !
 !--          Sink or source of scalar concentration due to canopy elements
@@ -1009,5 +1013,5 @@
 !
 !-- Nudging
-    IF ( nudging )  CALL nudge( simulated_time, 'u' ) 
+    IF ( nudging )  CALL nudge( simulated_time, 'u' )
 
     CALL user_actions( 'u-tendency' )
@@ -1085,5 +1089,5 @@
 !
 !-- Nudging
-    IF ( nudging )  CALL nudge( simulated_time, 'v' ) 
+    IF ( nudging )  CALL nudge( simulated_time, 'v' )
 
     CALL user_actions( 'v-tendency' )
@@ -1274,6 +1278,7 @@
 !
 !--    If required, add tendency due to radiative heating/cooling
-       IF ( radiation .AND. radiation_scheme == 'rrtmg' )  THEN
-          CALL radiation_tendency ( tend )
+       IF ( radiation .AND. radiation_scheme == 'rrtmg' .AND.                  &
+            simulated_time > skip_time_do_radiation )  THEN
+            CALL radiation_tendency ( tend )
        ENDIF
 
@@ -1859,5 +1864,5 @@
 !
 !-- Nudging
-    IF ( nudging )  CALL nudge( simulated_time, 'u' ) 
+    IF ( nudging )  CALL nudge( simulated_time, 'u' )
 
     CALL user_actions( 'u-tendency' )
@@ -1926,5 +1931,5 @@
 !
 !-- Nudging
-    IF ( nudging )  CALL nudge( simulated_time, 'v' ) 
+    IF ( nudging )  CALL nudge( simulated_time, 'v' )
 
     CALL user_actions( 'v-tendency' )
@@ -2096,4 +2101,9 @@
        ENDIF
 
+       IF ( radiation .AND. radiation_scheme == 'rrtmg' .AND.                  &
+            simulated_time > skip_time_do_radiation )  THEN
+            CALL radiation_tendency ( tend )
+       ENDIF
+
        CALL user_actions( 'pt-tendency' )
 
Index: palm/trunk/SOURCE/radiation_model.f90
===================================================================
--- palm/trunk/SOURCE/radiation_model.f90	(revision 1690)
+++ palm/trunk/SOURCE/radiation_model.f90	(revision 1691)
@@ -19,5 +19,7 @@
 ! Current revisions:
 ! -----------------
-! 
+! Added option for spin-up runs without radiation (skip_time_do_radiation). Bugfix
+! in calculation of pressure profiles. Bugfix in calculation of trace gas profiles.
+! Added output of radiative heating rates.
 ! 
 ! Former revisions:
@@ -61,5 +63,4 @@
 !> @todo Output of other rrtm arrays (such as volume mixing ratios)
 !> @todo Adapt for use with topography
-!> @todo Remove 3D dummy arrays (such as clear-sky output)
 !>
 !> @note Many variables have a leading dummy dimension (0:0) in order to
@@ -70,8 +71,8 @@
 
     USE arrays_3d,                                                             &
-        ONLY:  hyp, pt, q, ql, zw
+        ONLY:  dzw, hyp, pt, q, ql, zw
 
     USE cloud_parameters,                                                      &
-        ONLY:  cp, l_v, nc_const, rho_l, sigma_gc  
+        ONLY:  cp, l_d_cp, nc_const, rho_l, sigma_gc  
 
     USE constants,                                                             &
@@ -80,5 +81,5 @@
     USE control_parameters,                                                    &
         ONLY:  cloud_droplets, cloud_physics, g, initializing_actions,         &
-               large_scale_forcing, lsf_surf, phi, pt_surface,                 &
+               large_scale_forcing, lsf_surf, phi, pt_surface, rho_surface,    &
                surface_pressure, time_since_reference_point
 
@@ -153,33 +154,36 @@
 
 
-    LOGICAL ::  constant_albedo = .FALSE., & !< flag parameter indicating whether the albedo may change depending on zenith
-                lw_radiation = .TRUE.,     & !< flag parameter indicing whether longwave radiation shall be calculated
-                radiation = .FALSE.,       & !< flag parameter indicating whether the radiation model is used
-                sun_up    = .TRUE.,        & !< flag parameter indicating whether the sun is up or down
-                sw_radiation = .TRUE.        !< flag parameter indicing whether shortwave radiation shall be calculated
-
-    REAL(wp), PARAMETER :: sigma_sb       = 5.67E-8_wp, & !< Stefan-Boltzmann constant
-                           solar_constant = 1368.0_wp     !< solar constant at top of atmosphere
- 
-    REAL(wp) :: albedo = 9999999.9_wp,        & !< NAMELIST alpha
-                albedo_lw_dif = 9999999.9_wp, & !< NAMELIST aldif
-                albedo_lw_dir = 9999999.9_wp, & !< NAMELIST aldir
-                albedo_sw_dif = 9999999.9_wp, & !< NAMELIST asdif
-                albedo_sw_dir = 9999999.9_wp, & !< NAMELIST asdir
-                dt_radiation = 0.0_wp,        & !< radiation model timestep
-                emissivity = 0.95_wp,         & !< NAMELIST surface emissivity
-                exn,                          & !< Exner function
-                lon = 0.0_wp,                 & !< longitude in radians
-                lat = 0.0_wp,                 & !< latitude in radians
-                decl_1,                       & !< declination coef. 1
-                decl_2,                       & !< declination coef. 2
-                decl_3,                       & !< declination coef. 3
-                time_utc,                     & !< current time in UTC
-                time_utc_init = 43200.0_wp,   & !< UTC time at model start (noon)
-                lambda = 0.0_wp,              & !< longitude in degrees
-                net_radiation = 0.0_wp,       & !< net radiation at surface
-                time_radiation = 0.0_wp,      & !< time since last call of radiation code
-                sky_trans                       !< sky transmissivity
-
+    LOGICAL ::  constant_albedo = .FALSE.,       & !< flag parameter indicating whether the albedo may change depending on zenith
+                force_radiation_call = .FALSE.,  & !< flag parameter for unscheduled radiation calls
+                lw_radiation = .TRUE.,           & !< flag parameter indicing whether longwave radiation shall be calculated
+                radiation = .FALSE.,             & !< flag parameter indicating whether the radiation model is used
+                sun_up    = .TRUE.,              & !< flag parameter indicating whether the sun is up or down
+                sw_radiation = .TRUE.              !< flag parameter indicing whether shortwave radiation shall be calculated
+
+
+    REAL(wp), PARAMETER :: d_seconds_hour  = 0.000277777777778_wp,  & !< inverse of seconds per hour (1/3600)
+                           d_hours_day    = 0.0416666666667_wp,     & !< inverse of hours per day (1/24)
+                           sigma_sb       = 5.67037321E-8_wp,       & !< Stefan-Boltzmann constant
+                           solar_constant = 1368.0_wp                 !< solar constant at top of atmosphere
+
+    REAL(wp) :: albedo = 9999999.9_wp,           & !< NAMELIST alpha
+                albedo_lw_dif = 9999999.9_wp,    & !< NAMELIST aldif
+                albedo_lw_dir = 9999999.9_wp,    & !< NAMELIST aldir
+                albedo_sw_dif = 9999999.9_wp,    & !< NAMELIST asdif
+                albedo_sw_dir = 9999999.9_wp,    & !< NAMELIST asdir
+                decl_1,                          & !< declination coef. 1
+                decl_2,                          & !< declination coef. 2
+                decl_3,                          & !< declination coef. 3
+                dt_radiation = 0.0_wp,           & !< radiation model timestep
+                emissivity = 0.98_wp,            & !< NAMELIST surface emissivity
+                lambda = 0.0_wp,                 & !< longitude in degrees
+                lon = 0.0_wp,                    & !< longitude in radians
+                lat = 0.0_wp,                    & !< latitude in radians
+                net_radiation = 0.0_wp,          & !< net radiation at surface
+                skip_time_do_radiation = 0.0_wp, & !< Radiation model is not called before this time
+                sky_trans,                       & !< sky transmissivity
+                time_radiation = 0.0_wp,         & !< time since last call of radiation code
+                time_utc,                        & !< current time in UTC
+                time_utc_init = 43200.0_wp         !< UTC time at model start (noon)
 
     REAL(wp), DIMENSION(0:0) ::  zenith        !< solar zenith angle
@@ -213,12 +217,21 @@
 
     REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET :: &
+                        rad_lw_cs_hr,                  & !< longwave clear sky radiation heating rate (K/s)
+                        rad_lw_cs_hr_av,               & !< average of rad_lw_cs_hr
+                        rad_lw_hr,                     & !< longwave radiation heating rate (K/s)
+                        rad_lw_hr_av,                  & !< average of rad_sw_hr
+                        rad_lw_in,                     & !< incoming longwave radiation (W/m2)
+                        rad_lw_in_av,                  & !< average of rad_lw_in
+                        rad_lw_out,                    & !< outgoing longwave radiation (W/m2)
+                        rad_lw_out_av,                 & !< average of rad_lw_out
+                        rad_sw_cs_hr,                  & !< shortwave clear sky radiation heating rate (K/s)
+                        rad_sw_cs_hr_av,               & !< average of rad_sw_cs_hr
+                        rad_sw_hr,                     & !< shortwave radiation heating rate (K/s)
+                        rad_sw_hr_av,                  & !< average of rad_sw_hr
                         rad_sw_in,                     & !< incoming shortwave radiation (W/m2)
                         rad_sw_in_av,                  & !< average of rad_sw_in
                         rad_sw_out,                    & !< outgoing shortwave radiation (W/m2)
-                        rad_sw_out_av,                 & !< average of rad_sw_out
-                        rad_lw_in,                     & !< incoming longwave radiation (W/m2)
-                        rad_lw_in_av,                  & !< average of rad_lw_in
-                        rad_lw_out,                    & !< outgoing longwave radiation (W/m2)
-                        rad_lw_out_av                    !< average of rad_lw_out
+                        rad_sw_out_av                    !< average of rad_sw_out
+
 
 !
@@ -244,9 +257,9 @@
                     rrtm_icld = 0,     & !< cloud flag (0: clear sky column, 1: cloudy column)
                     rrtm_iaer = 0,     & !< aerosol option flag (0: no aerosol layers, for lw only: 6 (requires setting of rrtm_sw_ecaer), 10: one or more aerosol layers (not implemented)
-                    rrtm_idrv = 0        !< longwave upward flux calculation option (0,1)
+                    rrtm_idrv = 1        !< longwave upward flux calculation option (0,1)
 
     LOGICAL :: snd_exists = .FALSE.      !< flag parameter to check whether a user-defined input files exists
 
-    REAL(wp), PARAMETER :: mol_weight_air_d_wv = 1.607793_wp !< molecular weight dry air / water vapor
+    REAL(wp), PARAMETER :: mol_mass_air_d_wv = 1.607793_wp !< molecular weight dry air / water vapor
 
     REAL(wp), DIMENSION(:), ALLOCATABLE :: hyp_snd,     & !< hypostatic pressure from sounding data (hPa)
@@ -255,40 +268,42 @@
                                            t_snd          !< actual temperature from sounding data (hPa)
 
-    REAL(wp), DIMENSION(:,:), ALLOCATABLE :: aldif,         & !< longwave diffuse albedo solar angle of 60Â°
-                                             aldir,         & !< longwave direct albedo solar angle of 60Â°
-                                             asdif,         & !< shortwave diffuse albedo solar angle of 60Â°
-                                             asdir,         & !< shortwave direct albedo solar angle of 60Â°
-                                             rrtm_ccl4vmr,  & !< CCL4 volume mixing ratio (g/mol)
-                                             rrtm_cfc11vmr, & !< CFC11 volume mixing ratio (g/mol)
-                                             rrtm_cfc12vmr, & !< CFC12 volume mixing ratio (g/mol)
-                                             rrtm_cfc22vmr, & !< CFC22 volume mixing ratio (g/mol)
-                                             rrtm_ch4vmr,   & !< CH4 volume mixing ratio
-                                             rrtm_cicewp,   & !< in-cloud ice water path (g/mÂ²)
-                                             rrtm_cldfr,    & !< cloud fraction (0,1)
-                                             rrtm_cliqwp,   & !< in-cloud liquid water path (g/mÂ²)
-                                             rrtm_co2vmr,   & !< CO2 volume mixing ratio (g/mol)
-                                             rrtm_emis,     & !< surface emissivity (0-1)    
-                                             rrtm_h2ovmr,   & !< H2O volume mixing ratio
-                                             rrtm_n2ovmr,   & !< N2O volume mixing ratio
-                                             rrtm_o2vmr,    & !< O2 volume mixing ratio
-                                             rrtm_o3vmr,    & !< O3 volume mixing ratio
-                                             rrtm_play,     & !< pressure layers (hPa, zu-grid)
-                                             rrtm_plev,     & !< pressure layers (hPa, zw-grid)
-                                             rrtm_reice,    & !< cloud ice effective radius (microns)
-                                             rrtm_reliq,    & !< cloud water drop effective radius (microns)
-                                             rrtm_tlay,     & !< actual temperature (K, zu-grid)
-                                             rrtm_tlev,     & !< actual temperature (K, zw-grid)
-                                             rrtm_lwdflx,   & !< RRTM output of incoming longwave radiation flux (W/m2)
-                                             rrtm_lwuflx,   & !< RRTM output of outgoing longwave radiation flux (W/m2)
-                                             rrtm_lwhr,     & !< RRTM output of longwave radiation heating rate (K/d)
-                                             rrtm_lwuflxc,  & !< RRTM output of incoming clear sky longwave radiation flux (W/m2)
-                                             rrtm_lwdflxc,  & !< RRTM output of outgoing clear sky longwave radiation flux (W/m2) 
-                                             rrtm_lwhrc,    & !< RRTM output of incoming longwave clear sky radiation heating rate (K/d)
-                                             rrtm_swdflx,   & !< RRTM output of incoming shortwave radiation flux (W/m2)
-                                             rrtm_swuflx,   & !< RRTM output of outgoing shortwave radiation flux (W/m2)
-                                             rrtm_swhr,     & !< RRTM output of shortwave radiation heating rate (K/d)
-                                             rrtm_swuflxc,  & !< RRTM output of incoming clear sky shortwave radiation flux (W/m2)
-                                             rrtm_swdflxc,  & !< RRTM output of outgoing clear sky shortwave radiation flux (W/m2) 
-                                             rrtm_swhrc       !< RRTM output of incoming shortwave clear sky radiation heating rate (K/d) 
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE :: aldif,          & !< longwave diffuse albedo solar angle of 60Â°
+                                             aldir,          & !< longwave direct albedo solar angle of 60Â°
+                                             asdif,          & !< shortwave diffuse albedo solar angle of 60Â°
+                                             asdir,          & !< shortwave direct albedo solar angle of 60Â°
+                                             rrtm_ccl4vmr,   & !< CCL4 volume mixing ratio (g/mol)
+                                             rrtm_cfc11vmr,  & !< CFC11 volume mixing ratio (g/mol)
+                                             rrtm_cfc12vmr,  & !< CFC12 volume mixing ratio (g/mol)
+                                             rrtm_cfc22vmr,  & !< CFC22 volume mixing ratio (g/mol)
+                                             rrtm_ch4vmr,    & !< CH4 volume mixing ratio
+                                             rrtm_cicewp,    & !< in-cloud ice water path (g/mÂ²)
+                                             rrtm_cldfr,     & !< cloud fraction (0,1)
+                                             rrtm_cliqwp,    & !< in-cloud liquid water path (g/mÂ²)
+                                             rrtm_co2vmr,    & !< CO2 volume mixing ratio (g/mol)
+                                             rrtm_emis,      & !< surface emissivity (0-1)    
+                                             rrtm_h2ovmr,    & !< H2O volume mixing ratio
+                                             rrtm_n2ovmr,    & !< N2O volume mixing ratio
+                                             rrtm_o2vmr,     & !< O2 volume mixing ratio
+                                             rrtm_o3vmr,     & !< O3 volume mixing ratio
+                                             rrtm_play,      & !< pressure layers (hPa, zu-grid)
+                                             rrtm_plev,      & !< pressure layers (hPa, zw-grid)
+                                             rrtm_reice,     & !< cloud ice effective radius (microns)
+                                             rrtm_reliq,     & !< cloud water drop effective radius (microns)
+                                             rrtm_tlay,      & !< actual temperature (K, zu-grid)
+                                             rrtm_tlev,      & !< actual temperature (K, zw-grid)
+                                             rrtm_lwdflx,    & !< RRTM output of incoming longwave radiation flux (W/m2)
+                                             rrtm_lwdflxc,   & !< RRTM output of outgoing clear sky longwave radiation flux (W/m2) 
+                                             rrtm_lwuflx,    & !< RRTM output of outgoing longwave radiation flux (W/m2)
+                                             rrtm_lwuflxc,   & !< RRTM output of incoming clear sky longwave radiation flux (W/m2)
+                                             rrtm_lwuflx_dt, & !< RRTM output of incoming clear sky longwave radiation flux (W/m2)
+                                             rrtm_lwuflxc_dt,& !< RRTM output of outgoing clear sky longwave radiation flux (W/m2)
+                                             rrtm_lwhr,      & !< RRTM output of longwave radiation heating rate (K/d)
+                                             rrtm_lwhrc,     & !< RRTM output of incoming longwave clear sky radiation heating rate (K/d)
+                                             rrtm_swdflx,    & !< RRTM output of incoming shortwave radiation flux (W/m2)
+                                             rrtm_swdflxc,   & !< RRTM output of outgoing clear sky shortwave radiation flux (W/m2) 
+                                             rrtm_swuflx,    & !< RRTM output of outgoing shortwave radiation flux (W/m2)
+                                             rrtm_swuflxc,   & !< RRTM output of incoming clear sky shortwave radiation flux (W/m2)
+                                             rrtm_swhr,      & !< RRTM output of shortwave radiation heating rate (K/d)
+                                             rrtm_swhrc        !< RRTM output of incoming shortwave clear sky radiation heating rate (K/d) 
 
 !
@@ -296,10 +311,6 @@
     REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  rad_lw_cs_in,   & !< incoming clear sky longwave radiation (W/m2) (not used)
                                                 rad_lw_cs_out,  & !< outgoing clear sky longwave radiation (W/m2) (not used)
-                                                rad_lw_cs_hr,   & !< longwave clear sky radiation heating rate (K/d) (not used)
-                                                rad_lw_hr,      & !< longwave radiation heating rate (K/d)
                                                 rad_sw_cs_in,   & !< incoming clear sky shortwave radiation (W/m2) (not used)
                                                 rad_sw_cs_out,  & !< outgoing clear sky shortwave radiation (W/m2) (not used)
-                                                rad_sw_cs_hr,   & !< shortwave clear sky radiation heating rate (K/d) (not used)
-                                                rad_sw_hr,      & !< shortwave radiation heating rate (K/d)
                                                 rrtm_aldif,     & !< surface albedo for longwave diffuse radiation
                                                 rrtm_aldir,     & !< surface albedo for longwave direct radiation
@@ -316,4 +327,5 @@
                                                 rrtm_sw_asmaer, & !< sw aerosol asymmetry parameter
                                                 rrtm_sw_ecaer     !< sw aerosol optical detph at 0.55 microns (rrtm_iaer = 6 only)
+
 #endif
 
@@ -341,13 +353,17 @@
     PUBLIC albedo, albedo_type, albedo_type_name, albedo_lw_dif, albedo_lw_dir,&
            albedo_sw_dif, albedo_sw_dir, constant_albedo, day_init, dots_rad,  &
-           dt_radiation, init_radiation, lambda, lw_radiation, net_radiation,  &
-           rad_net, rad_net_av, radiation, radiation_clearsky,                 &
-           radiation_rrtmg, radiation_scheme, radiation_tendency, rad_lw_in,   &
-           rad_lw_in_av, rad_lw_out, rad_lw_out_av, rad_sw_in, rad_sw_in_av,   &
-           rad_sw_out, rad_sw_out_av, sigma_sb, sw_radiation, time_radiation,  &
-           time_utc_init 
+           dt_radiation, emissivity, force_radiation_call, init_radiation,     &
+           lambda, lw_radiation, net_radiation, rad_net, rad_net_av, radiation,&
+           radiation_clearsky, radiation_rrtmg, radiation_scheme,              &
+           radiation_tendency, rad_lw_in, rad_lw_in_av, rad_lw_out,            &
+           rad_lw_out_av, rad_lw_cs_hr, rad_lw_cs_hr_av, rad_lw_hr,            &
+           rad_lw_hr_av, rad_sw_in, rad_sw_in_av, rad_sw_out, rad_sw_out_av,   &
+           rad_sw_cs_hr, rad_sw_cs_hr_av, rad_sw_hr, rad_sw_hr_av, sigma_sb,   &
+           skip_time_do_radiation, sw_radiation, time_radiation, time_utc_init
+
 
 #if defined ( __rrtmg )
-    PUBLIC rrtm_aldif, rrtm_aldir, rrtm_asdif, rrtm_asdir
+    PUBLIC rrtm_aldif, rrtm_aldir, rrtm_asdif, rrtm_asdir, rrtm_idrv,          &
+           rrtm_lwuflx_dt
 #endif
 
@@ -483,22 +499,16 @@
 !
 !--       Allocate 3d arrays of radiative fluxes and heating rates
-          ALLOCATE ( rad_sw_hr(nzb+1:nzt+1,nysg:nyng,nxlg:nxrg) )
-          ALLOCATE ( rad_sw_cs_in(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
-          ALLOCATE ( rad_sw_cs_out(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
-          ALLOCATE ( rad_sw_cs_hr(nzb+1:nzt+1,nysg:nyng,nxlg:nxrg) )
-
           IF ( .NOT. ALLOCATED ( rad_sw_in ) )  THEN
              ALLOCATE ( rad_sw_in(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
              rad_sw_in = 0.0_wp
-
           ENDIF
 
           IF ( .NOT. ALLOCATED ( rad_sw_in_av ) )  THEN
              ALLOCATE ( rad_sw_in_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
-             rad_sw_out = 0.0_wp
           ENDIF
 
           IF ( .NOT. ALLOCATED ( rad_sw_out ) )  THEN
              ALLOCATE ( rad_sw_out(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+             rad_sw_out = 0.0_wp
           ENDIF
 
@@ -507,8 +517,23 @@
           ENDIF
 
-          ALLOCATE ( rad_lw_hr(nzb+1:nzt+1,nysg:nyng,nxlg:nxrg) )
-          ALLOCATE ( rad_lw_cs_in(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
-          ALLOCATE ( rad_lw_cs_out(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
-          ALLOCATE ( rad_lw_cs_hr(nzb+1:nzt+1,nysg:nyng,nxlg:nxrg) )
+          IF ( .NOT. ALLOCATED ( rad_sw_hr ) )  THEN
+             ALLOCATE ( rad_sw_hr(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+             rad_sw_hr = 0.0_wp
+          ENDIF
+
+          IF ( .NOT. ALLOCATED ( rad_sw_hr_av ) )  THEN
+             ALLOCATE ( rad_sw_hr_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+             rad_sw_hr_av = 0.0_wp
+          ENDIF
+
+          IF ( .NOT. ALLOCATED ( rad_sw_cs_hr ) )  THEN
+             ALLOCATE ( rad_sw_cs_hr(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+             rad_sw_cs_hr = 0.0_wp
+          ENDIF
+
+          IF ( .NOT. ALLOCATED ( rad_sw_cs_hr_av ) )  THEN
+             ALLOCATE ( rad_sw_cs_hr_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+             rad_sw_cs_hr_av = 0.0_wp
+          ENDIF
 
           IF ( .NOT. ALLOCATED ( rad_lw_in ) )  THEN
@@ -530,13 +555,33 @@
           ENDIF
 
-          rad_sw_hr     = 0.0_wp
+          IF ( .NOT. ALLOCATED ( rad_lw_hr ) )  THEN
+             ALLOCATE ( rad_lw_hr(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+             rad_lw_hr = 0.0_wp
+          ENDIF
+
+          IF ( .NOT. ALLOCATED ( rad_lw_hr_av ) )  THEN
+             ALLOCATE ( rad_lw_hr_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+             rad_lw_hr_av = 0.0_wp
+          ENDIF
+
+          IF ( .NOT. ALLOCATED ( rad_lw_cs_hr ) )  THEN
+             ALLOCATE ( rad_lw_cs_hr(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+             rad_lw_cs_hr = 0.0_wp
+          ENDIF
+
+          IF ( .NOT. ALLOCATED ( rad_lw_cs_hr_av ) )  THEN
+             ALLOCATE ( rad_lw_cs_hr_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+             rad_lw_cs_hr_av = 0.0_wp
+          ENDIF
+
+          ALLOCATE ( rad_sw_cs_in(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+          ALLOCATE ( rad_sw_cs_out(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
           rad_sw_cs_in  = 0.0_wp
           rad_sw_cs_out = 0.0_wp
-          rad_sw_cs_hr  = 0.0_wp
-
-          rad_lw_hr     = 0.0_wp
+
+          ALLOCATE ( rad_lw_cs_in(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+          ALLOCATE ( rad_lw_cs_out(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
           rad_lw_cs_in  = 0.0_wp
           rad_lw_cs_out = 0.0_wp
-          rad_lw_cs_hr  = 0.0_wp
 
 !
@@ -578,21 +623,23 @@
 !--    Add timeseries for radiation model
        dots_rad = dots_num + 1
-       dots_label(dots_num+1) = "rad_net"
-       dots_label(dots_num+2) = "rad_lw_in"
-       dots_label(dots_num+3) = "rad_lw_out"
-       dots_label(dots_num+4) = "rad_sw_in"
-       dots_label(dots_num+5) = "rad_sw_out"
-       dots_unit(dots_num+1:dots_num+5) = "W/m2"
-       dots_num  = dots_num + 5
+       dots_num = dots_num + 5
+
+       dots_label(dots_rad+1) = "rad_net"
+       dots_label(dots_rad+2) = "rad_lw_in"
+       dots_label(dots_rad+3) = "rad_lw_out"
+       dots_label(dots_rad+4) = "rad_sw_in"
+       dots_label(dots_rad+5) = "rad_sw_out"
+       dots_unit(dots_rad:dots_rad+4) = "W/m2"
 
 !
 !--    Output of albedos is only required for RRTMG
        IF ( radiation_scheme == 'rrtmg' )  THEN
-          dots_label(dots_num+1) = "rrtm_aldif"
-          dots_label(dots_num+2) = "rrtm_aldir"
-          dots_label(dots_num+3) = "rrtm_asdif"
-          dots_label(dots_num+4) = "rrtm_asdir"
-          dots_unit(dots_num+1:dots_num+4) = ""
           dots_num  = dots_num + 4
+          dots_label(dots_rad+5) = "rrtm_aldif"
+          dots_label(dots_rad+6) = "rrtm_aldir"
+          dots_label(dots_rad+7) = "rrtm_asdif"
+          dots_label(dots_rad+8) = "rrtm_asdir"
+          dots_unit(dots_num+5:dots_num+8) = ""
+
        ENDIF
 
@@ -624,5 +671,8 @@
        IMPLICIT NONE
 
-       INTEGER(iwp) :: i, j, k
+       INTEGER(iwp) :: i, j, k   !< loop indices
+       REAL(wp)     :: exn,   &  !< Exner functions at surface
+                       exn_1, &  !< Exner functions at first grid level
+                       pt_1      !< potential temperature at first grid level
 
 !
@@ -643,10 +693,20 @@
           DO j = nys, nyn
              k = nzb_s_inner(j,i)
+
+             exn_1 = (hyp(k+1) / 100000.0_wp )**0.286_wp
+
              rad_sw_in(0,j,i)  = solar_constant * sky_trans * zenith(0)
              rad_sw_out(0,j,i) = alpha(j,i) * rad_sw_in(0,j,i)
-             rad_lw_out(0,j,i) = sigma_sb * (pt(k,j,i) * exn)**4
-             rad_lw_in(0,j,i)  = 0.8_wp * sigma_sb * (pt(k+1,j,i) * exn)**4
-             rad_net(j,i)      = rad_sw_in(0,j,i) - rad_sw_out(0,j,i)          &
-                                 + rad_lw_in(0,j,i) - rad_lw_out(0,j,i)
+             rad_lw_out(0,j,i) = emissivity * sigma_sb * (pt(k,j,i) * exn)**4
+
+             IF ( cloud_physics )  THEN
+                pt_1 = pt(k+1,j,i) + l_d_cp / exn_1 * ql(k+1,j,i)
+                rad_lw_in(0,j,i)  = 0.8_wp * sigma_sb * (pt_1 * exn_1)**4
+             ELSE
+                rad_lw_in(0,j,i)  = 0.8_wp * sigma_sb * (pt(k+1,j,i) * exn_1)**4
+             ENDIF
+
+             rad_net(j,i) = rad_sw_in(0,j,i) - rad_sw_out(0,j,i)               &
+                            + rad_lw_in(0,j,i) - rad_lw_out(0,j,i)
 
           ENDDO
@@ -682,8 +742,8 @@
 #if defined ( __rrtmg )
 
-       INTEGER(iwp) :: i, j, k, n          !< 
-
-       REAL(wp)     ::  s_r2      !< weighted sum over all droplets with r^2
-       REAL(wp)     ::  s_r3      !< weighted sum over all droplets with r^3
+       INTEGER(iwp) :: i, j, k, n !< loop indices
+
+       REAL(wp)     ::  s_r2, &   !< weighted sum over all droplets with r^2
+                        s_r3      !< weighted sum over all droplets with r^3
 
 !
@@ -703,5 +763,5 @@
 !--    profile. nzt_rad might be modified by these calls and all required arrays
 !--    will then be re-allocated
-       IF ( large_scale_forcing  .AND.  lsf_surf ) THEN
+       IF ( large_scale_forcing  .AND.  lsf_surf )  THEN
           CALL read_sounding_data
           CALL read_trace_gas_data
@@ -714,10 +774,11 @@
 !
 !--          Prepare profiles of temperature and H2O volume mixing ratio
-             rrtm_tlev(0,nzb+1) = pt(nzb,j,i)
+             rrtm_tlev(0,nzb+1) = pt(nzb,j,i) * ( surface_pressure             &
+                                                  / 1000.0_wp )**0.286_wp
 
              DO k = nzb+1, nzt+1
                 rrtm_tlay(0,k) = pt(k,j,i) * ( (hyp(k) ) / 100000.0_wp         &
-                                 )**0.286_wp + ( l_v / cp ) * ql(k,j,i)
-                rrtm_h2ovmr(0,k) = mol_weight_air_d_wv * (q(k,j,i) - ql(k,j,i))
+                                 )**0.286_wp + l_d_cp * ql(k,j,i)
+                rrtm_h2ovmr(0,k) = mol_mass_air_d_wv * (q(k,j,i) - ql(k,j,i))
 
              ENDDO
@@ -754,20 +815,23 @@
              rrtm_reliq  = 0.0_wp
              rrtm_cliqwp = 0.0_wp
+             rrtm_icld   = 0
 
              DO k = nzb+1, nzt+1
-                rrtm_cliqwp(0,k) =  ql(k,j,i) * 1000.0_wp *                      &
-                                  (rrtm_plev(0,k) - rrtm_plev(0,k+1)) * 100.0_wp / g 
-
-                IF ( rrtm_cliqwp(0,k) .GT. 0 )  THEN
+                rrtm_cliqwp(0,k) =  ql(k,j,i) * 1000.0_wp *                    &
+                                    (rrtm_plev(0,k) - rrtm_plev(0,k+1))        &
+                                    * 100.0_wp / g 
+
+                IF ( rrtm_cliqwp(0,k) > 0.0_wp )  THEN
                    rrtm_cldfr(0,k) = 1.0_wp
-                   rrtm_icld = 1
+                   IF ( rrtm_icld == 0 )  rrtm_icld = 1
 
 !
 !--                Calculate cloud droplet effective radius
                    IF ( cloud_physics )  THEN
-                      rrtm_reliq(0,k) = 1.0E6_wp * ( 3.0_wp * ql(k,j,i)          &
-                                      / ( 4.0_wp * pi * nc_const * rho_l )     &
-                                      )**0.33333333333333_wp                   &
-                                     * EXP( LOG( sigma_gc )**2 )
+                      rrtm_reliq(0,k) = 1.0E6_wp * ( 3.0_wp * ql(k,j,i)        &
+                                        * rho_surface                          &
+                                        / ( 4.0_wp * pi * nc_const * rho_l )   &
+                                        )**0.33333333333333_wp                 &
+                                        * EXP( LOG( sigma_gc )**2 )
 
                    ELSEIF ( cloud_droplets )  THEN
@@ -794,10 +858,8 @@
 !
 !--                Limit effective radius
-                   IF ( rrtm_reliq(0,k) .GT. 0.0_wp )  THEN
+                   IF ( rrtm_reliq(0,k) > 0.0_wp )  THEN
                       rrtm_reliq(0,k) = MAX(rrtm_reliq(0,k),2.5_wp)
                       rrtm_reliq(0,k) = MIN(rrtm_reliq(0,k),60.0_wp)
                   ENDIF
-                ELSE
-                   rrtm_icld = 0
                 ENDIF
              ENDDO
@@ -817,6 +879,9 @@
                rrtm_reliq      , rrtm_lw_tauaer,                               &
                rrtm_lwuflx     , rrtm_lwdflx  , rrtm_lwhr  ,                   &
-               rrtm_lwuflxc    , rrtm_lwdflxc , rrtm_lwhrc )
-
+               rrtm_lwuflxc    , rrtm_lwdflxc , rrtm_lwhrc ,                   &
+               rrtm_lwuflx_dt  ,  rrtm_lwuflxc_dt )
+
+!
+!--             Save fluxes
                 DO k = nzb, nzt+1
                    rad_lw_in(k,j,i)  = rrtm_lwdflx(0,k)
@@ -824,4 +889,10 @@
                 ENDDO
 
+!
+!--             Save heating rates (convert from K/d to K/h)
+                DO k = nzb+1, nzt+1
+                   rad_lw_hr(k,j,i)     = rrtm_lwhr(0,k)  * d_hours_day
+                   rad_lw_cs_hr(k,j,i)  = rrtm_lwhrc(0,k) * d_hours_day
+                ENDDO
 
              ENDIF
@@ -841,8 +912,18 @@
                rrtm_swuflxc    , rrtm_swdflxc , rrtm_swhrc )
   
+!
+!--             Save fluxes
                 DO k = nzb, nzt+1
                    rad_sw_in(k,j,i)  = rrtm_swdflx(0,k)
                    rad_sw_out(k,j,i) = rrtm_swuflx(0,k)
                 ENDDO
+
+!
+!--             Save heating rates (convert from K/d to K/s)
+                DO k = nzb+1, nzt+1
+                   rad_sw_hr(k,j,i)     = rrtm_swhr(0,k)  * d_hours_day
+                   rad_sw_cs_hr(k,j,i)  = rrtm_swhrc(0,k) * d_hours_day
+                ENDDO
+
              ENDIF
 
@@ -857,6 +938,12 @@
        CALL exchange_horiz( rad_lw_in,  nbgp )
        CALL exchange_horiz( rad_lw_out, nbgp )
+       CALL exchange_horiz( rad_lw_hr,    nbgp )
+       CALL exchange_horiz( rad_lw_cs_hr, nbgp )
+
        CALL exchange_horiz( rad_sw_in,  nbgp )
        CALL exchange_horiz( rad_sw_out, nbgp ) 
+       CALL exchange_horiz( rad_sw_hr,    nbgp )
+       CALL exchange_horiz( rad_sw_cs_hr, nbgp )
+
        CALL exchange_horiz_2d( rad_net, nbgp )
 #endif
@@ -897,5 +984,5 @@
 !
 !--    Check if the sun is up (otheriwse shortwave calculations can be skipped)
-       IF ( zenith(0) .GT. 0.0_wp )  THEN
+       IF ( zenith(0) > 0.0_wp )  THEN
           sun_up = .TRUE.
        ELSE
@@ -996,9 +1083,16 @@
        IMPLICIT NONE
 
-       INTEGER(iwp) :: id, id_dim_zrad, id_var, k, nz_snd, nz_snd_start, nz_snd_end
-
-       REAL(wp) :: t_surface
-
-       REAL(wp), DIMENSION(:), ALLOCATABLE ::  hyp_snd_tmp, t_snd_tmp
+       INTEGER(iwp) :: id,           & !< NetCDF id of input file
+                       id_dim_zrad,  & !< pressure level id in the NetCDF file
+                       id_var,       & !< NetCDF variable id
+                       k,            & !< loop index
+                       nz_snd,       & !< number of vertical levels in the sounding data
+                       nz_snd_start, & !< start vertical index for sounding data to be used
+                       nz_snd_end      !< end vertical index for souding data to be used
+
+       REAL(wp) :: t_surface           !< actual surface temperature
+
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  hyp_snd_tmp, & !< temporary hydrostatic pressure profile (sounding)
+                                               t_snd_tmp      !< temporary temperature profile (sounding)
 
 !
@@ -1014,4 +1108,5 @@
           DEALLOCATE ( rrtm_tlay )
           DEALLOCATE ( rrtm_tlev )
+
           DEALLOCATE ( rrtm_h2ovmr )
           DEALLOCATE ( rrtm_cicewp )
@@ -1022,10 +1117,14 @@
           DEALLOCATE ( rrtm_lw_taucld )
           DEALLOCATE ( rrtm_lw_tauaer )
+
           DEALLOCATE ( rrtm_lwdflx  )
+          DEALLOCATE ( rrtm_lwdflxc )
           DEALLOCATE ( rrtm_lwuflx  )
+          DEALLOCATE ( rrtm_lwuflxc )
+          DEALLOCATE ( rrtm_lwuflx_dt )
+          DEALLOCATE ( rrtm_lwuflxc_dt )
           DEALLOCATE ( rrtm_lwhr  )
-          DEALLOCATE ( rrtm_lwuflxc )
-          DEALLOCATE ( rrtm_lwdflxc )
           DEALLOCATE ( rrtm_lwhrc )
+
           DEALLOCATE ( rrtm_sw_taucld )
           DEALLOCATE ( rrtm_sw_ssacld )
@@ -1035,11 +1134,13 @@
           DEALLOCATE ( rrtm_sw_ssaaer )
           DEALLOCATE ( rrtm_sw_asmaer ) 
-          DEALLOCATE ( rrtm_sw_ecaer )    
+          DEALLOCATE ( rrtm_sw_ecaer )   
+ 
           DEALLOCATE ( rrtm_swdflx  )
+          DEALLOCATE ( rrtm_swdflxc )
           DEALLOCATE ( rrtm_swuflx  )
+          DEALLOCATE ( rrtm_swuflxc )
           DEALLOCATE ( rrtm_swhr  )
-          DEALLOCATE ( rrtm_swuflxc )
-          DEALLOCATE ( rrtm_swdflxc )
           DEALLOCATE ( rrtm_swhrc )
+
        ENDIF
 
@@ -1063,5 +1164,5 @@
 !--    Read pressure from file
        nc_stat = NF90_INQ_VARID( id, "Pressure", id_var )
-       nc_stat = NF90_GET_VAR( id, id_var, hyp_snd_tmp(:), start = (/1/),    &
+       nc_stat = NF90_GET_VAR( id, id_var, hyp_snd_tmp(:), start = (/1/),      &
                                count = (/nz_snd/) )
        CALL handle_netcdf_error( 'netcdf', 552 )
@@ -1075,5 +1176,5 @@
 !--    Read temperature from file
        nc_stat = NF90_INQ_VARID( id, "ReferenceTemperature", id_var )
-       nc_stat = NF90_GET_VAR( id, id_var, t_snd_tmp(:), start = (/1/),      &
+       nc_stat = NF90_GET_VAR( id, id_var, t_snd_tmp(:), start = (/1/),        &
                                count = (/nz_snd/) )
        CALL handle_netcdf_error( 'netcdf', 553 )
@@ -1088,5 +1189,5 @@
 !--    in Pa, hyp_snd in hPa).
        DO  k = 1, nz_snd
-          IF ( hyp_snd_tmp(k) .LT. (hyp(nzt+1) - 1000.0_wp) * 0.01_wp )  THEN
+          IF ( hyp_snd_tmp(k) < ( hyp(nzt+1) - 1000.0_wp) * 0.01_wp )  THEN
              nz_snd_start = k
              EXIT
@@ -1094,5 +1195,5 @@
        END DO
 
-       IF ( nz_snd_start .LE. nz_snd )  THEN
+       IF ( nz_snd_start <= nz_snd )  THEN
           nz_snd_end = nz_snd - 1
        END IF
@@ -1128,5 +1229,5 @@
        ALLOCATE ( rrtm_plev(0:0,nzb+1:nzt_rad+2)   )
 
-       t_surface = pt_surface * (surface_pressure / 1000.0_wp )**0.286_wp
+       t_surface = pt_surface * ( surface_pressure / 1000.0_wp )**0.286_wp
        DO k = nzb+1, nzt+1
           rrtm_play(0,k) = hyp(k) * 0.01_wp
@@ -1160,6 +1261,6 @@
           rrtm_h2ovmr(0,k) = q_snd(k)
        ENDDO
-       rrtm_tlay(0,nzt_rad+1)   = 2.0_wp * rrtm_tlay(0,nzt_rad)                &
-                                  - rrtm_tlay(0,nzt_rad-1)
+       rrtm_tlay(0,nzt_rad+1) = 2.0_wp * rrtm_tlay(0,nzt_rad)                 &
+                                - rrtm_tlay(0,nzt_rad-1)
        DO k = nzt+9, nzt_rad+1
           rrtm_tlev(0,k)   = rrtm_tlay(0,k-1) + (rrtm_tlay(0,k)                &
@@ -1237,4 +1338,9 @@
        rrtm_lwhrc   = 0.0_wp
 
+       ALLOCATE ( rrtm_lwuflx_dt(0:0,nzb:nzt_rad+1) )
+       ALLOCATE ( rrtm_lwuflxc_dt(0:0,nzb:nzt_rad+1) )
+
+       rrtm_lwuflxc_dt = 0.0_wp
+       rrtm_lwuflxc_dt = 0.0_wp
 
     END SUBROUTINE read_sounding_data
@@ -1253,11 +1359,19 @@
        IMPLICIT NONE
 
-       INTEGER(iwp), PARAMETER :: num_trace_gases = 9 !< number of trace gases
-
-       CHARACTER(LEN=5), DIMENSION(num_trace_gases), PARAMETER ::              &
+       INTEGER(iwp), PARAMETER :: num_trace_gases = 9 !< number of trace gases (absorbers)
+
+       CHARACTER(LEN=5), DIMENSION(num_trace_gases), PARAMETER ::              & !< trace gas names
            trace_names = (/'O3   ', 'CO2  ', 'CH4  ', 'N2O  ', 'O2   ',        &
                            'CFC11', 'CFC12', 'CFC22', 'CCL4 '/)
 
-       INTEGER(iwp) :: id, k, m, n, nabs, np, id_abs, id_dim, id_var
+       INTEGER(iwp) :: id,     & !< NetCDF id
+                       k,      & !< loop index
+                       m,      & !< loop index
+                       n,      & !< loop index
+                       nabs,   & !< number of absorbers
+                       np,     & !< number of pressure levels
+                       id_abs, & !< NetCDF id of the respective absorber
+                       id_dim, & !< NetCDF id of asborber's dimension
+                       id_var    !< NetCDf id ot the absorber
 
        REAL(wp) :: p_mls_l, p_mls_u, p_wgt_l, p_wgt_u, p_mls_m
@@ -1380,5 +1494,5 @@
 !--          When the pressure level is higher than the trace gas pressure
 !--          level, assume that 
-             IF ( rrtm_plev_tmp(k-1) .GT. p_mls(1) )  THEN             
+             IF ( rrtm_plev_tmp(k-1) > p_mls(1) )  THEN             
                 
                 trace_mls_path(k,m) = trace_mls_path(k,m) + trace_mls(m,1)     &
@@ -1399,5 +1513,5 @@
                           MAX( rrtm_plev_tmp(k), p_mls(n-1) ) )
 
-                IF ( p_mls_l .GT. p_mls_u )  THEN
+                IF ( p_mls_l > p_mls_u )  THEN
 
 !
@@ -1412,9 +1526,9 @@
                                          +  ( p_wgt_u * trace_mls(m,n)         &
                                             + p_wgt_l * trace_mls(m,n-1) )     &
-                                         * (p_mls_l + p_mls_u) / g
+                                         * (p_mls_l - p_mls_u) / g
                 ENDIF
              ENDDO
 
-             IF ( rrtm_plev_tmp(k) .LT. p_mls(np) )  THEN 
+             IF ( rrtm_plev_tmp(k) < p_mls(np) )  THEN 
                 trace_mls_path(k,m) = trace_mls_path(k,m) + trace_mls(m,np)    &
                                       * ( MIN( rrtm_plev_tmp(k-1), p_mls(np) ) &
@@ -1503,40 +1617,19 @@
     SUBROUTINE radiation_tendency_ij ( i, j, tend )
 
-       USE arrays_3d,                                                          &
-           ONLY:  dzw
-
        USE cloud_parameters,                                                   &
-           ONLY:  pt_d_t, cp
-
-       USE control_parameters,                                                 &
-           ONLY:  rho_surface
+           ONLY:  pt_d_t
 
        IMPLICIT NONE
 
-       INTEGER(iwp) :: i, j, k
-
-       REAL(wp), DIMENSION(nzb:nzt+1,nysg:nyng,nxlg:nxrg) :: tend
+       INTEGER(iwp) :: i, j, k !< loop indices
+
+       REAL(wp), DIMENSION(nzb:nzt+1,nysg:nyng,nxlg:nxrg) :: tend !< pt tendency term
 
 #if defined ( __rrtmg )
-
-       REAL(wp) :: rad_sw_net_l, rad_sw_net_u, rad_lw_net_l, rad_lw_net_u
-
-       rad_sw_net_l = 0.0_wp
-       rad_sw_net_u = 0.0_wp
-       rad_lw_net_l = 0.0_wp
-       rad_lw_net_u = 0.0_wp
-
-!
-!--    Calculate radiative flux divergence
+!
+!--    Calculate tendency based on heating rate
        DO k = nzb+1, nzt+1
-
-          rad_sw_net_l = rad_sw_in(k-1,j,i) - rad_sw_out(k-1,j,i)
-          rad_sw_net_u = rad_sw_in(k,j,i)   - rad_sw_out(k,j,i)
-          rad_lw_net_l = rad_lw_in(k-1,j,i) - rad_lw_out(k-1,j,i)
-          rad_lw_net_u = rad_lw_in(k,j,i)   - rad_lw_out(k,j,i)
-
-          tend(k,j,i) = tend(k,j,i) + ( rad_sw_net_u - rad_sw_net_l            &
-                                      + rad_lw_net_u - rad_lw_net_l ) /        &
-                                     ( dzw(k) * cp * rho_surface ) * pt_d_t(k) 
+          tend(k,j,i) = tend(k,j,i) + (rad_lw_hr(k,j,i) + rad_sw_hr(k,j,i))    &
+                                      * pt_d_t(k) * d_seconds_hour
        ENDDO
 
@@ -1554,46 +1647,25 @@
     SUBROUTINE radiation_tendency ( tend )
 
-       USE arrays_3d,                                                          &
-           ONLY:  dzw
-
        USE cloud_parameters,                                                   &
-           ONLY:  pt_d_t, cp
+           ONLY:  pt_d_t
 
        USE indices,                                                            &
            ONLY:  nxl, nxr, nyn, nys
 
-       USE control_parameters,                                                 &
-           ONLY:  rho_surface
-
        IMPLICIT NONE
 
-       INTEGER(iwp) :: i, j, k
-
-       REAL(wp), DIMENSION(nzb:nzt+1,nysg:nyng,nxlg:nxrg) :: tend
+       INTEGER(iwp) :: i, j, k !< loop indices
+
+       REAL(wp), DIMENSION(nzb:nzt+1,nysg:nyng,nxlg:nxrg) :: tend !< pt tendency term
 
 #if defined ( __rrtmg )
-
-       REAL(wp) :: rad_sw_net_l, rad_sw_net_u, rad_lw_net_l, rad_lw_net_u
-
-       rad_sw_net_l = 0.0_wp
-       rad_sw_net_u = 0.0_wp
-       rad_lw_net_l = 0.0_wp
-       rad_lw_net_u = 0.0_wp
-
+!
+!--    Calculate tendency based on heating rate
        DO  i = nxl, nxr
           DO  j = nys, nyn
-
-!
-!--          Calculate radiative flux divergence
              DO k = nzb+1, nzt+1
-
-                rad_sw_net_l = rad_sw_in(k-1,j,i) - rad_sw_out(k-1,j,i)
-                rad_sw_net_u = rad_sw_in(k  ,j,i) - rad_sw_out(k  ,j,i)
-                rad_lw_net_l = rad_lw_in(k-1,j,i) - rad_lw_out(k-1,j,i)
-                rad_lw_net_u = rad_lw_in(k  ,j,i) - rad_lw_out(k  ,j,i)
-
-                tend(k,j,i) = tend(k,j,i) + ( rad_sw_net_u - rad_sw_net_l      &
-                                      + rad_lw_net_u - rad_lw_net_l ) /        &
-                                      ( dzw(k) * cp * rho_surface ) * pt_d_t(k) 
+                tend(k,j,i) = tend(k,j,i) + ( rad_lw_hr(k,j,i)                 &
+                                            +  rad_sw_hr(k,j,i) ) * pt_d_t(k)  &
+                                            * d_seconds_hour
              ENDDO
          ENDDO
Index: palm/trunk/SOURCE/read_3d_binary.f90
===================================================================
--- palm/trunk/SOURCE/read_3d_binary.f90	(revision 1690)
+++ palm/trunk/SOURCE/read_3d_binary.f90	(revision 1691)
@@ -14,10 +14,11 @@
 ! PALM. If not, see <http://www.gnu.org/licenses/>.
 !
-! Copyright 1997-2014 Leibniz Universitaet Hannover
+! Copyright 1997-2015 Leibniz Universitaet Hannover
 !--------------------------------------------------------------------------------!
 !
 ! Current revisions:
 ! -----------------
-! 
+! Added output of radiative heating rates and Obukhov length. Removed output of
+! rif.
 ! 
 ! Former revisions:
@@ -83,6 +84,6 @@
 
     USE arrays_3d,                                                             &
-        ONLY:  e, kh, km, p, pt, q, ql, qc, nr, nrs, nrsws, nrswst, qr, qrs,   &
-               qrsws, qrswst, qs, qsws, qswst, sa, saswsb, saswst, rif,        &
+        ONLY:  e, kh, km, ol, p, pt, q, ql, qc, nr, nrs, nrsws, nrswst, qr,    &
+               qrs, qrsws, qrswst, qs, qsws, qswst, sa, saswsb, saswst,        &
                rif_wall, shf, ts, tswst, u, u_m_l, u_m_n, u_m_r, u_m_s, us,    &
                usws, uswst, v, v_m_l, v_m_n, v_m_r, v_m_s, vpt, vsws, vswst,   &
@@ -119,5 +120,8 @@
     USE radiation_model_mod,                                                   &
         ONLY: rad_net, rad_net_av, rad_lw_in, rad_lw_in_av, rad_lw_out,        &
-              rad_lw_out_av, rad_sw_in, rad_sw_in_av, rad_sw_out, rad_sw_out_av
+              rad_lw_cs_hr, rad_lw_cs_hr_av, rad_lw_hr, rad_lw_hr_av,          &
+              rad_lw_out_av, rad_sw_in, rad_sw_in_av, rad_sw_out,              &
+              rad_sw_out_av, rad_sw_cs_hr, rad_sw_cs_hr_av, rad_sw_hr,         &
+              rad_sw_hr_av
 
     USE random_function_mod,                                                   &
@@ -595,4 +599,8 @@
                    nrswst(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp)  = &
                                           tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+                CASE ( 'ol' )
+                   IF ( k == 1 )  READ ( 13 )  tmp_2d
+                   ol(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp)  = &
+                                         tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
 
                 CASE ( 'p' )
@@ -867,4 +875,36 @@
                              tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
 
+                CASE ( 'rad_lw_cs_hr' )
+                   IF ( .NOT. ALLOCATED( rad_lw_cs_hr ) )  THEN
+                      ALLOCATE( rad_lw_cs_hr(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                   ENDIF
+                   IF ( k == 1 )  READ ( 13 )  tmp_3d
+                   rad_lw_cs_hr(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = &
+                           tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+
+                CASE ( 'rad_lw_cs_hr_av' )
+                   IF ( .NOT. ALLOCATED( rad_lw_out_av ) )  THEN
+                      ALLOCATE( rad_lw_cs_hr_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                   ENDIF
+                   IF ( k == 1 )  READ ( 13 )  tmp_3d
+                   rad_lw_cs_hr_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = &
+                           tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+
+                CASE ( 'rad_lw_hr' )
+                   IF ( .NOT. ALLOCATED( rad_lw_hr ) )  THEN
+                      ALLOCATE( rad_lw_hr(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                   ENDIF
+                   IF ( k == 1 )  READ ( 13 )  tmp_3d
+                   rad_lw_hr(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = &
+                           tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+
+                CASE ( 'rad_lw_hr_av' )
+                   IF ( .NOT. ALLOCATED( rad_lw_hr_av ) )  THEN
+                      ALLOCATE( rad_lw_hr_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                   ENDIF
+                   IF ( k == 1 )  READ ( 13 )  tmp_3d
+                   rad_lw_hr_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = &
+                           tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+
                 CASE ( 'rad_sw_in' )
                    IF ( .NOT. ALLOCATED( rad_sw_in ) )  THEN
@@ -898,4 +938,36 @@
                    rad_sw_out_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = &
                              tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+
+                CASE ( 'rad_sw_cs_hr' )
+                   IF ( .NOT. ALLOCATED( rad_sw_cs_hr ) )  THEN
+                      ALLOCATE( rad_sw_cs_hr(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                   ENDIF
+                   IF ( k == 1 )  READ ( 13 )  tmp_3d
+                   rad_sw_cs_hr(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = &
+                           tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+
+                CASE ( 'rad_sw_cs_hr_av' )
+                   IF ( .NOT. ALLOCATED( rad_sw_out_av ) )  THEN
+                      ALLOCATE( rad_sw_cs_hr_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                   ENDIF
+                   IF ( k == 1 )  READ ( 13 )  tmp_3d
+                   rad_sw_cs_hr_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = &
+                           tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+
+                CASE ( 'rad_sw_hr' )
+                   IF ( .NOT. ALLOCATED( rad_sw_hr ) )  THEN
+                      ALLOCATE( rad_sw_hr(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                   ENDIF
+                   IF ( k == 1 )  READ ( 13 )  tmp_3d
+                   rad_sw_hr(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = &
+                           tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+
+                CASE ( 'rad_sw_hr_av' )
+                   IF ( .NOT. ALLOCATED( rad_sw_hr_av ) )  THEN
+                      ALLOCATE( rad_sw_hr_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                   ENDIF
+                   IF ( k == 1 )  READ ( 13 )  tmp_3d
+                   rad_lw_hr_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = &
+                           tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
 
                 CASE ( 'random_iv' )  ! still unresolved issue
@@ -914,9 +986,4 @@
                    rho_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = &
                                 tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
-
-                CASE ( 'rif' )
-                   IF ( k == 1 )  READ ( 13 )  tmp_2d
-                   rif(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp)  = &
-                                         tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
 
                 CASE ( 'rif_wall' )
Index: palm/trunk/SOURCE/read_var_list.f90
===================================================================
--- palm/trunk/SOURCE/read_var_list.f90	(revision 1690)
+++ palm/trunk/SOURCE/read_var_list.f90	(revision 1691)
@@ -14,10 +14,11 @@
 ! PALM. If not, see <http://www.gnu.org/licenses/>.
 !
-! Copyright 1997-2014 Leibniz Universitaet Hannover
+! Copyright 1997-2015 Leibniz Universitaet Hannover
 !--------------------------------------------------------------------------------!
 !
 ! Current revisions:
 ! ------------------
-! 
+! Added output of most_method, constant_flux_layer, zeta_min, zeta_max. Removed 
+! output of prandtl_layer and rif_min, rif_max.
 ! 
 ! Former revisions:
@@ -179,4 +180,5 @@
         ONLY:  statistic_regions, hom, hom_sum, pr_palm, u_max, u_max_ijk,     &
                v_max, v_max_ijk, w_max, w_max_ijk
+
 
     IMPLICIT NONE
@@ -356,4 +358,6 @@
           CASE ( 'conserve_volume_flow_mode' )
              READ ( 13 )  conserve_volume_flow_mode
+          CASE ( 'constant_flux_layer' )
+             READ ( 13 )  constant_flux_layer
           CASE ( 'coupling_start_time' )
              READ ( 13 )  coupling_start_time
@@ -460,4 +464,6 @@
           CASE ( 'momentum_advec' )
              READ ( 13 )  momentum_advec
+          CASE ( 'most_method' )
+             READ ( 13 )  most_method
           CASE ( 'nc_const' )
              READ ( 13 )  nc_const
@@ -494,6 +500,4 @@
           CASE ( 'phi' )
              READ ( 13 )  phi
-          CASE ( 'prandtl_layer' )
-             READ ( 13 )  prandtl_layer
           CASE ( 'prandtl_number' )
              READ ( 13 )  prandtl_number
@@ -552,8 +556,4 @@
           CASE ( 'residual_limit' )
              READ ( 13 )  residual_limit
-          CASE ( 'rif_max' )
-             READ ( 13 )  rif_max
-          CASE ( 'rif_min' )
-             READ ( 13 )  rif_min
           CASE ( 'roughness_length' )
              READ ( 13 )  roughness_length
@@ -714,4 +714,8 @@
           CASE ( 'w_max_ijk' )
              READ ( 13 )  w_max_ijk
+          CASE ( 'zeta_max' )
+             READ ( 13 )  zeta_max
+          CASE ( 'zeta_min' )
+             READ ( 13 )  zeta_min
           CASE ( 'z0h_factor' )
              READ ( 13 )  z0h_factor
Index: palm/trunk/SOURCE/sum_up_3d_data.f90
===================================================================
--- palm/trunk/SOURCE/sum_up_3d_data.f90	(revision 1690)
+++ palm/trunk/SOURCE/sum_up_3d_data.f90	(revision 1691)
@@ -14,10 +14,11 @@
 ! PALM. If not, see <http://www.gnu.org/licenses/>.
 !
-! Copyright 1997-2014 Leibniz Universitaet Hannover
+! Copyright 1997-2015 Leibniz Universitaet Hannover
 !--------------------------------------------------------------------------------!
 !
 ! Current revisions:
 ! -----------------
-! 
+! Added output of Obukhov length and radiative heating rates for RRTMG. 
+! Corrected output of LWC.
 ! 
 ! Former revisions:
@@ -84,9 +85,9 @@
 
     USE arrays_3d,                                                             &
-        ONLY:  dzw, e, nr, p, pt, q, qc, ql, ql_c, ql_v, qr, qsws, rho, sa,    &
+        ONLY:  dzw, e, nr, ol, p, pt, q, qc, ql, ql_c, ql_v, qr, qsws, rho, sa,&
                shf, ts, u, us, v, vpt, w, z0, z0h
 
     USE averaging,                                                             &
-        ONLY:  e_av, lpt_av, lwp_av, nr_av, p_av, pc_av, pr_av, prr_av,        &
+        ONLY:  e_av, lpt_av, lwp_av, nr_av, ol_av, p_av, pc_av, pr_av, prr_av, &
                precipitation_rate_av, pt_av, q_av, qc_av, ql_av, ql_c_av,      &
                ql_v_av, ql_vp_av, qr_av, qsws_av, qv_av, rho_av, s_av, sa_av,  &
@@ -97,5 +98,5 @@
 
     USE control_parameters,                                                    &
-        ONLY:  average_count_3d, cloud_physics, doav, doav_n
+        ONLY:  average_count_3d, cloud_physics, doav, doav_n, rho_surface
 
     USE cpulog,                                                                &
@@ -120,6 +121,9 @@
     USE radiation_model_mod,                                                   &
         ONLY:  rad_net, rad_net_av, rad_sw_in, rad_sw_in_av, rad_sw_out,       &
-               rad_sw_out_av, rad_lw_in, rad_lw_in_av, rad_lw_out,             &
-               rad_lw_out_av
+               rad_sw_out_av, rad_sw_cs_hr, rad_sw_cs_hr_av, rad_sw_hr,        &
+               rad_sw_hr_av, rad_lw_in, rad_lw_in_av, rad_lw_out,              &
+               rad_lw_out_av, rad_lw_cs_hr, rad_lw_cs_hr_av, rad_lw_hr,        &
+               rad_lw_hr_av
+
 
     IMPLICIT NONE
@@ -215,4 +219,10 @@
                 nr_av = 0.0_wp
 
+             CASE ( 'ol*' )
+                IF ( .NOT. ALLOCATED( ol_av ) )  THEN
+                   ALLOCATE( ol_av(nysg:nyng,nxlg:nxrg) )
+                ENDIF
+                ol_av = 0.0_wp
+
              CASE ( 'p' )
                 IF ( .NOT. ALLOCATED( p_av ) )  THEN
@@ -347,4 +357,16 @@
                 rad_lw_out_av = 0.0_wp
 
+             CASE ( 'rad_lw_cs_hr' )
+                IF ( .NOT. ALLOCATED( rad_lw_cs_hr_av ) )  THEN
+                   ALLOCATE( rad_lw_cs_hr_av(nzb+1:nzt+1,nysg:nyng,nxlg:nxrg) )
+                ENDIF
+                rad_lw_cs_hr_av = 0.0_wp
+
+             CASE ( 'rad_lw_hr' )
+                IF ( .NOT. ALLOCATED( rad_lw_hr_av ) )  THEN
+                   ALLOCATE( rad_lw_hr_av(nzb+1:nzt+1,nysg:nyng,nxlg:nxrg) )
+                ENDIF
+                rad_lw_hr_av = 0.0_wp
+
              CASE ( 'rad_sw_in' )
                 IF ( .NOT. ALLOCATED( rad_sw_in_av ) )  THEN
@@ -359,4 +381,16 @@
                 rad_sw_out_av = 0.0_wp
 
+             CASE ( 'rad_sw_cs_hr' )
+                IF ( .NOT. ALLOCATED( rad_sw_cs_hr_av ) )  THEN
+                   ALLOCATE( rad_sw_cs_hr_av(nzb+1:nzt+1,nysg:nyng,nxlg:nxrg) )
+                ENDIF
+                rad_sw_cs_hr_av = 0.0_wp
+
+             CASE ( 'rad_sw_hr' )
+                IF ( .NOT. ALLOCATED( rad_sw_hr_av ) )  THEN
+                   ALLOCATE( rad_sw_hr_av(nzb+1:nzt+1,nysg:nyng,nxlg:nxrg) )
+                ENDIF
+                rad_sw_hr_av = 0.0_wp
+
              CASE ( 'rho' )
                 IF ( .NOT. ALLOCATED( rho_av ) )  THEN
@@ -530,6 +564,6 @@
              DO  i = nxlg, nxrg
                 DO  j = nysg, nyng
-                   lwp_av(j,i) = lwp_av(j,i) + SUM( ql(nzb:nzt,j,i) * &
-                                                    dzw(1:nzt+1) )
+                   lwp_av(j,i) = lwp_av(j,i) + SUM( ql(nzb:nzt,j,i)            &
+                                               * dzw(1:nzt+1) ) * rho_surface
                 ENDDO
              ENDDO
@@ -557,4 +591,11 @@
                       nr_av(k,j,i) = nr_av(k,j,i) + nr(k,j,i)
                    ENDDO
+                ENDDO
+             ENDDO
+
+          CASE ( 'ol*' )
+             DO  i = nxlg, nxrg
+                DO  j = nysg, nyng
+                   ol_av(j,i) = ol_av(j,i) + ol(j,i)
                 ENDDO
              ENDDO
@@ -777,4 +818,21 @@
              ENDDO
 
+          CASE ( 'rad_lw_cs_hr' )
+             DO  i = nxlg, nxrg
+                DO  j = nysg, nyng
+                   DO  k = nzb, nzt+1
+                      rad_lw_cs_hr_av(k,j,i) = rad_lw_cs_hr_av(k,j,i) + rad_lw_cs_hr(k,j,i)
+                   ENDDO
+                ENDDO
+             ENDDO
+
+          CASE ( 'rad_lw_hr' )
+             DO  i = nxlg, nxrg
+                DO  j = nysg, nyng
+                   DO  k = nzb, nzt+1
+                      rad_lw_hr_av(k,j,i) = rad_lw_hr_av(k,j,i) + rad_lw_hr(k,j,i)
+                   ENDDO
+                ENDDO
+             ENDDO
 
           CASE ( 'rad_sw_in' )
@@ -792,4 +850,22 @@
                    DO  k = nzb, nzt+1
                       rad_sw_out_av(k,j,i) = rad_sw_out_av(k,j,i) + rad_sw_out(k,j,i)
+                   ENDDO
+                ENDDO
+             ENDDO
+
+          CASE ( 'rad_sw_cs_hr' )
+             DO  i = nxlg, nxrg
+                DO  j = nysg, nyng
+                   DO  k = nzb, nzt+1
+                      rad_sw_cs_hr_av(k,j,i) = rad_sw_cs_hr_av(k,j,i) + rad_sw_cs_hr(k,j,i)
+                   ENDDO
+                ENDDO
+             ENDDO
+
+          CASE ( 'rad_sw_hr' )
+             DO  i = nxlg, nxrg
+                DO  j = nysg, nyng
+                   DO  k = nzb, nzt+1
+                      rad_sw_hr_av(k,j,i) = rad_sw_hr_av(k,j,i) + rad_sw_hr(k,j,i)
                    ENDDO
                 ENDDO
Index: palm/trunk/SOURCE/surface_layer_fluxes.f90
===================================================================
--- palm/trunk/SOURCE/surface_layer_fluxes.f90	(revision 1691)
+++ palm/trunk/SOURCE/surface_layer_fluxes.f90	(revision 1691)
@@ -0,0 +1,1093 @@
+!> @file surface_layer_fluxes.f90
+!--------------------------------------------------------------------------------!
+! This file is part of PALM.
+!
+! PALM is free software: you can redistribute it and/or modify it under the terms
+! of the GNU General Public License as published by the Free Software Foundation,
+! either version 3 of the License, or (at your option) any later version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2015 Leibniz Universitaet Hannover
+!
+!--------------------------------------------------------------------------------!
+! Current revisions:
+! -----------------
+! Modularized and completely re-written version of prandtl_fluxes.f90. In the
+! course of the re-writing two additional methods have been implemented. See
+! updated description.
+!
+! Former revisions:
+! -----------------
+! $Id$
+!
+! 1551 2015-03-03 14:18:16Z maronga
+! Removed land surface model part. The surface fluxes are now always calculated
+! within prandtl_fluxes, based on the given surface temperature/humidity (which 
+! is either provided by the land surface model, by large scale forcing data, or
+! directly prescribed by the user.
+! 
+! 1496 2014-12-02 17:25:50Z maronga
+! Adapted for land surface model
+! 
+! 1494 2014-11-21 17:14:03Z maronga
+! Bugfixes: qs is now calculated before calculation of Rif. calculation of
+! buoyancy flux in Rif corrected (added missing humidity term), allow use of 
+! topography for coupled runs (not tested)
+! 
+! 1361 2014-04-16 15:17:48Z hoffmann
+! Bugfix: calculation of turbulent fluxes of rain water content (qrsws) and rain 
+! drop concentration (nrsws) added
+! 
+! 1340 2014-03-25 19:45:13Z kanani
+! REAL constants defined as wp-kind
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! 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
+!
+! 1276 2014-01-15 13:40:41Z heinze
+! Use LSF_DATA also in case of Dirichlet bottom boundary condition for scalars
+!
+! 1257 2013-11-08 15:18:40Z raasch
+! openACC "kernels do" replaced by "kernels loop", "loop independent" added
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 1015 2012-09-27 09:23:24Z raasch
+! OpenACC statements added
+!
+! 978 2012-08-09 08:28:32Z fricke
+! roughness length for scalar quantities z0h added
+!
+! Revision 1.1  1998/01/23 10:06:06  raasch
+! Initial revision
+!
+!
+! Description:
+! ------------
+!> Diagnostic computation of vertical fluxes in the constant flux layer from the
+!> values of the variables at grid point k=1. Three different methods are
+!> available:
+!> 1) the "old" version (most_method = 'circular') which is fast, but inaccurate
+!> 2) a Newton iteration method (most_method = 'newton'), which is accurate, but
+!>    slower
+!> 3) a method using a lookup table which is fast and accurate. Note, however,
+!>    that this method cannot be used in case of roughness heterogeneity
+!>
+!> @todo limiting of uv_total might be required is some cases
+!> @todo (re)move large_scale_forcing actions
+!> @todo check/optimize OpenMP and OpenACC directives
+!------------------------------------------------------------------------------!
+ MODULE surface_layer_fluxes_mod
+
+    USE arrays_3d,                                                             &
+        ONLY:  e, kh, nr, nrs, nrsws, ol, pt, q, ql, qr, qrs, qrsws, qs, qsws, &
+               shf, ts, u, us, usws, v, vpt, vsws, zu, zw, z0, z0h
+
+    USE cloud_parameters,                                                      &
+        ONLY:  l_d_cp, pt_d_t
+
+    USE constants,                                                             &
+        ONLY:  pi
+
+    USE cpulog
+
+    USE control_parameters,                                                    &
+        ONLY:  cloud_physics, constant_heatflux, constant_waterflux,           &
+               coupling_mode, g, humidity, ibc_e_b, ibc_pt_b, icloud_scheme,   &
+               initializing_actions, kappa, intermediate_timestep_count,       &
+               intermediate_timestep_count_max, large_scale_forcing, lsf_surf, &
+               message_string, most_method, neutral, passive_scalar,           &
+               precipitation, pt_surface, q_surface, run_coupled,              &
+               surface_pressure, simulated_time, terminate_run, zeta_max,      &
+               zeta_min 
+
+    USE indices,                                                               &
+        ONLY:  nxl, nxlg, nxr, nxrg, nys, nysg, nyn, nyng, nzb_s_inner,        &
+               nzb_u_inner, nzb_v_inner
+
+    USE kinds
+
+    USE pegrid
+
+    USE land_surface_model_mod,                                                &
+        ONLY:  land_surface, skip_time_do_lsm
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  i            !< loop index x direction
+    INTEGER(iwp) ::  j            !< loop index y direction
+    INTEGER(iwp) ::  k            !< loop indey z direction
+
+    INTEGER(iwp), PARAMETER     :: num_steps = 15000  !< number of steps in the lookup table
+
+    LOGICAL      ::  coupled_run  !< Flag for coupled atmosphere-ocean runs
+
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE :: pt1,      & !< Potential temperature at first grid level (required for cloud_physics = .T.)
+                                             qv1,      & !< Specific humidity at first grid level (required for cloud_physics = .T.)
+                                             uv_total    !< Total velocity at first grid level
+
+    REAL(wp), DIMENSION(0:num_steps-1) :: rib_tab,  & !< Lookup table bulk Richardson number
+                                          ol_tab      !< Lookup table values of L
+
+    REAL(wp)     ::  e_s,               & !< Saturation water vapor pressure
+                     l_bnd  = 7500,     & !< Lookup table index of the last time step
+                     ol_max = 1.0E6_wp, & !< Maximum Obukhov length
+                     rib_max,           & !< Maximum Richardson number in lookup table
+                     rib_min,           & !< Minimum Richardson number in lookup table
+                     z_mo                 !< Height of the constant flux layer where MOST is assumed
+
+
+    SAVE
+
+    PRIVATE
+
+    PUBLIC init_surface_layer_fluxes, surface_layer_fluxes
+
+    INTERFACE init_surface_layer_fluxes
+       MODULE PROCEDURE init_surface_layer_fluxes
+    END INTERFACE init_surface_layer_fluxes
+
+    INTERFACE surface_layer_fluxes
+       MODULE PROCEDURE surface_layer_fluxes
+    END INTERFACE surface_layer_fluxes
+
+
+ CONTAINS
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Main routine to compute the surface fluxes
+!------------------------------------------------------------------------------!
+    SUBROUTINE surface_layer_fluxes
+
+       IMPLICIT NONE
+
+!
+!--    In case cloud physics is used, it is required to derive potential
+!--    temperature and specific humidity at first grid level from the fields pt 
+!--    and q
+       IF ( cloud_physics )  THEN
+          CALL calc_pt_q
+       ENDIF
+
+!
+!--    First, calculate the new Obukhov length, then new friction velocity,
+!--    followed by the new scaling parameters (th*, q*, etc.), and the new
+!--    surface fluxes if required. The old routine ("circular") requires a 
+!--    different order of calls as the scaling parameters from the previous time
+!--    steps are used to calculate the Obukhov length
+
+!
+!--    Depending on setting of most_method use the "old" routine
+       IF ( most_method == 'circular' )  THEN
+
+          CALL calc_scaling_parameters
+
+          IF ( .NOT. neutral )  THEN
+             CALL calc_ol
+          ENDIF
+
+          CALL calc_us
+
+          CALL calc_surface_fluxes
+
+!
+!--    Use either Newton iteration or a lookup table for the bulk Richardson
+!--    number to calculate the Obukhov length 
+       ELSEIF ( most_method == 'newton' .OR. most_method == 'lookup' )  THEN
+
+          IF ( .NOT. neutral )  THEN
+             CALL calc_ol
+          ENDIF
+
+          CALL calc_us
+
+          CALL calc_scaling_parameters
+
+          CALL calc_surface_fluxes
+
+       ENDIF
+
+    END SUBROUTINE surface_layer_fluxes
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Initializing actions for the surface layer routine. Basically, this involves
+!> the preparation of a lookup table for the the bulk Richardson number vs 
+!> Obukhov length L when using the lookup table method.
+!------------------------------------------------------------------------------!
+    SUBROUTINE init_surface_layer_fluxes
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) :: l,          & !< Index for loop to create lookup table
+                       num_steps_n   !< Number of non-stretched zeta steps
+
+       LOGICAL :: terminate_run_l = .FALSE.    !< Flag to terminate run (global)
+
+       REAL(wp), PARAMETER ::  zeta_stretch = -10.0_wp !< Start of stretching in the free convection limit
+                               
+       REAL(wp), DIMENSION(:), ALLOCATABLE :: zeta_tmp
+
+
+       REAL(wp) :: zeta_step,            & !< Increment of zeta
+                   regr      = 1.01_wp,  & !< Stretching factor of zeta_step in the free convection limit
+                   regr_old  = 1.0E9_wp, & !< Stretching factor of last iteration step
+                   z0h_min   = 0.0_wp,   & !< Minimum value of z0h to create table
+                   z0_min    = 0.0_wp      !< Minimum value of z0 to create table
+!
+!--    When cloud physics is used, arrays for storing potential temperature and
+!--    specific humidity at first grid level are required
+       IF ( cloud_physics )  THEN
+          ALLOCATE ( pt1(nysg:nyng,nxlg:nxrg) )
+          ALLOCATE ( qv1(nysg:nyng,nxlg:nxrg) )
+       ENDIF
+
+!
+!--    Allocate field for storing the horizontal velocity
+       ALLOCATE ( uv_total(nysg:nyng,nxlg:nxrg) )
+
+       IF ( most_method == 'lookup' )  THEN
+
+!
+!--       Check for roughness heterogeneity. In that case terminate run and
+!--       inform user
+          IF ( MINVAL( z0h ) /= MAXVAL( z0h ) .OR.                             &
+               MINVAL( z0  ) /= MAXVAL( z0  ) )  THEN
+             terminate_run_l = .TRUE.
+          ENDIF
+
+#if defined( __parallel )
+!
+!--       Make a logical OR for all processes. Force termiation of model if result
+!--       is TRUE
+          IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
+          CALL MPI_ALLREDUCE( terminate_run_l, terminate_run, 1, MPI_LOGICAL,  &
+                              MPI_LOR, comm2d, ierr )
+#else
+          terminate_run = terminate_run_l
+#endif
+
+          IF ( terminate_run )  THEN
+             message_string = 'most_method = "lookup" cannot be used in ' //   &
+                              'combination with a prescribed roughness '  //   &
+                              'heterogeneity'
+             CALL message( 'surface_layer_fluxes', 'PA0417', 1, 2, 0, 6, 0 )
+          ENDIF
+
+          ALLOCATE(  zeta_tmp(0:num_steps-1) )
+
+!
+!--       Use the lowest possible value for z_mo
+          k    = MINVAL(nzb_s_inner)
+          z_mo = zu(k+1) - zw(k)
+
+!
+!--       Calculate z/L range from zeta_stretch to zeta_max using 90% of the
+!--       available steps (num_steps). The calculation is done with negative
+!--       values of zeta in order to simplify the stretching in the free
+!--       convection limit for the remaining 10% of steps.
+          zeta_tmp(0) = - zeta_max
+          num_steps_n = ( num_steps * 9 / 10 ) - 1
+          zeta_step   = (zeta_max - zeta_stretch) / REAL(num_steps_n)
+
+          DO l = 1, num_steps_n
+             zeta_tmp(l) = zeta_tmp(l-1) + zeta_step
+          ENDDO
+
+!
+!--       Calculate stretching factor for the free convection range
+          DO WHILE ( ABS( (regr-regr_old) / regr_old ) > 1.0E-10_wp )
+             regr_old = regr
+             regr = ( 1.0_wp - ( -zeta_min / zeta_step ) * ( 1.0_wp - regr )   &
+                    )**( 10.0_wp / REAL(num_steps) )
+          ENDDO
+
+!
+!--       Calculate z/L range from zeta_min to zeta_stretch
+          DO l = num_steps_n+1, num_steps-1
+             zeta_tmp(l) = zeta_tmp(l-1) + zeta_step
+             zeta_step = zeta_step * regr
+          ENDDO
+
+!
+!--       Invert array and switch sign, then calculate Obukhov length and bulk
+!--       Richardson number
+          z0h_min = MINVAL(z0h)
+          z0_min  = MINVAL(z0)
+          
+!
+!--       Calculate lookup table for the Richardson number versus Obukhov length
+!--       The Richardson number (rib) is defined depending on the choice of 
+!--       boundary conditions for temperature
+          IF ( ibc_pt_b == 1 )  THEN
+             DO l = 0, num_steps-1
+                ol_tab(l)  = - z_mo / zeta_tmp(num_steps-1-l)
+                rib_tab(l) = z_mo / ol_tab(l)  / ( LOG( z_mo / z0_min )        &
+                                                - psi_m( z_mo / ol_tab(l) )    &
+                                                + psi_m( z0_min / ol_tab(l) )  &
+                                                  )**3
+             ENDDO  
+          ELSE
+             DO l = 0, num_steps-1
+                ol_tab(l)  = - z_mo / zeta_tmp(num_steps-1-l)
+                rib_tab(l) = z_mo / ol_tab(l)  * ( LOG( z_mo / z0h_min )       &
+                                              - psi_h( z_mo / ol_tab(l) )      &
+                                              + psi_h( z0h_min / ol_tab(l) )   &
+                                            )                                  &
+                                          / ( LOG( z_mo / z0_min )             &
+                                              - psi_m( z_mo / ol_tab(l) )      &
+                                              + psi_m( z0_min / ol_tab(l) )    &
+                                            )**2
+             ENDDO
+          ENDIF
+
+!
+!--       Determine minimum values of rib in the lookup table. Set upper limit 
+!--       to critical Richardson number (0.25)
+          rib_min  = MINVAL(rib_tab)
+          rib_max  = 0.25 !MAXVAL(rib_tab)
+
+          DEALLOCATE( zeta_tmp )
+       ENDIF
+
+    END SUBROUTINE init_surface_layer_fluxes
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Calculate the Obukhov length (L) and Richardson flux number (z/L)
+!------------------------------------------------------------------------------!
+    SUBROUTINE calc_ol
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) :: iter,  & !< Newton iteration step
+                       l        !< look index
+
+       REAL(wp), DIMENSION(nysg:nyng,nxlg:nxrg) :: rib                
+                       
+       REAL(wp)     :: f,      & !< Function for Newton iteration: f = Ri - [...]/[...]^2 = 0
+                       f_d_ol, & !< Derivative of f
+                       ol_l,   & !< Lower bound of L for Newton iteration
+                       ol_m,   & !< Previous value of L for Newton iteration
+                       ol_old, & !< Previous time step value of L 
+                       ol_u,   & !< Upper bound of L for Newton iteration
+                       rib       !< Bulk Richardson number
+
+!
+!--    Compute the absolute value of the horizontal velocity (relative to the 
+!--    surface). This is required by all methods
+       !$OMP PARALLEL DO PRIVATE( k, z_mo )
+       !$acc kernels loop
+       DO  i = nxl, nxr
+          DO  j = nys, nyn
+
+             k   = nzb_s_inner(j,i)
+
+             uv_total(j,i) = SQRT( ( 0.5_wp * ( u(k+1,j,i) + u(k+1,j,i+1)      &
+                                         - u(k,j,i)   - u(k,j,i+1) ) )**2 +    &
+                              ( 0.5_wp * ( v(k+1,j,i) + v(k+1,j+1,i)           &
+                                         - v(k,j,i)   - v(k,j+1,i) ) )**2 )
+
+!
+!--          For too small values of the local wind, MOST does not work. A
+!--          threshold value is thus set if required
+!            uv_total(j,i) = MAX(0.01_wp,uv_total(j,i))
+
+          ENDDO
+       ENDDO
+
+!
+!--    Values of uv_total need to be exchanged at the ghost boundaries
+       !$acc update host( uv_total )
+       CALL exchange_horiz_2d( uv_total )
+       !$acc update device( uv_total )
+
+       IF ( TRIM( most_method ) /= 'circular' )  THEN
+      
+          !$OMP PARALLEL DO PRIVATE( k, z_mo )
+          !$acc kernels loop
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+
+                k   = nzb_s_inner(j,i)
+                z_mo = zu(k+1) - zw(k)
+
+!
+!--             Evaluate bulk Richardson number (calculation depends on
+!--             definition based on setting of boundary conditions
+                IF ( ibc_pt_b /= 1 )  THEN
+                   IF ( humidity )  THEN
+                      rib(j,i) = g * z_mo * ( vpt(k+1,j,i) - vpt(k,j,i) )      &
+                           / ( uv_total(j,i)**2 * vpt(k+1,j,i) )
+                   ELSE
+                      rib(j,i) = g * z_mo * ( pt(k+1,j,i) - pt(k,j,i) )        &
+                           / ( uv_total(j,i)**2 * pt(k+1,j,i) )
+                   ENDIF      
+                ELSE
+!
+!--                When using Neumann boundary conditions, the buoyancy flux
+!--                is required but cannot be calculated at the surface, as pt
+!--                and q are not known at the surface. Hence the values at 
+!--                first grid level are used to estimate the buoyancy flux
+                   IF ( humidity )  THEN
+                      rib(j,i) = - g * z_mo * ( ( 1.0_wp + 0.61_wp             &
+                                 * q(k+1,j,i) ) * shf(j,i) + 0.61_wp           &
+                                 * pt(k+1,j,i) * qsws(j,i) )   &
+                                 / ( uv_total(j,i)**3 * vpt(k+1,j,i) * kappa**2 )
+                   ELSE
+                      rib(j,i) = - g * z_mo * shf(j,i)                         &
+                           / ( uv_total(j,i)**3 * pt(k+1,j,i) * kappa**2 )
+                   ENDIF
+                ENDIF  
+     
+             ENDDO
+          ENDDO 
+
+       ENDIF
+
+!
+!--    Calculate the Obukhov length either using a Newton iteration
+!--    method, via a lookup table, or using the old circular way
+       IF ( TRIM( most_method ) == 'newton' )  THEN
+
+          !$OMP PARALLEL DO PRIVATE( k, z_mo )
+          !$acc kernels loop
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+
+                k   = nzb_s_inner(j,i)
+                z_mo = zu(k+1) - zw(k)
+
+!
+!--             Store current value in case the Newton iteration fails
+                ol_old = ol(j,i)
+
+!
+!--             Ensure that the bulk Richardson number and the Obukhov 
+!--             lengtH have the same sign
+                IF ( rib(j,i) * ol(j,i) < 0.0_wp .OR.                        &
+                     ABS( ol(j,i) ) == ol_max )  THEN
+                   IF ( rib(j,i) > 0.0_wp ) ol(j,i) =  0.01_wp
+                   IF ( rib(j,i) < 0.0_wp ) ol(j,i) = -0.01_wp
+                ENDIF
+!
+!--             Iteration to find Obukhov length
+                iter = 0
+                DO
+                   iter = iter + 1
+!
+!--                In case of divergence, use the value of the previous time step
+                   IF ( iter > 1000 )  THEN
+                      ol(j,i) = ol_old
+                      EXIT
+                   ENDIF
+
+                   ol_m = ol(j,i)
+                   ol_l = ol_m - 0.001_wp * ol_m
+                   ol_u = ol_m + 0.001_wp * ol_m
+
+
+                   IF ( ibc_pt_b /= 1 )  THEN
+!
+!--                   Calculate f = Ri - [...]/[...]^2 = 0
+                      f = rib(j,i) - ( z_mo / ol_m ) * ( LOG( z_mo / z0h(j,i) )&
+                                                    - psi_h( z_mo / ol_m )     &
+                                                    + psi_h( z0h(j,i) / ol_m ) &
+                                                   )                           &
+                                                 / ( LOG( z_mo / z0(j,i) )     &
+                                                    - psi_m( z_mo / ol_m )     &
+                                                    + psi_m( z0(j,i) / ol_m )  &
+                                                    )**2
+
+!
+!--                    Calculate df/dL
+                       f_d_ol = ( - ( z_mo / ol_u ) * ( LOG( z_mo / z0h(j,i) ) &
+                                                   - psi_h( z_mo / ol_u )      &
+                                                   + psi_h( z0h(j,i) / ol_u )  &
+                                                 )                             &
+                                               / ( LOG( z_mo / z0(j,i) )       &
+                                                   - psi_m( z_mo / ol_u )      &
+                                                   + psi_m( z0(j,i) / ol_u )   &
+                                                 )**2                          &
+                              + ( z_mo / ol_l ) * ( LOG( z_mo / z0h(j,i) )     &
+                                                   - psi_h( z_mo / ol_l )      &
+                                                   + psi_h( z0h(j,i) / ol_l )  &
+                                                 )                             &
+                                               / ( LOG( z_mo / z0(j,i) )       &
+                                                   - psi_m( z_mo / ol_l )      &
+                                                   + psi_m( z0(j,i) / ol_l )   &
+                                                 )**2                          &
+                                ) / ( ol_u - ol_l )
+                   ELSE
+!
+!--                   Calculate f = Ri - 1 /[...]^3 = 0
+                      f = rib(j,i) - ( z_mo / ol_m ) / ( LOG( z_mo / z0(j,i) )&
+                                                    - psi_m( z_mo / ol_m )    &
+                                                    + psi_m( z0(j,i) / ol_m ) &
+                                                       )**3
+
+!
+!--                   Calculate df/dL
+                      f_d_ol = ( - ( z_mo / ol_u ) / ( LOG( z_mo / z0(j,i) )  &
+                                                   - psi_m( z_mo / ol_u )     &
+                                                   + psi_m( z0(j,i) / ol_u )  &
+                                                 )**3                         &
+                              + ( z_mo / ol_l ) / ( LOG( z_mo / z0(j,i) )     &
+                                                   - psi_m( z_mo / ol_l )     &
+                                                   + psi_m( z0(j,i) / ol_l )  &
+                                                 )**3                         &
+                                     ) / ( ol_u - ol_l )
+                   ENDIF
+!
+!--                Calculate new L
+                   ol(j,i) = ol_m - f / f_d_ol
+
+!
+!--                Ensure that the bulk Richardson number and the Obukhov 
+!--                length have the same sign and ensure convergence.
+                   IF ( ol(j,i) * ol_m < 0.0_wp )  ol(j,i) = ol_m * 0.5_wp
+
+!
+!--                If unrealistic value occurs, set L to the maximum
+!--                value that is allowed
+                   IF ( ABS( ol(j,i) ) > ol_max )  THEN
+                      ol(j,i) = ol_max
+                      EXIT
+                   ENDIF
+!
+!--                Check for convergence
+                   IF ( ABS( ( ol(j,i) - ol_m ) / ol(j,i) ) < 1.0E-4_wp )  THEN
+                      EXIT
+                   ELSE
+                      CYCLE
+                   ENDIF
+
+                ENDDO
+                       
+             ENDDO
+          ENDDO
+
+       ELSEIF ( TRIM( most_method ) == 'lookup' )  THEN
+
+          !$OMP PARALLEL DO PRIVATE( k, z_mo )
+          !$acc kernels loop
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+
+                k   = nzb_s_inner(j,i)
+
+!
+!--             If the bulk Richardson number is outside the range of the lookup
+!--             table, set it to the exceeding threshold value
+                IF ( rib(j,i) < rib_min )  rib(j,i) = rib_min
+                IF ( rib(j,i) > rib_max )  rib(j,i) = rib_max
+
+!
+!--             Find the correct index bounds for linear interpolation. As the
+!--             Richardson number will not differ very much from time step to
+!--             time step , use the index from the last step and search in the 
+!--             correct direction
+                l = l_bnd
+                IF ( rib_tab(l) - rib(j,i) > 0.0_wp )  THEN
+                   DO WHILE ( rib_tab(l-1) - rib(j,i) > 0.0_wp .AND. l > 0 )
+                      l = l-1
+                   ENDDO
+                ELSE
+                   DO WHILE ( rib_tab(l) - rib(j,i) < 0.0_wp                &
+                              .AND. l < num_steps-1 )
+                      l = l+1
+                   ENDDO
+                ENDIF
+                l_bnd = l
+
+!
+!--             Linear interpolation to find the correct value of z/L
+                ol(j,i) = ( ol_tab(l-1) + ( ol_tab(l) - ol_tab(l-1) )       &
+                            / (  rib_tab(l) - rib_tab(l-1) )                &
+                            * ( rib(j,i) - rib_tab(l-1) ) )
+
+             ENDDO
+          ENDDO
+
+       ELSEIF ( TRIM( most_method ) == 'circular' )  THEN
+
+          !$OMP PARALLEL DO PRIVATE( k, z_mo )
+          !$acc kernels loop
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+
+                k   = nzb_s_inner(j,i)
+                z_mo = zu(k+1) - zw(k)
+
+                IF ( .NOT. humidity )  THEN
+                   ol(j,i) =  ( pt(k+1,j,i) *  us(j,i)**2 ) / ( kappa * g      &
+                              * ts(j,i) + 1E-30_wp )
+                ELSEIF ( cloud_physics )  THEN
+
+                   ol(j,i) =  ( vpt(k+1,j,i) * us(j,i)**2 ) / ( kappa * g      &
+                              * ( ts(j,i) + 0.61_wp * pt1(j,i) * qs(j,i)       &
+                              + 0.61_wp * qv1(j,i) * ts(j,i) - ts(j,i)         &
+                              * ql(k+1,j,i) ) + 1E-30_wp )
+                ELSE
+                   ol(j,i) =  ( vpt(k+1,j,i) *  us(j,i)**2 ) / ( kappa * g     &
+                              * ( ts(j,i) + 0.61_wp * pt(k+1,j,i) * qs(j,i)    &
+                                  + 0.61_wp * q(k+1,j,i) * ts(j,i) ) + 1E-30_wp )
+                ENDIF
+!
+!--             Limit the value range of the Obukhov length.
+!--             This is necessary for very small velocities (u,v --> 0), because
+!--             the absolute value of ol can then become very small, which in
+!--             consequence would result in very large shear stresses and very
+!--             small momentum fluxes (both are generally unrealistic).
+                IF ( ( z_mo / ol(j,i) ) < zeta_min )  ol(j,i) = z_mo / zeta_min
+                IF ( ( z_mo / ol(j,i) ) > zeta_max )  ol(j,i) = z_mo / zeta_max
+
+             ENDDO
+          ENDDO
+
+       ENDIF
+
+!
+!--    Values of ol at ghost point locations are needed for the evaluation
+!--    of usws and vsws.
+       !$acc update host( ol )
+       CALL exchange_horiz_2d( ol )
+       !$acc update device( ol )
+
+    END SUBROUTINE calc_ol
+
+!
+!-- Calculate friction velocity u*
+    SUBROUTINE calc_us
+
+       IMPLICIT NONE
+
+       DO  i = nxlg, nxrg
+          DO  j = nysg, nyng
+
+             k   = nzb_s_inner(j,i)+1
+             z_mo = zu(k+1) - zw(k)
+
+!
+!--          Compute u* at the scalars' grid points
+             !$OMP PARALLEL DO PRIVATE( a, b, k, uv_total, z_mo )
+             !$acc kernels loop
+             us(j,i) = kappa * uv_total(j,i) / ( LOG( z_mo / z0(j,i) )         &
+                                          - psi_m( z_mo / ol(j,i) )            &
+                                          + psi_m( z0(j,i) / ol(j,i) ) )
+          ENDDO
+       ENDDO
+
+    END SUBROUTINE calc_us
+
+!
+!-- Calculate potential temperature and specific humidity at first grid level
+    SUBROUTINE calc_pt_q
+
+       IMPLICIT NONE
+
+       DO  i = nxlg, nxrg
+          DO  j = nysg, nyng
+             k   = nzb_s_inner(j,i)+1
+             pt1(j,i) = pt(k,j,i) + l_d_cp * pt_d_t(k) * ql(k,j,i)
+             qv1(j,i) = q(k,j,i) - ql(k,j,i)
+          ENDDO
+       ENDDO
+
+    END SUBROUTINE calc_pt_q
+
+!
+!-- Calculate the other MOST scaling parameters theta*, q*, (qr*, nr*)
+    SUBROUTINE calc_scaling_parameters
+
+       IMPLICIT NONE
+
+!
+!--    Data information for accelerators
+       !$acc data present( e, nrsws, nzb_u_inner, nzb_v_inner, nzb_s_inner, pt )  &
+       !$acc      present( q, qs, qsws, qrsws, shf, ts, u, us, usws, v )     &
+       !$acc      present( vpt, vsws, zu, zw, z0, z0h )
+! 
+!--    Compute theta*
+       IF ( constant_heatflux )  THEN
+
+!
+!--       For a given heat flux in the surface layer:
+          !$OMP PARALLEL DO
+          !$acc kernels loop
+          DO  i = nxlg, nxrg
+             DO  j = nysg, nyng
+                ts(j,i) = -shf(j,i) / ( us(j,i) + 1E-30_wp )
+!
+!--             ts must be limited, because otherwise overflow may occur in case
+!--             of us=0 when computing ol further below
+                IF ( ts(j,i) < -1.05E5_wp )  ts(j,i) = -1.0E5_wp
+                IF ( ts(j,i) >   1.0E5_wp )  ts(j,i) =  1.0E5_wp
+             ENDDO
+          ENDDO
+
+       ELSE
+!
+!--       For a given surface temperature:
+          IF ( large_scale_forcing .AND. lsf_surf )  THEN
+             !$OMP PARALLEL DO
+             !$acc kernels loop
+             DO  i = nxlg, nxrg
+                DO  j = nysg, nyng
+                   k = nzb_s_inner(j,i)
+                   pt(k,j,i) = pt_surface
+                ENDDO
+             ENDDO
+          ENDIF
+
+          !$OMP PARALLEL DO PRIVATE( a, b, k, z_mo )
+          !$acc kernels loop
+          DO  i = nxlg, nxrg
+             DO  j = nysg, nyng
+
+                k   = nzb_s_inner(j,i)
+                z_mo = zu(k+1) - zw(k)
+
+                IF ( cloud_physics )  THEN
+                   ts(j,i) = kappa * ( pt1(j,i) - pt(k,j,i) )                  &
+                                     / ( LOG( z_mo / z0h(j,i) )                &
+                                         - psi_h( z_mo / ol(j,i) )             &
+                                         + psi_h( z0h(j,i) / ol(j,i) ) )
+                ELSE
+                   ts(j,i) = kappa * ( pt(k+1,j,i) - pt(k,j,i) )               &
+                                     / ( LOG( z_mo / z0h(j,i) )                &
+                                         - psi_h( z_mo / ol(j,i) )             &
+                                         + psi_h( z0h(j,i) / ol(j,i) ) )
+                ENDIF
+
+             ENDDO
+          ENDDO
+       ENDIF
+
+!
+!--    If required compute q*
+       IF ( humidity  .OR.  passive_scalar )  THEN
+          IF ( constant_waterflux )  THEN
+!
+!--          For a given water flux in the Prandtl layer:
+             !$OMP PARALLEL DO
+             !$acc kernels loop
+             DO  i = nxlg, nxrg
+                DO  j = nysg, nyng
+                   qs(j,i) = -qsws(j,i) / ( us(j,i) + 1E-30_wp )
+                ENDDO
+             ENDDO
+
+          ELSE
+             coupled_run = ( coupling_mode == 'atmosphere_to_ocean' .AND.      &
+                             run_coupled )
+
+             IF ( large_scale_forcing .AND. lsf_surf )  THEN
+                !$OMP PARALLEL DO
+                !$acc kernels loop
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      k = nzb_s_inner(j,i)
+                      q(k,j,i) = q_surface
+                   ENDDO
+                ENDDO
+             ENDIF
+
+             !$OMP PARALLEL DO PRIVATE( a, b, k, z_mo )
+             !$acc kernels loop independent
+             DO  i = nxlg, nxrg
+                !$acc loop independent
+                DO  j = nysg, nyng
+
+                   k   = nzb_s_inner(j,i)
+                   z_mo = zu(k+1) - zw(k)
+
+!
+!--                Assume saturation for atmosphere coupled to ocean (but not
+!--                in case of precursor runs)
+                   IF ( coupled_run )  THEN
+                      e_s = 6.1_wp * &
+                              EXP( 0.07_wp * ( MIN(pt(k,j,i),pt(k+1,j,i))      &
+                                               - 273.15_wp ) )
+                      q(k,j,i) = 0.622_wp * e_s / ( surface_pressure - e_s )
+                   ENDIF
+
+                   IF ( cloud_physics )  THEN
+                      qs(j,i) = kappa * ( qv1(j,i) - q(k,j,i) )                &
+                                        / ( LOG( z_mo / z0h(j,i) )             &
+                                            - psi_h( z_mo / ol(j,i) )          &
+                                            + psi_h( z0h(j,i) / ol(j,i) ) )
+
+                   ELSE
+                      qs(j,i) = kappa * ( q(k+1,j,i) - q(k,j,i) )              &
+                                        / ( LOG( z_mo / z0h(j,i) )             &
+                                            - psi_h( z_mo / ol(j,i) )          &
+                                            + psi_h( z0h(j,i) / ol(j,i) ) )
+                   ENDIF
+
+                ENDDO
+             ENDDO
+          ENDIF
+       ENDIF
+
+
+!
+!--    If required compute qr* and nr*
+       IF ( cloud_physics .AND. icloud_scheme == 0 .AND. precipitation )  THEN
+
+          !$OMP PARALLEL DO PRIVATE( a, b, k, z_mo )
+          !$acc kernels loop independent
+          DO  i = nxlg, nxrg
+             !$acc loop independent
+             DO  j = nysg, nyng
+
+                k   = nzb_s_inner(j,i)
+                z_mo = zu(k+1) - zw(k)
+
+                   qrs(j,i) = kappa * ( qr(k+1,j,i) - qr(k,j,i) )              &
+                                     / ( LOG( z_mo / z0h(j,i) )                &
+                                         - psi_h( z_mo / ol(j,i) )             &
+                                         + psi_h( z0h(j,i) / ol(j,i) ) )
+
+                   nrs(j,i) = kappa * ( nr(k+1,j,i) - nr(k,j,i) )              &
+                                     / ( LOG( z_mo / z0h(j,i) )                &
+                                         - psi_h( z_mo / ol(j,i) )             &
+                                         + psi_h( z0h(j,i) / ol(j,i) ) )
+             ENDDO
+          ENDDO
+
+       ENDIF
+
+    END SUBROUTINE calc_scaling_parameters
+
+
+
+!
+!-- Calculate surface fluxes usws, vsws, shf, qsws, (qrsws, nrsws)
+    SUBROUTINE calc_surface_fluxes
+
+       IMPLICIT NONE
+
+       REAL(wp) :: ol_mid !< Grid-interpolated L
+
+!
+!--    Compute u'w' for the total model domain.
+!--    First compute the corresponding component of u* and square it.
+       !$OMP PARALLEL DO PRIVATE( k, ol_mid, z_mo )
+       !$acc kernels loop
+       DO  i = nxl, nxr
+          DO  j = nys, nyn
+
+             k   = nzb_u_inner(j,i)
+             z_mo = zu(k+1) - zw(k)
+!
+!--          Compute bulk Obukhov length for this point
+             ol_mid = 0.5_wp * ( ol(j,i-1) + ol(j,i) )
+
+             IF ( ol_mid == 0.0_wp )  THEN
+                ol_mid = MIN(ol(j,i-1), ol(j,i))
+             ENDIF
+
+             usws(j,i) = kappa * ( u(k+1,j,i) - u(k,j,i) )                     &
+                                 / ( LOG( z_mo / z0(j,i) )                     &
+                                     - psi_m( z_mo / ol_mid )                  &
+                                     + psi_m( z0(j,i) / ol_mid ) )
+
+             usws(j,i) = -usws(j,i) * 0.5_wp * ( us(j,i-1) + us(j,i) )
+          ENDDO
+       ENDDO
+
+!
+!--    Compute v'w' for the total model domain.
+!--    First compute the corresponding component of u* and square it.
+       !$OMP PARALLEL DO PRIVATE( k, ol_mid, z_mo )
+       !$acc kernels loop
+       DO  i = nxl, nxr
+          DO  j = nys, nyn
+
+             k   = nzb_v_inner(j,i)
+             z_mo = zu(k+1) - zw(k)
+!
+!--          Compute bulk Obukhov length for this point
+             ol_mid = 0.5_wp * ( ol(j-1,i) + ol(j,i) )
+
+             IF ( ol_mid == 0.0_wp )  THEN
+                ol_mid = MIN(ol(j-1,i), ol(j-1,i))
+             ENDIF
+
+             vsws(j,i) = kappa * ( v(k+1,j,i) - v(k,j,i) )                     &
+                                 / ( LOG( z_mo / z0(j,i) )                     &
+                                     - psi_m( z_mo / ol_mid )                  &
+                                     + psi_m( z0(j,i) / ol_mid ) )
+
+             vsws(j,i) = -vsws(j,i) * 0.5_wp * ( us(j,i-1) + us(j,i) )
+
+          ENDDO
+       ENDDO
+
+!
+!--    Exchange the boundaries for the momentum fluxes (is this still required?)
+       !$acc update host( usws, vsws )
+       CALL exchange_horiz_2d( usws )
+       CALL exchange_horiz_2d( vsws )
+       !$acc update device( usws, vsws )
+
+!
+!--    Compute the vertical kinematic heat flux
+       IF ( .NOT. constant_heatflux .AND. ( simulated_time <=                &
+            skip_time_do_lsm .OR. .NOT. land_surface ) )  THEN
+          !$OMP PARALLEL DO
+          !$acc kernels loop independent
+          DO  i = nxlg, nxrg
+             !$acc loop independent
+             DO  j = nysg, nyng
+                shf(j,i) = -ts(j,i) * us(j,i)
+             ENDDO
+          ENDDO
+
+       ENDIF
+
+!
+!-- Compute the vertical water/scalar flux
+       IF ( .NOT. constant_waterflux .AND. ( humidity .OR. passive_scalar )    &
+            .AND. ( simulated_time <= skip_time_do_lsm .OR. .NOT.            &
+            land_surface ) )  THEN
+          !$OMP PARALLEL DO
+          !$acc kernels loop independent
+          DO  i = nxlg, nxrg
+             !$acc loop independent
+             DO  j = nysg, nyng
+                qsws(j,i) = -qs(j,i) * us(j,i)
+             ENDDO
+          ENDDO
+
+       ENDIF
+
+!
+!--    Compute (turbulent) fluxes of rain water content and rain drop conc.
+       IF ( cloud_physics  .AND.  icloud_scheme == 0  .AND.                    &
+            precipitation )  THEN
+          !$OMP PARALLEL DO
+          !$acc kernels loop independent
+          DO  i = nxlg, nxrg
+             !$acc loop independent
+             DO  j = nysg, nyng
+                qrsws(j,i) = -qrs(j,i) * us(j,i)
+                nrsws(j,i) = -nrs(j,i) * us(j,i)
+             ENDDO
+          ENDDO
+       ENDIF
+
+!
+!--    Bottom boundary condition for the TKE
+       IF ( ibc_e_b == 2 )  THEN
+          !$OMP PARALLEL DO
+          !$acc kernels loop independent
+          DO  i = nxlg, nxrg
+             !$acc loop independent
+             DO  j = nysg, nyng
+                e(nzb_s_inner(j,i)+1,j,i) = ( us(j,i) / 0.1_wp )**2
+!
+!--             As a test: cm = 0.4
+!               e(nzb_s_inner(j,i)+1,j,i) = ( us(j,i) / 0.4_wp )**2
+                e(nzb_s_inner(j,i),j,i)   = e(nzb_s_inner(j,i)+1,j,i)
+             ENDDO
+          ENDDO
+       ENDIF
+       !$acc end data
+
+    END SUBROUTINE calc_surface_fluxes
+
+
+!
+!-- Integrated stability function for momentum
+    FUNCTION psi_m( zeta ) 
+       
+       USE kinds
+
+       IMPLICIT NONE 
+
+       REAL(wp)            :: psi_m !< Integrated similarity function result
+       REAL(wp)            :: zeta  !< Stability parameter z/L
+       REAL(wp)            :: x     !< dummy variable
+
+       REAL(wp), PARAMETER :: a = 1.0_wp            !< constant
+       REAL(wp), PARAMETER :: b = 0.66666666666_wp  !< constant
+       REAL(wp), PARAMETER :: c = 5.0_wp            !< constant
+       REAL(wp), PARAMETER :: d = 0.35_wp           !< constant
+       REAL(wp), PARAMETER :: c_d_d = c / d         !< constant
+       REAL(wp), PARAMETER :: bc_d_d = b * c / d    !< constant
+
+
+       IF ( zeta < 0.0_wp )  THEN
+          x = SQRT( SQRT(1.0_wp  - 16.0_wp * zeta ) )
+          psi_m = pi * 0.5_wp - 2.0_wp * ATAN( x ) + LOG( ( 1.0_wp + x )**2    &
+                  * ( 1.0_wp + x**2 ) * 0.125_wp )
+       ELSE
+
+          psi_m = - b * ( zeta - c_d_d ) * EXP( -d * zeta ) - a * zeta         &
+                   - bc_d_d
+!
+!--       Old version for stable conditions (only valid for z/L < 0.5)
+!--       psi_m = - 5.0_wp * zeta
+
+       ENDIF
+
+    END FUNCTION psi_m
+
+
+!
+!-- Integrated stability function for heat and moisture
+    FUNCTION psi_h( zeta ) 
+       
+       USE kinds
+
+       IMPLICIT NONE 
+
+       REAL(wp)            :: psi_h !< Integrated similarity function result
+       REAL(wp)            :: zeta  !< Stability parameter z/L
+       REAL(wp)            :: x     !< dummy variable
+
+       REAL(wp), PARAMETER :: a = 1.0_wp            !< constant
+       REAL(wp), PARAMETER :: b = 0.66666666666_wp  !< constant
+       REAL(wp), PARAMETER :: c = 5.0_wp            !< constant
+       REAL(wp), PARAMETER :: d = 0.35_wp           !< constant
+       REAL(wp), PARAMETER :: c_d_d = c / d         !< constant
+       REAL(wp), PARAMETER :: bc_d_d = b * c / d    !< constant
+
+
+       IF ( zeta < 0.0_wp )  THEN
+          x = SQRT(1.0_wp  - 16.0_wp * zeta )
+          psi_h = 2.0_wp * LOG( (1.0_wp + x ) / 2.0_wp )
+       ELSE
+          psi_h = - b * ( zeta - c_d_d ) * EXP( -d * zeta ) - (1.0_wp          &
+                  + 0.66666666666_wp * a * zeta )**1.5_wp - bc_d_d             &
+                  + 1.0_wp
+!
+!--       Old version for stable conditions (only valid for z/L < 0.5)
+!--       psi_h = - 5.0_wp * zeta
+       ENDIF
+
+    END FUNCTION psi_h
+
+ END MODULE surface_layer_fluxes_mod
Index: palm/trunk/SOURCE/time_integration.f90
===================================================================
--- palm/trunk/SOURCE/time_integration.f90	(revision 1690)
+++ palm/trunk/SOURCE/time_integration.f90	(revision 1691)
@@ -14,10 +14,11 @@
 ! PALM. If not, see <http://www.gnu.org/licenses/>.
 !
-! Copyright 1997-2014 Leibniz Universitaet Hannover
+! Copyright 1997-2015 Leibniz Universitaet Hannover
 !--------------------------------------------------------------------------------!
 !
 ! Current revisions:
 ! ------------------
-! 
+! Added option for spin-ups without land surface and radiation models. Moved calls
+! for radiation and lan surface schemes.
 ! 
 ! Former revisions:
@@ -170,11 +171,11 @@
                averaging_interval_sp, bc_lr_cyc, bc_ns_cyc, bc_pt_t_val,       &
                bc_q_t_val, call_psolver_at_all_substeps, cloud_droplets,       &
-               cloud_physics, constant_heatflux, create_disturbances, dopr_n,  &
-               constant_diffusion, coupling_mode, coupling_start_time,         &
-               current_timestep_number, disturbance_created,                   &
-               disturbance_energy_limit, dist_range, do_sum, dt_3d,            &
-               dt_averaging_input, dt_averaging_input_pr, dt_coupling,         &
-               dt_data_output_av, dt_disturb, dt_do2d_xy, dt_do2d_xz,          &
-               dt_do2d_yz, dt_do3d, dt_domask,dt_dopts, dt_dopr,               &
+               cloud_physics, constant_flux_layer, constant_heatflux,          &
+               create_disturbances, dopr_n, constant_diffusion, coupling_mode, &
+               coupling_start_time, current_timestep_number,                   &
+               disturbance_created, disturbance_energy_limit, dist_range,      &
+               do_sum, dt_3d, dt_averaging_input, dt_averaging_input_pr,       &
+               dt_coupling, dt_data_output_av, dt_disturb, dt_do2d_xy,         &
+               dt_do2d_xz, dt_do2d_yz, dt_do3d, dt_domask,dt_dopts, dt_dopr,   &
                dt_dopr_listing, dt_dosp, dt_dots, dt_dvrp, dt_run_control,     &
                end_time, first_call_lpm, galilei_transformation, humidity,     &
@@ -183,5 +184,5 @@
                loop_optimization, lsf_surf, lsf_vert, masks, mid,              &
                netcdf_data_format, neutral, nr_timesteps_this_run, nudging,    &
-               ocean, on_device, passive_scalar, prandtl_layer, precipitation, &
+               ocean, on_device, passive_scalar, precipitation,                &
                prho_reference, pt_reference, pt_slope_offset, random_heatflux, &
                run_coupled, simulated_time, simulated_time_chr,                &
@@ -213,5 +214,6 @@
 
     USE land_surface_model_mod,                                                &
-        ONLY:  land_surface, lsm_energy_balance, lsm_soil_model
+        ONLY:  land_surface, lsm_energy_balance, lsm_soil_model,               &
+               skip_time_do_lsm
 
     USE ls_forcing_mod,                                                        &
@@ -238,9 +240,13 @@
 
     USE radiation_model_mod,                                                   &
-        ONLY: dt_radiation, radiation, radiation_clearsky,                     &
-              radiation_rrtmg, radiation_scheme, time_radiation
+        ONLY: dt_radiation, force_radiation_call, radiation,                   &
+              radiation_clearsky, radiation_rrtmg, radiation_scheme,           &
+              skip_time_do_radiation, time_radiation
 
     USE statistics,                                                            &
         ONLY:  flow_statistics_called, hom, pr_palm, sums_ls_l
+
+    USE surface_layer_fluxes_mod,                                              &
+        ONLY:  surface_layer_fluxes
 
     USE user_actions_mod,                                                      &
@@ -374,23 +380,4 @@
           ENDIF
 
-          IF ( radiation .AND. intermediate_timestep_count                     &
-               == intermediate_timestep_count_max  )  THEN
-
-               time_radiation = time_radiation + dt_3d
-
-             IF ( time_radiation >= dt_radiation )  THEN
-
-                CALL cpu_log( log_point(50), 'radiation', 'start' )
-
-                time_radiation = time_radiation - dt_radiation
-                IF ( radiation_scheme == 'clear-sky' )  THEN
-                   CALL radiation_clearsky
-                ELSEIF ( radiation_scheme == 'rrtmg' )  THEN
-                   CALL radiation_rrtmg
-                ENDIF
-
-                CALL cpu_log( log_point(50), 'radiation', 'stop' )
-             ENDIF
-          ENDIF
 !
 !--       Solve the prognostic equations. A fast cache optimized version with
@@ -631,19 +618,4 @@
 !--       velocities at the outflow in case of a non-cyclic lateral wall)
           CALL boundary_conds
-
-!
-!--       When using the land surface model: 
-!--       1) solve energy balance equation to calculate new skin temperature
-!--       2) run soil model 
-          IF ( land_surface )  THEN
-
-             CALL cpu_log( log_point(54), 'land_surface', 'start' )
-
-             CALL lsm_energy_balance
-             CALL lsm_soil_model
-
-             CALL cpu_log( log_point(54), 'land_surface', 'stop' )
-
-          ENDIF
 
 !
@@ -731,11 +703,21 @@
 
 !
-!--          First the vertical fluxes in the Prandtl layer are being computed
-             IF ( prandtl_layer )  THEN
-                CALL cpu_log( log_point(19), 'prandtl_fluxes', 'start' )
-                CALL prandtl_fluxes
-                CALL cpu_log( log_point(19), 'prandtl_fluxes', 'stop' )
-             ENDIF
-
+!--          First the vertical fluxes in the surface (constant flux) layer are computed
+             IF ( constant_flux_layer )  THEN
+                CALL cpu_log( log_point(19), 'surface_layer_fluxes', 'start' )
+                CALL surface_layer_fluxes
+                CALL cpu_log( log_point(19), 'surface_layer_fluxes', 'stop' )
+             ENDIF
+
+!
+!--          If required, solve the energy balance for the surface and run soil 
+!--          model
+             IF ( land_surface .AND. simulated_time > skip_time_do_lsm)  THEN
+
+                CALL cpu_log( log_point(54), 'land_surface', 'start' )
+                CALL lsm_energy_balance
+                CALL lsm_soil_model
+                CALL cpu_log( log_point(54), 'land_surface', 'stop' )
+             ENDIF
 !
 !--          Compute the diffusion coefficients
@@ -752,4 +734,34 @@
              CALL cpu_log( log_point(17), 'diffusivities', 'stop' )
 
+          ENDIF
+
+!
+!--       If required, calculate radiative fluxes and heating rates
+          IF ( radiation .AND. intermediate_timestep_count                     &
+               == intermediate_timestep_count_max .AND. simulated_time >    &
+               skip_time_do_radiation )  THEN
+
+               time_radiation = time_radiation + dt_3d
+
+             IF ( time_radiation >= dt_radiation .OR. force_radiation_call )   &
+             THEN
+
+                CALL cpu_log( log_point(50), 'radiation', 'start' )
+
+                IF ( .NOT. force_radiation_call )  THEN
+                   time_radiation = time_radiation - dt_radiation
+                ELSE
+                   WRITE(9,*) "Unscheduled radiation call at ", simulated_time
+                   CALL LOCAL_FLUSH ( 9 )
+                ENDIF
+
+                IF ( radiation_scheme == 'clear-sky' )  THEN
+                   CALL radiation_clearsky
+                ELSEIF ( radiation_scheme == 'rrtmg' )  THEN
+                   CALL radiation_rrtmg
+                ENDIF
+
+                CALL cpu_log( log_point(50), 'radiation', 'stop' )
+             ENDIF
           ENDIF
 
Index: palm/trunk/SOURCE/wall_fluxes.f90
===================================================================
--- palm/trunk/SOURCE/wall_fluxes.f90	(revision 1690)
+++ palm/trunk/SOURCE/wall_fluxes.f90	(revision 1691)
@@ -14,10 +14,10 @@
 ! PALM. If not, see <http://www.gnu.org/licenses/>.
 !
-! Copyright 1997-2014 Leibniz Universitaet Hannover
+! Copyright 1997-2015 Leibniz Universitaet Hannover
 !--------------------------------------------------------------------------------!
 !
 ! Current revisions:
 ! -----------------
-! 
+! Renamed rif_min and rif_max with zeta_min and zeta_max, respectively.
 ! 
 ! Former revisions:
@@ -69,4 +69,6 @@
 !> it gives slightly different results from the ij-version for some unknown
 !> reason.
+!>
+!> @todo Rename rif to zeta throughout the routine
 !------------------------------------------------------------------------------!
  MODULE wall_fluxes_mod
@@ -107,5 +109,5 @@
        
        USE control_parameters,                                                 &
-           ONLY:  g, kappa, rif_max, rif_min
+           ONLY:  g, kappa, zeta_max, zeta_min
        
        USE grid_variables,                                                     &
@@ -234,6 +236,6 @@
 !--                shear stresses and very small momentum fluxes (both are
 !--                generally unrealistic).
-                   IF ( rifs < rif_min )  rifs = rif_min
-                   IF ( rifs > rif_max )  rifs = rif_max
+                   IF ( rifs < zeta_min )  rifs = zeta_min
+                   IF ( rifs > zeta_max )  rifs = zeta_max
 
 !
@@ -291,5 +293,5 @@
        
        USE control_parameters,                                                 &
-           ONLY:  g, kappa, rif_max, rif_min
+           ONLY:  g, kappa, zeta_max, zeta_min
        
        USE grid_variables,                                                     &
@@ -428,6 +430,6 @@
 !--                shear stresses and very small momentum fluxes (both are
 !--                generally unrealistic).
-                   IF ( rifs < rif_min )  rifs = rif_min
-                   IF ( rifs > rif_max )  rifs = rif_max
+                   IF ( rifs < zeta_min )  rifs = zeta_min
+                   IF ( rifs > zeta_max )  rifs = zeta_max
 
 !
@@ -485,5 +487,5 @@
        
        USE control_parameters,                                                 &
-           ONLY:  g, kappa, rif_max, rif_min
+           ONLY:  g, kappa, zeta_max, zeta_min
        
        USE grid_variables,                                                     &
@@ -596,6 +598,6 @@
 !--       consequence would result in very large shear stresses and very
 !--       small momentum fluxes (both are generally unrealistic).
-          IF ( rifs < rif_min )  rifs = rif_min
-          IF ( rifs > rif_max )  rifs = rif_max
+          IF ( rifs < zeta_min )  rifs = zeta_min
+          IF ( rifs > zeta_max )  rifs = zeta_max
 
 !
Index: palm/trunk/SOURCE/write_3d_binary.f90
===================================================================
--- palm/trunk/SOURCE/write_3d_binary.f90	(revision 1690)
+++ palm/trunk/SOURCE/write_3d_binary.f90	(revision 1691)
@@ -14,10 +14,11 @@
 ! PALM. If not, see <http://www.gnu.org/licenses/>.
 !
-! Copyright 1997-2014 Leibniz Universitaet Hannover
+! Copyright 1997-2015 Leibniz Universitaet Hannover
 !--------------------------------------------------------------------------------!
 !
 ! Current revisions:
 ! -----------------
-! 
+! Added output of radiative heating rates for RRTMG. Added output of ol. Removed
+! output of rif.
 ! 
 ! Former revisions:
@@ -79,6 +80,6 @@
 
     USE arrays_3d,                                                             &
-        ONLY:  e, kh, km, p, pt, q, ql, qc, nr, nrs, nrsws, nrswst, qr, qrs,   &
-               qrsws, qrswst, qs, qsws, qswst, sa, saswsb, saswst, rif,        &
+        ONLY:  e, kh, km, ol, p, pt, q, ql, qc, nr, nrs, nrsws, nrswst, qr,    &
+               qrs, qrsws, qrswst, qs, qsws, qswst, sa, saswsb, saswst,        &
                rif_wall, shf, ts, tswst, u, u_m_l, u_m_n, u_m_r, u_m_s, us,    &
                usws, uswst, v, v_m_l, v_m_n, v_m_r, v_m_s, vpt, vsws, vswst,   &
@@ -110,6 +111,8 @@
     USE radiation_model_mod,                                                   &
         ONLY: radiation, rad_net, rad_net_av, rad_lw_in, rad_lw_in_av,         &
-              rad_lw_out, rad_lw_out_av, rad_sw_in, rad_sw_in_av, rad_sw_out,  &
-              rad_sw_out_av
+              rad_lw_out, rad_lw_out_av, rad_lw_cs_hr, rad_lw_cs_hr_av,        &
+              rad_lw_hr, rad_lw_hr_av, rad_sw_in, rad_sw_in_av, rad_sw_out,    &
+              rad_sw_out_av, rad_sw_cs_hr, rad_sw_cs_hr_av, rad_sw_hr,         &
+              rad_sw_hr_av
 
     USE random_function_mod,                                                   &
@@ -190,4 +193,5 @@
        ENDIF
     ENDIF
+    WRITE ( 14 )  'ol                  ';  WRITE ( 14 )  ol
     WRITE ( 14 )  'p                   ';  WRITE ( 14 )  p
     IF ( ALLOCATED( p_av ) )  THEN
@@ -290,4 +294,16 @@
           WRITE ( 14 )  'rad_lw_out_av       ';  WRITE ( 14 )  rad_lw_out_av  
        ENDIF 
+       IF ( ALLOCATED( rad_lw_cs_hr ) )  THEN
+          WRITE ( 14 )  'rad_lw_cs_hr        ';  WRITE ( 14 )  rad_lw_cs_hr
+       ENDIF
+       IF ( ALLOCATED( rad_lw_cs_hr_av ) )  THEN
+          WRITE ( 14 )  'rad_lw_cs_hr_av     ';  WRITE ( 14 )  rad_lw_cs_hr_av
+       ENDIF
+       IF ( ALLOCATED( rad_lw_hr ) )  THEN
+          WRITE ( 14 )  'rad_lw_hr           ';  WRITE ( 14 )  rad_lw_hr
+       ENDIF
+       IF ( ALLOCATED( rad_lw_hr_av ) )  THEN
+          WRITE ( 14 )  'rad_lw_hr_av        ';  WRITE ( 14 )  rad_lw_hr_av
+       ENDIF
        IF ( ALLOCATED( rad_sw_in ) )  THEN
           WRITE ( 14 )  'rad_sw_in           ';  WRITE ( 14 )  rad_sw_in  
@@ -302,4 +318,16 @@
           WRITE ( 14 )  'rad_sw_out_av       ';  WRITE ( 14 )  rad_sw_out_av  
        ENDIF 
+       IF ( ALLOCATED( rad_sw_cs_hr ) )  THEN
+          WRITE ( 14 )  'rad_sw_cs_hr        ';  WRITE ( 14 )  rad_sw_cs_hr
+       ENDIF
+       IF ( ALLOCATED( rad_sw_cs_hr_av ) )  THEN
+          WRITE ( 14 )  'rad_sw_cs_hr_av     ';  WRITE ( 14 )  rad_sw_cs_hr_av
+       ENDIF
+       IF ( ALLOCATED( rad_sw_hr ) )  THEN
+          WRITE ( 14 )  'rad_sw_hr           ';  WRITE ( 14 )  rad_sw_hr
+       ENDIF
+       IF ( ALLOCATED( rad_sw_hr_av ) )  THEN
+          WRITE ( 14 )  'rad_sw_hr_av        ';  WRITE ( 14 )  rad_sw_hr_av
+       ENDIF
     ENDIF
     IF ( ocean )  THEN
@@ -338,5 +366,4 @@
                                            WRITE ( 14 )  seq_random_array
     ENDIF
-    WRITE ( 14 )  'rif                 ';  WRITE ( 14 )  rif
     IF ( topography /= 'flat' )  THEN
        WRITE ( 14 )  'rif_wall            ';  WRITE ( 14 )  rif_wall
Index: palm/trunk/SOURCE/write_var_list.f90
===================================================================
--- palm/trunk/SOURCE/write_var_list.f90	(revision 1690)
+++ palm/trunk/SOURCE/write_var_list.f90	(revision 1691)
@@ -14,10 +14,11 @@
 ! PALM. If not, see <http://www.gnu.org/licenses/>.
 !
-! Copyright 1997-2014 Leibniz Universitaet Hannover
+! Copyright 1997-2015 Leibniz Universitaet Hannover
 !--------------------------------------------------------------------------------!
 !
 ! Current revisions:
 ! -----------------
-! 
+! Added output of most_method, constant_flux_layer, zeta_min, zeta_max. Removed 
+! output of prandtl_layer and rif_min, rif_max.
 ! 
 ! Former revisions:
@@ -161,4 +162,5 @@
         ONLY:  statistic_regions, hom, hom_sum, u_max, u_max_ijk, v_max,       &
                v_max_ijk, w_max, w_max_ijk
+
     
     IMPLICIT NONE
@@ -167,5 +169,5 @@
 
 
-    binary_version = '3.9b'
+    binary_version = '4.0'
 
     WRITE ( 14 )  binary_version
@@ -273,4 +275,6 @@
     WRITE ( 14 )  conserve_volume_flow_mode
     WRITE ( 14 )  'coupling_start_time           '
+    WRITE ( 14 )  'constant_flux_layer           '
+    WRITE ( 14 )  constant_flux_layer
     WRITE ( 14 )  coupling_start_time
     WRITE ( 14 )  'current_timestep_number       '
@@ -374,4 +378,6 @@
     WRITE ( 14 )  'momentum_advec                '
     WRITE ( 14 )  momentum_advec
+    WRITE ( 14 )  'most_method                   '
+    WRITE ( 14 )  most_method
     WRITE ( 14 )  'nc_const                      '
     WRITE ( 14 )  nc_const
@@ -406,6 +412,4 @@
     WRITE ( 14 )  'phi                           '
     WRITE ( 14 )  phi
-    WRITE ( 14 )  'prandtl_layer                 '
-    WRITE ( 14 )  prandtl_layer
     WRITE ( 14 )  'prandtl_number                '
     WRITE ( 14 )  prandtl_number
@@ -462,8 +466,4 @@
     WRITE ( 14 )  'residual_limit                '
     WRITE ( 14 )  residual_limit
-    WRITE ( 14 )  'rif_max                       '
-    WRITE ( 14 )  rif_max
-    WRITE ( 14 )  'rif_min                       '
-    WRITE ( 14 )  rif_min
     WRITE ( 14 )  'roughness_length              '
     WRITE ( 14 )  roughness_length
@@ -624,4 +624,8 @@
     WRITE ( 14 )  'w_max_ijk                     '
     WRITE ( 14 )  w_max_ijk
+    WRITE ( 14 )  'zeta_max                      '
+    WRITE ( 14 )  zeta_max
+    WRITE ( 14 )  'zeta_min                      '
+    WRITE ( 14 )  zeta_min
     WRITE ( 14 )  'z0h_factor                    '
     WRITE ( 14 )  z0h_factor
