Index: branches/2016/dev_r6519_HPC_4/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_ts.F90
===================================================================
--- branches/2016/dev_r6519_HPC_4/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_ts.F90	(revision 7037)
+++ branches/2016/dev_r6519_HPC_4/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_ts.F90	(revision 7508)
@@ -244,8 +244,8 @@
             !
 !$OMP PARALLEL
-!$OMP WORKSHARE
-            ftne(1,:) = 0._wp ; ftnw(1,:) = 0._wp ; ftse(1,:) = 0._wp ; ftsw(1,:) = 0._wp
-!$OMP END WORKSHARE
-
+!$OMP DO schedule(static) private(jj)
+            DO jj = 1, jpj
+               ftne(1,jj) = 0._wp ; ftnw(1,jj) = 0._wp ; ftse(1,jj) = 0._wp ; ftsw(1,jj) = 0._wp
+            END DO
 !$OMP DO schedule(static) private(jj, ji)
             DO jj = 2, jpj
@@ -261,8 +261,11 @@
             !
          ELSE                                !== all other schemes (ENE, ENS, MIX)
-!$OMP PARALLEL WORKSHARE
-            zwz(:,:) = 0._wp
-            zhf(:,:) = 0._wp
-!$OMP END PARALLEL WORKSHARE
+!$OMP PARALLEL DO schedule(static) private(jj, ji)
+            DO jj = 1, jpj
+               DO ji = 1, jpi
+                  zwz(ji,jj) = 0._wp
+                  zhf(ji,jj) = 0._wp
+               END DO
+            END DO
             IF ( .not. ln_sco ) THEN
 
@@ -276,7 +279,10 @@
 !              zhf(:,:) = gdepw_0(:,:,jk+1)
             ELSE
-!$OMP PARALLEL WORKSHARE
-               zhf(:,:) = hbatf(:,:)
-!$OMP END PARALLEL WORKSHARE
+!$OMP PARALLEL DO schedule(static) private(jj, ji)
+               DO jj = 1, jpj
+                  DO ji = 1, jpi
+                     zhf(ji,jj) = hbatf(ji,jj)
+                  END DO
+               END DO
             END IF
 
@@ -308,7 +314,10 @@
                END DO
             END DO
-!$OMP WORKSHARE
-            zwz(:,:) = ff(:,:) * zwz(:,:)
-!$OMP END WORKSHARE NOWAIT
+!$OMP DO schedule(static) private(jj, ji)
+               DO jj = 1, jpj
+                  DO ji = 1, jpi
+                     zwz(ji,jj) = ff(ji,jj) * zwz(ji,jj)
+                  END DO
+               END DO
 !$OMP END PARALLEL
          ENDIF
@@ -330,8 +339,11 @@
       !                                   ! --------------------------------------------------
 !$OMP PARALLEL
-!$OMP WORKSHARE
-      zu_frc(:,:) = 0._wp
-      zv_frc(:,:) = 0._wp
-!$OMP END WORKSHARE
+!$OMP DO schedule(static) private(jj, ji)
+      DO jj = 1, jpj
+         DO ji = 1, jpi
+            zu_frc(ji,jj) = 0._wp
+            zv_frc(ji,jj) = 0._wp
+         END DO
+      END DO
       !
       DO jk = 1, jpkm1
@@ -345,9 +357,11 @@
       END DO
       !
-!$OMP WORKSHARE
-      zu_frc(:,:) = zu_frc(:,:) * r1_hu_n(:,:)
-      zv_frc(:,:) = zv_frc(:,:) * r1_hv_n(:,:)
-!$OMP END WORKSHARE
-      !
+!$OMP DO schedule(static) private(jj, ji)
+      DO jj = 1, jpj
+         DO ji = 1, jpi
+            zu_frc(ji,jj) = zu_frc(ji,jj) * r1_hu_n(ji,jj)
+            zv_frc(ji,jj) = zv_frc(ji,jj) * r1_hv_n(ji,jj)
+         END DO
+      END DO
       !
       !                                   !* baroclinic momentum trend (remove the vertical mean trend)
@@ -364,8 +378,11 @@
       !                                   !* barotropic Coriolis trends (vorticity scheme dependent)
       !                                   ! --------------------------------------------------------
-!$OMP WORKSHARE
-      zwx(:,:) = un_b(:,:) * hu_n(:,:) * e2u(:,:)        ! now fluxes 
-      zwy(:,:) = vn_b(:,:) * hv_n(:,:) * e1v(:,:)
-!$OMP END WORKSHARE NOWAIT
+!$OMP DO schedule(static) private(jj, ji)
+      DO jj = 1, jpj
+         DO ji = 1, jpi
+            zwx(ji,jj) = un_b(ji,jj) * hu_n(ji,jj) * e2u(ji,jj)        ! now fluxes 
+            zwy(ji,jj) = vn_b(ji,jj) * hv_n(ji,jj) * e1v(ji,jj)
+         END DO
+      END DO
 !$OMP END PARALLEL
       !
@@ -419,8 +436,11 @@
         IF( ln_wd ) THEN                        ! Calculating and applying W/D gravity filters
 !$OMP PARALLEL
-!$OMP WORKSHARE
-          wduflt1(:,:) = 1.0_wp
-          wdvflt1(:,:) = 1.0_wp
-!$OMP END WORKSHARE
+!$OMP DO schedule(static) private(jj, ji)
+          DO jj = 1, jpj
+             DO ji = 1, jpi
+                wduflt1(ji,jj) = 1.0_wp
+                wdvflt1(ji,jj) = 1.0_wp
+             END DO
+          END DO
 !$OMP DO schedule(static) private(jj,ji,ll_tmp1,ll_tmp2)
           DO jj = 2, jpjm1
@@ -529,8 +549,11 @@
          END DO
       ELSE
-!$OMP PARALLEL WORKSHARE
-        zu_frc(:,:) = zu_frc(:,:) + r1_hu_n(:,:) * bfrua(:,:) * zwx(:,:)
-        zv_frc(:,:) = zv_frc(:,:) + r1_hv_n(:,:) * bfrva(:,:) * zwy(:,:)
-!$OMP END PARALLEL WORKSHARE
+!$OMP PARALLEL DO schedule(static) private(jj,ji)
+         DO jj = 1, jpj
+            DO ji = 1, jpi
+               zu_frc(ji,jj) = zu_frc(ji,jj) + r1_hu_n(ji,jj) * bfrua(ji,jj) * zwx(ji,jj)
+               zv_frc(ji,jj) = zv_frc(ji,jj) + r1_hv_n(ji,jj) * bfrva(ji,jj) * zwy(ji,jj)
+            END DO
+         END DO
       END IF
       !
@@ -559,19 +582,28 @@
       !
       ! Note that the "unclipped" top friction parameter is used even with explicit drag
-!$OMP PARALLEL WORKSHARE
-      zu_frc(:,:) = zu_frc(:,:) + r1_hu_n(:,:) * tfrua(:,:) * zwx(:,:)
-      zv_frc(:,:) = zv_frc(:,:) + r1_hv_n(:,:) * tfrva(:,:) * zwy(:,:)
-!$OMP END PARALLEL WORKSHARE
+!$OMP PARALLEL DO schedule(static) private(jj,ji)
+      DO jj = 1, jpj
+         DO ji = 1, jpi
+            zu_frc(ji,jj) = zu_frc(ji,jj) + r1_hu_n(ji,jj) * tfrua(ji,jj) * zwx(ji,jj)
+            zv_frc(ji,jj) = zv_frc(ji,jj) + r1_hv_n(ji,jj) * tfrva(ji,jj) * zwy(ji,jj)
+         END DO
+      END DO
       !       
       IF (ln_bt_fw) THEN                        ! Add wind forcing
-!$OMP PARALLEL WORKSHARE
-         zu_frc(:,:) =  zu_frc(:,:) + zraur * utau(:,:) * r1_hu_n(:,:)
-         zv_frc(:,:) =  zv_frc(:,:) + zraur * vtau(:,:) * r1_hv_n(:,:)
-!$OMP END PARALLEL WORKSHARE
+!$OMP PARALLEL DO schedule(static) private(jj,ji)
+         DO jj = 1, jpj
+            DO ji = 1, jpi
+               zu_frc(ji,jj) =  zu_frc(ji,jj) + zraur * utau(ji,jj) * r1_hu_n(ji,jj)
+               zv_frc(ji,jj) =  zv_frc(ji,jj) + zraur * vtau(ji,jj) * r1_hv_n(ji,jj)
+            END DO
+         END DO
       ELSE
-!$OMP PARALLEL WORKSHARE
-         zu_frc(:,:) =  zu_frc(:,:) + zraur * z1_2 * ( utau_b(:,:) + utau(:,:) ) * r1_hu_n(:,:)
-         zv_frc(:,:) =  zv_frc(:,:) + zraur * z1_2 * ( vtau_b(:,:) + vtau(:,:) ) * r1_hv_n(:,:)
-!$OMP END PARALLEL WORKSHARE
+!$OMP PARALLEL DO schedule(static) private(jj,ji)
+         DO jj = 1, jpj
+            DO ji = 1, jpi
+               zu_frc(ji,jj) =  zu_frc(ji,jj) + zraur * z1_2 * ( utau_b(ji,jj) + utau(ji,jj) ) * r1_hu_n(ji,jj)
+               zv_frc(ji,jj) =  zv_frc(ji,jj) + zraur * z1_2 * ( vtau_b(ji,jj) + vtau(ji,jj) ) * r1_hv_n(ji,jj)
+            END DO
+         END DO
       ENDIF  
       !
@@ -605,19 +637,28 @@
       !                                         ! Surface net water flux and rivers
       IF (ln_bt_fw) THEN
-!$OMP PARALLEL WORKSHARE
-         zssh_frc(:,:) = zraur * ( emp(:,:) - rnf(:,:) + fwfisf(:,:) )
-!$OMP END PARALLEL WORKSHARE
+!$OMP PARALLEL DO schedule(static) private(jj,ji)
+         DO jj = 1, jpj
+            DO ji = 1, jpi
+               zssh_frc(ji,jj) = zraur * ( emp(ji,jj) - rnf(ji,jj) + fwfisf(ji,jj) )
+            END DO
+         END DO
       ELSE
-!$OMP PARALLEL WORKSHARE
-         zssh_frc(:,:) = zraur * z1_2 * (  emp(:,:) + emp_b(:,:) - rnf(:,:) - rnf_b(:,:)   &
-                &                        + fwfisf(:,:) + fwfisf_b(:,:)                     )
-!$OMP END PARALLEL WORKSHARE
+!$OMP PARALLEL DO schedule(static) private(jj,ji)
+         DO jj = 1, jpj
+            DO ji = 1, jpi
+               zssh_frc(ji,jj) = zraur * z1_2 * (  emp(ji,jj) + emp_b(ji,jj) - rnf(ji,jj) - rnf_b(ji,jj)   &
+                &                        + fwfisf(ji,jj) + fwfisf_b(ji,jj)                     )
+            END DO
+         END DO
       ENDIF
 #if defined key_asminc
       !                                         ! Include the IAU weighted SSH increment
       IF( lk_asminc .AND. ln_sshinc .AND. ln_asmiau ) THEN
-!$OMP PARALLEL WORKSHARE
-         zssh_frc(:,:) = zssh_frc(:,:) - ssh_iau(:,:)
-!$OMP END PARALLEL WORKSHARE
+!$OMP PARALLEL DO schedule(static) private(jj,ji)
+         DO jj = 1, jpj
+            DO ji = 1, jpi
+               zssh_frc(ji,jj) = zssh_frc(ji,jj) - ssh_iau(ji,jj)
+            END DO
+         END DO
       ENDIF
 #endif
@@ -637,12 +678,15 @@
       ! Initialize barotropic variables:      
       IF( ll_init )THEN
-!$OMP PARALLEL WORKSHARE
-         sshbb_e(:,:) = 0._wp
-         ubb_e  (:,:) = 0._wp
-         vbb_e  (:,:) = 0._wp
-         sshb_e (:,:) = 0._wp
-         ub_e   (:,:) = 0._wp
-         vb_e   (:,:) = 0._wp
-!$OMP END PARALLEL WORKSHARE
+!$OMP PARALLEL DO schedule(static) private(jj,ji)
+         DO jj = 1, jpj
+            DO ji = 1, jpi
+               sshbb_e(ji,jj) = 0._wp
+               ubb_e  (ji,jj) = 0._wp
+               vbb_e  (ji,jj) = 0._wp
+               sshb_e (ji,jj) = 0._wp
+               ub_e   (ji,jj) = 0._wp
+               vb_e   (ji,jj) = 0._wp
+            END DO
+         END DO
       ENDIF
 
@@ -659,25 +703,31 @@
       !
       IF (ln_bt_fw) THEN                  ! FORWARD integration: start from NOW fields                    
-!$OMP PARALLEL WORKSHARE
-         sshn_e(:,:) =    sshn(:,:)            
-         un_e  (:,:) =    un_b(:,:)            
-         vn_e  (:,:) =    vn_b(:,:)
-         !
-         hu_e  (:,:) =    hu_n(:,:)       
-         hv_e  (:,:) =    hv_n(:,:) 
-         hur_e (:,:) = r1_hu_n(:,:)    
-         hvr_e (:,:) = r1_hv_n(:,:)
-!$OMP END PARALLEL WORKSHARE
+!$OMP PARALLEL DO schedule(static) private(jj,ji)
+         DO jj = 1, jpj
+            DO ji = 1, jpi
+               sshn_e(ji,jj) =    sshn(ji,jj)            
+               un_e  (ji,jj) =    un_b(ji,jj)            
+               vn_e  (ji,jj) =    vn_b(ji,jj)
+                !
+               hu_e  (ji,jj) =    hu_n(ji,jj)       
+               hv_e  (ji,jj) =    hv_n(ji,jj) 
+               hur_e (ji,jj) = r1_hu_n(ji,jj)    
+               hvr_e (ji,jj) = r1_hv_n(ji,jj)
+            END DO
+         END DO
       ELSE                                ! CENTRED integration: start from BEFORE fields
-!$OMP PARALLEL WORKSHARE
-         sshn_e(:,:) =    sshb(:,:)
-         un_e  (:,:) =    ub_b(:,:)         
-         vn_e  (:,:) =    vb_b(:,:)
-         !
-         hu_e  (:,:) =    hu_b(:,:)       
-         hv_e  (:,:) =    hv_b(:,:) 
-         hur_e (:,:) = r1_hu_b(:,:)    
-         hvr_e (:,:) = r1_hv_b(:,:)
-!$OMP END PARALLEL WORKSHARE
+!$OMP PARALLEL DO schedule(static) private(jj,ji)
+         DO jj = 1, jpj
+            DO ji = 1, jpi
+               sshn_e(ji,jj) =    sshb(ji,jj)
+               un_e  (ji,jj) =    ub_b(ji,jj)         
+               vn_e  (ji,jj) =    vb_b(ji,jj)
+                 !
+               hu_e  (ji,jj) =    hu_b(ji,jj)       
+               hv_e  (ji,jj) =    hv_b(ji,jj) 
+               hur_e (ji,jj) = r1_hu_b(ji,jj)    
+               hvr_e (ji,jj) = r1_hv_b(ji,jj)
+            END DO
+         END DO
       ENDIF
       !
@@ -685,11 +735,14 @@
       !
       ! Initialize sums:
-!$OMP PARALLEL WORKSHARE
-      ua_b  (:,:) = 0._wp       ! After barotropic velocities (or transport if flux form)          
-      va_b  (:,:) = 0._wp
-      ssha  (:,:) = 0._wp       ! Sum for after averaged sea level
-      un_adv(:,:) = 0._wp       ! Sum for now transport issued from ts loop
-      vn_adv(:,:) = 0._wp
-!$OMP END PARALLEL WORKSHARE
+!$OMP PARALLEL DO schedule(static) private(jj,ji)
+         DO jj = 1, jpj
+            DO ji = 1, jpi
+               ua_b  (ji,jj) = 0._wp       ! After barotropic velocities (or transport if flux form)          
+               va_b  (ji,jj) = 0._wp
+               ssha  (ji,jj) = 0._wp       ! Sum for after averaged sea level
+               un_adv(ji,jj) = 0._wp       ! Sum for now transport issued from ts loop
+               vn_adv(ji,jj) = 0._wp
+            END DO
+         END DO
       !                                             ! ==================== !
       DO jn = 1, icycle                             !  sub-time-step loop  !
@@ -715,8 +768,11 @@
 
          ! Extrapolate barotropic velocities at step jit+0.5:
-!$OMP PARALLEL WORKSHARE
-         ua_e(:,:) = za1 * un_e(:,:) + za2 * ub_e(:,:) + za3 * ubb_e(:,:)
-         va_e(:,:) = za1 * vn_e(:,:) + za2 * vb_e(:,:) + za3 * vbb_e(:,:)
-!$OMP END PARALLEL WORKSHARE
+!$OMP PARALLEL DO schedule(static) private(jj,ji)
+         DO jj = 1, jpj
+            DO ji = 1, jpi
+               ua_e(ji,jj) = za1 * un_e(ji,jj) + za2 * ub_e(ji,jj) + za3 * ubb_e(ji,jj)
+               va_e(ji,jj) = za1 * vn_e(ji,jj) + za2 * vb_e(ji,jj) + za3 * vbb_e(ji,jj)
+            END DO
+         END DO
 
          IF( .NOT.ln_linssh ) THEN                        !* Update ocean depth (variable volume case only)
@@ -724,7 +780,10 @@
             ! Extrapolate Sea Level at step jit+0.5:
 !$OMP PARALLEL 
-!$OMP WORKSHARE
-            zsshp2_e(:,:) = za1 * sshn_e(:,:)  + za2 * sshb_e(:,:) + za3 * sshbb_e(:,:)
-!$OMP END WORKSHARE
+!$OMP DO schedule(static) private(jj,ji)
+            DO jj = 1, jpj
+               DO ji = 1, jpi
+                  zsshp2_e(ji,jj) = za1 * sshn_e(ji,jj)  + za2 * sshb_e(ji,jj) + za3 * sshbb_e(ji,jj)
+               END DO
+            END DO
             !
 !$OMP DO schedule(static) private(jj,ji)
@@ -743,22 +802,28 @@
             CALL lbc_lnk_multi( zwx, 'U', 1._wp, zwy, 'V', 1._wp )
             !
-!$OMP PARALLEL WORKSHARE
-            zhup2_e (:,:) = hu_0(:,:) + zwx(:,:)                ! Ocean depth at U- and V-points
-            zhvp2_e (:,:) = hv_0(:,:) + zwy(:,:)
-!$OMP END PARALLEL WORKSHARE
+!$OMP PARALLEL DO schedule(static) private(jj,ji)
+            DO jj = 1, jpj
+               DO ji = 1, jpi
+                  zhup2_e (ji,jj) = hu_0(ji,jj) + zwx(ji,jj)                ! Ocean depth at U- and V-points
+                  zhvp2_e (ji,jj) = hv_0(ji,jj) + zwy(ji,jj)
+               END DO
+            END DO
             IF( ln_wd ) THEN
 !$OMP PARALLEL DO schedule(static) private(jj,ji)
-            DO jj = 1, jpj
-               DO ji = 1, jpi   ! vector opt.
-                  zhup2_e(ji,jj) = MAX(zhup2_e (ji,jj), rn_wdmin1)
-                  zhvp2_e(ji,jj) = MAX(zhvp2_e (ji,jj), rn_wdmin1)
-               END DO
-            END DO
+               DO jj = 1, jpj
+                  DO ji = 1, jpi   ! vector opt.
+                     zhup2_e(ji,jj) = MAX(zhup2_e (ji,jj), rn_wdmin1)
+                     zhvp2_e(ji,jj) = MAX(zhvp2_e (ji,jj), rn_wdmin1)
+                  END DO
+               END DO
             END IF
          ELSE
-!$OMP PARALLEL WORKSHARE
-            zhup2_e (:,:) = hu_n(:,:)
-            zhvp2_e (:,:) = hv_n(:,:)
-!$OMP END PARALLEL WORKSHARE
+!$OMP PARALLEL DO schedule(static) private(jj,ji)
+            DO jj = 1, jpj
+               DO ji = 1, jpi
+                  zhup2_e (ji,jj) = hu_n(ji,jj)
+                  zhvp2_e (ji,jj) = hv_n(ji,jj)
+               END DO
+            END DO
          ENDIF
          !                                                !* after ssh
@@ -767,8 +832,11 @@
          ! considering fluxes below:
          !
-!$OMP PARALLEL WORKSHARE
-         zwx(:,:) = e2u(:,:) * ua_e(:,:) * zhup2_e(:,:)         ! fluxes at jn+0.5
-         zwy(:,:) = e1v(:,:) * va_e(:,:) * zhvp2_e(:,:)
-!$OMP END PARALLEL WORKSHARE
+!$OMP PARALLEL DO schedule(static) private(jj,ji)
+         DO jj = 1, jpj
+            DO ji = 1, jpi
+               zwx(ji,jj) = e2u(ji,jj) * ua_e(ji,jj) * zhup2_e(ji,jj)         ! fluxes at jn+0.5
+               zwy(ji,jj) = e1v(ji,jj) * va_e(ji,jj) * zhvp2_e(ji,jj)
+            END DO
+         END DO
          !
 #if defined key_agrif
@@ -802,8 +870,12 @@
          za2 = wgtbtp2(jn)
 !$OMP PARALLEL
-!$OMP WORKSHARE
-         un_adv(:,:) = un_adv(:,:) + za2 * zwx(:,:) * r1_e2u(:,:)
-         vn_adv(:,:) = vn_adv(:,:) + za2 * zwy(:,:) * r1_e1v(:,:)
-!$OMP END WORKSHARE NOWAIT
+!$OMP DO schedule(static) private(jj,ji)
+         DO jj = 1, jpj
+            DO ji = 1, jpi
+               un_adv(ji,jj) = un_adv(ji,jj) + za2 * zwx(ji,jj) * r1_e2u(ji,jj)
+               vn_adv(ji,jj) = vn_adv(ji,jj) + za2 * zwy(ji,jj) * r1_e1v(ji,jj)
+            END DO
+         END DO
+!$OMP END DO NOWAIT
          !
          ! Set next sea level:
@@ -815,7 +887,11 @@
             END DO
          END DO
-!$OMP WORKSHARE
-         ssha_e(:,:) = (  sshn_e(:,:) - rdtbt * ( zssh_frc(:,:) + zhdiv(:,:) )  ) * ssmask(:,:)
-!$OMP END WORKSHARE NOWAIT
+!$OMP DO schedule(static) private(jj,ji)
+         DO jj = 1, jpj
+            DO ji = 1, jpi
+               ssha_e(ji,jj) = (  sshn_e(ji,jj) - rdtbt * ( zssh_frc(ji,jj) + zhdiv(ji,jj) )  ) * ssmask(ji,jj)
+            END DO
+         END DO
+!$OMP END DO NOWAIT
 !$OMP END PARALLEL
          IF( ln_wd ) THEN
@@ -872,12 +948,20 @@
          ENDIF
          !
-         zsshp2_e(:,:) = za0 *  ssha_e(:,:) + za1 *  sshn_e (:,:) &
-          &            + za2 *  sshb_e(:,:) + za3 *  sshbb_e(:,:)
+!$OMP PARALLEL DO schedule(static) private(jj,ji)
+         DO jj = 1, jpj
+            DO ji = 1, jpi
+               zsshp2_e(ji,jj) = za0 *  ssha_e(ji,jj) + za1 *  sshn_e (ji,jj) &
+                &            + za2 *  sshb_e(ji,jj) + za3 *  sshbb_e(ji,jj)
+            END DO
+         END DO
          IF( ln_wd ) THEN                   ! Calculating and applying W/D gravity filters
 !$OMP PARALLEL
-!$OMP WORKSHARE
-           wduflt1(:,:) = 1._wp
-           wdvflt1(:,:) = 1._wp
-!$OMP END WORKSHARE
+!$OMP DO schedule(static) private(jj,ji)
+           DO jj = 1, jpj
+              DO ji = 1, jpi
+                 wduflt1(ji,jj) = 1._wp
+                 wdvflt1(ji,jj) = 1._wp
+              END DO
+           END DO
 !$OMP DO schedule(static) private(jj,ji,ll_tmp1,ll_tmp2)
            DO jj = 2, jpjm1
@@ -1014,12 +1098,15 @@
          !
          ! Add bottom stresses:
-!$OMP PARALLEL WORKSHARE
-         zu_trd(:,:) = zu_trd(:,:) + bfrua(:,:) * un_e(:,:) * hur_e(:,:)
-         zv_trd(:,:) = zv_trd(:,:) + bfrva(:,:) * vn_e(:,:) * hvr_e(:,:)
-         !
-         ! Add top stresses:
-         zu_trd(:,:) = zu_trd(:,:) + tfrua(:,:) * un_e(:,:) * hur_e(:,:)
-         zv_trd(:,:) = zv_trd(:,:) + tfrva(:,:) * vn_e(:,:) * hvr_e(:,:)
-!$OMP END PARALLEL WORKSHARE
+!$OMP PARALLEL DO schedule(static) private(jj,ji)
+         DO jj = 1, jpj
+            DO ji = 1, jpi
+               zu_trd(ji,jj) = zu_trd(ji,jj) + bfrua(ji,jj) * un_e(ji,jj) * hur_e(ji,jj)
+               zv_trd(ji,jj) = zv_trd(ji,jj) + bfrva(ji,jj) * vn_e(ji,jj) * hvr_e(ji,jj)
+               !
+               ! Add top stresses:
+               zu_trd(ji,jj) = zu_trd(ji,jj) + tfrua(ji,jj) * un_e(ji,jj) * hur_e(ji,jj)
+               zv_trd(ji,jj) = zv_trd(ji,jj) + tfrva(ji,jj) * vn_e(ji,jj) * hvr_e(ji,jj)
+            END DO
+         END DO
          !
          ! Surface pressure trend:
@@ -1109,13 +1196,19 @@
             END DO
             ELSE
-!$OMP PARALLEL WORKSHARE
-              hu_e (:,:) = hu_0(:,:) + zsshu_a(:,:)
-              hv_e (:,:) = hv_0(:,:) + zsshv_a(:,:)
-!$OMP END PARALLEL WORKSHARE
+!$OMP PARALLEL DO schedule(static) private(jj,ji)
+            DO jj = 1, jpj
+               DO ji = 1, jpi
+                  hu_e (ji,jj) = hu_0(ji,jj) + zsshu_a(ji,jj)
+                  hv_e (ji,jj) = hv_0(ji,jj) + zsshv_a(ji,jj)
+               END DO
+            END DO
             END IF
-!$OMP PARALLEL WORKSHARE
-            hur_e(:,:) = ssumask(:,:) / ( hu_e(:,:) + 1._wp - ssumask(:,:) )
-            hvr_e(:,:) = ssvmask(:,:) / ( hv_e(:,:) + 1._wp - ssvmask(:,:) )
-!$OMP END PARALLEL WORKSHARE
+!$OMP PARALLEL DO schedule(static) private(jj,ji)
+            DO jj = 1, jpj
+               DO ji = 1, jpi
+                  hur_e(ji,jj) = ssumask(ji,jj) / ( hu_e(ji,jj) + 1._wp - ssumask(ji,jj) )
+                  hvr_e(ji,jj) = ssvmask(ji,jj) / ( hv_e(ji,jj) + 1._wp - ssvmask(ji,jj) )
+               END DO
+            END DO
             !
          ENDIF
@@ -1132,17 +1225,20 @@
          !                                             !* Swap
          !                                             !  ----
-!$OMP PARALLEL WORKSHARE
-         ubb_e  (:,:) = ub_e  (:,:)
-         ub_e   (:,:) = un_e  (:,:)
-         un_e   (:,:) = ua_e  (:,:)
-         !
-         vbb_e  (:,:) = vb_e  (:,:)
-         vb_e   (:,:) = vn_e  (:,:)
-         vn_e   (:,:) = va_e  (:,:)
-         !
-         sshbb_e(:,:) = sshb_e(:,:)
-         sshb_e (:,:) = sshn_e(:,:)
-         sshn_e (:,:) = ssha_e(:,:)
-!$OMP END PARALLEL WORKSHARE
+!$OMP PARALLEL DO schedule(static) private(jj,ji)
+         DO jj = 1, jpj
+            DO ji = 1, jpi
+               ubb_e  (ji,jj) = ub_e  (ji,jj)
+               ub_e   (ji,jj) = un_e  (ji,jj)
+               un_e   (ji,jj) = ua_e  (ji,jj)
+               !
+               vbb_e  (ji,jj) = vb_e  (ji,jj)
+               vb_e   (ji,jj) = vn_e  (ji,jj)
+               vn_e   (ji,jj) = va_e  (ji,jj)
+               !
+               sshbb_e(ji,jj) = sshb_e(ji,jj)
+               sshb_e (ji,jj) = sshn_e(ji,jj)
+               sshn_e (ji,jj) = ssha_e(ji,jj)
+            END DO
+         END DO
 
          !                                             !* Sum over whole bt loop
@@ -1150,18 +1246,27 @@
          za1 = wgtbtp1(jn)                                    
          IF( ln_dynadv_vec .OR. ln_linssh ) THEN    ! Sum velocities
-!$OMP PARALLEL WORKSHARE
-            ua_b  (:,:) = ua_b  (:,:) + za1 * ua_e  (:,:) 
-            va_b  (:,:) = va_b  (:,:) + za1 * va_e  (:,:) 
-!$OMP END PARALLEL WORKSHARE
+!$OMP PARALLEL DO schedule(static) private(jj,ji)
+            DO jj = 1, jpj
+               DO ji = 1, jpi
+                  ua_b  (ji,jj) = ua_b  (ji,jj) + za1 * ua_e  (ji,jj) 
+                  va_b  (ji,jj) = va_b  (ji,jj) + za1 * va_e  (ji,jj) 
+               END DO
+            END DO
          ELSE                                              ! Sum transports
-!$OMP PARALLEL WORKSHARE
-            ua_b  (:,:) = ua_b  (:,:) + za1 * ua_e  (:,:) * hu_e (:,:)
-            va_b  (:,:) = va_b  (:,:) + za1 * va_e  (:,:) * hv_e (:,:)
-!$OMP END PARALLEL WORKSHARE
+!$OMP PARALLEL DO schedule(static) private(jj,ji)
+            DO jj = 1, jpj
+               DO ji = 1, jpi
+                  ua_b  (ji,jj) = ua_b  (ji,jj) + za1 * ua_e  (ji,jj) * hu_e (ji,jj)
+                  va_b  (ji,jj) = va_b  (ji,jj) + za1 * va_e  (ji,jj) * hv_e (ji,jj)
+               END DO
+            END DO
          ENDIF
          !                       			   ! Sum sea level
-!$OMP PARALLEL WORKSHARE
-         ssha(:,:) = ssha(:,:) + za1 * ssha_e(:,:)
-!$OMP END PARALLEL WORKSHARE
+!$OMP PARALLEL DO schedule(static) private(jj,ji)
+         DO jj = 1, jpj
+            DO ji = 1, jpi
+               ssha(ji,jj) = ssha(ji,jj) + za1 * ssha_e(ji,jj)
+            END DO
+         END DO
          !                                                 ! ==================== !
       END DO                                               !        end loop      !
@@ -1172,25 +1277,37 @@
       !
       ! Set advection velocity correction:
-!$OMP PARALLEL WORKSHARE
-      zwx(:,:) = un_adv(:,:)
-      zwy(:,:) = vn_adv(:,:)
-!$OMP END PARALLEL WORKSHARE
+!$OMP PARALLEL DO schedule(static) private(jj,ji)
+      DO jj = 1, jpj
+         DO ji = 1, jpi
+            zwx(ji,jj) = un_adv(ji,jj)
+            zwy(ji,jj) = vn_adv(ji,jj)
+         END DO
+      END DO
       IF( ( kt == nit000 .AND. neuler==0 ) .OR. .NOT.ln_bt_fw ) THEN     
-!$OMP PARALLEL WORKSHARE
-         un_adv(:,:) = zwx(:,:) * r1_hu_n(:,:)
-         vn_adv(:,:) = zwy(:,:) * r1_hv_n(:,:)
-!$OMP END PARALLEL WORKSHARE
+!$OMP PARALLEL DO schedule(static) private(jj,ji)
+         DO jj = 1, jpj
+            DO ji = 1, jpi
+               un_adv(ji,jj) = zwx(ji,jj) * r1_hu_n(ji,jj)
+               vn_adv(ji,jj) = zwy(ji,jj) * r1_hv_n(ji,jj)
+            END DO
+         END DO
       ELSE
-!$OMP PARALLEL WORKSHARE
-         un_adv(:,:) = z1_2 * ( ub2_b(:,:) + zwx(:,:) ) * r1_hu_n(:,:)
-         vn_adv(:,:) = z1_2 * ( vb2_b(:,:) + zwy(:,:) ) * r1_hv_n(:,:)
-!$OMP END PARALLEL WORKSHARE
+!$OMP PARALLEL DO schedule(static) private(jj,ji)
+         DO jj = 1, jpj
+            DO ji = 1, jpi
+               un_adv(ji,jj) = z1_2 * ( ub2_b(ji,jj) + zwx(ji,jj) ) * r1_hu_n(ji,jj)
+               vn_adv(ji,jj) = z1_2 * ( vb2_b(ji,jj) + zwy(ji,jj) ) * r1_hv_n(ji,jj)
+            END DO
+         END DO
       END IF
 
       IF( ln_bt_fw ) THEN ! Save integrated transport for next computation
-!$OMP PARALLEL WORKSHARE
-         ub2_b(:,:) = zwx(:,:)
-         vb2_b(:,:) = zwy(:,:)
-!$OMP END PARALLEL WORKSHARE
+!$OMP PARALLEL DO schedule(static) private(jj,ji)
+         DO jj = 1, jpj
+            DO ji = 1, jpi
+               ub2_b(ji,jj) = zwx(ji,jj)
+               vb2_b(ji,jj) = zwy(ji,jj)
+            END DO
+         END DO
       ENDIF
       !
@@ -1225,8 +1342,11 @@
 !$OMP END DO NOWAIT
          ! Save barotropic velocities not transport:
-!$OMP WORKSHARE
-         ua_b(:,:) =  ua_b(:,:) / ( hu_0(:,:) + zsshu_a(:,:) + 1._wp - ssumask(:,:) )
-         va_b(:,:) =  va_b(:,:) / ( hv_0(:,:) + zsshv_a(:,:) + 1._wp - ssvmask(:,:) )
-!$OMP END WORKSHARE NOWAIT
+!$OMP DO schedule(static) private(jj,ji)
+         DO jj = 1, jpj
+            DO ji = 1, jpi
+               ua_b(ji,jj) =  ua_b(ji,jj) / ( hu_0(ji,jj) + zsshu_a(ji,jj) + 1._wp - ssumask(ji,jj) )
+               va_b(ji,jj) =  va_b(ji,jj) / ( hv_0(ji,jj) + zsshv_a(ji,jj) + 1._wp - ssvmask(ji,jj) )
+            END DO
+         END DO
 !$OMP END PARALLEL
       ENDIF
@@ -1249,15 +1369,21 @@
       IF( .NOT.Agrif_Root() .AND. ln_bt_fw ) THEN
          IF( Agrif_NbStepint() == 0 ) THEN
-!$OMP PARALLEL WORKSHARE
-            ub2_i_b(:,:) = 0._wp
-            vb2_i_b(:,:) = 0._wp
-!$OMP END PARALLEL WORKSHARE
+!$OMP PARALLEL DO schedule(static) private(jj,ji)
+            DO jj = 1, jpj
+               DO ji = 1, jpi
+                  ub2_i_b(ji,jj) = 0._wp
+                  vb2_i_b(ji,jj) = 0._wp
+               END DO
+            END DO
          END IF
          !
          za1 = 1._wp / REAL(Agrif_rhot(), wp)
-!$OMP PARALLEL WORKSHARE
-         ub2_i_b(:,:) = ub2_i_b(:,:) + za1 * ub2_b(:,:)
-         vb2_i_b(:,:) = vb2_i_b(:,:) + za1 * vb2_b(:,:)
-!$OMP END PARALLEL WORKSHARE
+!$OMP PARALLEL DO schedule(static) private(jj,ji)
+         DO jj = 1, jpj
+            DO ji = 1, jpi
+               ub2_i_b(ji,jj) = ub2_i_b(ji,jj) + za1 * ub2_b(ji,jj)
+               vb2_i_b(ji,jj) = vb2_i_b(ji,jj) + za1 * vb2_b(ji,jj)
+            END DO
+         END DO
       ENDIF
 #endif      
