Index: /palm/trunk/SOURCE/exchange_horiz_2d.f90
===================================================================
--- /palm/trunk/SOURCE/exchange_horiz_2d.f90	(revision 3767)
+++ /palm/trunk/SOURCE/exchange_horiz_2d.f90	(revision 3768)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! further variables moved to serial branch to avoid compiler warnings about unused variables
+! 
+! 3761 2019-02-25 15:31:42Z raasch
 ! variables moved to serial branch to avoid compiler warnings about unused variables
 ! 
@@ -235,8 +238,7 @@
 
     USE control_parameters,                                                    &
-        ONLY:  bc_dirichlet_l, bc_dirichlet_n, bc_dirichlet_r,                 &
-               bc_dirichlet_s, bc_radiation_l, bc_radiation_n, bc_radiation_r, &
-               bc_radiation_s, bc_lr_cyc, bc_ns_cyc, bc_radiation_l,           &
-               bc_radiation_n, bc_radiation_r, bc_radiation_s
+        ONLY:  bc_dirichlet_l, bc_dirichlet_n, bc_dirichlet_r, bc_dirichlet_s, &
+               bc_radiation_l, bc_radiation_n, bc_radiation_r, bc_radiation_s, &
+               bc_radiation_l, bc_radiation_n, bc_radiation_r, bc_radiation_s
         
     USE cpulog,                                                                &
@@ -247,4 +249,9 @@
     USE pegrid
 
+#if ! defined( __parallel )
+    USE control_parameters,                                                    &
+        ONLY:  bc_lr_cyc, bc_ns_cyc
+#endif
+
     IMPLICIT NONE
 
@@ -371,8 +378,8 @@
 
     USE control_parameters,                                                    &
-        ONLY:  bc_dirichlet_l, bc_dirichlet_n, bc_dirichlet_r,                 &
-               bc_dirichlet_s, bc_radiation_l, bc_radiation_n, bc_radiation_r, &
-               bc_radiation_s, bc_lr_cyc, bc_ns_cyc, bc_radiation_l,           &
-               bc_radiation_n, bc_radiation_r, bc_radiation_s, grid_level
+        ONLY:  bc_dirichlet_l, bc_dirichlet_n, bc_dirichlet_r, bc_dirichlet_s, &
+               bc_radiation_l, bc_radiation_n, bc_radiation_r, bc_radiation_s, &
+               bc_radiation_l, bc_radiation_n, bc_radiation_r, bc_radiation_s, &
+               grid_level
         
     USE cpulog,                                                                &
@@ -383,4 +390,9 @@
     USE pegrid
 
+#if ! defined( __parallel )
+    USE control_parameters,                                                    &
+        ONLY:  bc_lr_cyc, bc_ns_cyc
+#endif
+
     IMPLICIT NONE
 
Index: /palm/trunk/SOURCE/user_data_output_dvrp.f90
===================================================================
--- /palm/trunk/SOURCE/user_data_output_dvrp.f90	(revision 3767)
+++ /palm/trunk/SOURCE/user_data_output_dvrp.f90	(revision 3768)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! variables commented + statement added to avoid compiler warnings about unused variables
+! 
+! 3655 2019-01-07 16:51:22Z knoop
 ! Error messages revised
 ! 
@@ -77,10 +80,14 @@
     CHARACTER (LEN=*) ::  output_variable !< 
 
-    INTEGER(iwp) ::  i !< 
-    INTEGER(iwp) ::  j !< 
-    INTEGER(iwp) ::  k !< 
+!    INTEGER(iwp) ::  i !<
+!    INTEGER(iwp) ::  j !<
+!    INTEGER(iwp) ::  k !<
 
     REAL(wp), DIMENSION(nxl_dvrp:nxr_dvrp+1,nys_dvrp:nyn_dvrp+1,nzb:nz_do3d) :: &
               local_pf !< 
+
+!
+!-- Next line is to avoid compiler warning about unused variables. Please remove.
+    IF ( local_pf(nxl_dvrp,nys_dvrp,nzb) == 0.0_wp )  CONTINUE
 
 !
Index: /palm/trunk/SOURCE/user_data_output_mask.f90
===================================================================
--- /palm/trunk/SOURCE/user_data_output_mask.f90	(revision 3767)
+++ /palm/trunk/SOURCE/user_data_output_mask.f90	(revision 3768)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! variables commented + statement added to avoid compiler warnings about unused variables
+! 
+! 3655 2019-01-07 16:51:22Z knoop
 ! Add terrain-following output
 ! 
@@ -76,8 +79,8 @@
 
     INTEGER(iwp) ::  av             !< 
-    INTEGER(iwp) ::  i              !< 
-    INTEGER(iwp) ::  j              !< 
-    INTEGER(iwp) ::  k              !< 
-    INTEGER(iwp) ::  topo_top_ind   !< k index of highest horizontal surface
+!    INTEGER(iwp) ::  i              !<
+!    INTEGER(iwp) ::  j              !<
+!    INTEGER(iwp) ::  k              !<
+!    INTEGER(iwp) ::  topo_top_ind   !< k index of highest horizontal surface
 
     LOGICAL ::  found               !< 
@@ -86,4 +89,9 @@
        DIMENSION(mask_size_l(mid,1),mask_size_l(mid,2),mask_size_l(mid,3)) ::  &
           local_pf   !< 
+
+!
+!-- Next line is to avoid compiler warning about unused variables. Please remove.
+    IF ( av == 0  .OR.                                                                             &
+         local_pf(mask_size_l(mid,1),mask_size_l(mid,2),mask_size_l(mid,3)) == 0.0_wp )  CONTINUE
 
 
Index: /palm/trunk/SOURCE/user_dvrp_coltab.f90
===================================================================
--- /palm/trunk/SOURCE/user_dvrp_coltab.f90	(revision 3767)
+++ /palm/trunk/SOURCE/user_dvrp_coltab.f90	(revision 3768)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! statement added to avoid compiler warning about unused variable
+! 
+! 3655 2019-01-07 16:51:22Z knoop
 ! Corrected "Former revisions" section
 ! 
@@ -71,4 +74,8 @@
     CHARACTER (LEN=*) ::  variable   !< 
 
+!
+!-- Next line is to avoid compiler warning about unused variables. Please remove.
+    IF ( variable(1:1) == ' ' )  CONTINUE
+
 
 !
Index: /palm/trunk/SOURCE/user_flight.f90
===================================================================
--- /palm/trunk/SOURCE/user_flight.f90	(revision 3767)
+++ /palm/trunk/SOURCE/user_flight.f90	(revision 3768)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! unused variables commented out + statement added to avoid compiler warnings
+! 
+! 3684 2019-01-20 20:20:58Z knoop
 ! Corrected "Former revisions" section
 ! 
@@ -59,10 +62,14 @@
     IMPLICIT NONE
 
-    INTEGER(iwp) ::  i  !< index along x
-    INTEGER(iwp) ::  j  !< index along y
-    INTEGER(iwp) ::  k  !< index along z
+!    INTEGER(iwp) ::  i  !< index along x
+!    INTEGER(iwp) ::  j  !< index along y
+!    INTEGER(iwp) ::  k  !< index along z
     INTEGER(iwp) ::  id !< variable identifyer, according to the settings in user_init_flight
         
     REAL(wp), DIMENSION(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ::  var !< treated variable
+
+!
+!-- Next line is to avoid compiler warning about unused variables. Please remove.
+    IF ( id == 0  .OR.  var(nzb,nysg,nxlg) == 0.0_wp )  CONTINUE
 
 !
Index: /palm/trunk/SOURCE/user_init_3d_model.f90
===================================================================
--- /palm/trunk/SOURCE/user_init_3d_model.f90	(revision 3767)
+++ /palm/trunk/SOURCE/user_init_3d_model.f90	(revision 3768)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! variables commented out to avoid compiler warnings about unused variables
+! 
+! 3655 2019-01-07 16:51:22Z knoop
 ! Corrected "Former revisions" section
 ! 
@@ -77,6 +80,6 @@
     IMPLICIT NONE
 
-    INTEGER(iwp) ::  l !< running index surface orientation
-    INTEGER(iwp) ::  m !< running index surface elements
+!    INTEGER(iwp) ::  l !< running index surface orientation
+!    INTEGER(iwp) ::  m !< running index surface elements
 
 !
Index: /palm/trunk/SOURCE/user_init_flight.f90
===================================================================
--- /palm/trunk/SOURCE/user_init_flight.f90	(revision 3767)
+++ /palm/trunk/SOURCE/user_init_flight.f90	(revision 3768)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! statements commented or added to avoid compiler warnings about unused variables
+! 
+! 3655 2019-01-07 16:51:22Z knoop
 ! Corrected "Former revisions" section
 ! 
@@ -51,6 +54,6 @@
     USE kinds
     
-    USE netcdf_interface,                                                      &
-        ONLY: dofl_label, dofl_unit
+!    USE netcdf_interface,                                                      &
+!        ONLY: dofl_label, dofl_unit
     
     USE user
@@ -64,4 +67,11 @@
     
     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.
Index: /palm/trunk/SOURCE/user_init_grid.f90
===================================================================
--- /palm/trunk/SOURCE/user_init_grid.f90	(revision 3767)
+++ /palm/trunk/SOURCE/user_init_grid.f90	(revision 3768)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! variables commented + statement added to avoid compiler warnings about unused variables
+! 
+! 3655 2019-01-07 16:51:22Z knoop
 ! dz was replaced by dz(1)
 ! 
@@ -82,8 +85,13 @@
     IMPLICIT NONE
 
-    INTEGER(iwp)                                           ::  k_topo      !< topography top index
+!    INTEGER(iwp)                                           ::  k_topo      !< topography top index
     INTEGER(iwp), DIMENSION(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ::  topo_3d     !< 3D topography field
 
-    REAL(wp) ::  h_topo !< user-defined topography height
+!    REAL(wp) ::  h_topo !< user-defined topography height
+
+!
+!-- Next line is to avoid compiler warning about unused variables. Please remove.
+    IF ( topo_3d(nzb,nysg,nxlg) == 0 )  CONTINUE
+
 
 !
Index: /palm/trunk/SOURCE/user_init_plant_canopy.f90
===================================================================
--- /palm/trunk/SOURCE/user_init_plant_canopy.f90	(revision 3767)
+++ /palm/trunk/SOURCE/user_init_plant_canopy.f90	(revision 3768)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! unused variables commented out to avoid compiler warnings
+! 
+! 3655 2019-01-07 16:51:22Z knoop
 ! Corrected "Former revisions" section
 ! 
@@ -87,6 +90,6 @@
     IMPLICIT NONE
 
-    INTEGER(iwp) :: i   !< running index
-    INTEGER(iwp) :: j   !< running index
+!    INTEGER(iwp) :: i   !< running index
+!    INTEGER(iwp) :: j   !< running index
 
 !
Index: /palm/trunk/SOURCE/user_init_radiation.f90
===================================================================
--- /palm/trunk/SOURCE/user_init_radiation.f90	(revision 3767)
+++ /palm/trunk/SOURCE/user_init_radiation.f90	(revision 3768)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! unused variables commented out to avoid compiler warnings
+! 
+! 3655 2019-01-07 16:51:22Z knoop
 ! Corrected "Former revisions" section
 ! 
@@ -62,6 +65,6 @@
     IMPLICIT NONE
 
-    INTEGER(iwp) :: i   !< running index
-    INTEGER(iwp) :: j   !< running index
+!    INTEGER(iwp) :: i   !< running index
+!    INTEGER(iwp) :: j   !< running index
 
 !
Index: /palm/trunk/SOURCE/user_init_urban_surface.f90
===================================================================
--- /palm/trunk/SOURCE/user_init_urban_surface.f90	(revision 3767)
+++ /palm/trunk/SOURCE/user_init_urban_surface.f90	(revision 3768)
@@ -26,4 +26,7 @@
 ! -----------------
 ! $Id$
+! unused variables commented out to avoid compiler warnings
+! 
+! 3655 2019-01-07 16:51:22Z knoop
 ! Corrected "Former revisions" section
 ! 
@@ -52,6 +55,6 @@
     USE arrays_3d
     
-    USE control_parameters,                                                    &
-        ONLY:  urban_surface
+!    USE control_parameters,                                                    &
+!        ONLY:  urban_surface
     
     USE indices
@@ -67,7 +70,7 @@
     IMPLICIT NONE
 
-    INTEGER(iwp) ::  i  !< grid index
-    INTEGER(iwp) ::  j  !< grid index
-    INTEGER(iwp) ::  m  !< running index on 1D wall-type grid
+!    INTEGER(iwp) ::  i  !< grid index
+!    INTEGER(iwp) ::  j  !< grid index
+!    INTEGER(iwp) ::  m  !< running index on 1D wall-type grid
 
 !
Index: /palm/trunk/SOURCE/user_lpm_advec.f90
===================================================================
--- /palm/trunk/SOURCE/user_lpm_advec.f90	(revision 3767)
+++ /palm/trunk/SOURCE/user_lpm_advec.f90	(revision 3768)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! variables commented + statement added to avoid compiler warnings about unused variables
+! 
+! 3655 2019-01-07 16:51:22Z knoop
 ! Corrected "Former revisions" section
 ! 
@@ -84,9 +87,13 @@
     INTEGER(iwp) ::  jp   !< index of particle grid box, y-direction
     INTEGER(iwp) ::  kp   !< index of particle grid box, z-direction
-    INTEGER(iwp) ::  n    !< particle index
-    INTEGER(iwp) ::  nb   !< index of sub-box particles are sorted in
+!    INTEGER(iwp) ::  n    !< particle index
+!    INTEGER(iwp) ::  nb   !< index of sub-box particles are sorted in
 
-    INTEGER(iwp), DIMENSION(0:7)  ::  start_index !< start particle index for current sub-box
-    INTEGER(iwp), DIMENSION(0:7)  ::  end_index   !< start particle index for current sub-box
+!    INTEGER(iwp), DIMENSION(0:7)  ::  start_index !< start particle index for current sub-box
+!    INTEGER(iwp), DIMENSION(0:7)  ::  end_index   !< start particle index for current sub-box
+
+!
+!-- Next line is to avoid compiler warning about unused variables. Please remove.
+    IF ( ip == 0  .OR.  jp == 0  .OR.  kp == 0 )  CONTINUE
 
 !
Index: /palm/trunk/SOURCE/user_lpm_init.f90
===================================================================
--- /palm/trunk/SOURCE/user_lpm_init.f90	(revision 3767)
+++ /palm/trunk/SOURCE/user_lpm_init.f90	(revision 3768)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! unused variables commented out to avoid compiler warnings
+! 
+! 3655 2019-01-07 16:51:22Z knoop
 ! Corrected "Former revisions" section
 ! 
@@ -76,8 +79,8 @@
     IMPLICIT NONE
 
-    INTEGER(iwp) ::  ip   !<
-    INTEGER(iwp) ::  jp   !< 
-    INTEGER(iwp) ::  kp   !< 
-    INTEGER(iwp) ::  n    !< 
+!    INTEGER(iwp) ::  ip   !<
+!    INTEGER(iwp) ::  jp   !<
+!    INTEGER(iwp) ::  kp   !<
+!    INTEGER(iwp) ::  n    !<
 
 !
Index: /palm/trunk/SOURCE/user_lpm_set_attributes.f90
===================================================================
--- /palm/trunk/SOURCE/user_lpm_set_attributes.f90	(revision 3767)
+++ /palm/trunk/SOURCE/user_lpm_set_attributes.f90	(revision 3768)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! unused variables commented out to avoid compiler warnings
+! 
+! 3655 2019-01-07 16:51:22Z knoop
 ! Corrected "Former revisions" section
 ! 
@@ -64,6 +67,6 @@
  
 
-    USE indices,                                                               &
-        ONLY:  nxl, nxr, nys, nyn, nzb, nzt
+!    USE indices,                                                               &
+!        ONLY:  nxl, nxr, nys, nyn, nzb, nzt
 
     USE kinds
@@ -75,8 +78,8 @@
     IMPLICIT NONE
 
-    INTEGER(iwp) ::  ip   !<
-    INTEGER(iwp) ::  jp   !< 
-    INTEGER(iwp) ::  kp   !< 
-    INTEGER(iwp) ::  n    !< 
+!    INTEGER(iwp) ::  ip   !<
+!    INTEGER(iwp) ::  jp   !<
+!    INTEGER(iwp) ::  kp   !<
+!    INTEGER(iwp) ::  n    !<
 
 !
Index: /palm/trunk/SOURCE/user_module.f90
===================================================================
--- /palm/trunk/SOURCE/user_module.f90	(revision 3767)
+++ /palm/trunk/SOURCE/user_module.f90	(revision 3768)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! variables commented + statements added to avoid compiler warnings about unused variables
+!
+! 3767 2019-02-27 08:18:02Z raasch
 ! unused variable for file index removed from rrd-subroutines parameter list
 ! 
@@ -247,4 +250,10 @@
 
 !
+!-- Next statement is to avoid compiler warnings about unused variables. Please remove in case
+!-- that you are using them.
+    IF ( dots_num_palm == 0  .OR.  dots_num_user == 0  .OR.  user_idummy == 0  .OR.                &
+         user_rdummy == 0.0_wp )  CONTINUE
+
+!
 !-- Set revision number of this default interface version. It will be checked within
 !-- the main program (palm). Please change the revision number in case that the
@@ -325,10 +334,14 @@
 
 
-   INTEGER(iwp),      INTENT(IN)     ::  dots_max
-   INTEGER(iwp),      INTENT(INOUT)  ::  dots_num
-   CHARACTER (LEN=*), DIMENSION(dots_max), INTENT(INOUT)  :: dots_label
-   CHARACTER (LEN=*), DIMENSION(dots_max), INTENT(INOUT)  :: dots_unit
-
-
+    INTEGER(iwp),      INTENT(IN)     ::  dots_max
+    INTEGER(iwp),      INTENT(INOUT)  ::  dots_num
+    CHARACTER (LEN=*), DIMENSION(dots_max), INTENT(INOUT)  :: dots_label
+    CHARACTER (LEN=*), DIMENSION(dots_max), INTENT(INOUT)  :: dots_unit
+
+!
+!-- Next line is to avoid compiler warning about unused variables. Please remove.
+    IF ( dots_num == 0  .OR.  dots_label(1)(1:1) == ' '  .OR.  dots_unit(1)(1:1) == ' ' )  CONTINUE
+
+!
 !-- Sample for user-defined time series
 !-- For each time series quantity you have to give a label and a unit,
@@ -373,6 +386,10 @@
     CHARACTER (LEN=*) ::  dopr_unit !< local value of dopr_unit
 
-    INTEGER(iwp) ::  user_pr_index !< 
-    INTEGER(iwp) ::  var_count     !< 
+!    INTEGER(iwp) ::  user_pr_index !<
+    INTEGER(iwp) ::  var_count     !<
+
+!
+!-- Next line is to avoid compiler warning about unused variables. Please remove.
+    IF ( unit(1:1) == ' '  .OR.  dopr_unit(1:1) == ' '  .OR.  var_count == 0 )  CONTINUE
 
     SELECT CASE ( TRIM( variable ) )
@@ -448,7 +465,7 @@
 
 
-    INTEGER(iwp) :: i       !< loop index
-    INTEGER(iwp) :: j       !< loop index
-    INTEGER(iwp) :: region  !< index for loop over statistic regions
+!    INTEGER(iwp) :: i       !< loop index
+!    INTEGER(iwp) :: j       !< loop index
+!    INTEGER(iwp) :: region  !< index for loop over statistic regions
 
 !
@@ -487,5 +504,5 @@
 
 
-    CHARACTER (LEN=20) :: field_char   !< 
+!    CHARACTER (LEN=20) :: field_char   !<
 !
 !-- Here the user-defined initializing actions follow:
@@ -598,7 +615,7 @@
     CHARACTER (LEN=*) ::  location !< 
 
-    INTEGER(iwp) ::  i !< 
-    INTEGER(iwp) ::  j !< 
-    INTEGER(iwp) ::  k !< 
+!    INTEGER(iwp) ::  i !<
+!    INTEGER(iwp) ::  j !<
+!    INTEGER(iwp) ::  k !<
 
     CALL cpu_log( log_point(24), 'user_actions', 'start' )
@@ -688,9 +705,8 @@
 
 
-       CHARACTER (LEN=*) ::  location
-
-       INTEGER(iwp) ::  i
-       INTEGER(iwp) ::  idum
-       INTEGER(iwp) ::  j
+    CHARACTER (LEN=*) ::  location
+
+    INTEGER(iwp) ::  i
+    INTEGER(iwp) ::  j
 
 !
@@ -699,4 +715,9 @@
 
        CASE ( 'u-tendency' )
+
+!
+!--       Next line is to avoid compiler warning about unused variables. Please remove.
+          IF ( i == 0  .OR.  j == 0 )  CONTINUE
+
 !
 !--       Enter actions to be done in the u-tendency term here
@@ -752,7 +773,7 @@
     CHARACTER (LEN=*) :: variable !< 
 
-    INTEGER(iwp) ::  i !< 
-    INTEGER(iwp) ::  j !< 
-    INTEGER(iwp) ::  k !< 
+!    INTEGER(iwp) ::  i !<
+!    INTEGER(iwp) ::  j !<
+!    INTEGER(iwp) ::  k !<
 
     IF ( mode == 'allocate' )  THEN
@@ -843,8 +864,8 @@
 
     INTEGER(iwp) ::  av     !< flag to control data output of instantaneous or time-averaged data
-    INTEGER(iwp) ::  i      !< grid index along x-direction
-    INTEGER(iwp) ::  j      !< grid index along y-direction
-    INTEGER(iwp) ::  k      !< grid index along z-direction
-    INTEGER(iwp) ::  m      !< running index surface elements
+!    INTEGER(iwp) ::  i      !< grid index along x-direction
+!    INTEGER(iwp) ::  j      !< grid index along y-direction
+!    INTEGER(iwp) ::  k      !< grid index along z-direction
+!    INTEGER(iwp) ::  m      !< running index surface elements
     INTEGER(iwp) ::  nzb_do !< lower limit of the domain (usually nzb)
     INTEGER(iwp) ::  nzt_do !< upper limit of the domain (usually nzt+1)
@@ -853,7 +874,11 @@
     LOGICAL      ::  two_d !< flag parameter that indicates 2D variables (horizontal cross sections)
 
-    REAL(wp) ::  fill_value = -999.0_wp    !< value for the _FillValue attribute
+!    REAL(wp) ::  fill_value = -999.0_wp    !< value for the _FillValue attribute
 
     REAL(wp), DIMENSION(nxl:nxr,nys:nyn,nzb_do:nzt_do) ::  local_pf !< 
+
+!
+!-- Next line is to avoid compiler warning about unused variables. Please remove.
+    IF ( av == 0  .OR.  local_pf(nxl,nys,nzb_do) == 0.0_wp  .OR.  two_d )  CONTINUE
 
 
@@ -948,7 +973,7 @@
 
     INTEGER(iwp) ::  av    !< 
-    INTEGER(iwp) ::  i     !< 
-    INTEGER(iwp) ::  j     !< 
-    INTEGER(iwp) ::  k     !< 
+!    INTEGER(iwp) ::  i     !<
+!    INTEGER(iwp) ::  j     !<
+!    INTEGER(iwp) ::  k     !<
     INTEGER(iwp) ::  nzb_do !< lower limit of the data output (usually 0)
     INTEGER(iwp) ::  nzt_do !< vertical upper limit of the data output (usually nz_do3d)
@@ -956,7 +981,11 @@
     LOGICAL      ::  found !< 
 
-    REAL(wp) ::  fill_value = -999.0_wp    !< value for the _FillValue attribute
+!    REAL(wp) ::  fill_value = -999.0_wp    !< value for the _FillValue attribute
 
     REAL(sp), DIMENSION(nxl:nxr,nys:nyn,nzb_do:nzt_do) ::  local_pf !< 
+
+!
+!-- Next line is to avoid compiler warning about unused variables. Please remove.
+    IF ( av == 0  .OR.  local_pf(nxl,nys,nzb_do) == 0.0_wp )  CONTINUE
 
 
@@ -1017,11 +1046,15 @@
 
     CHARACTER (LEN=*) ::  mode   !< 
-    INTEGER(iwp) ::  i    !< 
-    INTEGER(iwp) ::  j    !< 
-    INTEGER(iwp) ::  k    !< 
+!    INTEGER(iwp) ::  i    !<
+!    INTEGER(iwp) ::  j    !<
+!    INTEGER(iwp) ::  k    !<
     INTEGER(iwp) ::  sr   !< 
     INTEGER(iwp) ::  tn   !< 
 
-    REAL(wp), DIMENSION(:), ALLOCATABLE ::  ts_value_l   !<
+!    REAL(wp), DIMENSION(:), ALLOCATABLE ::  ts_value_l   !<
+
+!
+!-- Next line is to avoid compiler warning about unused variables. Please remove.
+    IF ( sr == 0  .OR.  tn == 0 )  CONTINUE
 
     IF ( mode == 'profiles' )  THEN
@@ -1096,30 +1129,30 @@
 !> Reading global restart data that has been defined by the user.
 !------------------------------------------------------------------------------!
-    SUBROUTINE user_rrd_global( found )
-
-
-       USE control_parameters,                                                 &
-           ONLY: length, restart_string
-
-
-       LOGICAL, INTENT(OUT)  ::  found 
-
-
-       found = .TRUE.
-
-
-       SELECT CASE ( restart_string(1:length) )
-
-          CASE ( 'global_paramter' )
-!             READ ( 13 )  global_parameter
-
-          CASE DEFAULT
+ SUBROUTINE user_rrd_global( found )
+
+
+    USE control_parameters,                                                 &
+        ONLY: length, restart_string
+
+
+    LOGICAL, INTENT(OUT)  ::  found
+
+
+    found = .TRUE.
+
+
+    SELECT CASE ( restart_string(1:length) )
+
+       CASE ( 'global_paramter' )
+!          READ ( 13 )  global_parameter
+
+       CASE DEFAULT
  
-             found = .FALSE.
-
-       END SELECT
-
-
-    END SUBROUTINE user_rrd_global
+          found = .FALSE.
+
+    END SELECT
+
+
+ END SUBROUTINE user_rrd_global
 
 
@@ -1134,26 +1167,32 @@
 !> calculated in routine rrd_local.
 !------------------------------------------------------------------------------!
-    SUBROUTINE user_rrd_local( k, nxlf, nxlc, nxl_on_file, nxrf, nxrc,         &
-                               nxr_on_file, nynf, nync, nyn_on_file, nysf,     & 
-                               nysc, nys_on_file, tmp_3d, found )
-
-
-       INTEGER(iwp) ::  k               !< 
-       INTEGER(iwp) ::  nxlc            !< 
-       INTEGER(iwp) ::  nxlf            !< 
-       INTEGER(iwp) ::  nxl_on_file     !< 
-       INTEGER(iwp) ::  nxrc            !< 
-       INTEGER(iwp) ::  nxrf            !< 
-       INTEGER(iwp) ::  nxr_on_file     !< 
-       INTEGER(iwp) ::  nync            !< 
-       INTEGER(iwp) ::  nynf            !< 
-       INTEGER(iwp) ::  nyn_on_file     !< 
-       INTEGER(iwp) ::  nysc            !< 
-       INTEGER(iwp) ::  nysf            !< 
-       INTEGER(iwp) ::  nys_on_file     !< 
-
-       LOGICAL, INTENT(OUT)  ::  found 
-
-       REAL(wp), DIMENSION(nzb:nzt+1,nys_on_file-nbgp:nyn_on_file+nbgp,nxl_on_file-nbgp:nxr_on_file+nbgp) :: tmp_3d   !< 
+ SUBROUTINE user_rrd_local( k, nxlf, nxlc, nxl_on_file, nxrf, nxrc,         &
+                            nxr_on_file, nynf, nync, nyn_on_file, nysf,     &
+                            nysc, nys_on_file, tmp_3d, found )
+
+
+    INTEGER(iwp) ::  idum            !<
+    INTEGER(iwp) ::  k               !<
+    INTEGER(iwp) ::  nxlc            !<
+    INTEGER(iwp) ::  nxlf            !<
+    INTEGER(iwp) ::  nxl_on_file     !<
+    INTEGER(iwp) ::  nxrc            !<
+    INTEGER(iwp) ::  nxrf            !<
+    INTEGER(iwp) ::  nxr_on_file     !<
+    INTEGER(iwp) ::  nync            !<
+    INTEGER(iwp) ::  nynf            !<
+    INTEGER(iwp) ::  nyn_on_file     !<
+    INTEGER(iwp) ::  nysc            !<
+    INTEGER(iwp) ::  nysf            !<
+    INTEGER(iwp) ::  nys_on_file     !<
+
+    LOGICAL, INTENT(OUT)  ::  found
+
+    REAL(wp), DIMENSION(nzb:nzt+1,nys_on_file-nbgp:nyn_on_file+nbgp,nxl_on_file-nbgp:nxr_on_file+nbgp) :: tmp_3d   !<
+
+!
+!-- Next line is to avoid compiler warning about unused variables. Please remove.
+    idum = k + nxlc + nxlf + nxrc + nxrf + nync + nynf + nysc + nysf +                             &
+           INT( tmp_3d(nzb,nys_on_file,nxl_on_file) )
 
 !
@@ -1161,26 +1200,23 @@
 !-- Sample for user-defined output
 
-
-       found = .TRUE.
-
-
-          SELECT CASE ( restart_string(1:length) )
-
-             CASE ( 'u2_av' )
-!                IF ( .NOT. ALLOCATED( u2_av ) ) THEN
-!                     ALLOCATE( u2_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
-!                ENDIF
-!                IF ( k == 1 )  READ ( 13 )  tmp_3d
-!                   u2_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =         &
-!                      tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
-!
-             CASE DEFAULT
-
-                found = .FALSE.
-
-             END SELECT
-
-
-    END SUBROUTINE user_rrd_local
+    found = .TRUE.
+
+    SELECT CASE ( restart_string(1:length) )
+
+       CASE ( 'u2_av' )
+!          IF ( .NOT. ALLOCATED( u2_av ) ) THEN
+!               ALLOCATE( u2_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+!          ENDIF
+!          IF ( k == 1 )  READ ( 13 )  tmp_3d
+!             u2_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =         &
+!                tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+!
+       CASE DEFAULT
+
+          found = .FALSE.
+
+    END SELECT
+
+ END SUBROUTINE user_rrd_local
 
 
@@ -1191,12 +1227,10 @@
 !> runs.
 !------------------------------------------------------------------------------!
-    SUBROUTINE user_wrd_global
-
-
-!       CALL wrd_write_string( 'global_parameter' )
-!       WRITE ( 14 )  global_parameter
-
-
-    END SUBROUTINE user_wrd_global    
+ SUBROUTINE user_wrd_global
+
+!    CALL wrd_write_string( 'global_parameter' )
+!    WRITE ( 14 )  global_parameter
+
+ END SUBROUTINE user_wrd_global
 
 
@@ -1207,18 +1241,15 @@
 !> for restart runs.
 !------------------------------------------------------------------------------!
-    SUBROUTINE user_wrd_local
-
+ SUBROUTINE user_wrd_local
 
 !
 !-- Here the user-defined actions at the end of a job follow.
 !-- Sample for user-defined output:
-!          IF ( ALLOCATED( u2_av ) )  THEN
-!             CALL wrd_write_string( 'u2_av' )  
-!             WRITE ( 14 )  u2_av
-!          ENDIF
-
-
-
-    END SUBROUTINE user_wrd_local
+!    IF ( ALLOCATED( u2_av ) )  THEN
+!       CALL wrd_write_string( 'u2_av' )
+!       WRITE ( 14 )  u2_av
+!    ENDIF
+
+ END SUBROUTINE user_wrd_local
 
 
@@ -1236,4 +1267,3 @@
  END SUBROUTINE user_last_actions
 
-
  END MODULE user
Index: /palm/trunk/SOURCE/user_spectra.f90
===================================================================
--- /palm/trunk/SOURCE/user_spectra.f90	(revision 3767)
+++ /palm/trunk/SOURCE/user_spectra.f90	(revision 3768)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! variables removed + statement added to avoid compiler warnings about unused variables
+! 
+! 3655 2019-01-07 16:51:22Z knoop
 ! Renamed output variables
 ! 
@@ -91,10 +94,11 @@
     CHARACTER (LEN=*) ::  mode
 
-    INTEGER(iwp) ::  i    !< 
-    INTEGER(iwp) ::  j    !< 
-    INTEGER(iwp) ::  k    !< 
     INTEGER(iwp) ::  m    !< 
     INTEGER(iwp) ::  pr   !< 
 
+
+!
+!-- Next line is to avoid compiler warning about unused variable. Please remove.
+    IF ( pr == 0 )  CONTINUE
 
 !
