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/USR/usrdef_sbc.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/USR/usrdef_sbc.F90

    r7426 r7698  
    109109      ztrp= - 40.e0        ! retroaction term on heat fluxes (W/m2/K) 
    110110      zconv = 3.16e-5      ! convertion factor: 1 m/yr => 3.16e-5 mm/s 
     111!$OMP PARALLEL DO schedule(static) private(jj, ji, t_star) 
    111112      DO jj = 1, jpj 
    112113         DO ji = 1, jpi 
     
    137138 
    138139      ! freshwater (mass flux) and update of qns with heat content of emp 
    139       emp (:,:) = emp(:,:) - zsumemp * tmask(:,:,1)        ! freshwater flux (=0 in domain average) 
    140       sfx (:,:) = 0.0_wp                                   ! no salt flux 
    141       qns (:,:) = qns(:,:) - emp(:,:) * sst_m(:,:) * rcp   ! evap and precip are at SST 
     140!$OMP PARALLEL DO schedule(static) private(jj, ji) 
     141      DO jj = 1, jpj 
     142         DO ji = 1, jpi 
     143            emp (ji,jj) = emp(ji,jj) - zsumemp * tmask(ji,jj,1)          ! freshwater flux (=0 in domain average) 
     144            sfx (ji,jj) = 0.0_wp                                         ! no salt flux 
     145            qns (ji,jj) = qns(ji,jj) - emp(ji,jj) * sst_m(ji,jj) * rcp   ! evap and precip are at SST 
     146         END DO 
     147      END DO 
    142148 
    143149 
     
    166172      ztau_sais = 0.015 
    167173      ztaun = ztau - ztau_sais * COS( (ztime - ztimemax) / (ztimemin - ztimemax) * rpi ) 
     174!$OMP PARALLEL 
     175!$OMP DO schedule(static) private(jj, ji) 
    168176      DO jj = 1, jpj 
    169177         DO ji = 1, jpi 
     
    177185      ! module of wind stress and wind speed at T-point 
    178186      zcoef = 1. / ( zrhoa * zcdrag )  
     187!$OMP DO schedule(static) private(jj, ji, ztx, zty, zmod) 
    179188      DO jj = 2, jpjm1 
    180189         DO ji = fs_2, fs_jpim1   ! vect. opt. 
     
    186195         END DO 
    187196      END DO 
     197!$OMP END PARALLEL 
    188198      CALL lbc_lnk( taum(:,:), 'T', 1. )   ;   CALL lbc_lnk( wndm(:,:), 'T', 1. ) 
    189199 
Note: See TracChangeset for help on using the changeset viewer.