Index: palm/trunk/SCRIPTS/palmrungui
===================================================================
--- palm/trunk/SCRIPTS/palmrungui	(revision 4418)
+++ palm/trunk/SCRIPTS/palmrungui	(revision 4420)
@@ -25,4 +25,7 @@
 # -----------------
 # $Id$
+# Bugfix: minor fixes related to start buttons
+# 
+# 4411 2020-02-18 14:28:02Z maronga
 # Added new features: individual tag for submitted runs, automatic finding of
 # configuration, start of palmbuild from GUI
@@ -177,5 +180,5 @@
     def startpalmrun(self):
         palmrunline = str(self.groupBox.findChild(QtGui.QLineEdit,"commandline").text())
-        userline = str(self.group_advanced.findChild(QtGui.QLineEdit,"line_user").text())
+        userline    = str(self.group_advanced.findChild(QtGui.QLineEdit,"line_user").text())
         
         # Check for empty line
@@ -246,8 +249,13 @@
         palmbuildline = 'palmbuild -c ' + str(self.group_execution.findChild(QtGui.QComboBox, "combo_configuration").currentText())
         
+        palmrunline_save = str(self.groupBox.findChild(QtGui.QLineEdit,"commandline").text())
+        
         # Disable the main window
+        palmbuildline_save = palmbuildline
         self.tabWidget.setEnabled(False)
         self.groupBox.findChild(QtGui.QPushButton,"button_start").setEnabled(False)
         self.groupBox.findChild(QtGui.QLineEdit,"line_tag").setEnabled(False)  
+        self.groupBox.findChild(QtGui.QPushButton,"button_start").setText("wait...")  
+        self.group_execution.findChild(QtGui.QPushButton,"button_palmbuild").setText("wait...") 
         self.groupBox.findChild(QtGui.QLineEdit,"commandline").setText("Executing palmbuild in xterm...")        
         
@@ -284,5 +292,7 @@
         self.groupBox.findChild(QtGui.QPushButton,"button_start").setEnabled(True)
         self.groupBox.findChild(QtGui.QLineEdit,"line_tag").setEnabled(True)
-        
+        self.groupBox.findChild(QtGui.QPushButton,"button_start").setText("palmrun") 
+        self.groupBox.findChild(QtGui.QLineEdit,"commandline").setText(palmrunline_save)
+        self.group_execution.findChild(QtGui.QPushButton,"button_palmbuild").setText("(re-)build")      
         # Reload recent jobs
         self.recent_jobs(50)
Index: palm/trunk/SCRIPTS/palmrungui_files/mainwindow.ui
===================================================================
--- palm/trunk/SCRIPTS/palmrungui_files/mainwindow.ui	(revision 4418)
+++ palm/trunk/SCRIPTS/palmrungui_files/mainwindow.ui	(revision 4420)
@@ -1411,5 +1411,5 @@
      <y>0</y>
      <width>1185</width>
-     <height>19</height>
+     <height>30</height>
     </rect>
    </property>
@@ -1419,6 +1419,6 @@
       <x>261</x>
       <y>103</y>
-      <width>147</width>
-      <height>156</height>
+      <width>128</width>
+      <height>189</height>
      </rect>
     </property>
@@ -1598,6 +1598,6 @@
    <hints>
     <hint type="sourcelabel">
-     <x>202</x>
-     <y>515</y>
+     <x>206</x>
+     <y>540</y>
     </hint>
     <hint type="destinationlabel">
@@ -1614,6 +1614,6 @@
    <hints>
     <hint type="sourcelabel">
-     <x>240</x>
-     <y>515</y>
+     <x>244</x>
+     <y>540</y>
     </hint>
     <hint type="destinationlabel">
@@ -2292,20 +2292,4 @@
      <x>1182</x>
      <y>495</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>button_start</sender>
-   <signal>clicked()</signal>
-   <receiver>MainWindow</receiver>
-   <slot>startpalmbuild()</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>106</x>
-     <y>756</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>-3</x>
-     <y>672</y>
     </hint>
    </hints>
Index: palm/trunk/SOURCE/Makefile
===================================================================
--- palm/trunk/SOURCE/Makefile	(revision 4418)
+++ palm/trunk/SOURCE/Makefile	(revision 4420)
@@ -25,4 +25,7 @@
 # -----------------
 # $Id$
+# Added output control for wind turbine model
+# 
+# 4414 2020-02-19 20:16:04Z suehring
 # Move dependencies for init grid from advection scheme and multigrid solver
 # to module_interface
@@ -1145,5 +1148,6 @@
 	vertical_nesting_mod.o \
 	virtual_flight_mod.o \
-	virtual_measurement_mod.o
+	virtual_measurement_mod.o \
+	wind_turbine_model_mod.o
 time_integration_spinup.o: \
 	basic_constants_and_equations_mod.o \
Index: palm/trunk/SOURCE/time_integration.f90
===================================================================
--- palm/trunk/SOURCE/time_integration.f90	(revision 4418)
+++ palm/trunk/SOURCE/time_integration.f90	(revision 4420)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! Added output control for wind turbine model
+! 
+! 4403 2020-02-12 13:08:46Z banzhafs
 ! Allowing both existing and on-demand emission read modes
 !
@@ -369,4 +372,7 @@
                vm_time_start
 
+               
+    USE wind_turbine_model_mod,                                                                    &
+        ONLY:  dt_data_output_wtm, time_wtm, wind_turbine, wtm_data_output
 
 #if defined( _OPENACC )
@@ -1286,4 +1292,11 @@
           time_virtual_measurement = time_virtual_measurement + dt_3d
        ENDIF
+       
+!
+!--    Increment time-counter for wind turbine data output
+       IF ( wind_turbine )  THEN
+          time_wtm = time_wtm + dt_3d
+       ENDIF
+ 
 !
 !--    In case of synthetic turbulence generation and parametrized turbulence
@@ -1439,4 +1452,12 @@
                                           MAX( dt_virtual_measurement, dt_3d ) )
        ENDIF
+       
+!
+!--    Output wind turbine data
+       IF ( wind_turbine  .AND.  time_wtm >= dt_data_output_wtm )  THEN
+          CALL wtm_data_output
+          time_wtm = MOD( time_wtm, MAX( dt_data_output_wtm, dt_3d ) )
+       ENDIF
+       
 !
 !--    Profile output (ASCII) on file
Index: palm/trunk/SOURCE/wind_turbine_model_mod.f90
===================================================================
--- palm/trunk/SOURCE/wind_turbine_model_mod.f90	(revision 4418)
+++ palm/trunk/SOURCE/wind_turbine_model_mod.f90	(revision 4420)
@@ -26,4 +26,7 @@
 ! -----------------
 ! $Id$
+! Added output control for wind turbine model
+! 
+! 4412 2020-02-19 14:53:13Z maronga
 ! Bugfix: corrected character length in dimension_names
 ! 
@@ -166,6 +169,8 @@
     
     LOGICAL ::  initial_write_coordinates = .FALSE. 
-
-    REAL(wp) ::  dt_wtm          = 1.0_wp
+    
+    REAL(wp) ::  dt_data_output_wtm = 1.0_wp       !< data output interval
+    REAL(wp) ::  time_wtm           = 0.0_wp       !< time since last data output
+    
     
     REAL(wp) ::  segment_length  = 1.0_wp          !< length of the segments, the rotor area is divided into
@@ -441,4 +446,9 @@
 
     PUBLIC                                                                     &
+           dt_data_output_wtm,                                                 &
+           time_wtm,                                                           &
+           wind_turbine
+
+    PUBLIC                                                                     &
            wtm_parin,                                                          &
            wtm_check_parameters,                                               &
@@ -467,5 +477,8 @@
        CHARACTER (LEN=80) ::  line  !< dummy string that contains the current line of the parameter file 
 
-       NAMELIST /wind_turbine_par/   air_dens, dtow, gear_eff, gear_ratio,     &
+                                  
+       NAMELIST /wind_turbine_parameters/                                      &
+                                  air_dens, dtow, dt_data_output_wtm, gear_eff,&
+                                  gear_ratio,                                  &
                                   gen_eff, inertia_gen, inertia_rot, max_miss, &
                                   max_torque_gen, max_trq_rate, min_miss,      &
@@ -478,17 +491,4 @@
                                   yaw_control, yaw_speed, tl_cor
 !                                  , turb_cd_nacelle
-                                  
-       NAMELIST /wind_turbine_parameters/                                      &
-                                  air_dens, dtow, gear_eff, gear_ratio,        &
-                                  gen_eff, inertia_gen, inertia_rot, max_miss, &
-                                  max_torque_gen, max_trq_rate, min_miss,      &
-                                  min_reg15, min_reg2, nairfoils, nturbines,   &
-                                  omega_rot, phi_yaw, pitch_add, pitch_control,&
-                                  rated_genspeed, rated_power, rcx, rcy, rcz,  &
-                                  rnac, rr, segment_length, segment_width,     &
-                                  slope2, speed_control, tilt, time_turbine_on,&
-                                  turb_cd_tower, pitch_rate,                   &
-                                  yaw_control, yaw_speed, tl_cor
-!                                  , turb_cd_nacelle
 !
 !--    Try to find wind turbine model package
@@ -502,10 +502,10 @@
 !
 !--    Read user-defined namelist
-       READ ( 11, wind_turbine_parameters, ERR = 10 )
+       READ ( 11, wind_turbine_parameters, ERR = 10, END = 12 )
 !
 !--    Set flag that indicates that the wind turbine model is switched on
        wind_turbine = .TRUE.
        
-       GOTO 14
+       GOTO 12
 
  10    BACKSPACE( 11 )
@@ -513,33 +513,6 @@
        CALL parin_fail_message( 'wind_turbine_parameters', line )
 
-!
-!--    Try to find wind turbine model package
- 12    REWIND ( 11 )
-       line = ' '
-       DO WHILE ( INDEX( line, '&wind_turbine_par' ) == 0 )
-          READ ( 11, '(A)', END=14 )  line
-       ENDDO
-       BACKSPACE ( 11 )
-
-!
-!--    Read user-defined namelist
-       READ ( 11, wind_turbine_par, ERR = 13, END = 14 )
-      
-       message_string = 'namelist wind_tubrine_par is deprecated and will ' // &
-                        'be removed in near future. &Please use namelist ' //  &
-                        'wind_turbine_parameters instead' 
-       CALL message( 'wtm_parin', 'PA0487', 0, 1, 0, 6, 0 )     
-      
-!
-!--    Set flag that indicates that the wind turbine model is switched on
-       wind_turbine = .TRUE.
-
-       GOTO 14
-
- 13    BACKSPACE( 11 )
-       READ( 11 , '(A)') line
-       CALL parin_fail_message( 'wind_turbine_par', line )
-
- 14    CONTINUE   ! TBD Change from continue, mit ierrn machen
+
+ 12    CONTINUE   ! TBD Change from continue, mit ierrn machen
 
 
@@ -556,6 +529,6 @@
 
        IMPLICIT NONE
-
-       
+       
+
        CALL wrd_write_string( 'omega_gen' )
        WRITE ( 14 )  omega_gen
@@ -678,7 +651,12 @@
        ENDIF
 
+       IF ( dt_data_output_wtm <= 0.0 )  THEN
+          message_string = 'dt_data_output_wtm must be > 0.0'
+       CALL message( 'check_parameters', 'PA0709', 1, 2, 0, 6, 0 )
+    ENDIF
+       
  
     END SUBROUTINE wtm_check_parameters 
-    
+!     
                                         
 !------------------------------------------------------------------------------!
@@ -1323,5 +1301,5 @@
        ntimesteps = MIN( CEILING(                                                 &
                      ( end_time - MAX( time_turbine_on, time_since_reference_point )&
-                     ) / MAX( 0.1_wp, dt_wtm ) ), ntimesteps_max )
+                     ) / MAX( 0.1_wp, dt_data_output_wtm ) ), ntimesteps_max )
 
        
@@ -2730,8 +2708,4 @@
        ENDIF   
 
-
-!
-!--    NetCDF output, should be moved
-       CALL wtm_data_output
        
        CALL cpu_log( log_point_s(61), 'wtm_forces', 'stop' )
