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 6748 for branches/2016/dev_r6519_HPC_4/NEMOGCM/NEMO/OPA_SRC/TRA/trasbc.F90 – NEMO

Ignore:
Timestamp:
2016-06-28T11:53:56+02:00 (8 years ago)
Author:
mocavero
Message:

GYRE hybrid parallelization

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2016/dev_r6519_HPC_4/NEMOGCM/NEMO/OPA_SRC/TRA/trasbc.F90

    r6472 r6748  
    8888      IF( l_trdtra ) THEN                    !* Save ta and sa trends 
    8989         CALL wrk_alloc( jpi, jpj, jpk, ztrdt, ztrds )  
     90!$OMP PARALLEL WORKSHARE 
    9091         ztrdt(:,:,:) = tsa(:,:,:,jp_tem) 
    9192         ztrds(:,:,:) = tsa(:,:,:,jp_sal) 
     93!$OMP END PARALLEL WORKSHARE 
    9294      ENDIF 
    9395      ! 
    9496!!gm  This should be moved into sbcmod.F90 module ? (especially now that ln_traqsr is read in namsbc namelist) 
    9597      IF( .NOT.ln_traqsr ) THEN     ! no solar radiation penetration 
     98!$OMP PARALLEL WORKSHARE 
    9699         qns(:,:) = qns(:,:) + qsr(:,:)      ! total heat flux in qns 
    97100         qsr(:,:) = 0._wp                     ! qsr set to zero 
     101!$OMP END PARALLEL WORKSHARE 
    98102      ENDIF 
    99103 
     
    111115         ELSE                                   ! No restart or restart not found: Euler forward time stepping 
    112116            zfact = 1._wp 
     117!$OMP PARALLEL WORKSHARE 
    113118            sbc_tsc_b(:,:,:) = 0._wp 
     119!$OMP END PARALLEL WORKSHARE 
    114120         ENDIF 
    115121      ELSE                                !* other time-steps: swap of forcing fields 
    116122         zfact = 0.5_wp 
     123!$OMP PARALLEL WORKSHARE 
    117124         sbc_tsc_b(:,:,:) = sbc_tsc(:,:,:) 
     125!$OMP END PARALLEL WORKSHARE 
    118126      ENDIF 
    119127      !                             !==  Now sbc tracer content fields  ==! 
     128!$OMP PARALLEL DO schedule(static) private(jj, ji) 
    120129      DO jj = 2, jpj 
    121130         DO ji = fs_2, fs_jpim1   ! vector opt. 
     
    125134      END DO 
    126135      IF( ln_linssh ) THEN                !* linear free surface   
     136!$OMP PARALLEL DO schedule(static) private(jj, ji) 
    127137         DO jj = 2, jpj                         !==>> add concentration/dilution effect due to constant volume cell 
    128138            DO ji = fs_2, fs_jpim1   ! vector opt. 
     
    136146      ! 
    137147      DO jn = 1, jpts               !==  update tracer trend  ==! 
     148!$OMP PARALLEL DO schedule(static) private(jj, ji) 
    138149         DO jj = 2, jpj 
    139150            DO ji = fs_2, fs_jpim1   ! vector opt.   
     
    217228      ! 
    218229      IF( ln_iscpl .AND. ln_hsb) THEN         ! input of heat and salt due to river runoff  
     230!$OMP PARALLEL DO schedule(static) private(jk, jj, ji, zdep) 
    219231         DO jk = 1,jpk 
    220232            DO jj = 2, jpj  
     
    231243 
    232244      IF( l_trdtra )   THEN                      ! save the horizontal diffusive trends for further diagnostics 
     245!$OMP PARALLEL WORKSHARE 
    233246         ztrdt(:,:,:) = tsa(:,:,:,jp_tem) - ztrdt(:,:,:) 
    234247         ztrds(:,:,:) = tsa(:,:,:,jp_sal) - ztrds(:,:,:) 
     248!$OMP END PARALLEL WORKSHARE 
    235249         CALL trd_tra( kt, 'TRA', jp_tem, jptra_nsr, ztrdt ) 
    236250         CALL trd_tra( kt, 'TRA', jp_sal, jptra_nsr, ztrds ) 
Note: See TracChangeset for help on using the changeset viewer.