Ignore:
Timestamp:
Mar 28, 2019 1:16:58 PM (2 years ago)
Author:
raasch
Message:

some routines instrumented with openmp directives, loop reordering for performance optimization

File:
1 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SOURCE/urban_surface_mod.f90

    r3824 r3832  
    2828! -----------------
    2929! $Id$
     30! instrumented with openmp directives
     31!
     32! 3824 2019-03-27 15:56:16Z pavelkrc
    3033! Remove unused imports
    3134!
     
    53325335        LOGICAL      :: spinup  !< if true, no calculation of window temperatures
    53335336
     5337        !$OMP PARALLEL PRIVATE (m, i, j, k, kw, wtend, wintend, win_absorp, wall_mod)
    53345338        wall_mod=1.0_wp
    53355339        IF (usm_wall_mod .AND. spinup) THEN
     
    53415345!
    53425346!--     For horizontal surfaces                                   
     5347        !$OMP DO SCHEDULE (STATIC)
    53435348        DO  m = 1, surf_usm_h%ns
    53445349!
     
    55215526!
    55225527!--     For vertical surfaces     
     5528        !$OMP DO SCHEDULE (STATIC)
    55235529        DO  l = 0, 3                             
    55245530           DO  m = 1, surf_usm_v(l)%ns
     
    56995705           ENDDO
    57005706        ENDDO
     5707        !$OMP END PARALLEL
    57015708
    57025709    END SUBROUTINE usm_material_heat_model
     
    57345741!
    57355742!--     For horizontal surfaces                                   
     5743        !$OMP PARALLEL PRIVATE (m, i, j, k, kw, lambda_h_green_sat, ke, lambda_green_temp, gtend,  &
     5744        !$OMP&                  tend, h_vg, gamma_green_temp, m_total, root_extr_green)
     5745        !$OMP DO SCHEDULE (STATIC)
    57365746        DO  m = 1, surf_usm_h%ns
    57375747
     
    59805990           
    59815991        ENDDO
     5992        !$OMP END PARALLEL
    59825993
    59835994!
     
    77527763!       
    77537764!--     First, treat horizontal surface elements
     7765        !$OMP PARALLEL PRIVATE (m, i, j, k, lambda_surface, lambda_surface_window,                 &
     7766        !$OMP&                  lambda_surface_green, qv1, rho_cp, rho_lv, drho_l_lv, f_shf,       &
     7767        !$OMP&                  f_shf_window, f_shf_green, m_total, f1, f2, e_s, e, f3, f_qsws_veg,&
     7768        !$OMP&                  q_s, f_qsws_liq, f_qsws, e_s_dt, dq_s_dt, coef_1, coef_window_1,   &
     7769        !$OMP&                  coef_green_1, coef_2, coef_window_2, coef_green_2, stend_wall,     &
     7770        !$OMP&                  stend_window, stend_green, tend, m_liq_max)
     7771        !$OMP DO SCHEDULE (STATIC)
    77547772        DO  m = 1, surf_usm_h%ns
    77557773!
     
    81978215       ENDDO
    81988216!
    8199 !--   Now, treat vertical surface elements
     8217!--    Now, treat vertical surface elements
     8218       !$OMP DO SCHEDULE (STATIC)
    82008219       DO  l = 0, 3
    82018220           DO  m = 1, surf_usm_v(l)%ns
     
    85748593 
    85758594       ENDDO
     8595       !$OMP END PARALLEL
     8596
    85768597!
    85778598!--     Add-up anthropogenic heat, for now only at upward-facing surfaces
     
    85868607            dtime = mod(simulated_time + time_utc_init, 24.0_wp*3600.0_wp)
    85878608            dhour = INT(dtime/3600.0_wp)
     8609
     8610!--         TO_DO: activate, if testcase is available
     8611!--         !$OMP PARALLEL DO PRIVATE (i, j, k, acoef, rho_cp)
     8612!--         it may also improve performance to move get_topography_top_index_ji before the k-loop
    85888613            DO i = nxl, nxr
    85898614               DO j = nys, nyn
Note: See TracChangeset for help on using the changeset viewer.