Index: palm/trunk/SOURCE/surface_data_output_mod.f90
===================================================================
--- palm/trunk/SOURCE/surface_output_mod.f90	(revision 3646)
+++ palm/trunk/SOURCE/surface_data_output_mod.f90	(revision 3648)
@@ -1,3 +1,3 @@
-!> @file surface_output_mod.f90
+!> @file surface_data_output_mod.f90
 !------------------------------------------------------------------------------!
 ! This file is part of the PALM model system.
@@ -15,5 +15,5 @@
 ! PALM. If not, see <http://www.gnu.org/licenses/>.
 !
-! Copyright 1997-2018 Leibniz Universitaet Hannover
+! Copyright 1997-2019 Leibniz Universitaet Hannover
 !------------------------------------------------------------------------------!
 !
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! Rename module and subroutines
+! 
+! 3646 2018-12-28 17:58:49Z kanani
 ! Bugfix: use time_since_reference_point instead of simulated_time (relevant
 ! when using wall/soil spinup)
@@ -63,5 +66,5 @@
 !------------------------------------------------------------------------------!
 
-MODULE surface_output_mod
+MODULE surface_data_output_mod
 
    USE kinds
@@ -71,5 +74,5 @@
        
    USE control_parameters,                                                     &
-       ONLY:  surface_data_output
+       ONLY:  surface_output
        
    USE grid_variables,                                                         &
@@ -126,33 +129,33 @@
    PRIVATE
 
-   INTERFACE  surface_output
-      MODULE PROCEDURE surface_output
-   END INTERFACE  surface_output
+   INTERFACE  surface_data_output
+      MODULE PROCEDURE surface_data_output
+   END INTERFACE  surface_data_output
    
-   INTERFACE  surface_output_averaging
-      MODULE PROCEDURE surface_output_averaging
-   END INTERFACE  surface_output_averaging
+   INTERFACE  surface_data_output_averaging
+      MODULE PROCEDURE surface_data_output_averaging
+   END INTERFACE  surface_data_output_averaging
    
-   INTERFACE  surface_output_check_parameters
-      MODULE PROCEDURE surface_output_check_parameters
-   END INTERFACE  surface_output_check_parameters
+   INTERFACE  surface_data_output_check_parameters
+      MODULE PROCEDURE surface_data_output_check_parameters
+   END INTERFACE  surface_data_output_check_parameters
    
-   INTERFACE  surface_output_init
-      MODULE PROCEDURE surface_output_init
-   END INTERFACE  surface_output_init
+   INTERFACE  surface_data_output_init
+      MODULE PROCEDURE surface_data_output_init
+   END INTERFACE  surface_data_output_init
    
-   INTERFACE  surface_output_last_action
-      MODULE PROCEDURE surface_output_last_action
-   END INTERFACE  surface_output_last_action
+   INTERFACE  surface_data_output_last_action
+      MODULE PROCEDURE surface_data_output_last_action
+   END INTERFACE  surface_data_output_last_action
       
-   INTERFACE  surface_output_parin
-      MODULE PROCEDURE surface_output_parin
-   END INTERFACE  surface_output_parin
+   INTERFACE  surface_data_output_parin
+      MODULE PROCEDURE surface_data_output_parin
+   END INTERFACE  surface_data_output_parin
 
 !
 !--Public subroutines
-   PUBLIC surface_output, surface_output_averaging,                            &
-          surface_output_check_parameters, surface_output_init,                &
-          surface_output_last_action, surface_output_parin
+   PUBLIC surface_data_output, surface_data_output_averaging,                  &
+          surface_data_output_check_parameters, surface_data_output_init,      &
+          surface_data_output_last_action, surface_data_output_parin
 !
 !--Public variables
@@ -168,5 +171,5 @@
 !> and polygon data for the surface elements, allocation of required arrays.
 !------------------------------------------------------------------------------!
-   SUBROUTINE surface_output_init
+   SUBROUTINE surface_data_output_init
    
       IMPLICIT NONE
@@ -855,5 +858,5 @@
 #endif
 
-   END SUBROUTINE surface_output_init
+   END SUBROUTINE surface_data_output_init
    
 !------------------------------------------------------------------------------!
@@ -865,5 +868,5 @@
 !> are called to write the surface data in the respective NetCDF files.
 !------------------------------------------------------------------------------!   
-   SUBROUTINE surface_output( av )
+   SUBROUTINE surface_data_output( av )
    
       USE control_parameters,                                                  &
@@ -922,5 +925,5 @@
 !--            Output of instantaneous data
                IF ( av == 0 )  THEN
-                  CALL surface_output_collect( surf_def_h(0)%us,               &
+                  CALL surface_data_output_collect( surf_def_h(0)%us,          &
                                                surf_def_h(1)%us,               &
                                                surf_lsm_h%us,                  &
@@ -951,5 +954,5 @@
 !--            Output of instantaneous data
                IF ( av == 0 )  THEN
-                  CALL surface_output_collect( surf_def_h(0)%ts,               &
+                  CALL surface_data_output_collect( surf_def_h(0)%ts,          &
                                                surf_def_h(1)%ts,               &
                                                surf_lsm_h%ts,                  &
@@ -980,5 +983,5 @@
 !--            Output of instantaneous data
                IF ( av == 0 )  THEN
-                  CALL surface_output_collect( surf_def_h(0)%qs,               &
+                  CALL surface_data_output_collect( surf_def_h(0)%qs,          &
                                                surf_def_h(1)%qs,               &
                                                surf_lsm_h%qs,                  &
@@ -1009,5 +1012,5 @@
 !--            Output of instantaneous data
                IF ( av == 0 )  THEN
-                  CALL surface_output_collect( surf_def_h(0)%ss,               &
+                  CALL surface_data_output_collect( surf_def_h(0)%ss,          &
                                                surf_def_h(1)%ss,               &
                                                surf_lsm_h%ss,                  &
@@ -1038,5 +1041,5 @@
 !--            Output of instantaneous data
                IF ( av == 0 )  THEN
-                  CALL surface_output_collect( surf_def_h(0)%qcs,              &
+                  CALL surface_data_output_collect( surf_def_h(0)%qcs,         &
                                                surf_def_h(1)%qcs,              &
                                                surf_lsm_h%qcs,                 &
@@ -1067,5 +1070,5 @@
 !--            Output of instantaneous data
                IF ( av == 0 )  THEN
-                  CALL surface_output_collect( surf_def_h(0)%ncs,              &
+                  CALL surface_data_output_collect( surf_def_h(0)%ncs,         &
                                                surf_def_h(1)%ncs,              &
                                                surf_lsm_h%ncs,                 &
@@ -1096,5 +1099,5 @@
 !--            Output of instantaneous data
                IF ( av == 0 )  THEN
-                  CALL surface_output_collect( surf_def_h(0)%qrs,              &
+                  CALL surface_data_output_collect( surf_def_h(0)%qrs,         &
                                                surf_def_h(1)%qrs,              &
                                                surf_lsm_h%qrs,                 &
@@ -1125,5 +1128,5 @@
 !--            Output of instantaneous data
                IF ( av == 0 )  THEN
-                  CALL surface_output_collect( surf_def_h(0)%nrs,              &
+                  CALL surface_data_output_collect( surf_def_h(0)%nrs,         &
                                                surf_def_h(1)%nrs,              &
                                                surf_lsm_h%nrs,                 &
@@ -1154,5 +1157,5 @@
 !--            Output of instantaneous data
                IF ( av == 0 )  THEN
-                  CALL surface_output_collect( surf_def_h(0)%ol,               &
+                  CALL surface_data_output_collect( surf_def_h(0)%ol,          &
                                                surf_def_h(1)%ol,               &
                                                surf_lsm_h%ol,                  &
@@ -1183,5 +1186,5 @@
 !--            Output of instantaneous data
                IF ( av == 0 )  THEN
-                  CALL surface_output_collect( surf_def_h(0)%z0,               &
+                  CALL surface_data_output_collect( surf_def_h(0)%z0,          &
                                                surf_def_h(1)%z0,               &
                                                surf_lsm_h%z0,                  &
@@ -1212,5 +1215,5 @@
 !--            Output of instantaneous data
                IF ( av == 0 )  THEN
-                  CALL surface_output_collect( surf_def_h(0)%z0h,              &
+                  CALL surface_data_output_collect( surf_def_h(0)%z0h,         &
                                                surf_def_h(1)%z0h,              &
                                                surf_lsm_h%z0h,                 &
@@ -1241,5 +1244,5 @@
 !--            Output of instantaneous data
                IF ( av == 0 )  THEN
-                  CALL surface_output_collect( surf_def_h(0)%z0q,              &
+                  CALL surface_data_output_collect( surf_def_h(0)%z0q,         &
                                                surf_def_h(1)%z0q,              &
                                                surf_lsm_h%z0q,                 &
@@ -1270,5 +1273,5 @@
 !--            Output of instantaneous data
                IF ( av == 0 )  THEN
-                  CALL surface_output_collect( surf_def_h(0)%pt1,              &
+                  CALL surface_data_output_collect( surf_def_h(0)%pt1,         &
                                                surf_def_h(1)%pt1,              &
                                                surf_lsm_h%pt1,                 &
@@ -1299,5 +1302,5 @@
 !--            Output of instantaneous data
                IF ( av == 0 )  THEN
-                  CALL surface_output_collect( surf_def_h(0)%qv1,              &
+                  CALL surface_data_output_collect( surf_def_h(0)%qv1,         &
                                                surf_def_h(1)%qv1,              &
                                                surf_lsm_h%qv1,                 &
@@ -1328,5 +1331,5 @@
 !--            Output of instantaneous data
                IF ( av == 0 )  THEN
-                  CALL surface_output_collect( surf_def_h(0)%vpt1,             &
+                  CALL surface_data_output_collect( surf_def_h(0)%vpt1,        &
                                                surf_def_h(1)%vpt1,             &
                                                surf_lsm_h%vpt1,                &
@@ -1357,5 +1360,5 @@
 !--            Output of instantaneous data
                IF ( av == 0 )  THEN
-                  CALL surface_output_collect( surf_def_h(0)%usws,             &
+                  CALL surface_data_output_collect( surf_def_h(0)%usws,        &
                                                surf_def_h(1)%usws,             &
                                                surf_lsm_h%usws,                &
@@ -1386,5 +1389,5 @@
 !--            Output of instantaneous data
                IF ( av == 0 )  THEN
-                  CALL surface_output_collect( surf_def_h(0)%vsws,             &
+                  CALL surface_data_output_collect( surf_def_h(0)%vsws,        &
                                                surf_def_h(1)%vsws,             &
                                                surf_lsm_h%vsws,                &
@@ -1415,5 +1418,5 @@
 !--            Output of instantaneous data
                IF ( av == 0 )  THEN
-                  CALL surface_output_collect( surf_def_h(0)%shf,              &
+                  CALL surface_data_output_collect( surf_def_h(0)%shf,         &
                                                surf_def_h(1)%shf,              &
                                                surf_lsm_h%shf,                 &
@@ -1443,5 +1446,5 @@
 !--            Output of instantaneous data
                IF ( av == 0 )  THEN
-                  CALL surface_output_collect( surf_def_h(0)%qsws,             &
+                  CALL surface_data_output_collect( surf_def_h(0)%qsws,        &
                                                surf_def_h(1)%qsws,             &
                                                surf_lsm_h%qsws,                &
@@ -1472,5 +1475,5 @@
 !--            Output of instantaneous data
                IF ( av == 0 )  THEN
-                  CALL surface_output_collect( surf_def_h(0)%ssws,             &
+                  CALL surface_data_output_collect( surf_def_h(0)%ssws,        &
                                                surf_def_h(1)%ssws,             &
                                                surf_lsm_h%ssws,                &
@@ -1501,5 +1504,5 @@
 !--            Output of instantaneous data
                IF ( av == 0 )  THEN
-                  CALL surface_output_collect( surf_def_h(0)%qcsws,            &
+                  CALL surface_data_output_collect( surf_def_h(0)%qcsws,       &
                                                surf_def_h(1)%qcsws,            &
                                                surf_lsm_h%qcsws,               &
@@ -1530,5 +1533,5 @@
 !--            Output of instantaneous data
                IF ( av == 0 )  THEN
-                  CALL surface_output_collect( surf_def_h(0)%ncsws,            &
+                  CALL surface_data_output_collect( surf_def_h(0)%ncsws,       &
                                                surf_def_h(1)%ncsws,            &
                                                surf_lsm_h%ncsws,               &
@@ -1559,5 +1562,5 @@
 !--            Output of instantaneous data
                IF ( av == 0 )  THEN
-                  CALL surface_output_collect( surf_def_h(0)%qrsws,            &
+                  CALL surface_data_output_collect( surf_def_h(0)%qrsws,       &
                                                surf_def_h(1)%qrsws,            &
                                                surf_lsm_h%qrsws,               &
@@ -1588,5 +1591,5 @@
 !--            Output of instantaneous data
                IF ( av == 0 )  THEN
-                  CALL surface_output_collect( surf_def_h(0)%nrsws,            &
+                  CALL surface_data_output_collect( surf_def_h(0)%nrsws,       &
                                                surf_def_h(1)%nrsws,            &
                                                surf_lsm_h%nrsws,               &
@@ -1617,5 +1620,5 @@
 !--            Output of instantaneous data
                IF ( av == 0 )  THEN
-                  CALL surface_output_collect( surf_def_h(0)%sasws,            &
+                  CALL surface_data_output_collect( surf_def_h(0)%sasws,       &
                                                surf_def_h(1)%sasws,            &
                                                surf_lsm_h%sasws,               &
@@ -1646,5 +1649,5 @@
 !--            Output of instantaneous data
                IF ( av == 0 )  THEN
-                  CALL surface_output_collect( surf_def_h(0)%q_surface,        &
+                  CALL surface_data_output_collect( surf_def_h(0)%q_surface,   &
                                                surf_def_h(1)%q_surface,        &
                                                surf_lsm_h%q_surface,           &
@@ -1675,5 +1678,5 @@
 !--            Output of instantaneous data
                IF ( av == 0 )  THEN
-                  CALL surface_output_collect( surf_def_h(0)%pt_surface,       &
+                  CALL surface_data_output_collect( surf_def_h(0)%pt_surface,  &
                                                surf_def_h(1)%pt_surface,       &
                                                surf_lsm_h%pt_surface,          &
@@ -1704,5 +1707,5 @@
 !--            Output of instantaneous data
                IF ( av == 0 )  THEN
-                  CALL surface_output_collect( surf_def_h(0)%vpt_surface,      &
+                  CALL surface_data_output_collect( surf_def_h(0)%vpt_surface, &
                                                surf_def_h(1)%vpt_surface,      &
                                                surf_lsm_h%vpt_surface,         &
@@ -1733,5 +1736,5 @@
 !--            Output of instantaneous data
                IF ( av == 0 )  THEN
-                  CALL surface_output_collect( surf_def_h(0)%rad_net,          &
+                  CALL surface_data_output_collect( surf_def_h(0)%rad_net,     &
                                                surf_def_h(1)%rad_net,          &
                                                surf_lsm_h%rad_net,             &
@@ -1762,5 +1765,5 @@
 !--            Output of instantaneous data
                IF ( av == 0 )  THEN
-                  CALL surface_output_collect( surf_def_h(0)%rad_lw_in,        &
+                  CALL surface_data_output_collect( surf_def_h(0)%rad_lw_in,   &
                                                surf_def_h(1)%rad_lw_in,        &
                                                surf_lsm_h%rad_lw_in,           &
@@ -1791,5 +1794,5 @@
 !--            Output of instantaneous data
                IF ( av == 0 )  THEN
-                  CALL surface_output_collect( surf_def_h(0)%rad_lw_out,       &
+                  CALL surface_data_output_collect( surf_def_h(0)%rad_lw_out,  &
                                                surf_def_h(1)%rad_lw_out,       &
                                                surf_lsm_h%rad_lw_out,          &
@@ -1820,5 +1823,5 @@
 !--            Output of instantaneous data
                IF ( av == 0 )  THEN
-                  CALL surface_output_collect( surf_def_h(0)%rad_sw_in,        &
+                  CALL surface_data_output_collect( surf_def_h(0)%rad_sw_in,   &
                                                surf_def_h(1)%rad_sw_in,        &
                                                surf_lsm_h%rad_sw_in,           &
@@ -1849,5 +1852,5 @@
 !--            Output of instantaneous data
                IF ( av == 0 )  THEN
-                  CALL surface_output_collect( surf_def_h(0)%rad_sw_out,       &
+                  CALL surface_data_output_collect( surf_def_h(0)%rad_sw_out,  &
                                                surf_def_h(1)%rad_sw_out,       &
                                                surf_lsm_h%rad_sw_out,          &
@@ -1878,5 +1881,5 @@
 !--            Output of instantaneous data
                IF ( av == 0 )  THEN
-                  CALL surface_output_collect( surf_def_h(0)%ghf,              &
+                  CALL surface_data_output_collect( surf_def_h(0)%ghf,         &
                                                surf_def_h(1)%ghf,              &
                                                surf_lsm_h%ghf,                 &
@@ -1907,5 +1910,5 @@
 !--            Output of instantaneous data
                IF ( av == 0 )  THEN
-                  CALL surface_output_collect( surf_def_h(0)%r_a,              &
+                  CALL surface_data_output_collect( surf_def_h(0)%r_a,         &
                                                surf_def_h(1)%r_a,              &
                                                surf_lsm_h%r_a,                 &
@@ -1936,5 +1939,5 @@
 !--            Output of instantaneous data
                IF ( av == 0 )  THEN
-                  CALL surface_output_collect( surf_def_h(0)%r_soil,           &
+                  CALL surface_data_output_collect( surf_def_h(0)%r_soil,      &
                                                surf_def_h(1)%r_soil,           &
                                                surf_lsm_h%r_soil,              &
@@ -1965,5 +1968,5 @@
 !--            Output of instantaneous data
                IF ( av == 0 )  THEN
-                  CALL surface_output_collect( surf_def_h(0)%r_canopy,         &
+                  CALL surface_data_output_collect( surf_def_h(0)%r_canopy,    &
                                                surf_def_h(1)%r_canopy,         &
                                                surf_lsm_h%r_canopy,            &
@@ -1994,5 +1997,5 @@
 !--            Output of instantaneous data
                IF ( av == 0 )  THEN
-                  CALL surface_output_collect( surf_def_h(0)%r_s,              &
+                  CALL surface_data_output_collect( surf_def_h(0)%r_s,         &
                                                surf_def_h(1)%r_s,              &
                                                surf_lsm_h%r_s,                 &
@@ -2023,5 +2026,5 @@
 !--            Output of instantaneous data
                IF ( av == 0 )  THEN
-                  CALL surface_output_collect( surf_def_h(0)%rad_sw_dir,       &
+                  CALL surface_data_output_collect( surf_def_h(0)%rad_sw_dir,  &
                                                surf_def_h(1)%rad_sw_dir,       &
                                                surf_lsm_h%rad_sw_dir,          &
@@ -2052,5 +2055,5 @@
 !--            Output of instantaneous data
                IF ( av == 0 )  THEN
-                  CALL surface_output_collect( surf_def_h(0)%rad_sw_dif,       &
+                  CALL surface_data_output_collect( surf_def_h(0)%rad_sw_dif,  &
                                                surf_def_h(1)%rad_sw_dif,       &
                                                surf_lsm_h%rad_sw_dif,          &
@@ -2081,5 +2084,5 @@
 !--            Output of instantaneous data
                IF ( av == 0 )  THEN
-                  CALL surface_output_collect( surf_def_h(0)%rad_sw_ref,       &
+                  CALL surface_data_output_collect( surf_def_h(0)%rad_sw_ref,  &
                                                surf_def_h(1)%rad_sw_ref,       &
                                                surf_lsm_h%rad_sw_ref,          &
@@ -2110,5 +2113,5 @@
 !--            Output of instantaneous data
                IF ( av == 0 )  THEN
-                  CALL surface_output_collect( surf_def_h(0)%rad_sw_res,       &
+                  CALL surface_data_output_collect( surf_def_h(0)%rad_sw_res,  &
                                                surf_def_h(1)%rad_sw_res,       &
                                                surf_lsm_h%rad_sw_res,          &
@@ -2139,5 +2142,5 @@
 !--            Output of instantaneous data
                IF ( av == 0 )  THEN
-                  CALL surface_output_collect( surf_def_h(0)%rad_lw_dif,       &
+                  CALL surface_data_output_collect( surf_def_h(0)%rad_lw_dif,  &
                                                surf_def_h(1)%rad_lw_dif,       &
                                                surf_lsm_h%rad_lw_dif,          &
@@ -2168,5 +2171,5 @@
 !--            Output of instantaneous data
                IF ( av == 0 )  THEN
-                  CALL surface_output_collect( surf_def_h(0)%rad_lw_ref,       &
+                  CALL surface_data_output_collect( surf_def_h(0)%rad_lw_ref,  &
                                                surf_def_h(1)%rad_lw_ref,       &
                                                surf_lsm_h%rad_lw_ref,          &
@@ -2197,5 +2200,5 @@
 !--            Output of instantaneous data
                IF ( av == 0 )  THEN
-                  CALL surface_output_collect( surf_def_h(0)%rad_lw_res,       &
+                  CALL surface_data_output_collect( surf_def_h(0)%rad_lw_res,  &
                                                surf_def_h(1)%rad_lw_res,       &
                                                surf_lsm_h%rad_lw_res,          &
@@ -2254,5 +2257,5 @@
       IF ( av == 1 )  average_count_surf = 0
              
-   END SUBROUTINE surface_output
+   END SUBROUTINE surface_data_output
    
 !------------------------------------------------------------------------------!
@@ -2261,5 +2264,5 @@
 !> Routine for controlling the data averaging. 
 !------------------------------------------------------------------------------!     
-   SUBROUTINE surface_output_averaging
+   SUBROUTINE surface_data_output_averaging
    
       IMPLICIT NONE
@@ -2278,5 +2281,5 @@
 
             CASE ( 'us' )
-               CALL surface_output_sum_up( surf_def_h(0)%us,                   &
+               CALL surface_data_output_sum_up( surf_def_h(0)%us,              &
                                            surf_def_h(1)%us,                   &
                                            surf_lsm_h%us,                      &
@@ -2296,5 +2299,5 @@
 
             CASE ( 'ts' )
-               CALL surface_output_sum_up( surf_def_h(0)%ts,                   &
+               CALL surface_data_output_sum_up( surf_def_h(0)%ts,              &
                                            surf_def_h(1)%ts,                   &
                                            surf_lsm_h%ts,                      &
@@ -2314,5 +2317,5 @@
 
             CASE ( 'qs' )
-               CALL surface_output_sum_up( surf_def_h(0)%qs,                   &
+               CALL surface_data_output_sum_up( surf_def_h(0)%qs,              &
                                            surf_def_h(1)%qs,                   &
                                            surf_lsm_h%qs,                      &
@@ -2332,5 +2335,5 @@
 
             CASE ( 'ss' )
-               CALL surface_output_sum_up( surf_def_h(0)%ss,                   &
+               CALL surface_data_output_sum_up( surf_def_h(0)%ss,              &
                                            surf_def_h(1)%ss,                   &
                                            surf_lsm_h%ss,                      &
@@ -2350,5 +2353,5 @@
 
             CASE ( 'qcs' )
-               CALL surface_output_sum_up( surf_def_h(0)%qcs,                  &
+               CALL surface_data_output_sum_up( surf_def_h(0)%qcs,             &
                                            surf_def_h(1)%qcs,                  &
                                            surf_lsm_h%qcs,                     &
@@ -2368,5 +2371,5 @@
 
             CASE ( 'ncs' )
-               CALL surface_output_sum_up( surf_def_h(0)%ncs,                  &
+               CALL surface_data_output_sum_up( surf_def_h(0)%ncs,             &
                                            surf_def_h(1)%ncs,                  &
                                            surf_lsm_h%ncs,                     &
@@ -2386,5 +2389,5 @@
 
             CASE ( 'qrs' )
-               CALL surface_output_sum_up( surf_def_h(0)%qrs,                  &
+               CALL surface_data_output_sum_up( surf_def_h(0)%qrs,             &
                                            surf_def_h(1)%qrs,                  &
                                            surf_lsm_h%qrs,                     &
@@ -2404,5 +2407,5 @@
 
             CASE ( 'nrs' )
-               CALL surface_output_sum_up( surf_def_h(0)%nrs,                  &
+               CALL surface_data_output_sum_up( surf_def_h(0)%nrs,             &
                                            surf_def_h(1)%nrs,                  &
                                            surf_lsm_h%nrs,                     &
@@ -2422,5 +2425,5 @@
 
             CASE ( 'ol' )
-               CALL surface_output_sum_up( surf_def_h(0)%ol,                   &
+               CALL surface_data_output_sum_up( surf_def_h(0)%ol,              &
                                            surf_def_h(1)%ol,                   &
                                            surf_lsm_h%ol,                      &
@@ -2440,5 +2443,5 @@
 
             CASE ( 'z0' )
-               CALL surface_output_sum_up( surf_def_h(0)%z0,                   &
+               CALL surface_data_output_sum_up( surf_def_h(0)%z0,              &
                                            surf_def_h(1)%z0,                   &
                                            surf_lsm_h%z0,                      &
@@ -2458,5 +2461,5 @@
 
             CASE ( 'z0h' )
-               CALL surface_output_sum_up( surf_def_h(0)%z0h,                  &
+               CALL surface_data_output_sum_up( surf_def_h(0)%z0h,             &
                                            surf_def_h(1)%z0h,                  &
                                            surf_lsm_h%z0h,                     &
@@ -2476,5 +2479,5 @@
 
             CASE ( 'z0q' )
-               CALL surface_output_sum_up( surf_def_h(0)%z0q,                  &
+               CALL surface_data_output_sum_up( surf_def_h(0)%z0q,             &
                                            surf_def_h(1)%z0q,                  &
                                            surf_lsm_h%z0q,                     &
@@ -2494,5 +2497,5 @@
 
             CASE ( 'theta1' )                                                  
-               CALL surface_output_sum_up( surf_def_h(0)%pt1,                  &
+               CALL surface_data_output_sum_up( surf_def_h(0)%pt1,             &
                                            surf_def_h(1)%pt1,                  &
                                            surf_lsm_h%pt1,                     &
@@ -2512,5 +2515,5 @@
                                                                                
             CASE ( 'qv1' )                                                     
-               CALL surface_output_sum_up( surf_def_h(0)%qv1,                  &
+               CALL surface_data_output_sum_up( surf_def_h(0)%qv1,             &
                                            surf_def_h(1)%qv1,                  &
                                            surf_lsm_h%qv1,                     &
@@ -2530,5 +2533,5 @@
 
             CASE ( 'thetav1' )
-               CALL surface_output_sum_up( surf_def_h(0)%vpt1,                 &
+               CALL surface_data_output_sum_up( surf_def_h(0)%vpt1,            &
                                            surf_def_h(1)%vpt1,                 &
                                            surf_lsm_h%vpt1,                    &
@@ -2548,5 +2551,5 @@
 
             CASE ( 'usws' )
-               CALL surface_output_sum_up( surf_def_h(0)%usws,                 &
+               CALL surface_data_output_sum_up( surf_def_h(0)%usws,            &
                                            surf_def_h(1)%usws,                 &
                                            surf_lsm_h%usws,                    &
@@ -2566,5 +2569,5 @@
 
             CASE ( 'vsws' )
-               CALL surface_output_sum_up( surf_def_h(0)%vsws,                 &
+               CALL surface_data_output_sum_up( surf_def_h(0)%vsws,            &
                                            surf_def_h(1)%vsws,                 &
                                            surf_lsm_h%vsws,                    &
@@ -2584,5 +2587,5 @@
 
             CASE ( 'shf' )
-               CALL surface_output_sum_up( surf_def_h(0)%shf,                  &
+               CALL surface_data_output_sum_up( surf_def_h(0)%shf,             &
                                            surf_def_h(1)%shf,                  &
                                            surf_lsm_h%shf,                     &
@@ -2602,5 +2605,5 @@
 
             CASE ( 'qsws' )
-               CALL surface_output_sum_up( surf_def_h(0)%qsws,                 &
+               CALL surface_data_output_sum_up( surf_def_h(0)%qsws,            &
                                            surf_def_h(1)%qsws,                 &
                                            surf_lsm_h%qsws,                    &
@@ -2620,5 +2623,5 @@
 
             CASE ( 'ssws' )
-               CALL surface_output_sum_up( surf_def_h(0)%ssws,                 &
+               CALL surface_data_output_sum_up( surf_def_h(0)%ssws,            &
                                            surf_def_h(1)%ssws,                 &
                                            surf_lsm_h%ssws,                    &
@@ -2638,5 +2641,5 @@
 
             CASE ( 'qcsws' )
-               CALL surface_output_sum_up( surf_def_h(0)%qcsws,                &
+               CALL surface_data_output_sum_up( surf_def_h(0)%qcsws,           &
                                            surf_def_h(1)%qcsws,                &
                                            surf_lsm_h%qcsws,                   &
@@ -2656,5 +2659,5 @@
 
             CASE ( 'ncsws' )
-               CALL surface_output_sum_up( surf_def_h(0)%ncsws,                &
+               CALL surface_data_output_sum_up( surf_def_h(0)%ncsws,           &
                                            surf_def_h(1)%ncsws,                &
                                            surf_lsm_h%ncsws,                   &
@@ -2674,5 +2677,5 @@
 
             CASE ( 'qrsws' )
-               CALL surface_output_sum_up( surf_def_h(0)%qrsws,                &
+               CALL surface_data_output_sum_up( surf_def_h(0)%qrsws,           &
                                            surf_def_h(1)%qrsws,                &
                                            surf_lsm_h%qrsws,                   &
@@ -2692,5 +2695,5 @@
 
             CASE ( 'nrsws' )
-               CALL surface_output_sum_up( surf_def_h(0)%nrsws,                &
+               CALL surface_data_output_sum_up( surf_def_h(0)%nrsws,           &
                                            surf_def_h(1)%nrsws,                &
                                            surf_lsm_h%nrsws,                   &
@@ -2710,5 +2713,5 @@
 
             CASE ( 'sasws' )
-               CALL surface_output_sum_up( surf_def_h(0)%sasws,                &
+               CALL surface_data_output_sum_up( surf_def_h(0)%sasws,           &
                                            surf_def_h(1)%sasws,                &
                                            surf_lsm_h%sasws,                   &
@@ -2728,5 +2731,5 @@
 
             CASE ( 'q_surface' )
-               CALL surface_output_sum_up( surf_def_h(0)%q_surface,            &
+               CALL surface_data_output_sum_up( surf_def_h(0)%q_surface,       &
                                            surf_def_h(1)%q_surface,            &
                                            surf_lsm_h%q_surface,               &
@@ -2746,5 +2749,5 @@
 
             CASE ( 'theta_surface' )
-               CALL surface_output_sum_up( surf_def_h(0)%pt_surface,           &
+               CALL surface_data_output_sum_up( surf_def_h(0)%pt_surface,      &
                                            surf_def_h(1)%pt_surface,           &
                                            surf_lsm_h%pt_surface,              &
@@ -2764,5 +2767,5 @@
 
             CASE ( 'thetav_surface' )
-               CALL surface_output_sum_up( surf_def_h(0)%vpt_surface,          &
+               CALL surface_data_output_sum_up( surf_def_h(0)%vpt_surface,     &
                                            surf_def_h(1)%vpt_surface,          &
                                            surf_lsm_h%vpt_surface,             &
@@ -2782,5 +2785,5 @@
 
             CASE ( 'rad_net' )
-               CALL surface_output_sum_up( surf_def_h(0)%rad_net,              &
+               CALL surface_data_output_sum_up( surf_def_h(0)%rad_net,         &
                                            surf_def_h(1)%rad_net,              &
                                            surf_lsm_h%rad_net,                 &
@@ -2800,5 +2803,5 @@
 
             CASE ( 'rad_lw_in' )
-               CALL surface_output_sum_up( surf_def_h(0)%rad_lw_in,            &
+               CALL surface_data_output_sum_up( surf_def_h(0)%rad_lw_in,       &
                                            surf_def_h(1)%rad_lw_in,            &
                                            surf_lsm_h%rad_lw_in,               &
@@ -2818,5 +2821,5 @@
 
             CASE ( 'rad_lw_out' )
-               CALL surface_output_sum_up( surf_def_h(0)%rad_lw_out,           &
+               CALL surface_data_output_sum_up( surf_def_h(0)%rad_lw_out,      &
                                            surf_def_h(1)%rad_lw_out,           &
                                            surf_lsm_h%rad_lw_out,              &
@@ -2836,5 +2839,5 @@
 
             CASE ( 'rad_sw_in' )
-               CALL surface_output_sum_up( surf_def_h(0)%rad_sw_in,            &
+               CALL surface_data_output_sum_up( surf_def_h(0)%rad_sw_in,       &
                                            surf_def_h(1)%rad_sw_in,            &
                                            surf_lsm_h%rad_sw_in,               &
@@ -2854,5 +2857,5 @@
 
             CASE ( 'rad_sw_out' )
-               CALL surface_output_sum_up( surf_def_h(0)%rad_sw_out,           &
+               CALL surface_data_output_sum_up( surf_def_h(0)%rad_sw_out,      &
                                            surf_def_h(1)%rad_sw_out,           &
                                            surf_lsm_h%rad_sw_out,              &
@@ -2872,5 +2875,5 @@
 
             CASE ( 'ghf' )
-               CALL surface_output_sum_up( surf_def_h(0)%ghf,                  &
+               CALL surface_data_output_sum_up( surf_def_h(0)%ghf,             &
                                            surf_def_h(1)%ghf,                  &
                                            surf_lsm_h%ghf,                     &
@@ -2890,5 +2893,5 @@
                                                                                
             CASE ( 'r_a' )                                                     
-               CALL surface_output_sum_up( surf_def_h(0)%r_a,                  &
+               CALL surface_data_output_sum_up( surf_def_h(0)%r_a,             &
                                            surf_def_h(1)%r_a,                  &
                                            surf_lsm_h%r_a,                     &
@@ -2908,5 +2911,5 @@
                                                                                
             CASE ( 'r_soil' )                                                  
-               CALL surface_output_sum_up( surf_def_h(0)%r_soil,               &
+               CALL surface_data_output_sum_up( surf_def_h(0)%r_soil,          &
                                            surf_def_h(1)%r_soil,               &
                                            surf_lsm_h%r_soil,                  &
@@ -2926,5 +2929,5 @@
 
             CASE ( 'r_canopy' )
-               CALL surface_output_sum_up( surf_def_h(0)%r_canopy,             &
+               CALL surface_data_output_sum_up( surf_def_h(0)%r_canopy,        &
                                            surf_def_h(1)%r_canopy,             &
                                            surf_lsm_h%r_canopy,                &
@@ -2944,5 +2947,5 @@
 
             CASE ( 'r_s' )
-               CALL surface_output_sum_up( surf_def_h(0)%r_s,                  &
+               CALL surface_data_output_sum_up( surf_def_h(0)%r_s,             &
                                            surf_def_h(1)%r_s,                  &
                                            surf_lsm_h%r_s,                     &
@@ -2963,5 +2966,5 @@
 
             CASE ( 'rad_sw_dir' )
-               CALL surface_output_sum_up( surf_def_h(0)%rad_sw_dir,           &
+               CALL surface_data_output_sum_up( surf_def_h(0)%rad_sw_dir,      &
                                            surf_def_h(1)%rad_sw_dir,           &
                                            surf_lsm_h%rad_sw_dir,              &
@@ -2980,5 +2983,5 @@
                                            surf_usm_v(3)%rad_sw_dir, n_out )
             CASE ( 'rad_sw_dif' )
-               CALL surface_output_sum_up( surf_def_h(0)%rad_sw_dif,           &
+               CALL surface_data_output_sum_up( surf_def_h(0)%rad_sw_dif,      &
                                            surf_def_h(1)%rad_sw_dif,           &
                                            surf_lsm_h%rad_sw_dif,              &
@@ -2998,5 +3001,5 @@
 
             CASE ( 'rad_sw_ref' )
-               CALL surface_output_sum_up( surf_def_h(0)%rad_sw_ref,           &
+               CALL surface_data_output_sum_up( surf_def_h(0)%rad_sw_ref,      &
                                            surf_def_h(1)%rad_sw_ref,           &
                                            surf_lsm_h%rad_sw_ref,              &
@@ -3016,5 +3019,5 @@
                
             CASE ( 'rad_sw_res' )
-               CALL surface_output_sum_up( surf_def_h(0)%rad_sw_res,           &
+               CALL surface_data_output_sum_up( surf_def_h(0)%rad_sw_res,      &
                                            surf_def_h(1)%rad_sw_res,           &
                                            surf_lsm_h%rad_sw_res,              &
@@ -3034,5 +3037,5 @@
 
             CASE ( 'rad_lw_dif' )
-               CALL surface_output_sum_up( surf_def_h(0)%rad_lw_dif,           &
+               CALL surface_data_output_sum_up( surf_def_h(0)%rad_lw_dif,      &
                                            surf_def_h(1)%rad_lw_dif,           &
                                            surf_lsm_h%rad_lw_dif,              &
@@ -3052,5 +3055,5 @@
 
             CASE ( 'rad_lw_ref' )
-               CALL surface_output_sum_up( surf_def_h(0)%rad_lw_ref,           &
+               CALL surface_data_output_sum_up( surf_def_h(0)%rad_lw_ref,      &
                                            surf_def_h(1)%rad_lw_ref,           &
                                            surf_lsm_h%rad_lw_ref,              &
@@ -3070,5 +3073,5 @@
 
             CASE ( 'rad_lw_res' )
-               CALL surface_output_sum_up( surf_def_h(0)%rad_lw_res,           &
+               CALL surface_data_output_sum_up( surf_def_h(0)%rad_lw_res,      &
                                            surf_def_h(1)%rad_lw_res,           &
                                            surf_lsm_h%rad_lw_res,              &
@@ -3091,5 +3094,5 @@
       
    
-   END SUBROUTINE surface_output_averaging
+   END SUBROUTINE surface_data_output_averaging
    
 !------------------------------------------------------------------------------!
@@ -3098,5 +3101,5 @@
 !> Sum-up the surface data for average output variables.  
 !------------------------------------------------------------------------------!   
-   SUBROUTINE surface_output_sum_up( var_def_h0, var_def_h1,                   &
+   SUBROUTINE surface_data_output_sum_up( var_def_h0, var_def_h1,              &
                                      var_lsm_h,  var_usm_h,                    &
                                      var_def_v0, var_lsm_v0, var_usm_v0,       &
@@ -3295,5 +3298,5 @@
       ENDIF
    
-   END SUBROUTINE surface_output_sum_up
+   END SUBROUTINE surface_data_output_sum_up
    
 !------------------------------------------------------------------------------!
@@ -3302,5 +3305,5 @@
 !> Collect the surface data from different types and different orientation.
 !------------------------------------------------------------------------------!
-   SUBROUTINE surface_output_collect( var_def_h0, var_def_h1,                  &
+   SUBROUTINE surface_data_output_collect( var_def_h0, var_def_h1,             &
                                       var_lsm_h,  var_usm_h,                   &
                                       var_def_v0, var_lsm_v0, var_usm_v0,      &
@@ -3482,28 +3485,5 @@
       ENDIF
    
-   END SUBROUTINE surface_output_collect
-   
-   
-   
-!    SUBROUTINE data_output_surf_driver (time)
-!       IMPLICIT NONE
-! 
-!       REAL(kind=wp),INTENT(IN)    :: time
-!       CHARACTER(LEN=64)           :: filename
-!       INTEGER,SAVE                :: file_number=1
-! 
-!       if(output_mode == "legacy_VTK")   then
-!           CALL prepare_vtk_data
-! 
-!           write(filename,'(a,i5.5,a)') 'surface_output_',file_number,'.vtk'
-!           if(myid == surf_io_pe)   write(9,*) 'Legacy VTK surface output to file: ',trim(filename)
-!           file_number = file_number+1
-! 
-!           CALL write_ascii_vtk (filename, time)
-!       END IF
-! 
-!       RETURN
-!    END SUBROUTINE data_output_surf_driver
-   
+   END SUBROUTINE surface_data_output_collect
    
 !------------------------------------------------------------------------------!
@@ -3512,5 +3492,5 @@
 !> Parin for output of surface parameters
 !------------------------------------------------------------------------------!
-    SUBROUTINE surface_output_parin
+    SUBROUTINE surface_data_output_parin
 
        IMPLICIT NONE
@@ -3519,5 +3499,5 @@
        
 
-       NAMELIST /surface_output_parameters/                                    &
+       NAMELIST /surface_data_output_parameters/                               &
                                   averaging_interval_surf, data_output_surf,   &
                                   dt_dosurf, dt_dosurf_av,                     &
@@ -3530,5 +3510,5 @@
        REWIND ( 11 )
        line = ' '
-       DO WHILE ( INDEX( line, '&surface_output_parameters' ) == 0 )
+       DO WHILE ( INDEX( line, '&surface_data_output_parameters' ) == 0 )
           READ ( 11, '(A)', END=14 )  line
        ENDDO
@@ -3537,18 +3517,18 @@
 !
 !--    Read namelist
-       READ ( 11, surface_output_parameters, ERR = 10 )
+       READ ( 11, surface_data_output_parameters, ERR = 10 )
 !
 !--    Set flag that indicates that surface data output is switched on
-       surface_data_output = .TRUE.
+       surface_output = .TRUE.
        GOTO 14
 
  10    BACKSPACE( 11 )
        READ( 11 , '(A)') line
-       CALL parin_fail_message( 'surface_output_parameters', line )      
+       CALL parin_fail_message( 'surface_data_output_parameters', line )      
        
  14    CONTINUE
        
 
-    END SUBROUTINE surface_output_parin
+    END SUBROUTINE surface_data_output_parin
     
     
@@ -3560,5 +3540,5 @@
 !> variables and map them onto internal output array. 
 !------------------------------------------------------------------------------!
-    SUBROUTINE surface_output_check_parameters
+    SUBROUTINE surface_data_output_check_parameters
 
        USE control_parameters,                                                 &
@@ -3587,5 +3567,5 @@
                 averaging_interval_surf, ' must be <= dt_dosurf_av = ',        &
                 dt_dosurf_av
-          CALL message( 'surface_output_check_parameters',                     &
+          CALL message( 'surface_data_output_check_parameters',                &
                         'PA0087', 1, 2, 0, 6, 0 )
        ENDIF
@@ -3621,5 +3601,5 @@
                message_string = TRIM( trimvar ) //                             &
                              ' is not yet implemented in the surface output'
-               CALL message( 'surface_output_check_parameters',                &
+               CALL message( 'surface_data_output_check_parameters',           &
                              'PA0087', 1, 2, 0, 6, 0 )
 
@@ -3653,5 +3633,5 @@
                message_string = TRIM( trimvar ) //                             &
                              ' is not part of the surface output'
-               CALL message( 'surface_output_check_parameters',                &
+               CALL message( 'surface_data_output_check_parameters',           &
                              'PA0087', 1, 2, 0, 6, 0 )
          END SELECT
@@ -3659,5 +3639,5 @@
        ENDDO
 
-    END SUBROUTINE surface_output_check_parameters
+    END SUBROUTINE surface_data_output_check_parameters
     
     
@@ -3667,5 +3647,5 @@
 !> Last action.
 !------------------------------------------------------------------------------!
-    SUBROUTINE surface_output_last_action( av )
+    SUBROUTINE surface_data_output_last_action( av )
   
       USE control_parameters,                                                  &
@@ -3698,51 +3678,6 @@
       ENDDO    
 
-    END SUBROUTINE surface_output_last_action    
-
-!--Private Subroutines (Only called from tinside his module)
-
-
-
-!    SUBROUTINE write_ascii_vtk (filename,time)
-!       IMPLICIT NONE
-!       CHARACTER(LEN=*),INTENT(IN)   :: filename
-!       REAL(kind=wp),INTENT(IN)      :: time
-! 
-!       INTEGER                       :: file_id=251
-!       INTEGER                       :: n
-! 
-!       IF(myid == surf_io_pe)  then
-!          open(file_id,file=TRIM(filename))                                 ! Please use check_open in the final version
-! 
-!          write(file_id,'(a)') "# vtk DataFile Version 3.0"
-!          write(file_id,'(a,f8.2,a)') "legacy vtk File generated by PALM,  simulation time = ",time," sec"
-!          write(file_id,'(a)') "ASCII"
-! 
-!          write(file_id,'(a)') "DATASET POLYDATA"
-!          write(file_id,'(a,i5,a)') "POINTS ",npo," float"
-!          do n=1,npo
-!             write (file_id,'(8f10.1)') points(1:3,n)
-!          end do
-! 
-!          write(file_id,'(a,8i10)') "POLYGONS ",npg, 5*npg
-!          do n=1,npg
-!             write(file_id,'(8i10)') polygons(:,n)
-!          end do
-! 
-!          write(file_id,'(a,i10)') "CELL_DATA ",npg
-!          write(file_id,'(a,i10)') "SCALARS cell_scalars float 1 "
-!          write(file_id,'(a,i10)') "LOOKUP_TABLE default "
-! 
-!          do n=1,npg
-!             write(file_id,'(f10.2)') cell_scalars(n)
-!          end do
-! 
-!          close (file_id)
-! 
-!          DEALLOCATE (points,polygons,cell_scalars)
-!       ENDIF
-! 
-!       RETURN
-!    END SUBROUTINE write_ascii_vtk
-
-END MODULE surface_output_mod
+    END SUBROUTINE surface_data_output_last_action    
+
+
+END MODULE surface_data_output_mod
