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/OPA_SRC/ZDF/zdfmxl.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/OPA_SRC/ZDF/zdfmxl.F90

    r7646 r7698  
    9696 
    9797      ! w-level of the mixing and mixed layers 
    98       nmln(:,:)  = nlb10               ! Initialization to the number of w ocean point 
    99       hmlp(:,:)  = 0._wp               ! here hmlp used as a dummy variable, integrating vertically N^2 
    100       zN2_c = grav * rho_c * r1_rau0   ! convert density criteria into N^2 criteria 
     98      zN2_c = grav * rho_c * r1_rau0           ! convert density criteria into N^2 criteria 
     99!$OMP PARALLEL 
     100!$OMP DO schedule(static) private(jj, ji) 
     101      DO jj = 1, jpj 
     102         DO ji = 1, jpi 
     103            nmln(ji,jj)  = nlb10               ! Initialization to the number of w ocean point 
     104            hmlp(ji,jj)  = 0._wp               ! here hmlp used as a dummy variable, integrating vertically N^2 
     105         END DO 
     106      END DO 
    101107      DO jk = nlb10, jpkm1 
     108!$OMP DO schedule(static) private(jj, ji, ikt) 
    102109         DO jj = 1, jpj                ! Mixed layer level: w-level  
    103110            DO ji = 1, jpi 
     
    110117      ! 
    111118      ! w-level of the turbocline and mixing layer (iom_use) 
    112       imld(:,:) = mbkt(:,:) + 1        ! Initialization to the number of w ocean point 
     119!$OMP DO schedule(static) private(jj, ji) 
     120      DO jj = 1, jpj 
     121         DO ji = 1, jpi 
     122            imld(ji,jj) = mbkt(ji,jj) + 1        ! Initialization to the number of w ocean point 
     123         END DO 
     124      END DO 
    113125      DO jk = jpkm1, nlb10, -1         ! from the bottom to nlb10  
     126!$OMP DO schedule(static) private(jj, ji) 
    114127         DO jj = 1, jpj 
    115128            DO ji = 1, jpi 
     
    119132      END DO 
    120133      ! depth of the mixing and mixed layers 
     134!$OMP DO schedule(static) private(jj, ji, iiki, iikn) 
    121135      DO jj = 1, jpj 
    122136         DO ji = 1, jpi 
     
    128142         END DO 
    129143      END DO 
     144!$OMP END PARALLEL 
    130145      ! 
    131146      IF( .NOT.l_offline ) THEN 
Note: See TracChangeset for help on using the changeset viewer.