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 7508 for branches/2016/dev_r6519_HPC_4/NEMOGCM/NEMO/LIM_SRC_2 – NEMO

Ignore:
Timestamp:
2016-12-19T13:15:59+01:00 (8 years ago)
Author:
mocavero
Message:

changes on code duplication and workshare construct

Location:
branches/2016/dev_r6519_HPC_4/NEMOGCM/NEMO/LIM_SRC_2
Files:
8 edited

Legend:

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

    r7037 r7508  
    7878         ! 
    7979         ! Mean ice and snow thicknesses.           
    80 !$OMP PARALLEL WORKSHARE 
    81          hsnm(:,:)  = ( 1.0 - frld(:,:) ) * hsnif(:,:) 
    82          hicm(:,:)  = ( 1.0 - frld(:,:) ) * hicif(:,:) 
    83 !$OMP END PARALLEL WORKSHARE 
     80!$OMP PARALLEL DO schedule(static) private(jj, ji) 
     81      DO jj = 1, jpj 
     82         DO ji = 1, jpi 
     83            hsnm(ji,jj)  = ( 1.0 - frld(ji,jj) ) * hsnif(ji,jj) 
     84            hicm(ji,jj)  = ( 1.0 - frld(ji,jj) ) * hicif(ji,jj) 
     85         END DO 
     86      END DO 
    8487         ! 
    8588         !                                     ! Rheology (ice dynamics) 
     
    172175         SELECT CASE( cp_ice_msh )           ! ice-ocean relative velocity at u- & v-pts 
    173176         CASE( 'C' )                               ! EVP : C-grid ice dynamics 
    174 !$OMP PARALLEL WORKSHARE 
    175             zu_io(:,:) = u_ice(:,:) - ssu_m(:,:)           ! ice-ocean & ice velocity at ocean velocity points 
    176             zv_io(:,:) = v_ice(:,:) - ssv_m(:,:) 
    177 !$OMP END PARALLEL WORKSHARE 
     177!$OMP PARALLEL DO schedule(static) private(jj, ji) 
     178            DO jj = 1, jpj 
     179               DO ji = 1, jpi 
     180                  zu_io(ji,jj) = u_ice(ji,jj) - ssu_m(ji,jj)           ! ice-ocean & ice velocity at ocean velocity points 
     181                  zv_io(ji,jj) = v_ice(ji,jj) - ssv_m(ji,jj) 
     182               END DO 
     183            END DO 
    178184         CASE( 'I' )                               ! VP  : B-grid ice dynamics (I-point)  
    179185!$OMP PARALLEL DO schedule(static) private(jj, ji) 
     
    232238      !!------------------------------------------------------------------- 
    233239      INTEGER  ::   ios                 ! Local integer output status for namelist read 
     240      INTEGER  ::   ji, jj             ! dummy loop indices 
    234241      NAMELIST/namicedyn/ epsd, alpha,     & 
    235242         &                dm, nbiter, nbitdr, om, resl, cw, angvg, pstar,   & 
     
    285292      pstarh = pstar / 2.0 
    286293      ! 
    287 !$OMP PARALLEL WORKSHARE 
    288       ahiu(:,:) = ahi0 * umask(:,:,1)            ! Ice eddy Diffusivity coefficients. 
    289       ahiv(:,:) = ahi0 * vmask(:,:,1) 
    290 !$OMP END PARALLEL WORKSHARE 
     294!$OMP PARALLEL DO schedule(static) private(jj, ji) 
     295      DO jj = 1, jpj 
     296         DO ji = 1, jpi 
     297            ahiu(ji,jj) = ahi0 * umask(ji,jj,1)            ! Ice eddy Diffusivity coefficients. 
     298            ahiv(ji,jj) = ahi0 * vmask(ji,jj,1) 
     299         END DO 
     300      END DO 
    291301      ! 
    292302   END SUBROUTINE lim_dyn_init_2 
  • branches/2016/dev_r6519_HPC_4/NEMOGCM/NEMO/LIM_SRC_2/limhdf_2.F90

    r7037 r7508  
    8484      zeps  =  2._wp * epsi04 
    8585      ! 
    86 !$OMP PARALLEL WORKSHARE 
    87       ztab0(:, : ) = ptab(:,:)      ! Arrays initialization 
    88 !$OMP END PARALLEL WORKSHARE 
     86!$OMP PARALLEL DO schedule(static) private(jj, ji) 
     87      DO jj = 1, jpj 
     88         DO ji = 1, jpi 
     89            ztab0(ji, jj ) = ptab(ji,jj)      ! Arrays initialization 
     90         END DO 
     91      END DO 
    8992      zdiv0(:, 1 ) = 0._wp 
    9093      zdiv0(:,jpj) = 0._wp 
     
    151154         IF( lk_mpp )   CALL mpp_max( zconv )                  ! max over the global domain 
    152155 
    153 !$OMP PARALLEL WORKSHARE 
    154          ptab(:,:) = zrlx(:,:) 
    155 !$OMP END PARALLEL WORKSHARE  
     156!$OMP PARALLEL DO schedule(static) private(jj, ji) 
     157         DO jj = 1, jpj 
     158            DO ji = 1, jpi 
     159               ptab(ji,jj) = zrlx(ji,jj) 
     160            END DO 
     161         END DO 
    156162         ! 
    157163      END DO                                             ! end of sub-time step loop 
    158164 
    159165      IF(ln_ctl)   THEN 
    160 !$OMP PARALLEL WORKSHARE 
    161          zrlx(:,:) = ptab(:,:) - ztab0(:,:) 
    162 !$OMP END PARALLEL WORKSHARE 
     166!$OMP PARALLEL DO schedule(static) private(jj, ji) 
     167         DO jj = 1, jpj 
     168            DO ji = 1, jpi 
     169               zrlx(ji,jj) = ptab(ji,jj) - ztab0(ji,jj) 
     170            END DO 
     171         END DO 
    163172         WRITE(charout,FMT="(' lim_hdf  : zconv =',D23.16, ' iter =',I4,2X)") zconv, iter 
    164173         CALL prt_ctl( tab2d_1=zrlx, clinfo1=charout ) 
  • branches/2016/dev_r6519_HPC_4/NEMOGCM/NEMO/LIM_SRC_2/limistate_2.F90

    r7037 r7508  
    7171         CALL eos_fzp( tsn(:,:,1,jp_sal), tfu(:,:) )       ! freezing/melting point of sea water [Celcius] 
    7272!$OMP PARALLEL 
    73 !$OMP WORKSHARE 
    74          tfu(:,:) = tfu(:,:) *  tmask(:,:,1) 
    75 !$OMP END WORKSHARE 
     73!$OMP DO schedule(static) private(jj, ji) 
     74         DO jj = 1, jpj 
     75            DO ji = 1, jpi 
     76               tfu(ji,jj) = tfu(ji,jj) *  tmask(ji,jj,1) 
     77            END DO 
     78         END DO 
    7679 
    7780!$OMP DO schedule(static) private(jj, ji) 
     
    9598         END DO 
    9699 
    97 !$OMP WORKSHARE 
    98          tfu(:,:) = tfu(:,:) + rt0       ! ftu converted from Celsius to Kelvin (rt0 over land) 
     100!$OMP DO schedule(static) private(jj, ji) 
     101         DO jj = 1, jpj 
     102            DO ji = 1, jpi 
     103               tfu(ji,jj) = tfu(ji,jj) + rt0       ! ftu converted from Celsius to Kelvin (rt0 over land) 
    99104          
    100          sist  (:,:)   = tfu(:,:) 
    101          tbif  (:,:,1) = tfu(:,:) 
    102          tbif  (:,:,2) = tfu(:,:) 
    103          tbif  (:,:,3) = tfu(:,:) 
    104 !$OMP END WORKSHARE 
     105               sist  (ji,jj)   = tfu(ji,jj) 
     106               tbif  (ji,jj,1) = tfu(ji,jj) 
     107               tbif  (ji,jj,2) = tfu(ji,jj) 
     108               tbif  (ji,jj,3) = tfu(ji,jj) 
     109            END DO 
     110         END DO 
    105111 
    106112!$OMP END PARALLEL 
    107113      ENDIF 
    108114      
    109 !$OMP PARALLEL WORKSHARE 
    110       fsbbq (:,:)   = 0.e0 
    111       qstoif(:,:)   = 0.e0 
    112       u_ice (:,:)   = 0.e0 
    113       v_ice (:,:)   = 0.e0 
    114  
    115       !---  Moments for advection.              
    116  
    117       sxice (:,:)  = 0.e0   ;   sxsn (:,:)  = 0.e0   ;   sxa  (:,:)  = 0.e0 
    118       syice (:,:)  = 0.e0   ;   sysn (:,:)  = 0.e0   ;   sya  (:,:)  = 0.e0 
    119       sxxice(:,:)  = 0.e0   ;   sxxsn(:,:)  = 0.e0   ;   sxxa (:,:)  = 0.e0 
    120       syyice(:,:)  = 0.e0   ;   syysn(:,:)  = 0.e0   ;   syya (:,:)  = 0.e0 
    121       sxyice(:,:)  = 0.e0   ;   sxysn(:,:)  = 0.e0   ;   sxya (:,:)  = 0.e0 
    122  
    123       sxc0  (:,:)  = 0.e0   ;   sxc1 (:,:)  = 0.e0   ;   sxc2 (:,:)  = 0.e0 
    124       syc0  (:,:)  = 0.e0   ;   syc1 (:,:)  = 0.e0   ;   syc2 (:,:)  = 0.e0 
    125       sxxc0 (:,:)  = 0.e0   ;   sxxc1(:,:)  = 0.e0   ;   sxxc2(:,:)  = 0.e0 
    126       syyc0 (:,:)  = 0.e0   ;   syyc1(:,:)  = 0.e0   ;   syyc2(:,:)  = 0.e0 
    127       sxyc0 (:,:)  = 0.e0   ;   sxyc1(:,:)  = 0.e0   ;   sxyc2(:,:)  = 0.e0 
    128  
    129       sxst  (:,:)  = 0.e0 
    130       syst  (:,:)  = 0.e0 
    131       sxxst (:,:)  = 0.e0 
    132       syyst (:,:)  = 0.e0 
    133       sxyst (:,:)  = 0.e0 
     115!$OMP PARALLEL DO schedule(static) private(jj, ji) 
     116         DO jj = 1, jpj 
     117            DO ji = 1, jpi 
     118               fsbbq (ji,jj)   = 0.e0 
     119               qstoif(ji,jj)   = 0.e0 
     120               u_ice (ji,jj)   = 0.e0 
     121               v_ice (ji,jj)   = 0.e0 
     122 
     123               !---  Moments for advection.              
     124 
     125               sxice (ji,jj)  = 0.e0   ;   sxsn (ji,jj)  = 0.e0   ;   sxa  (ji,jj)  = 0.e0 
     126               syice (ji,jj)  = 0.e0   ;   sysn (ji,jj)  = 0.e0   ;   sya  (ji,jj)  = 0.e0 
     127               sxxice(ji,jj)  = 0.e0   ;   sxxsn(ji,jj)  = 0.e0   ;   sxxa (ji,jj)  = 0.e0 
     128               syyice(ji,jj)  = 0.e0   ;   syysn(ji,jj)  = 0.e0   ;   syya (ji,jj)  = 0.e0 
     129               sxyice(ji,jj)  = 0.e0   ;   sxysn(ji,jj)  = 0.e0   ;   sxya (ji,jj)  = 0.e0 
     130 
     131               sxc0  (ji,jj)  = 0.e0   ;   sxc1 (ji,jj)  = 0.e0   ;   sxc2 (ji,jj)  = 0.e0 
     132               syc0  (ji,jj)  = 0.e0   ;   syc1 (ji,jj)  = 0.e0   ;   syc2 (ji,jj)  = 0.e0 
     133               sxxc0 (ji,jj)  = 0.e0   ;   sxxc1(ji,jj)  = 0.e0   ;   sxxc2(ji,jj)  = 0.e0 
     134               syyc0 (ji,jj)  = 0.e0   ;   syyc1(ji,jj)  = 0.e0   ;   syyc2(ji,jj)  = 0.e0 
     135               sxyc0 (ji,jj)  = 0.e0   ;   sxyc1(ji,jj)  = 0.e0   ;   sxyc2(ji,jj)  = 0.e0 
     136 
     137               sxst  (ji,jj)  = 0.e0 
     138               syst  (ji,jj)  = 0.e0 
     139               sxxst (ji,jj)  = 0.e0 
     140               syyst (ji,jj)  = 0.e0 
     141               sxyst (ji,jj)  = 0.e0 
    134142#if ! defined key_lim2_vp 
    135       stress1_i (:,:) = 0._wp                          ! EVP rheology 
    136       stress2_i (:,:) = 0._wp 
    137       stress12_i(:,:) = 0._wp 
     143               stress1_i (ji,jj) = 0._wp                          ! EVP rheology 
     144               stress2_i (ji,jj) = 0._wp 
     145               stress12_i(ji,jj) = 0._wp 
    138146#endif 
    139 !$OMP END PARALLEL WORKSHARE 
     147            END DO 
     148         END DO 
    140149 
    141150      !-- lateral boundary conditions 
     
    145154      ! C A U T I O N  frld = 1 over land and lbc_lnk put zero along  
    146155      ! *************  closed boundaries herefore we force to one over land 
    147 !$OMP PARALLEL WORKSHARE 
    148       frld(:,:) = tms(:,:) * frld(:,:) + ( 1. - tms(:,:) )    
    149 !$OMP END PARALLEL WORKSHARE 
     156!$OMP PARALLEL DO schedule(static) private(jj, ji) 
     157         DO jj = 1, jpj 
     158            DO ji = 1, jpi 
     159               frld(ji,jj) = tms(ji,jj) * frld(ji,jj) + ( 1. - tms(ji,jj) )    
     160            END DO 
     161         END DO 
    150162 
    151163      CALL lbc_lnk( hsnif, 'T', 1. ) 
  • branches/2016/dev_r6519_HPC_4/NEMOGCM/NEMO/LIM_SRC_2/limmsh_2.F90

    r7037 r7508  
    152152 
    153153!$OMP PARALLEL 
    154 !$OMP WORKSHARE 
    155       akappa(:,:,1,1) =        1.0 / ( 2.0 * e1t(:,:) ) 
    156       akappa(:,:,1,2) = zd1d2(:,:) / ( 4.0 * e1t(:,:) * e2t(:,:) ) 
    157       akappa(:,:,2,1) = zd2d1(:,:) / ( 4.0 * e1t(:,:) * e2t(:,:) ) 
    158       akappa(:,:,2,2) =        1.0 / ( 2.0 * e2t(:,:) ) 
    159 !$OMP END WORKSHARE NOWAIT 
     154!$OMP DO schedule(static) private(jj, ji) 
     155      DO jj = 1, jpj 
     156         DO ji = 1, jpi 
     157            akappa(ji,jj,1,1) =        1.0 / ( 2.0 * e1t(ji,jj) ) 
     158            akappa(ji,jj,1,2) = zd1d2(ji,jj) / ( 4.0 * e1t(ji,jj) * e2t(ji,jj) ) 
     159            akappa(ji,jj,2,1) = zd2d1(ji,jj) / ( 4.0 * e1t(ji,jj) * e2t(ji,jj) ) 
     160            akappa(ji,jj,2,2) =        1.0 / ( 2.0 * e2t(ji,jj) ) 
     161         END DO 
     162      END DO 
     163!$OMP END DO NOWAIT 
    160164       
    161165      !                                                      ! weights (wght) 
     
    273277      !---------------------------- 
    274278       
    275 !$OMP PARALLEL WORKSHARE       
    276       tms(:,:) = tmask(:,:,1)      ! ice T-point  : use surface tmask 
    277  
    278 !$OMP END PARALLEL WORKSHARE 
     279!$OMP PARALLEL DO schedule(static) private(jj, ji) 
     280      DO jj = 1, jpj 
     281         DO ji = 1, jpi 
     282            tms(ji,jj) = tmask(ji,jj,1)      ! ice T-point  : use surface tmask 
     283 
     284         END DO 
     285      END DO 
    279286#if defined key_lim2_vp 
    280287      ! VP rheology : ice velocity point is I-point 
     
    292299      ! EVP rheology : ice velocity point are U- & V-points ; ice vorticity 
    293300      ! point is F-point 
    294 !$OMP PARALLEL WORKSHARE 
    295       tmu(:,:) = umask(:,:,1) 
    296       tmv(:,:) = vmask(:,:,1) 
    297       tmf(:,:) = 0.e0                        ! used of fmask except its special value along the coast (rn_shlat) 
    298       WHERE( fmask(:,:,1) == 1.e0 )   tmf(:,:) = 1.e0 
    299 !$OMP END PARALLEL WORKSHARE 
     301!$OMP PARALLEL DO schedule(static) private(jj, ji) 
     302      DO jj = 1, jpj 
     303         DO ji = 1, jpi 
     304            tmu(ji,jj) = umask(ji,jj,1) 
     305            tmv(ji,jj) = vmask(ji,jj,1) 
     306            tmf(ji,jj) = 0.e0                        ! used of fmask except its special value along the coast (rn_shlat) 
     307            IF( fmask(ji,jj,1) == 1.e0 )   tmf(ji,jj) = 1.e0 
     308         END DO 
     309      END DO 
    300310#endif 
    301311      ! 
    302312      ! unmasked and masked area of T-grid cell 
    303 !$OMP PARALLEL WORKSHARE 
    304       area(:,:) = e1t(:,:) * e2t(:,:) 
    305 !$OMP END PARALLEL WORKSHARE 
     313!$OMP PARALLEL DO schedule(static) private(jj, ji) 
     314      DO jj = 1, jpj 
     315         DO ji = 1, jpi 
     316            area(ji,jj) = e1t(ji,jj) * e2t(ji,jj) 
     317         END DO 
     318      END DO 
    306319      ! 
    307320#if defined key_lim2_vp 
  • branches/2016/dev_r6519_HPC_4/NEMOGCM/NEMO/LIM_SRC_2/limsbc_2.F90

    r7037 r7508  
    129129 
    130130!$OMP PARALLEL 
    131 !$OMP WORKSHARE 
    132       zqnsoce(:,:) = qns(:,:) 
    133 !$OMP END WORKSHARE NOWAIT 
     131!$OMP DO schedule(static) private(jj, ji) 
     132      DO jj = 1, jpj 
     133         DO ji = 1, jpi 
     134      zqnsoce(ji,jj) = qns(ji,jj) 
     135         END DO 
     136      END DO 
     137!$OMP END DO NOWAIT 
    134138!$OMP DO schedule(static) private(jj,ji,zinda,ifvt,i1mfr,idfr,iflt,ial,iadv,ifral,ifrdv,zqsr,zqns,zqhc,zemp,zemp_snw,zfmm,zfsalt,zcd)  
    135139      DO jj = 1, jpj 
     
    239243      !                                !------------------------------------------! 
    240244      IF( nn_ice_embd /= 0 ) THEN      ! embedded sea-ice (mass required) 
    241 !$OMP PARALLEL WORKSHARE 
    242          snwice_mass_b(:,:) = snwice_mass(:,:)                  ! save mass from the previous ice time step 
     245!$OMP PARALLEL DO schedule(static) private(jj, ji) 
     246      DO jj = 1, jpj 
     247         DO ji = 1, jpi 
     248         snwice_mass_b(ji,jj) = snwice_mass(ji,jj)                  ! save mass from the previous ice time step 
    243249         !                                                      ! new mass per unit area 
    244          snwice_mass  (:,:) = tms(:,:) * ( rhosn * hsnif(:,:) + rhoic * hicif(:,:)  ) * ( 1.0 - frld(:,:) ) 
     250         snwice_mass  (ji,jj) = tms(ji,jj) * ( rhosn * hsnif(ji,jj) + rhoic * hicif(ji,jj)  ) * ( 1.0 - frld(ji,jj) ) 
    245251         !                                                      ! time evolution of snow+ice mass 
    246          snwice_fmass (:,:) = ( snwice_mass(:,:) - snwice_mass_b(:,:) ) / rdt_ice 
    247 !$OMP END PARALLEL WORKSHARE 
     252         snwice_fmass (ji,jj) = ( snwice_mass(ji,jj) - snwice_mass_b(ji,jj) ) / rdt_ice 
     253         END DO 
     254      END DO 
    248255      ENDIF 
    249256 
     
    261268 
    262269      IF( ln_cpl) THEN 
    263 !$OMP PARALLEL WORKSHARE 
    264          tn_ice(:,:,1) = sist(:,:)          ! sea-ice surface temperature        
    265          ht_i(:,:,1) = hicif(:,:) 
    266          ht_s(:,:,1) = hsnif(:,:) 
    267          a_i(:,:,1) = fr_i(:,:) 
    268 !$OMP END PARALLEL WORKSHARE 
     270!$OMP PARALLEL DO schedule(static) private(jj, ji) 
     271         DO jj = 1, jpj 
     272            DO ji = 1, jpi 
     273               tn_ice(ji,jj,1) = sist(ji,jj)          ! sea-ice surface temperature        
     274               ht_i(ji,jj,1) = hicif(ji,jj) 
     275               ht_s(ji,jj,1) = hsnif(ji,jj) 
     276               a_i(ji,jj,1) = fr_i(ji,jj) 
     277            END DO 
     278         END DO 
    269279         !                                  ! Computation of snow/ice and ocean albedo 
    270280         CALL albedo_ice( tn_ice, ht_i, ht_s, zalbp, zalb ) 
    271 !$OMP PARALLEL WORKSHARE 
    272          alb_ice(:,:,1) =  0.5 * ( zalbp(:,:,1) + zalb (:,:,1) )   ! Ice albedo (mean clear and overcast skys) 
    273 !$OMP END PARALLEL WORKSHARE 
     281!$OMP PARALLEL DO schedule(static) private(jj, ji) 
     282      DO jj = 1, jpj 
     283         DO ji = 1, jpi 
     284            alb_ice(ji,jj,1) =  0.5 * ( zalbp(ji,jj,1) + zalb (ji,jj,1) )   ! Ice albedo (mean clear and overcast skys) 
     285         END DO 
     286      END DO 
    274287         IF( iom_use('icealb_cea' ) )   CALL iom_put( 'icealb_cea', alb_ice(:,:,1) * fr_i(:,:) )  ! ice albedo 
    275288      ENDIF 
     
    355368            CALL lbc_lnk( taum, 'T', 1. ) 
    356369            ! 
    357 !$OMP PARALLEL WORKSHARE 
    358             utau_oce(:,:) = utau(:,:)                    !* save the air-ocean stresses at ice time-step 
    359             vtau_oce(:,:) = vtau(:,:) 
    360 !$OMP END PARALLEL WORKSHARE 
     370!$OMP PARALLEL DO schedule(static) private(jj, ji) 
     371      DO jj = 1, jpj 
     372         DO ji = 1, jpi 
     373            utau_oce(ji,jj) = utau(ji,jj)                    !* save the air-ocean stresses at ice time-step 
     374            vtau_oce(ji,jj) = vtau(ji,jj) 
     375         END DO 
     376      END DO 
    361377            ! 
    362378         ENDIF 
     
    418434            CALL lbc_lnk( taum, 'T', 1. )   ;   CALL lbc_lnk( tmod_io, 'T', 1. ) 
    419435            ! 
    420 !$OMP PARALLEL WORKSHARE 
    421             utau_oce(:,:) = utau(:,:)                 !* save the air-ocean stresses at ice time-step 
    422             vtau_oce(:,:) = vtau(:,:) 
    423 !$OMP END PARALLEL WORKSHARE 
     436!$OMP PARALLEL DO schedule(static) private(jj, ji) 
     437            DO jj = 1, jpj 
     438               DO ji = 1, jpi 
     439                  utau_oce(ji,jj) = utau(ji,jj)                 !* save the air-ocean stresses at ice time-step 
     440                  vtau_oce(ji,jj) = vtau(ji,jj) 
     441               END DO 
     442            END DO 
    424443            ! 
    425444         ENDIF 
     
    475494      r1_rdtice = 1._wp / rdt_ice 
    476495      ! 
    477 !$OMP PARALLEL WORKSHARE 
    478       soce_0(:,:) = soce                     ! constant SSS and ice salinity used in levitating sea-ice case 
    479       sice_0(:,:) = sice 
    480 !$OMP END PARALLEL WORKSHARE 
     496!$OMP PARALLEL DO schedule(static) private(jj, ji) 
     497      DO jj = 1, jpj 
     498         DO ji = 1, jpi 
     499            soce_0(ji,jj) = soce                     ! constant SSS and ice salinity used in levitating sea-ice case 
     500            sice_0(ji,jj) = sice 
     501         END DO 
     502      END DO 
    481503      ! 
    482504      IF( cp_cfg == "orca" ) THEN            ! decrease ocean & ice reference salinities in the Baltic sea  
     
    489511      !                                      ! embedded sea ice 
    490512      IF( nn_ice_embd /= 0 ) THEN            ! mass exchanges between ice and ocean (case 1 or 2) set the snow+ice mass 
    491 !$OMP PARALLEL WORKSHARE 
    492          snwice_mass  (:,:) = tms(:,:) * ( rhosn * hsnif(:,:) + rhoic * hicif(:,:)  ) * ( 1.0 - frld(:,:) ) 
    493          snwice_mass_b(:,:) = snwice_mass(:,:) 
    494 !$OMP END PARALLEL WORKSHARE 
     513!$OMP PARALLEL DO schedule(static) private(jj, ji) 
     514         DO jj = 1, jpj 
     515            DO ji = 1, jpi 
     516               snwice_mass  (ji,jj) = tms(ji,jj) * ( rhosn * hsnif(ji,jj) + rhoic * hicif(ji,jj)  ) * ( 1.0 - frld(ji,jj) ) 
     517               snwice_mass_b(ji,jj) = snwice_mass(ji,jj) 
     518            END DO 
     519         END DO 
    495520      ELSE 
    496 !$OMP PARALLEL WORKSHARE 
    497          snwice_mass  (:,:) = 0.e0           ! no mass exchanges 
    498          snwice_mass_b(:,:) = 0.e0           ! no mass exchanges 
    499          snwice_fmass (:,:) = 0.e0           ! no mass exchanges 
    500 !$OMP END PARALLEL WORKSHARE 
     521!$OMP PARALLEL DO schedule(static) private(jj, ji) 
     522      DO jj = 1, jpj 
     523         DO ji = 1, jpi 
     524         snwice_mass  (ji,jj) = 0.e0           ! no mass exchanges 
     525         snwice_mass_b(ji,jj) = 0.e0           ! no mass exchanges 
     526         snwice_fmass (ji,jj) = 0.e0           ! no mass exchanges 
     527         END DO 
     528      END DO 
    501529      ENDIF 
    502530      IF( nn_ice_embd == 2 .AND.          &  ! full embedment (case 2) & no restart :  
    503531         &   .NOT.ln_rstart ) THEN           ! deplete the initial ssh below sea-ice area 
    504 !$OMP PARALLEL WORKSHARE 
    505          sshn(:,:) = sshn(:,:) - snwice_mass(:,:) * r1_rau0 
    506          sshb(:,:) = sshb(:,:) - snwice_mass(:,:) * r1_rau0 
    507 !$OMP END PARALLEL WORKSHARE 
     532!$OMP PARALLEL DO schedule(static) private(jj, ji) 
     533      DO jj = 1, jpj 
     534         DO ji = 1, jpi 
     535         sshn(ji,jj) = sshn(ji,jj) - snwice_mass(ji,jj) * r1_rau0 
     536         sshb(ji,jj) = sshb(ji,jj) - snwice_mass(ji,jj) * r1_rau0 
     537         END DO 
     538      END DO 
    508539!!gm I really don't like this staff here...  Find a way to put that elsewhere or differently 
    509540!!gm 
     
    516547               e3t_b(:,:,jk) = e3t_0(:,:,jk)*( 1._wp + sshb(:,:)*tmask(:,:,1)/(ht_0(:,:) + 1.0 - tmask(:,:,1)) ) 
    517548            end do 
    518 !$OMP WORKSHARE 
    519             e3t_a(:,:,:) = e3t_b(:,:,:) 
    520 !$OMP END WORKSHARE NOWAIT 
     549!$OMP DO schedule(static) private(jk, jj, ji) 
     550            DO jk = 1, jpk 
     551               DO jj = 1, jpj 
     552                  DO ji = 1, jpi 
     553                     e3t_a(ji,jj,jk) = e3t_b(ji,jj,jk) 
     554                  END DO 
     555               END DO 
     556            END DO 
    521557!$OMP END PARALLEL 
    522558            ! Reconstruction of all vertical scale factors at now and before time steps 
     
    535571            !        ! t- and w- points depth 
    536572!$OMP PARALLEL 
    537 !$OMP WORKSHARE 
    538             gdept_n(:,:,1) = 0.5_wp * e3w_n(:,:,1) 
    539             gdepw_n(:,:,1) = 0.0_wp 
    540             gde3w_n(:,:,1) = gdept_n(:,:,1) - sshn(:,:) 
    541 !$OMP END WORKSHARE 
     573!$OMP DO schedule(static) private(jj, ji) 
     574            DO jj = 1, jpj 
     575               DO ji = 1, jpi 
     576                  gdept_n(ji,jj,1) = 0.5_wp * e3w_n(ji,jj,1) 
     577                  gdepw_n(ji,jj,1) = 0.0_wp 
     578                  gde3w_n(ji,jj,1) = gdept_n(ji,jj,1) - sshn(ji,jj) 
     579               END DO 
     580            END DO 
    542581            DO jk = 2, jpk 
    543582!$OMP DO schedule(static) private(jj,ji) 
  • branches/2016/dev_r6519_HPC_4/NEMOGCM/NEMO/LIM_SRC_2/limthd_2.F90

    r7037 r7508  
    7676      INTEGER, INTENT(in) ::   kt     ! number of iteration 
    7777      ! 
    78       INTEGER  ::   ji, jj               ! dummy loop indices 
     78      INTEGER  ::   ji, jj, jk           ! dummy loop indices 
    7979      INTEGER  ::   nbpb                 ! nb of icy pts for thermo. cal. 
    8080      INTEGER  ::   nbpac                ! nb of pts for lateral accretion  
     
    121121       
    122122!!gm needed?  yes at least for some of these arrays  
     123      ztr_fram     = 0.e0   ! sea-ice transport through Fram strait 
    123124!$OMP PARALLEL 
    124 !$OMP WORKSHARE 
    125       zdvosif(:,:) = 0.e0   ! variation of ice volume at surface 
    126       zdvobif(:,:) = 0.e0   ! variation of ice volume at bottom 
    127       zdvolif(:,:) = 0.e0   ! total variation of ice volume 
    128       zdvonif(:,:) = 0.e0   ! transformation of snow to sea-ice volume 
    129       zlicegr(:,:) = 0.e0   ! lateral variation of ice volume 
    130       zdvomif(:,:) = 0.e0   ! variation of ice volume at bottom due to melting only 
    131       ztr_fram     = 0.e0   ! sea-ice transport through Fram strait 
    132       fstric (:,:) = 0.e0   ! part of solar radiation absorbing inside the ice 
    133       fscmbq (:,:) = 0.e0   ! linked with fstric 
    134       ffltbif(:,:) = 0.e0   ! linked with fstric 
    135       qfvbq  (:,:) = 0.e0   ! linked with fstric 
    136       rdm_snw(:,:) = 0.e0   ! variation of snow mass over 1 time step 
    137       rdq_snw(:,:) = 0.e0   ! heat content associated with rdm_snw 
    138       rdm_ice(:,:) = 0.e0   ! variation of ice mass over 1 time step 
    139       rdq_ice(:,:) = 0.e0   ! heat content associated with rdm_ice 
    140       zmsk (:,:,:) = 0.e0 
    141 !$OMP END WORKSHARE NOWAIT 
     125!$OMP DO schedule(static) private(jj,ji) 
     126      DO jj = 1, jpj 
     127         DO ji = 1, jpi 
     128            zdvosif(ji,jj) = 0.e0   ! variation of ice volume at surface 
     129            zdvobif(ji,jj) = 0.e0   ! variation of ice volume at bottom 
     130            zdvolif(ji,jj) = 0.e0   ! total variation of ice volume 
     131            zdvonif(ji,jj) = 0.e0   ! transformation of snow to sea-ice volume 
     132            zlicegr(ji,jj) = 0.e0   ! lateral variation of ice volume 
     133            zdvomif(ji,jj) = 0.e0   ! variation of ice volume at bottom due to melting only 
     134            fstric (ji,jj) = 0.e0   ! part of solar radiation absorbing inside the ice 
     135            fscmbq (ji,jj) = 0.e0   ! linked with fstric 
     136            ffltbif(ji,jj) = 0.e0   ! linked with fstric 
     137            qfvbq  (ji,jj) = 0.e0   ! linked with fstric 
     138            rdm_snw(ji,jj) = 0.e0   ! variation of snow mass over 1 time step 
     139            rdq_snw(ji,jj) = 0.e0   ! heat content associated with rdm_snw 
     140            rdm_ice(ji,jj) = 0.e0   ! variation of ice mass over 1 time step 
     141            rdq_ice(ji,jj) = 0.e0   ! heat content associated with rdm_ice 
     142         END DO 
     143      END DO 
     144!$OMP END DO NOWAIT 
     145!$OMP DO schedule(static) private(jk,jj,ji) 
     146      DO jk = 1, jpk 
     147         DO jj = 1, jpj 
     148            DO ji = 1, jpi 
     149               zmsk (ji,jj,jk) = 0.e0 
     150            END DO 
     151         END DO 
     152      END DO 
     153!$OMP END DO NOWAIT 
    142154 
    143155      ! set to zero snow thickness smaller than epsi04 
     
    434446            fr_i  (ji,jj) = 1.0 - frld(ji,jj)   
    435447            hicifp(ji,jj) = hicif(ji,jj) * fr_i(ji,jj) - hicifp(ji,jj) 
     448            ztmp(ji,jj) = 1. - pfrld(ji,jj)                              ! fraction of ice after the dynamic, before the thermodynamic 
    436449         END DO 
    437450      END DO 
     
    439452      ! Outputs 
    440453      !-------------------------------------------------------------------------------- 
    441       ztmp(:,:) = 1. - pfrld(:,:)                                ! fraction of ice after the dynamic, before the thermodynamic 
    442454      IF( iom_use('ist_cea'    ) )   CALL iom_put( 'ist_cea', (sist(:,:) - rt0) * ztmp(:,:) )   ! Ice surface temperature   [Celius] 
    443455      IF( iom_use('qsr_ai_cea' ) )   CALL iom_put( 'qsr_ai_cea', qsr_ice(:,:,1) * ztmp(:,:) )   ! Solar flux over the ice     [W/m2] 
  • branches/2016/dev_r6519_HPC_4/NEMOGCM/NEMO/LIM_SRC_2/limtrp_2.F90

    r7037 r7508  
    8989# endif 
    9090 
    91       zsm(:,:) = area(:,:) 
     91!$OMP PARALLEL DO schedule(static) private(jj,ji) 
     92      DO jj = 1, jpj 
     93         DO ji = 1, jpi 
     94            zsm(ji,jj) = area(ji,jj) 
     95         END DO 
     96      END DO 
    9297       
    9398      IF( ln_limdyn ) THEN 
     
    110115            ! 
    111116         ELSE                       ! EVP rheology : C-grid sea-ice dynamics (u- & v-points ice velocity) 
    112 !$OMP PARALLEL WORKSHARE 
    113             zui_u(:,:) = u_ice(:,:)      ! EVP rheology: ice (u,v) at u- and v-points 
    114             zvi_v(:,:) = v_ice(:,:) 
    115 !$OMP END PARALLEL WORKSHARE 
     117!$OMP PARALLEL DO schedule(static) private(jj,ji) 
     118            DO jj = 1, jpj 
     119               DO ji = 1, jpi 
     120                  zui_u(ji,jj) = u_ice(ji,jj)      ! EVP rheology: ice (u,v) at u- and v-points 
     121                  zvi_v(ji,jj) = v_ice(ji,jj) 
     122               END DO 
     123            END DO 
    116124         ENDIF 
    117125 
     
    128136         ! content of properties 
    129137         ! --------------------- 
    130 !$OMP PARALLEL WORKSHARE 
    131          zs0sn (:,:) =  hsnm(:,:)              * area  (:,:)  ! Snow volume. 
    132          zs0ice(:,:) =  hicm(:,:)              * area  (:,:)  ! Ice volume. 
    133          zs0a  (:,:) =  ( 1.0 - frld(:,:) )    * area  (:,:)  ! Surface covered by ice. 
    134          zs0c0 (:,:) =  tbif(:,:,1) / rt0_snow * zs0sn (:,:)  ! Heat content of the snow layer. 
    135          zs0c1 (:,:) =  tbif(:,:,2) / rt0_ice  * zs0ice(:,:)  ! Heat content of the first ice layer. 
    136          zs0c2 (:,:) =  tbif(:,:,3) / rt0_ice  * zs0ice(:,:)  ! Heat content of the second ice layer. 
    137          zs0st (:,:) =  qstoif(:,:) / xlic     * zs0a  (:,:)  ! Heat reservoir for brine pockets. 
    138 !$OMP END PARALLEL WORKSHARE 
     138!$OMP PARALLEL DO schedule(static) private(jj,ji) 
     139         DO jj = 1, jpj 
     140            DO ji = 1, jpi 
     141               zs0sn (ji,jj) =  hsnm(ji,jj)              * area  (ji,jj)  ! Snow volume. 
     142               zs0ice(ji,jj) =  hicm(ji,jj)              * area  (ji,jj)  ! Ice volume. 
     143               zs0a  (ji,jj) =  ( 1.0 - frld(ji,jj) )    * area  (ji,jj)  ! Surface covered by ice. 
     144               zs0c0 (ji,jj) =  tbif(ji,jj,1) / rt0_snow * zs0sn (ji,jj)  ! Heat content of the snow layer. 
     145               zs0c1 (ji,jj) =  tbif(ji,jj,2) / rt0_ice  * zs0ice(ji,jj)  ! Heat content of the first ice layer. 
     146               zs0c2 (ji,jj) =  tbif(ji,jj,3) / rt0_ice  * zs0ice(ji,jj)  ! Heat content of the second ice layer. 
     147               zs0st (ji,jj) =  qstoif(ji,jj) / xlic     * zs0a  (ji,jj)  ! Heat reservoir for brine pockets. 
     148               END DO 
     149            END DO 
    139150          
    140151  
     
    184195!!gm Define in limmsh one for all area = 1 /area  (CPU time saved !) 
    185196!$OMP PARALLEL 
    186 !$OMP WORKSHARE 
    187          zs0ice(:,:) = zs0ice(:,:) / area(:,:) 
    188          zs0sn (:,:) = zs0sn (:,:) / area(:,:) 
    189          zs0a  (:,:) = zs0a  (:,:) / area(:,:) 
    190          zs0c0 (:,:) = zs0c0 (:,:) / area(:,:) 
    191          zs0c1 (:,:) = zs0c1 (:,:) / area(:,:) 
    192          zs0c2 (:,:) = zs0c2 (:,:) / area(:,:) 
    193          zs0st (:,:) = zs0st (:,:) / area(:,:) 
    194  
    195 !$OMP END WORKSHARE NOWAIT 
     197!$OMP DO schedule(static) private(jj,ji) 
     198            DO jj = 1, jpj 
     199               DO ji = 1, jpi 
     200                  zs0ice(ji,jj) = zs0ice(ji,jj) / area(ji,jj) 
     201                  zs0sn (ji,jj) = zs0sn (ji,jj) / area(ji,jj) 
     202                  zs0a  (ji,jj) = zs0a  (ji,jj) / area(ji,jj) 
     203                  zs0c0 (ji,jj) = zs0c0 (ji,jj) / area(ji,jj) 
     204                  zs0c1 (ji,jj) = zs0c1 (ji,jj) / area(ji,jj) 
     205                  zs0c2 (ji,jj) = zs0c2 (ji,jj) / area(ji,jj) 
     206                  zs0st (ji,jj) = zs0st (ji,jj) / area(ji,jj) 
     207               END DO 
     208            END DO 
    196209 
    197210         !-------------------------------------! 
  • branches/2016/dev_r6519_HPC_4/NEMOGCM/NEMO/LIM_SRC_2/limwri_2.F90

    r7037 r7508  
    143143       
    144144!$OMP PARALLEL 
    145 !$OMP WORKSHARE       
    146       zcmo(:,:, 1:jpnoumax ) = 0.e0  
    147 !$OMP END WORKSHARE       
     145!$OMP DO schedule(static) private(jj, ji) 
     146      DO jj = 1, jpj 
     147         DO ji = 1, jpi 
     148            zcmo(ji,jj, 1:jpnoumax ) = 0.e0  
     149         END DO 
     150      END DO 
    148151!$OMP DO schedule(static) private(jj,ji,zindh,zinda,zindb,ztmu) 
    149152      DO jj = 2 , jpjm1 
Note: See TracChangeset for help on using the changeset viewer.