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 7037 for branches/2016/dev_r6519_HPC_4/NEMOGCM/NEMO/LIM_SRC_2/limhdf_2.F90 – NEMO

Ignore:
Timestamp:
2016-10-18T15:32:04+02:00 (8 years ago)
Author:
mocavero
Message:

ORCA2_LIM_PISCES hybrid version update

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2016/dev_r6519_HPC_4/NEMOGCM/NEMO/LIM_SRC_2/limhdf_2.F90

    r4990 r7037  
    7070         IF( lk_mpp    )   CALL mpp_sum( ierr ) 
    7171         IF( ierr /= 0 )   CALL ctl_stop( 'STOP', 'lim_hdf_2 : unable to allocate standard arrays' ) 
     72!$OMP PARALLEL DO schedule(static) private(jj, ji) 
    7273         DO jj = 2, jpjm1   
    7374            DO ji = fs_2 , fs_jpim1   ! vector opt. 
     
    8384      zeps  =  2._wp * epsi04 
    8485      ! 
     86!$OMP PARALLEL WORKSHARE 
    8587      ztab0(:, : ) = ptab(:,:)      ! Arrays initialization 
     88!$OMP END PARALLEL WORKSHARE 
    8689      zdiv0(:, 1 ) = 0._wp 
    8790      zdiv0(:,jpj) = 0._wp 
    88       zflu (jpi,:) = 0._wp    
     91      zflu (jpi,:) = 0._wp 
    8992      zflv (jpi,:) = 0._wp 
    9093      zdiv0(1,  :) = 0._wp 
     
    98101         iter = iter + 1                                       ! incrementation of the sub-time step number 
    99102         ! 
     103!$OMP PARALLEL 
     104!$OMP DO schedule(static) private(jj, ji) 
    100105         DO jj = 1, jpjm1                                      ! diffusive fluxes in U- and V- direction 
    101106            DO ji = 1 , fs_jpim1   ! vector opt. 
     
    105110         END DO 
    106111         ! 
     112!$OMP DO schedule(static) private(jj, ji) 
    107113         DO jj= 2, jpjm1                                       ! diffusive trend : divergence of the fluxes 
    108114            DO ji = fs_2 , fs_jpim1   ! vector opt.  
     
    111117            END DO 
    112118         END DO 
     119!$OMP END DO NOWAIT 
     120!$OMP END PARALLEL 
    113121         ! 
    114          IF( iter == 1 )   zdiv0(:,:) = zdiv(:,:)              ! save the 1st evaluation of the diffusive trend in zdiv0 
     122         IF( iter == 1 ) THEN 
     123!$OMP PARALLEL DO schedule(static) private(jj, ji) 
     124             DO jj= 2, jpjm1                                       ! diffusive trend : divergence of the fluxes 
     125                DO ji = fs_2 , fs_jpim1   ! vector opt.  
     126                   zdiv0(ji,jj) = zdiv(ji,jj)              ! save the 1st evaluation of the diffusive trend in zdiv0 
     127                END DO 
     128             END DO 
     129         END IF 
    115130         ! 
     131!$OMP PARALLEL DO schedule(static) private(jj,ji,zrlxint) 
    116132         DO jj = 2, jpjm1                                      ! iterative evaluation 
    117133            DO ji = fs_2 , fs_jpim1   ! vector opt. 
     
    127143         zconv = 0._wp                                         ! convergence test 
    128144 
     145!$OMP PARALLEL DO schedule(static) private(jj,ji) REDUCTION(MAX:zconv) 
    129146         DO jj = 2, jpjm1 
    130147            DO ji = 2, jpim1 
     
    134151         IF( lk_mpp )   CALL mpp_max( zconv )                  ! max over the global domain 
    135152 
     153!$OMP PARALLEL WORKSHARE 
    136154         ptab(:,:) = zrlx(:,:) 
     155!$OMP END PARALLEL WORKSHARE  
    137156         ! 
    138157      END DO                                             ! end of sub-time step loop 
    139158 
    140159      IF(ln_ctl)   THEN 
     160!$OMP PARALLEL WORKSHARE 
    141161         zrlx(:,:) = ptab(:,:) - ztab0(:,:) 
     162!$OMP END PARALLEL WORKSHARE 
    142163         WRITE(charout,FMT="(' lim_hdf  : zconv =',D23.16, ' iter =',I4,2X)") zconv, iter 
    143164         CALL prt_ctl( tab2d_1=zrlx, clinfo1=charout ) 
Note: See TracChangeset for help on using the changeset viewer.