New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 7698 for trunk/NEMOGCM/NEMO/LIM_SRC_3/limthd_da.F90 – NEMO

Ignore:
Timestamp:
2017-02-18T10:02:03+01:00 (7 years ago)
Author:
mocavero
Message:

update trunk with OpenMP parallelization

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMOGCM/NEMO/LIM_SRC_3/limthd_da.F90

    r7646 r7698  
    113113      zastar = 1._wp / ( 1._wp - (rn_dmin / zdmax)**(1._wp/rn_beta) ) 
    114114       
     115!$OMP PARALLEL 
     116!$OMP DO schedule(static) private(jj,ji,zdfloe,zperi,zwlat) 
    115117      DO jj = 1, jpj 
    116118         DO ji = 1, jpi 
     
    135137      !---------------------------------------------------------------------------------------------! 
    136138      DO jl = jpl, 1, -1 
     139!$OMP DO schedule(static) private(jj,ji,rswitch,zda) 
    137140         DO jj = 1, jpj 
    138141            DO ji = 1, jpi 
     
    163166       
    164167      ! total concentration 
    165       at_i(:,:) = SUM( a_i(:,:,:), dim=3 ) 
    166        
     168!$OMP DO schedule(static) private(jj,ji) 
     169      DO jj = 1, jpj 
     170         DO ji = 1, jpi 
     171            at_i(ji,jj) = 0._wp 
     172         END DO 
     173      END DO 
     174      DO jl = 1, jpl 
     175!$OMP DO schedule(static) private(jj,ji) 
     176         DO jj = 1, jpj 
     177            DO ji = 1, jpi 
     178               at_i(ji,jj) = at_i(ji,jj) + a_i(ji,jj,jl) 
     179            END DO 
     180         END DO 
     181      END DO 
    167182      ! --- ensure that ht_i = 0 where a_i = 0 --- 
    168       WHERE( a_i == 0._wp ) ht_i = 0._wp 
     183      DO jl = 1, jpl 
     184!$OMP DO schedule(static) private(jj,ji) 
     185         DO jj = 1, jpj 
     186            DO ji = 1, jpi 
     187               IF(a_i(ji,jj,jl)  == 0._wp) ht_i(ji,jj,jl) = 0._wp 
     188            END DO 
     189         END DO 
     190      END DO 
     191!$OMP END PARALLEL 
     192 
    169193      ! 
    170194      CALL wrk_dealloc( jpi,jpj, zda_tot ) 
Note: See TracChangeset for help on using the changeset viewer.