Index: palm/trunk/SOURCE/land_surface_model_mod.f90
===================================================================
--- palm/trunk/SOURCE/land_surface_model_mod.f90	(revision 3831)
+++ palm/trunk/SOURCE/land_surface_model_mod.f90	(revision 3832)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! instrumented with openmp directives
+! 
+! 3786 2019-03-06 16:58:03Z raasch
 ! further unused variables removed
 ! 
@@ -1900,4 +1903,9 @@
     i_off = surf%ioff
 
+    !$OMP PARALLEL PRIVATE (m, i, j, k, lambda_h_sat, ke, lambda_soil, lambda_surface,             &
+    !$OMP&                  c_surface_tmp, f1,m_total, f2, e_s, e, f3, m_min, m_liq_max, q_s,      &
+    !$OMP&                  f_qsws_veg, f_qsws_soil, f_qsws_liq, f_shf, f_qsws, e_s_dt, dq_s_dt,   &
+    !$OMP&                  coef_1, coef_2, tend)
+    !$OMP DO SCHEDULE (STATIC)
     DO  m = 1, surf%ns
 
@@ -2396,4 +2404,5 @@
 
     ENDDO
+    !$OMP END PARALLEL
 
 !
@@ -2438,4 +2447,7 @@
        REAL(wp) ::  resistance    !< aerodynamic and soil resistance term
 
+
+       !$OMP PARALLEL PRIVATE (m, i, j, k, e_s, q_s, resistance)
+       !$OMP DO SCHEDULE (STATIC)
        DO  m = 1, surf%ns
 
@@ -2474,4 +2486,5 @@
                      
        ENDDO
+       !$OMP END PARALLEL
   
     END SUBROUTINE calc_q_surface
@@ -5253,4 +5266,6 @@
        ENDIF
 
+       !$OMP PARALLEL PRIVATE (m, k, lambda_temp, lambda_h_sat, ke, tend, gamma_temp, h_vg, m_total)
+       !$OMP DO SCHEDULE (STATIC)
        DO  m = 1, surf%ns
 
@@ -5525,4 +5540,5 @@
 
        ENDDO
+       !$OMP END PARALLEL
 
     END SUBROUTINE lsm_soil_model
Index: palm/trunk/SOURCE/transpose.f90
===================================================================
--- palm/trunk/SOURCE/transpose.f90	(revision 3831)
+++ palm/trunk/SOURCE/transpose.f90	(revision 3832)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! loop reordering for performance optimization
+! 
+! 3694 2019-01-23 17:01:49Z knoop
 ! OpenACC port for SPEC
 ! 
@@ -129,6 +132,6 @@
      !$ACC PRESENT(f_inv, f_in)
 #endif
-     DO  i = 0, nx
-         DO  k = nzb_x, nzt_x
+     DO  k = nzb_x, nzt_x
+         DO  i = 0, nx
              DO  j = nys_x, nyn_x
                  f_inv(j,k,i) = f_in(i,j,k)
@@ -856,6 +859,6 @@
     !$ACC PRESENT(f_in, f_inv)
 #endif
-     DO  k = 1,nz
-         DO  i = nxl, nxr
+     DO  i = nxl, nxr
+         DO  k = 1,nz
              DO  j = nys, nyn
                  f_inv(j,i,k) = f_in(k,j,i)
@@ -1020,6 +1023,6 @@
     !$ACC PRESENT(f_out, f_inv)
 #endif
-     DO  k = nzb_y, nzt_y
-         DO  j = 0, ny
+     DO  j = 0, ny
+         DO  k = nzb_y, nzt_y
              DO  i = nxl_y, nxr_y
                  f_out(j,i,k) = f_inv(i,k,j)
Index: palm/trunk/SOURCE/urban_surface_mod.f90
===================================================================
--- palm/trunk/SOURCE/urban_surface_mod.f90	(revision 3831)
+++ palm/trunk/SOURCE/urban_surface_mod.f90	(revision 3832)
@@ -28,4 +28,7 @@
 ! -----------------
 ! $Id$
+! instrumented with openmp directives
+! 
+! 3824 2019-03-27 15:56:16Z pavelkrc
 ! Remove unused imports
 !
@@ -5332,4 +5335,5 @@
         LOGICAL      :: spinup  !< if true, no calculation of window temperatures
 
+        !$OMP PARALLEL PRIVATE (m, i, j, k, kw, wtend, wintend, win_absorp, wall_mod)
         wall_mod=1.0_wp
         IF (usm_wall_mod .AND. spinup) THEN
@@ -5341,4 +5345,5 @@
 !
 !--     For horizontal surfaces                                   
+        !$OMP DO SCHEDULE (STATIC)
         DO  m = 1, surf_usm_h%ns
 !
@@ -5521,4 +5526,5 @@
 !
 !--     For vertical surfaces     
+        !$OMP DO SCHEDULE (STATIC)
         DO  l = 0, 3                              
            DO  m = 1, surf_usm_v(l)%ns
@@ -5699,4 +5705,5 @@
            ENDDO
         ENDDO
+        !$OMP END PARALLEL
 
     END SUBROUTINE usm_material_heat_model
@@ -5734,4 +5741,7 @@
 !
 !--     For horizontal surfaces                                   
+        !$OMP PARALLEL PRIVATE (m, i, j, k, kw, lambda_h_green_sat, ke, lambda_green_temp, gtend,  &
+        !$OMP&                  tend, h_vg, gamma_green_temp, m_total, root_extr_green)
+        !$OMP DO SCHEDULE (STATIC)
         DO  m = 1, surf_usm_h%ns
 
@@ -5980,4 +5990,5 @@
            
         ENDDO
+        !$OMP END PARALLEL
 
 !
@@ -7752,4 +7763,11 @@
 !        
 !--     First, treat horizontal surface elements
+        !$OMP PARALLEL PRIVATE (m, i, j, k, lambda_surface, lambda_surface_window,                 &
+        !$OMP&                  lambda_surface_green, qv1, rho_cp, rho_lv, drho_l_lv, f_shf,       &
+        !$OMP&                  f_shf_window, f_shf_green, m_total, f1, f2, e_s, e, f3, f_qsws_veg,&
+        !$OMP&                  q_s, f_qsws_liq, f_qsws, e_s_dt, dq_s_dt, coef_1, coef_window_1,   &
+        !$OMP&                  coef_green_1, coef_2, coef_window_2, coef_green_2, stend_wall,     &
+        !$OMP&                  stend_window, stend_green, tend, m_liq_max)
+        !$OMP DO SCHEDULE (STATIC)
         DO  m = 1, surf_usm_h%ns
 !
@@ -8197,5 +8215,6 @@
        ENDDO
 !
-!--   Now, treat vertical surface elements
+!--    Now, treat vertical surface elements
+       !$OMP DO SCHEDULE (STATIC)
        DO  l = 0, 3
            DO  m = 1, surf_usm_v(l)%ns
@@ -8574,4 +8593,6 @@
  
        ENDDO
+       !$OMP END PARALLEL
+
 !
 !--     Add-up anthropogenic heat, for now only at upward-facing surfaces
@@ -8586,4 +8607,8 @@
             dtime = mod(simulated_time + time_utc_init, 24.0_wp*3600.0_wp)
             dhour = INT(dtime/3600.0_wp)
+
+!--         TO_DO: activate, if testcase is available
+!--         !$OMP PARALLEL DO PRIVATE (i, j, k, acoef, rho_cp)
+!--         it may also improve performance to move get_topography_top_index_ji before the k-loop
             DO i = nxl, nxr
                DO j = nys, nyn
Index: palm/trunk/SOURCE/wind_turbine_model_mod.f90
===================================================================
--- palm/trunk/SOURCE/wind_turbine_model_mod.f90	(revision 3831)
+++ palm/trunk/SOURCE/wind_turbine_model_mod.f90	(revision 3832)
@@ -26,4 +26,7 @@
 ! -----------------
 ! $Id$
+! instrumented with openmp directives
+! 
+! 3725 2019-02-07 10:11:02Z raasch
 ! unused variables removed
 ! 
@@ -340,4 +343,6 @@
     REAL(wp) ::  w_int_l                     !< 
     REAL(wp) ::  w_int_u                     !<
+    !$OMP THREADPRIVATE (cur_r, phi_rotor, pre_factor, torque_seg, u_int_l, u_int_u, u_rot, &
+    !$OMP&               v_int_l, v_int_u, w_int_l, w_int_u)
 !
 !-  Tendencies from the nacelle and tower thrust
@@ -346,4 +351,5 @@
     REAL(wp) ::  tend_nac_y = 0.0_wp  !< 
     REAL(wp) ::  tend_tow_y = 0.0_wp  !<
+    !$OMP THREADPRIVATE (tend_nac_x, tend_tow_x, tend_nac_y, tend_tow_y)
 
     REAL(wp), DIMENSION(:), ALLOCATABLE ::  alpha_attack !< 
@@ -1731,4 +1737,8 @@
 !
 !--          Loop over rings of each turbine:
+
+             !$OMP PARALLEL PRIVATE (ring, rseg, thrust_seg, torque_seg_y, torque_seg_z, sin_rot,  &
+             !$OMP&                  cos_rot, re, rbx, rby, rbz, ii, jj, kk, aa, bb, cc, dd, gg)
+             !$OMP DO
              DO ring = 1, nrings(inot)
 
@@ -1919,4 +1929,5 @@
                 ENDDO
              ENDDO
+             !$OMP END PARALLEL
 
           ENDDO
@@ -1960,4 +1971,10 @@
 !
 !--          Loop over rings of each turbine:
+             !$OMP PARALLEL PRIVATE (ring, rseg, sin_rot, cos_rot, re, rea, ren, rote, rota, rotn, &
+             !$OMP&                  vtheta, phi_rel, lct, rad_d, alpha_attack, vrel,              &
+             !$OMP&                  chord, iialpha, iir, turb_cl, tl_factor, thrust_seg,          &
+             !$OMP&                  torque_seg_y, turb_cd, torque_seg_z, thrust_ring,             &
+             !$OMP&                  torque_ring_y, torque_ring_z)
+             !$OMP DO
              DO ring = 1, nrings(inot)
 !
@@ -2184,4 +2201,5 @@
 !
 !--                Add the segment thrust to the thrust of the whole rotor
+                   !$OMP CRITICAL
                    thrust_rotor(inot) = thrust_rotor(inot) +                   &
                                         thrust_seg(rseg)                   
@@ -2189,4 +2207,5 @@
 
                    torque_total(inot) = torque_total(inot) + (torque_seg * cur_r)
+                   !$OMP END CRITICAL
 
                 ENDDO   !-- end of loop over ring segments
@@ -2201,4 +2220,5 @@
 
              ENDDO   !-- end of loop over rings
+             !$OMP END PARALLEL
 
 
@@ -2297,4 +2317,6 @@
                                         eps_min ) / dy )
 
+             !$OMP PARALLEL PRIVATE (i, j, k, ring, rseg, flag, dist_u_3d, dist_v_3d, dist_w_3d)
+             !$OMP DO
              DO i = MAX( nxl, i_hub(inot) - i_smear(inot) ),                   &
                     MIN( nxr, i_hub(inot) + i_smear(inot) )
@@ -2377,4 +2399,5 @@
                 ENDDO           ! End of loop over j
              ENDDO              ! End of loop over i
+             !$OMP END PARALLEL
 
              CALL cpu_log( log_point_s(63), 'wtm_smearing', 'stop' )          
