Index: palm/trunk/SOURCE/Makefile
===================================================================
--- palm/trunk/SOURCE/Makefile	(revision 4521)
+++ palm/trunk/SOURCE/Makefile	(revision 4522)
@@ -25,4 +25,7 @@
 # -----------------
 # $Id$
+# routine user_init_flight renamed to user_init_flight_mod
+# 
+# 4518 2020-05-04 15:44:28Z suehring
 # Remove dependency of read_restart_data_mod on diagnostic_output_quantities_mod
 # 
@@ -306,5 +309,5 @@
 	user_flight.f90\
 	user_init_3d_model.f90 \
-	user_init_flight.f90 \
+	user_init_flight_mod.f90 \
 	user_init_grid.f90 \
 	user_init_land_surface.f90 \
@@ -1292,5 +1295,5 @@
 	surface_mod.o \
 	user_module.o
-user_init_flight.o: \
+user_init_flight_mod.o: \
 	mod_kinds.o \
 	modules.o \
@@ -1358,5 +1361,5 @@
 	restart_data_mpi_io_mod.o \
 	user_flight.o \
-	user_init_flight.o
+	user_init_flight_mod.o
 virtual_measurement_mod.o: \
 	basic_constants_and_equations_mod.o \
Index: palm/trunk/SOURCE/user_init_flight.f90
===================================================================
--- palm/trunk/SOURCE/user_init_flight.f90	(revision 4521)
+++ 	(revision )
@@ -1,113 +1,0 @@
-!> @file user_init_flight.f90
-!--------------------------------------------------------------------------------------------------!
-! This file is part of the PALM model system.
-!
-! 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-2020 Leibniz Universitaet Hannover
-!--------------------------------------------------------------------------------------------------!
-!
-!
-! Current revisions:
-! -----------------
-! 
-! 
-! Former revisions:
-! -----------------
-! $Id$
-! file re-formatted to follow the PALM coding standard
-!
-!
-! 4360 2020-01-07 11:25:50Z suehring
-! Corrected "Former revisions" section
-!
-! 3768 2019-02-27 14:35:58Z raasch
-! statements commented or added to avoid compiler warnings about unused variables
-!
-! 3655 2019-01-07 16:51:22Z knoop
-! Corrected "Former revisions" section
-!
-! 1957 2016-07-07 10:43:48Z suehring
-! Initial revision
-!
-! Description:
-! ------------
-!> Execution of user-defined initialization for flight measurements.
-!--------------------------------------------------------------------------------------------------!
- SUBROUTINE user_init_flight( init, k, id, label_leg )
-
-
-    USE control_parameters
-
-    USE indices
-
-    USE kinds
-
-!    USE netcdf_interface,                                                                          &
-!        ONLY: dofl_label,                                                                          &
-!              dofl_unit
-
-    USE user
-
-    IMPLICIT NONE
-
-    CHARACTER(LEN=10), OPTIONAL ::  label_leg     !< label of the respective leg
-
-    INTEGER(iwp), OPTIONAL                ::  id  !< variable index
-    INTEGER(iwp), OPTIONAL, INTENT(INOUT) ::  k   !< index for respective variable and leg
-
-    LOGICAL ::  init  !< variable to recognize initial call
-
-!
-!-- Following statements are added to avoid compiler warnings about unused variables. Please remove.
-    IF ( PRESENT( id )        )  CONTINUE
-    IF ( PRESENT( k )         )  CONTINUE
-    IF ( PRESENT( label_leg ) )  CONTINUE
-
-!
-!-- Sample for user-defined flight-time series.
-!-- For each quantity you have to give a label and a unit, which will be used for the output into
-!-- NetCDF file. They must not contain more than twenty characters.
-
-
-    IF ( init )  THEN
-!
-!--    The number of user-defined quantity has to be increased appropriately.
-!--    In the following example, 2 user-defined quantities are added.
-!        num_var_fl_user = num_var_fl_user + 2
-
-       init = .FALSE.
-
-    ELSE
-
-!
-!--    Please add the respective number of new variables as following:
-
-!        SELECT CASE ( id )
-!
-!           CASE ( 1 )
-!              dofl_label(k)   = TRIM(label_leg) // '_' // 'abs_u'
-!              dofl_unit(k)    = 'm/s'
-!              k               = k + 1
-!
-!           CASE ( 2 )
-!
-!              dofl_label(k)   = TRIM(label_leg) // '_' // 'abs_v'
-!              dofl_unit(k)    = 'm/s'
-!              k               = k + 1
-!
-!        END SELECT
-
-    ENDIF
-
- END SUBROUTINE user_init_flight
-
Index: palm/trunk/SOURCE/user_init_flight_mod.f90
===================================================================
--- palm/trunk/SOURCE/user_init_flight_mod.f90	(revision 4522)
+++ palm/trunk/SOURCE/user_init_flight_mod.f90	(revision 4522)
@@ -0,0 +1,135 @@
+!> @file user_init_flight_mod.f90
+!--------------------------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! 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-2020 Leibniz Universitaet Hannover
+!--------------------------------------------------------------------------------------------------!
+!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! * Modularize user_init_flight in order to provide an explicit interface.
+! * routine renamed to user_init_flight_mod
+! 
+! 4498 2020-04-15 14:26:31Z raasch
+! file re-formatted to follow the PALM coding standard
+!
+!
+! 4360 2020-01-07 11:25:50Z suehring
+! Corrected "Former revisions" section
+!
+! 3768 2019-02-27 14:35:58Z raasch
+! statements commented or added to avoid compiler warnings about unused variables
+!
+! 3655 2019-01-07 16:51:22Z knoop
+! Corrected "Former revisions" section
+!
+! 1957 2016-07-07 10:43:48Z suehring
+! Initial revision
+!
+!
+! Description:
+! ------------
+!> Initialization of user-defined flight measurements.
+!>
+!> @todo Integrate into user_module when circular dependencies has been vanished.
+!--------------------------------------------------------------------------------------------------!
+ MODULE user_init_flight_mod
+
+    USE control_parameters
+
+    USE indices
+
+    USE kinds
+
+!    USE netcdf_interface,                                                                          &
+!        ONLY: dofl_label,                                                                          &
+!              dofl_unit
+
+    USE user
+
+    IMPLICIT NONE
+
+    PUBLIC user_init_flight
+
+    INTERFACE user_init_flight
+       MODULE PROCEDURE user_init_flight
+    END INTERFACE user_init_flight
+
+    CONTAINS
+
+! Description:
+! ------------
+!> Execution of user-defined initialization for flight measurements.
+!--------------------------------------------------------------------------------------------------!
+ SUBROUTINE user_init_flight( init, k, id, label_leg )
+
+    CHARACTER(LEN=10), OPTIONAL ::  label_leg     !< label of the respective leg
+
+    INTEGER(iwp), OPTIONAL                ::  id  !< variable index
+    INTEGER(iwp), OPTIONAL, INTENT(INOUT) ::  k   !< index for respective variable and leg
+
+    LOGICAL ::  init  !< variable to recognize initial call
+
+!
+!-- Following statements are added to avoid compiler warnings about unused variables. Please remove.
+    IF ( PRESENT( id )        )  CONTINUE
+    IF ( PRESENT( k )         )  CONTINUE
+    IF ( PRESENT( label_leg ) )  CONTINUE
+
+!
+!-- Sample for user-defined flight-time series.
+!-- For each quantity you have to give a label and a unit, which will be used for the output into
+!-- NetCDF file. They must not contain more than twenty characters.
+
+
+    IF ( init )  THEN
+!
+!--    The number of user-defined quantity has to be increased appropriately.
+!--    In the following example, 2 user-defined quantities are added.
+!        num_var_fl_user = num_var_fl_user + 2
+
+       init = .FALSE.
+
+    ELSE
+
+!
+!--    Please add the respective number of new variables as following:
+
+!        SELECT CASE ( id )
+!
+!           CASE ( 1 )
+!              dofl_label(k)   = TRIM(label_leg) // '_' // 'abs_u'
+!              dofl_unit(k)    = 'm/s'
+!              k               = k + 1
+!
+!           CASE ( 2 )
+!
+!              dofl_label(k)   = TRIM(label_leg) // '_' // 'abs_v'
+!              dofl_unit(k)    = 'm/s'
+!              k               = k + 1
+!
+!        END SELECT
+
+    ENDIF
+
+ END SUBROUTINE user_init_flight
+ 
+ END MODULE user_init_flight_mod
+
Index: palm/trunk/SOURCE/virtual_flight_mod.f90
===================================================================
--- palm/trunk/SOURCE/virtual_flight_mod.f90	(revision 4521)
+++ palm/trunk/SOURCE/virtual_flight_mod.f90	(revision 4522)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! Modularize user_init_flight in order to provide an explicit interface.
+! 
+! 4497 2020-04-15 10:20:51Z raasch
 ! file re-formatted to follow the PALM coding standard
 !
@@ -66,4 +69,7 @@
     USE restart_data_mpi_io_mod,                                                                   &
         ONLY:  rd_mpi_io_check_array, rrd_mpi_io_global_array, wrd_mpi_io_global_array
+
+    USE  user_init_flight_mod,                                                                     &
+        ONLY:  user_init_flight
 
 
