Index: palm/trunk/SOURCE/Makefile
===================================================================
--- palm/trunk/SOURCE/Makefile	(revision 3987)
+++ palm/trunk/SOURCE/Makefile	(revision 3988)
@@ -25,4 +25,7 @@
 # -----------------
 # $Id$
+# Add dependencies for virtual_measurement_mod
+# 
+# 3880 2019-04-08 21:43:02Z knoop
 # Add Netcdf data output for indoor model
 # Remove some dependencies
@@ -1570,5 +1573,6 @@
 	spectra_mod.o \
 	surface_mod.o \
-	vertical_nesting_mod.o
+	vertical_nesting_mod.o \
+	virtual_measurement_mod.o
 run_control.o: \
 	cpulog_mod.o \
@@ -1876,3 +1880,4 @@
 	spectra_mod.o \
 	surface_mod.o \
-	vertical_nesting_mod.o
+	vertical_nesting_mod.o \
+	virtual_measurement_mod.o
Index: palm/trunk/SOURCE/read_restart_data_mod.f90
===================================================================
--- palm/trunk/SOURCE/read_restart_data_mod.f90	(revision 3987)
+++ palm/trunk/SOURCE/read_restart_data_mod.f90	(revision 3988)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! + time_virtual_measurement (to enable steering of output interval)
+! 
+! 3936 2019-04-26 15:38:02Z kanani
 ! Enable time-averaged output of theta_2m* with restarts
 ! 
@@ -167,4 +170,7 @@
     USE vertical_nesting_mod,                                                  &
         ONLY:  vnest_init
+
+    USE virtual_measurement_mod,                                               &
+        ONLY:  time_virtual_measurement
 
 
@@ -670,4 +676,6 @@
              CASE ( 'time_utc_init' )
                 READ ( 13 )  time_utc_init
+             CASE ( 'time_virtual_measurement' )
+                READ ( 13 )  time_virtual_measurement
              CASE ( 'timestep_scheme' )
                 READ ( 13 )  timestep_scheme
Index: palm/trunk/SOURCE/time_integration.f90
===================================================================
--- palm/trunk/SOURCE/time_integration.f90	(revision 3987)
+++ palm/trunk/SOURCE/time_integration.f90	(revision 3988)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! Implement steerable output interval for virtual measurements
+! 
+! 3968 2019-05-13 11:04:01Z suehring
 ! replace nspec_out with n_matched_vars
 ! 
@@ -657,5 +660,9 @@
 
     USE virtual_measurement_mod,                                                                   &
-        ONLY:  vm_data_output, vm_sampling, vm_time_start
+        ONLY:  dt_virtual_measurement,                                                             &
+               time_virtual_measurement,                                                           &
+               vm_data_output,                                                                     &
+               vm_sampling,                                                                        &
+               vm_time_start
 
 
@@ -1538,4 +1545,9 @@
        ENDIF
 !
+!--    Increment time-counter for virtual measurements
+       IF ( virtual_measurement  .AND.  vm_time_start <= time_since_reference_point )  THEN
+          time_virtual_measurement = time_virtual_measurement + dt_3d
+       ENDIF
+!
 !--    In case of synthetic turbulence generation and parametrized turbulence
 !--    information, update the time counter and if required, adjust the 
@@ -1680,9 +1692,11 @@
 !
 !--    Take virtual measurements
-       IF ( virtual_measurement  .AND.  vm_time_start <= time_since_reference_point )  THEN
+       IF ( virtual_measurement  .AND.  time_virtual_measurement >= dt_virtual_measurement         &
+                                 .AND.  vm_time_start <= time_since_reference_point )  THEN
           CALL vm_sampling
           CALL vm_data_output
-       ENDIF
-
+          time_virtual_measurement = MOD(      time_virtual_measurement,                           &
+                                          MAX( dt_virtual_measurement, dt_3d ) )
+       ENDIF
 !
 !--    Profile output (ASCII) on file
Index: palm/trunk/SOURCE/virtual_measurement_mod.f90
===================================================================
--- palm/trunk/SOURCE/virtual_measurement_mod.f90	(revision 3987)
+++ palm/trunk/SOURCE/virtual_measurement_mod.f90	(revision 3988)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! Add variables to enable steering of output interval for virtual measurements
+! 
+! 3913 2019-04-17 15:12:28Z gronemeier
 ! Bugfix: rotate positions of measurements before writing them into file
 ! 
@@ -284,6 +287,8 @@
     LOGICAL ::  init = .TRUE.                     !< flag indicating initialization of data output
     LOGICAL ::  use_virtual_measurement = .FALSE. !< Namelist parameter
-    
-    REAL(wp) ::  vm_time_start = 0.0              !< time after virtual measurements should start
+
+    REAL(wp) ::  dt_virtual_measurement = 0.0_wp    !< namelist parameter
+    REAL(wp) ::  time_virtual_measurement = 0.0_wp  !< time since last 3d output
+    REAL(wp) ::  vm_time_start = 0.0                !< time after virtual measurements should start
 
     TYPE( virt_general )                        ::  vmea_general !< data structure which encompass general variables
@@ -325,5 +330,5 @@
 !
 !-- Public variables
-    PUBLIC  vmea, vmea_general, vm_time_start
+    PUBLIC  dt_virtual_measurement, time_virtual_measurement, vmea, vmea_general, vm_time_start
 
  CONTAINS
@@ -374,5 +379,6 @@
     CHARACTER (LEN=80) ::  line   !< dummy string that contains the current line of the parameter file
  
-    NAMELIST /virtual_measurement_parameters/  use_virtual_measurement,        &
+    NAMELIST /virtual_measurement_parameters/  dt_virtual_measurement,                             &
+                                               use_virtual_measurement,                            &
                                                vm_time_start
 
Index: palm/trunk/SOURCE/write_restart_data_mod.f90
===================================================================
--- palm/trunk/SOURCE/write_restart_data_mod.f90	(revision 3987)
+++ palm/trunk/SOURCE/write_restart_data_mod.f90	(revision 3988)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! + time_virtual_measurement (to enable steering of output interval)
+! 
+! 3936 2019-04-26 15:38:02Z kanani
 ! Enable time-averaged output of theta_2m* with restarts
 ! 
@@ -135,4 +138,7 @@
         ONLY:  vnest_init
 
+    USE virtual_measurement_mod,                                               &
+        ONLY:  time_virtual_measurement
+
 
     IMPLICIT NONE
@@ -713,4 +719,7 @@
        WRITE ( 14 )  time_utc_init
 
+       CALL wrd_write_string( 'time_virtual_measurement' ) 
+       WRITE ( 14 )  time_virtual_measurement
+
        CALL wrd_write_string( 'timestep_scheme' ) 
        WRITE ( 14 )  timestep_scheme
