Index: palm/trunk/SOURCE/Makefile
===================================================================
--- palm/trunk/SOURCE/Makefile	(revision 4043)
+++ palm/trunk/SOURCE/Makefile	(revision 4047)
@@ -25,26 +25,29 @@
 # -----------------
 # $Id$
+# Introduction of the dynamics module and dissolution of swap_timelevel
+#
+# 4043 2019-06-18 16:59:00Z schwenkel
 # Delete droplet_interactions_ptq
 #
 # 4039 2019-06-18 10:32:41Z suehring
 # add dependency for diagnostic output quantities
-# 
+#
 # 4017 2019-06-06 12:16:46Z schwenkel
 # add dependency for init_pegrid
-# 
+#
 # 3994 2019-05-22 18:08:09Z suehring
 # new module for calculation and output of diagnostic quantities added
-# 
+#
 # 3988 2019-05-22 11:32:37Z kanani
 # Add dependencies for virtual_measurement_mod
-# 
+#
 # 3880 2019-04-08 21:43:02Z knoop
 # Add Netcdf data output for indoor model
 # Remove some dependencies
-# 
+#
 # 3744 2019-02-15 18:38:58Z suehring
-# Enable mesoscale offline nesting for chemistry variables as well as 
+# Enable mesoscale offline nesting for chemistry variables as well as
 # initialization of chemistry via dynamic input file.
-# 
+#
 # 3727 2019-02-08 14:52:10Z gronemeier
 # surface_data_output_mod depends on netcdf_interface_mod
@@ -52,14 +55,14 @@
 # 3700 2019-01-26 17:03:42Z knoop
 # Rename surface_output_mod into surface_data_output_mod
-# 
+#
 # 3637 2018-12-20 01:51:36Z knoop
 # Implementation of the PALM module interface
-# 
+#
 # 3634 2018-12-18 12:31:28Z knoop
 # OpenACC port for SPEC
-# 
+#
 # 3579 2018-11-29 15:32:39Z suehring
 # Dependency for check_parameters on nesting_offl_mod added
-# 
+#
 # 3569 2018-11-27 17:03:40Z kanani
 # dom_dwd_user, Schrempf:
@@ -69,22 +72,22 @@
 # 3525 2018-11-14 16:06:14Z kanani
 # Changes related to clean-up of biometeorology (dom_dwd_user)
-# 
+#
 # 3522 2018-11-13 12:14:36Z suehring
 # Dependencies for virtual measurement module added
-# 
+#
 # 3494 2018-11-06 14:51:27Z suehring
 # Surface output revised
-# 
+#
 # 3474 2018-10-30 21:07:39Z kanani
 # Add virtual measurement module
-# 
+#
 # 3472 2018-10-30 20:43:50Z suehring
 # Add indoor model (kanani, srissman, tlang),
 # minor formatting
-# 
+#
 # 3467 2018-10-30 19:05:21Z suehring
 # Implementation of a new aerosol module salsa.
-# 
-# 
+#
+#
 # 3458 2018-10-30 14:51:23Z kanani
 # from chemistry branch r3443, banzhafs, Russo, forkel, basit:
@@ -93,23 +96,23 @@
 # Added chemistry emission module
 # chemistry_model_mod added to flow_statistics
-# 
+#
 # 3448 2018-10-29 18:14:31Z kanani
 # Adjustment of biometeorology dependencies
-# 
+#
 # 3436 2018-10-26 18:35:15Z gronemeier
 # Add surface_mod to user_data_output_mask
-# 
+#
 # 3435 2018-10-26 18:25:44Z gronemeier
 # - Add surface_mod to data_output_mask
 # - Add chemistry_model_mod and surface_mod to init_masks
-# 
+#
 # 3421 2018-10-24 18:39:32Z gronemeier
 # Add netcdf_data_input_mod to netcdf_interface_mod
 # bugfix: add dependencies to chemistry_model_mod
 # Add module for surface data output
-# 
+#
 # 3381 2018-10-19 13:09:06Z raasch
 # dependencies for ocean_mod fixed
-# 
+#
 # 3355 2018-10-16 14:03:34Z knoop
 # Add module for offline nesting;
@@ -117,13 +120,13 @@
 # Bugfix, missing dependency for turbulence generator in init_3d_model;
 # Some formatting ajdustments
-# 
+#
 # 3343 2018-10-15 10:38:52Z suehring
 # (from branch resler)
 # Add biometeorology
-# 
-# 
+#
+#
 # 3322 2018-10-09 10:02:39Z kanani
 # Formatting and cleanup
-# 
+#
 # 3298 2018-10-02 12:21:11Z kanani
 # Added missing dependencies and replaced blanks with tabs (forkel)
@@ -134,68 +137,68 @@
 # changes related to modularization of the ocean mode,
 # bugfix: dependency to advec_ws was missed in chemistry_model_mod
-# 
+#
 # 3274 2018-09-24 15:42:55Z knoop
 # Added palm dependency of multi_agent_system_mod, because of mas_last_actions
 # call at the end of palm run
-# 
+#
 # 3167 2018-07-24 18:17:30Z suehring
 # Bugfix, add missing dependencies for multi-agent system
-# 
+#
 # 3159 2018-07-20 11:20:01Z sward
 # Added multi agent system
-# 
+#
 # 3130 2018-07-16 11:08:55Z gronemeier
 # add surface_layer_fluxes_mod to turbulence_closure_mod
-# 
+#
 # 3129 2018-07-16 07:45:13Z gronemeier
 # add turbulence_closure_mod to parin
-# 
+#
 # 2963 2018-04-12 14:47:44Z suehring
-# Introduce index for vegetation/wall, pavement/green-wall and water/window 
+# Introduce index for vegetation/wall, pavement/green-wall and water/window
 # surfaces, for clearer access of surface fraction, albedo, emissivity, etc. .
-# 
+#
 # 2955 2018-04-09 15:14:01Z suehring
 # Add log-points to measure CPU time of NetCDF data input.
-# 
+#
 # 2938 2018-03-27 15:52:42Z suehring
 # No initialization of child domains via dynamic input file, except for soil
 # moisture and temperature
 # Apply turbulence generator at non-cyclic lateral boundary in nesting case
-# 
+#
 # 2936 2018-03-27 14:49:27Z suehring
 # Added dependencies for parent and child synchronization
-# 
+#
 # 2921 2018-03-22 15:05:23Z Giersch
 # date_and_time_mod dependency has been added to read/write_restart_data_mod
-# 
+#
 # 2918 2018-03-21 15:52:14Z gronemeier
-# read/write_3d_binary and read/write_var_list has been removed, 
+# read/write_3d_binary and read/write_var_list has been removed,
 # read/write_restart_data_mod, wrd_write_string and
-# user_read/write_restart_data_mod has been added, dependencies with respect to 
+# user_read/write_restart_data_mod has been added, dependencies with respect to
 # the aforementioned routines have been added/removed
 #
 # 2847 2018-03-02 21:45:58Z suehring
 # Changed format and enforced sorting
-# 
+#
 # 2817 2018-02-19 16:32:21Z knoop
 # Preliminary gust module interface implemented
-# 
+#
 # 2802 2018-02-14 16:21:39Z thiele
 # Changed lpm from subroutine to module.
 # Introduce particle transfer in nested models.
-# 
+#
 # 2773 2018-01-30 14:12:54Z suehring
 # Nesting of chemical species
-# 
+#
 # 2718 2018-01-02 08:49:38Z maronga
 # Corrected "Former revisions" section
-# 
+#
 # 2697 2017-12-14 17:57:20Z kanani
 # Bugfix, missing dependencies
-# 
+#
 # 2696 2017-12-14 17:12:51Z kanani
 # Change in file header (GPL part)
 # Implementation of uv exposure model (FK)
-# Bugfix, removed loop dependcy for vertical_nesting_mod and 
+# Bugfix, removed loop dependcy for vertical_nesting_mod and
 # turbulence_closure_mod, added depencies for vertical_nesting_mod (TG)
 # implemented turbulence_closure_mod (TG)
@@ -205,13 +208,13 @@
 # For LSM, add dependency on calc_mean_profile (??)
 # poismg_noopt modularized and renamed into poismg_noopt_mod
-# add dependencies for netcdf_data_input_mod, calc_mean_profile, 
+# add dependencies for netcdf_data_input_mod, calc_mean_profile,
 # radiation_module_mod, land_surface_model_mod (MS)
-# 
+#
 # 2608 2017-11-13 14:04:26Z schwenkel
-# Added diagnostic_quantities_mod 
-# 
+# Added diagnostic_quantities_mod
+#
 # 2600 2017-11-01 14:11:20Z raasch
 # comment line concerning bound checks removed
-# 
+#
 # 2599 2017-11-01 13:18:45Z hellstea
 # virtual_flight_mod, synthetic_turbulence_generator_mod and
@@ -220,40 +223,40 @@
 # 2563 2017-10-19 15:36:10Z Giersch
 # wind_turbine_model_mod and synthetic_turbulence_generator_mod were added to
-# write_var_list and virtual_flight_mod was deleted from read_var_list 
+# write_var_list and virtual_flight_mod was deleted from read_var_list
 #
 # 2544 2017-10-13 18:09:32Z maronga
-# Added date_and_time_mod 
-# 
+# Added date_and_time_mod
+#
 # 2371 2017-08-24 13:01:17Z kanani
 # Corrected dependencies for vertical_nesting_mod
-# 
+#
 # 2370 2017-08-23 06:11:43Z raasch
 # dependency bugfix for synthetic_turbulence_generator
-# 
+#
 # 2365 2017-08-21 14:59:59Z kanani
 # Added dependencies for vertical_nesting_mod
-# 
+#
 # 2339 2017-08-07 13:55:26Z gronemeier
 # corrected timestamp in header
-# 
+#
 # 2338 2017-08-07 12:15:38Z gronemeier
 # Modularize 1D model
-# 
+#
 # 2320 2017-07-21 12:47:43Z suehring
 # -ls_forcing nudging
 # +large_scale_forcing_nudging
-# 
+#
 # 2318 2017-07-20 17:27:44Z suehring
 # Add further dependencies on surface_mod
-# 
+#
 # 2317 2017-07-20 17:27:19Z suehring
 # Added time_integration_spinup
-# 
+#
 # 2269 2017-06-09 11:57:32Z suehring
 # Add dependency in read_3d_binary
-# 
+#
 # 2263 2017-06-08 14:59:01Z schwenkel
 # Implemented splitting and merging algorithm
-# 
+#
 # 2259 2017-06-08 09:09:11Z gronemeier
 # Implemented synthetic turbulence generator
@@ -261,12 +264,12 @@
 # 2256 2017-06-07 13:58:08Z suehring
 # Remove ring dependency in init_pegrid
-# 
+#
 # 2238 2017-05-31 16:49:16Z suehring
 # Bugfix, further missing dependency on surface_mod
-# 
+#
 # 2237 2017-05-31 10:34:53Z suehring
-# Bugfix, add dependencies on surface_mod for surface_coupler, 
-# plant_canopy_model_mod and ls_forcing_mod 
-# 
+# Bugfix, add dependencies on surface_mod for surface_coupler,
+# plant_canopy_model_mod and ls_forcing_mod
+#
 # 2233 2017-05-30 18:08:54Z suehring
 #
@@ -274,5 +277,5 @@
 # +dependencies for surface_mod
 # -wall_fluxes
-# 
+#
 # 2130 2017-01-24 16:25:39Z raasch
 # dependency for timestep updated
@@ -280,13 +283,13 @@
 # 2118 2017-01-17 16:38:49Z raasch
 # -cuda_fft_interfaces_mod
-# 
+#
 # 2050 2016-11-08 15:00:55Z gronemeier
 # Implement turbulent outflow method
-# 
+#
 # 2007 2016-08-24 15:47:17Z kanani
 # urban surface module added,
 # cleaned up some lines (compiler flags/options), which were accidentally
 # added in rev1938
-# 
+#
 # 1998 2016-08-20 18:45:34Z knoop
 # Bugfix: added netcdf_interface to dependency list for user_init_land_surface
@@ -294,8 +297,8 @@
 # 1986 2016-08-10 14:07:17Z gronemeier
 # POSIX-calls module added
-# 
+#
 # 1972 2016-07-26 07:52:02Z maronga
 # Removed some dependencies due to further modularization of land surface model
-# 
+#
 # 1957 2016-07-07 10:43:48Z suehring
 # flight module added
@@ -305,9 +308,9 @@
 #
 # 1938 2016-06-13 15:26:05Z hellstea
-# Some dependency errors corrected 
-# 
+# Some dependency errors corrected
+#
 # 1934 2016-06-13 09:46:57Z hellstea
 # poismg renamed poismg_noopt, poismg_fast_mod renamed poismg_mod
-# 
+#
 # 1914 2016-05-26 14:44:07Z witha
 # Added wind_turbine_model_mod
@@ -320,5 +323,5 @@
 #
 # 1850 2016-04-08 13:29:27Z maronga
-# Adapted for modularization of microphysics 
+# Adapted for modularization of microphysics
 # Several files renamed --> _mod
 # Bugfix for previous commit
@@ -335,16 +338,16 @@
 # 1833 2016-04-07 14:23:03Z raasch
 # spectrum renamed spectra_mod, depencies for spectra changed
-# 
+#
 # 1826 2016-04-07 12:01:39Z maronga
 # Renamed radiation_model to radiation_model_mod.
 # Renamed plant_canopy_model to plant_canopy_model_mod.
-# 
+#
 # 1822 2016-04-07 07:49:42Z hoffmann
 # Tails removed. lpm_release_set removed. calc_precipitation, impact_of_latent_heat
-# removed. 
+# removed.
 #
 # 1817 2016-04-06 15:44:20Z maronga
 # Renamed land_surface_model to land_surface_model_mod.
-# 
+#
 # 1808 2016-04-05 19:44:00Z raasch
 # -local_flush, -local_getenv
@@ -372,5 +375,5 @@
 #
 # 1762 2016-02-25 12:31:13Z hellstea
-# +pmc_interface, +pmc routines 
+# +pmc_interface, +pmc routines
 #
 # 1747 2016-02-08 12:25:53Z raasch
@@ -378,10 +381,10 @@
 #
 # 1691 2015-10-26 16:17:44Z maronga
-# Replaced prandtl_fluxes with surface_layer_fluxes. Added radiation_model to 
+# Replaced prandtl_fluxes with surface_layer_fluxes. Added radiation_model to
 # prognostic_equations
-# 
+#
 # 1585 2015-04-30 07:05:52Z maronga
 # Added user_init_radiation.f90
-# 
+#
 # 1575 2015-03-27 09:56:27Z raasch
 # +poismg_fast
@@ -389,5 +392,5 @@
 # 1551 2015-03-03 14:18:16Z maronga
 # Bugfix: further adjustments for the land surface model and radiation model
-# 
+#
 # 1517 2015-01-07 19:12:25Z hoffmann
 # advec_s_bc added to prognostic_equations
@@ -395,16 +398,16 @@
 # 1500 2014-12-03 17:42:41Z maronga
 # Bugfix: missing adjustments for land surface model and radiation model
-# 
+#
 # 1496 2014-12-02 17:25:50Z maronga
-# Added land surface model and radiation model files: land_surface_model, 
+# Added land surface model and radiation model files: land_surface_model,
 # radiation_model, user_init_land_surface
-# 
+#
 # 1484 2014-10-21 10:53:05Z kanani
 # plant_canopy_model-dependency added for check_parameters, header, init_3d_model,
 # package_parin, read_var_list, user_init_plant_canopy, write_var_list
-# 
+#
 # 1444 2014-08-02 20:10:32Z letzel
 # bugfix: cpulog added to lpm_advec
-# 
+#
 # 1404 2014-05-14 09:01:39Z keck
 # bugfix: dependencies added for progress_bar
@@ -412,11 +415,11 @@
 # 1402 2014-05-09 14:25:13Z raasch
 # progress_bar added
-# 
+#
 # 1400 2014-05-09 14:03:54Z knoop
 # Added new module random_generator_parallel
-# 
+#
 # 1380 2014-04-28 12:40:45Z heinze
 # bugfix: mod_particle_attributes  added to check_open
-# nudging added to time_integration 
+# nudging added to time_integration
 #
 # 1374 2014-04-25 12:55:07Z raasch
@@ -426,5 +429,5 @@
 # Added new module calc_mean_profile, previously in module buoyancy,
 # removed buoyancy dependency from nudging
-# 
+#
 # 1363 2014-04-17 12:28:49Z keck
 # bugfix: cpulog added to lpm_pack_arrays
@@ -432,7 +435,7 @@
 # 1361 2014-04-16 15:17:48Z hoffmann
 # cpulog added to microphysics
-# 
+#
 # 1359 2014-04-11 17:15:14Z hoffmann
-# mod_particle_attributes added, lpm_sort_arrays removed, 
+# mod_particle_attributes added, lpm_sort_arrays removed,
 # lpm_extend_particle_array removed
 #
@@ -606,4 +609,5 @@
 	disturb_field.f90 \
 	disturb_heatflux.f90 \
+	dynamics_mod.f90 \
 	exchange_horiz_2d.f90 \
 	exchange_horiz.f90 \
@@ -679,5 +683,4 @@
 	surface_mod.f90 \
 	surface_data_output_mod.f90 \
-	swap_timelevel.f90 \
 	synthetic_turbulence_generator_mod.f90 \
 	temperton_fft_mod.f90 \
@@ -715,5 +718,5 @@
 
 CC = cc
-CFLAGS = -O 
+CFLAGS = -O
 
 F90 =
@@ -736,5 +739,5 @@
 
 clean:
-	rm -f $(PROG) $(OBJS) *.mod *.smod *.i *.lst 
+	rm -f $(PROG) $(OBJS) *.mod *.smod *.i *.lst
 
 .f90.o:
@@ -994,4 +997,7 @@
 	random_generator_parallel_mod.o \
 	surface_mod.o
+dynamics_mod.o: \
+	mod_kinds.o \
+	modules.o
 exchange_horiz.o: \
 	cpulog_mod.o \
@@ -1179,4 +1185,5 @@
 	chemistry_model_mod.o \
 	diagnostic_output_quantities_mod.o \
+	dynamics_mod.o \
 	gust_mod.o \
 	indoor_model_mod.o \
@@ -1194,4 +1201,5 @@
 	surface_data_output_mod.o \
 	synthetic_turbulence_generator_mod.o \
+	turbulence_closure_mod.o \
 	urban_surface_mod.o \
 	user_module.o \
@@ -1508,11 +1516,4 @@
 	netcdf_interface_mod.o \
 	surface_mod.o
-swap_timelevel.o: \
-	cpulog_mod.o \
-	mod_kinds.o \
-	module_interface.o \
-	modules.o \
-	pmc_interface_mod.o \
-	turbulence_closure_mod.o
 synthetic_turbulence_generator_mod.o: \
 	basic_constants_and_equations_mod.o \
