Index: /palm/trunk/SOURCE/average_3d_data.f90
===================================================================
--- /palm/trunk/SOURCE/average_3d_data.f90	(revision 770)
+++ /palm/trunk/SOURCE/average_3d_data.f90	(revision 771)
@@ -4,5 +4,5 @@
 ! Current revisions:
 ! -----------------
-!
+! +lpt_av
 ! Former revisions:
 ! -----------------
@@ -75,4 +75,13 @@
              ENDDO
 
+          CASE ( 'lpt' )
+             DO  i = nxlg, nxrg
+                DO  j = nysg, nyng
+                   DO  k = nzb, nzt+1
+                      lpt_av(k,j,i) = lpt_av(k,j,i) / REAL( average_count_3d )
+                   ENDDO
+                ENDDO
+             ENDDO
+
           CASE ( 'lwp*' )
              DO  i = nxlg, nxrg
Index: /palm/trunk/SOURCE/check_parameters.f90
===================================================================
--- /palm/trunk/SOURCE/check_parameters.f90	(revision 770)
+++ /palm/trunk/SOURCE/check_parameters.f90	(revision 771)
@@ -4,5 +4,5 @@
 ! Current revisions:
 ! -----------------
-! 
+! +lpt
 !
 ! Former revisions:
@@ -2563,4 +2563,12 @@
              unit = 'm2/s2'
 
+          CASE ( 'lpt' )
+             IF ( .NOT. cloud_physics )  THEN
+                message_string = 'output of "' // TRIM( var ) // '" requi' // &
+                         'res cloud_physics = .TRUE. or cloud_droplets = .TRUE.'
+                CALL message( 'check_parameters', 'PA0347', 1, 2, 0, 6, 0 )
+             ENDIF
+             unit = 'K'
+
           CASE ( 'pc', 'pr' )
              IF ( .NOT. particle_advection )  THEN
Index: /palm/trunk/SOURCE/data_output_2d.f90
===================================================================
--- /palm/trunk/SOURCE/data_output_2d.f90	(revision 770)
+++ /palm/trunk/SOURCE/data_output_2d.f90	(revision 771)
@@ -4,5 +4,5 @@
 ! Current revisions:
 ! -----------------
-! 
+! +lpt
 !
 ! Former revisions:
@@ -230,4 +230,12 @@
                 ELSE
                    to_be_resorted => e_av
+                ENDIF
+                IF ( mode == 'xy' )  level_z = zu
+
+             CASE ( 'lpt_xy', 'lpt_xz', 'lpt_yz' )
+                IF ( av == 0 )  THEN
+                   to_be_resorted => pt
+                ELSE
+                   to_be_resorted => lpt_av
                 ENDIF
                 IF ( mode == 'xy' )  level_z = zu
Index: /palm/trunk/SOURCE/data_output_3d.f90
===================================================================
--- /palm/trunk/SOURCE/data_output_3d.f90	(revision 770)
+++ /palm/trunk/SOURCE/data_output_3d.f90	(revision 771)
@@ -4,5 +4,5 @@
 ! Current revisions:
 ! -----------------
-! 
+! +lpt
 !
 ! Former revisions:
@@ -166,4 +166,11 @@
              ELSE
                 to_be_resorted => e_av
+             ENDIF
+
+          CASE ( 'lpt' )
+             IF ( av == 0 )  THEN
+                to_be_resorted => pt
+             ELSE
+                to_be_resorted => lpt_av
              ENDIF
 
Index: /palm/trunk/SOURCE/data_output_mask.f90
===================================================================
--- /palm/trunk/SOURCE/data_output_mask.f90	(revision 770)
+++ /palm/trunk/SOURCE/data_output_mask.f90	(revision 771)
@@ -4,4 +4,5 @@
 ! Current revisions:
 ! -----------------
+! +lpt
 !
 ! Former revisions:
@@ -113,4 +114,11 @@
              ELSE
                 to_be_resorted => e_av
+             ENDIF
+
+          CASE ( 'lpt' )
+             IF ( av == 0 )  THEN
+                to_be_resorted => pt
+             ELSE
+                to_be_resorted => lpt_av
              ENDIF
 
Index: /palm/trunk/SOURCE/init_masks.f90
===================================================================
--- /palm/trunk/SOURCE/init_masks.f90	(revision 770)
+++ /palm/trunk/SOURCE/init_masks.f90	(revision 771)
@@ -4,5 +4,5 @@
 ! Current revisions:
 ! -----------------
-! 
+! +lpt
 !
 ! Former revisions:
@@ -170,4 +170,12 @@
                 unit = 'm2/s2'
 
+             CASE ( 'lpt' )
+                IF ( .NOT. cloud_physics )  THEN
+                   WRITE ( message_string, * ) 'output of "', TRIM( var ), &
+                        '" requires cloud_physics = .TRUE.'
+                   CALL message( 'init_masks', 'PA0348', 1, 2, 0, 6, 0 )
+                ENDIF
+                unit = 'K'
+
              CASE ( 'pc', 'pr' )
                 IF ( .NOT. particle_advection )  THEN
Index: /palm/trunk/SOURCE/modules.f90
===================================================================
--- /palm/trunk/SOURCE/modules.f90	(revision 770)
+++ /palm/trunk/SOURCE/modules.f90	(revision 771)
@@ -5,5 +5,5 @@
 ! Current revisions:
 ! -----------------
-! 
+! +lpt_av
 !
 ! Former revisions:
@@ -323,7 +323,7 @@
 
     REAL, DIMENSION(:,:,:), ALLOCATABLE, TARGET :: &
-          e_av, p_av, pc_av, pr_av, pt_av, q_av, ql_av, ql_c_av, ql_v_av, &
-          ql_vp_av, qv_av, rho_av, s_av, sa_av, u_av, v_av, vpt_av, w_av
-
+          e_av, lpt_av, p_av, pc_av, pr_av, pt_av, q_av, ql_av, ql_c_av,     &
+          ql_v_av, ql_vp_av, qv_av, rho_av, s_av, sa_av, u_av, v_av, vpt_av, &
+          w_av
  END MODULE averaging
 
Index: /palm/trunk/SOURCE/netcdf.f90
===================================================================
--- /palm/trunk/SOURCE/netcdf.f90	(revision 770)
+++ /palm/trunk/SOURCE/netcdf.f90	(revision 771)
@@ -7,5 +7,5 @@
 ! Current revisions:
 ! ------------------
-! 
+! +lpt
 !
 ! Former revisions:
@@ -417,6 +417,6 @@
 !
 !--             Most variables are defined on the scalar grid
-                CASE ( 'e', 'p', 'pc', 'pr', 'pt', 'q', 'ql', 'ql_c', 'ql_v', &
-                       'ql_vp', 'qv', 'rho', 's', 'sa', 'vpt' )
+                CASE ( 'e', 'lpt', 'p', 'pc', 'pr', 'pt', 'q', 'ql', 'ql_c', &
+                       'ql_v', 'ql_vp', 'qv', 'rho', 's', 'sa', 'vpt' )
 
                    grid_x = 'x'
@@ -945,6 +945,6 @@
 !
 !--             Most variables are defined on the scalar grid
-                CASE ( 'e', 'p', 'pc', 'pr', 'pt', 'q', 'ql', 'ql_c', 'ql_v', &
-                       'ql_vp', 'qv', 'rho', 's', 'sa', 'vpt' )
+                CASE ( 'e', 'lpt', 'p', 'pc', 'pr', 'pt', 'q', 'ql', 'ql_c', &
+                       'ql_v', 'ql_vp', 'qv', 'rho', 's', 'sa', 'vpt' )
 
                    grid_x = 'x'
@@ -1507,6 +1507,6 @@
 !
 !--                   Most variables are defined on the zu grid
-                      CASE ( 'e_xy', 'p_xy', 'pc_xy', 'pr_xy', 'pt_xy', 'q_xy',&
-                             'ql_xy', 'ql_c_xy', 'ql_v_xy', 'ql_vp_xy',        &
+                      CASE ( 'e_xy', 'lpt_xy', 'p_xy', 'pc_xy', 'pr_xy', 'pt_xy',&
+                             'q_xy', 'ql_xy', 'ql_c_xy', 'ql_v_xy', 'ql_vp_xy',  &
                              'qv_xy', 'rho_xy', 's_xy', 'sa_xy', 'vpt_xy' )
 
@@ -2093,7 +2093,7 @@
 !
 !--                Most variables are defined on the zu grid
-                   CASE ( 'e_xz', 'p_xz', 'pc_xz', 'pr_xz', 'pt_xz', 'q_xz',  &
-                          'ql_xz', 'ql_c_xz', 'ql_v_xz', 'ql_vp_xz', 'qv_xz', &
-                          'rho_xz', 's_xz', 'sa_xz', 'vpt_xz' )
+                   CASE ( 'e_xz', 'lpt_xz', 'p_xz', 'pc_xz', 'pr_xz', 'pt_xz', &
+                          'q_xz', 'ql_xz', 'ql_c_xz', 'ql_v_xz', 'ql_vp_xz',   &
+                          'qv_xz', 'rho_xz', 's_xz', 'sa_xz', 'vpt_xz' )
 
                       grid_x = 'x'
@@ -2679,7 +2679,7 @@
 !
 !--                Most variables are defined on the zu grid
-                   CASE ( 'e_yz', 'p_yz', 'pc_yz', 'pr_yz', 'pt_yz', 'q_yz',  &
-                          'ql_yz', 'ql_c_yz', 'ql_v_yz', 'ql_vp_yz', 'qv_yz', &
-                          'rho_yz', 's_yz', 'sa_yz', 'vpt_yz' )
+                   CASE ( 'e_yz', 'lpt_yz', 'p_yz', 'pc_yz', 'pr_yz', 'pt_yz',&
+                          'q_yz', 'ql_yz', 'ql_c_yz', 'ql_v_yz', 'ql_vp_yz',  &
+                          'qv_yz', 'rho_yz', 's_yz', 'sa_yz', 'vpt_yz' )
 
                       grid_x = 'x'
@@ -3717,6 +3717,6 @@
 !
 !--             Most variables are defined on the zu levels
-                CASE ( 'e', 'p', 'pc', 'pr', 'pt', 'q', 'ql', 'ql_c', 'ql_v', &
-                       'ql_vp', 'qv', 'rho', 's', 'sa', 'u', 'v', 'vpt' )
+                CASE ( 'e', 'lpt', 'p', 'pc', 'pr', 'pt', 'q', 'ql', 'ql_c',  &
+                       'ql_v', 'ql_vp', 'qv', 'rho', 's', 'sa', 'u', 'v', 'vpt' )
 
                    grid_z = 'zu'
Index: /palm/trunk/SOURCE/read_3d_binary.f90
===================================================================
--- /palm/trunk/SOURCE/read_3d_binary.f90	(revision 770)
+++ /palm/trunk/SOURCE/read_3d_binary.f90	(revision 771)
@@ -4,4 +4,5 @@
 ! Current revisions:
 ! -----------------
+! +lpt_av
 !
 ! Former revisions:
@@ -395,4 +396,12 @@
                                 tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
 
+                CASE ( 'lpt_av' )
+                   IF ( .NOT. ALLOCATED( lpt_av ) )  THEN
+                      ALLOCATE( lpt_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg ))
+                   ENDIF
+                   IF ( k == 1 )  READ ( 13 )  tmp_3d
+                   lpt_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = &
+                                tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+
                 CASE ( 'lwp_av' )
                    IF ( .NOT. ALLOCATED( lwp_av ) )  THEN
Index: /palm/trunk/SOURCE/sum_up_3d_data.f90
===================================================================
--- /palm/trunk/SOURCE/sum_up_3d_data.f90	(revision 770)
+++ /palm/trunk/SOURCE/sum_up_3d_data.f90	(revision 771)
@@ -4,4 +4,5 @@
 ! Current revisions:
 ! -----------------
+! lpt_av
 !
 ! Former revisions:
@@ -71,4 +72,10 @@
                 e_av = 0.0
 
+             CASE ( 'lpt' )
+                IF ( .NOT. ALLOCATED( lpt_av ) )  THEN
+                   ALLOCATE( lpt_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                ENDIF
+                lpt_av = 0.0
+
              CASE ( 'lwp*' )
                 IF ( .NOT. ALLOCATED( lwp_av ) )  THEN
@@ -239,4 +246,13 @@
                    DO  k = nzb, nzt+1
                       e_av(k,j,i) = e_av(k,j,i) + e(k,j,i)
+                   ENDDO
+                ENDDO
+             ENDDO
+
+          CASE ( 'lpt' )
+             DO  i = nxlg, nxrg
+                DO  j = nysg, nyng
+                   DO  k = nzb, nzt+1
+                      lpt_av(k,j,i) = lpt_av(k,j,i) + pt(k,j,i)
                    ENDDO
                 ENDDO
Index: /palm/trunk/SOURCE/write_3d_binary.f90
===================================================================
--- /palm/trunk/SOURCE/write_3d_binary.f90	(revision 770)
+++ /palm/trunk/SOURCE/write_3d_binary.f90	(revision 771)
@@ -4,5 +4,5 @@
 ! Current revisions:
 ! -----------------
-! 
+! +lpt
 !
 ! Former revisions:
@@ -102,4 +102,7 @@
        WRITE ( 14 )  'km_m                ';  WRITE ( 14 )  km_m
     ENDIF
+    IF ( ALLOCATED( lpt_av ) )  THEN
+       WRITE ( 14 )  'lpt_av              ';  WRITE ( 14 )  lpt_av
+    ENDIF
     IF ( ALLOCATED( lwp_av ) )  THEN
        WRITE ( 14 )  'lwp_av              ';  WRITE ( 14 )  lwp_av
