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_3/limrhg.F90 – NEMO

Ignore:
Timestamp:
2016-10-18T15:32:04+02:00 (7 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_3/limrhg.F90

    r6416 r7037  
    180180      ! 
    181181      ! Put every vector to 0 
     182 
     183#if defined key_lim3 
     184      CALL lim_itd_me_icestrength( nn_icestr )      ! LIM-3: Ice strength on T-points 
     185#endif 
     186 
     187!$OMP PARALLEL 
     188!$OMP WORKSHARE 
    182189      delta_i(:,:) = 0._wp   ; 
    183190      zpresh (:,:) = 0._wp   ;   
     
    186193      divu_i (:,:) = 0._wp   ;   zdt   (:,:) = 0._wp   ;   zds(:,:) = 0._wp 
    187194      shear_i(:,:) = 0._wp 
    188  
    189 #if defined key_lim3 
    190       CALL lim_itd_me_icestrength( nn_icestr )      ! LIM-3: Ice strength on T-points 
    191 #endif 
    192  
     195!$OMP END WORKSHARE 
     196 
     197!$OMP DO schedule(static) private(jj,ji) 
    193198      DO jj = k_j1 , k_jpj       ! Ice mass and temp variables 
    194199         DO ji = 1 , jpi 
     
    206211      ! Ice strength on grid cell corners (zpreshc) 
    207212      ! needed for calculation of shear stress  
     213!$OMP DO schedule(static) private(jj,ji,zstms) 
    208214      DO jj = k_j1+1, k_jpj-1 
    209215         DO ji = 2, jpim1 !RB caution no fs_ (ji+1,jj+1) 
     
    215221         END DO 
    216222      END DO 
     223!$OMP END DO NOWAIT 
     224!$OMP END PARALLEL 
    217225      CALL lbc_lnk( zpreshc(:,:), 'F', 1. ) 
    218226      ! 
     
    242250         zintb = REAL( nn_fsbc + 1 ) / REAL( nn_fsbc ) * 0.5_wp 
    243251         ! 
     252!$OMP PARALLEL WORKSHARE 
    244253         zpice(:,:) = ssh_m(:,:) + (  zintn * snwice_mass(:,:) +  zintb * snwice_mass_b(:,:)  ) * r1_rau0 
     254!$OMP END PARALLEL WORKSHARE 
    245255         ! 
    246256      ELSE                                    !== non-embedded sea ice: use ocean surface for slope calculation ==! 
     257!$OMP PARALLEL WORKSHARE 
    247258         zpice(:,:) = ssh_m(:,:) 
     259!$OMP END PARALLEL WORKSHARE 
    248260      ENDIF 
    249261 
     262!$OMP PARALLEL DO schedule(static) private(jj,ji,zc1,zc2,zc3,zt11,zt12,zt21,zt22,ztagnx,ztagny,zdsshx,zdsshy) 
    250263      DO jj = k_j1+1, k_jpj-1 
    251264         DO ji = fs_2, fs_jpim1 
     
    319332 
    320333      !-Initialise stress tensor  
     334!$OMP PARALLEL WORKSHARE 
    321335      zs1 (:,:) = stress1_i (:,:)  
    322336      zs2 (:,:) = stress2_i (:,:) 
    323337      zs12(:,:) = stress12_i(:,:) 
     338!$OMP END PARALLEL WORKSHARE 
    324339 
    325340      !                                               !----------------------! 
    326341      DO jter = 1 , nn_nevp                           !    loop over jter    ! 
    327342         !                                            !----------------------!         
     343!$OMP PARALLEL 
     344!$OMP DO schedule(static) private(jj,ji) 
    328345         DO jj = k_j1, k_jpj-1 
    329             zu_ice(:,jj) = u_ice(:,jj)    ! velocity at previous time step 
    330             zv_ice(:,jj) = v_ice(:,jj) 
    331          END DO 
    332  
     346            DO ji = 1, jpi 
     347               zu_ice(ji,jj) = u_ice(ji,jj)    ! velocity at previous time step 
     348               zv_ice(ji,jj) = v_ice(ji,jj) 
     349            END DO 
     350         END DO 
     351!$OMP END DO NOWAIT 
     352 
     353!$OMP DO schedule(static) private(jj,ji) 
    333354         DO jj = k_j1+1, k_jpj-1 
    334355            DO ji = fs_2, fs_jpim1   !RB bug no vect opt due to zmask 
     
    377398            END DO 
    378399         END DO 
     400!$OMP END DO NOWAIT 
     401!$OMP END PARALLEL 
    379402 
    380403         CALL lbc_lnk_multi( v_ice1, 'U', -1., u_ice2, 'V', -1. )      ! lateral boundary cond. 
    381404          
     405!$OMP PARALLEL DO schedule(static) private(jj,ji,zdst,delta,zddc,zdtc) 
    382406         DO jj = k_j1+1, k_jpj-1 
    383407            DO ji = fs_2, fs_jpim1 
     
    417441  
    418442         ! Ice internal stresses (Appendix C of Hunke and Dukowicz, 2002) 
     443!$OMP PARALLEL DO schedule(static) private(jj,ji) 
    419444         DO jj = k_j1+1, k_jpj-1 
    420445            DO ji = fs_2, fs_jpim1 
     
    438463         IF (MOD(jter,2).eq.0) THEN  
    439464 
     465!$OMP PARALLEL DO schedule(static) private(jj,ji,rswitch,z0,zv_ice1,za,zr,zcca,zccb) 
    440466            DO jj = k_j1+1, k_jpj-1 
    441467               DO ji = fs_2, fs_jpim1 
     
    464490#endif          
    465491 
     492!$OMP PARALLEL DO schedule(static) private(jj,ji,rswitch,z0,zu_ice2,za,zr,zcca,zccb) 
    466493            DO jj = k_j1+1, k_jpj-1 
    467494               DO ji = fs_2, fs_jpim1 
     
    491518 
    492519         ELSE  
     520!$OMP PARALLEL DO schedule(static) private(jj,ji,rswitch,z0,zu_ice2,za,zr,zcca,zccb) 
    493521            DO jj = k_j1+1, k_jpj-1 
    494522               DO ji = fs_2, fs_jpim1 
     
    517545#endif          
    518546 
     547!$OMP PARALLEL DO schedule(static) private(jj,ji,rswitch,z0,zv_ice1,za,zr,zcca,zccb) 
    519548            DO jj = k_j1+1, k_jpj-1 
    520549               DO ji = fs_2, fs_jpim1 
     
    562591      ! If the ice volume is below zvmin then ice velocity should equal the 
    563592      ! ocean velocity. This prevents high velocity when ice is thin 
     593!$OMP PARALLEL DO schedule(static) private(jj,ji) 
    564594      DO jj = k_j1+1, k_jpj-1 
    565595         DO ji = fs_2, fs_jpim1 
     
    582612#endif          
    583613 
     614!$OMP PARALLEL DO schedule(static) private(jj,ji) 
    584615      DO jj = k_j1+1, k_jpj-1  
    585616         DO ji = fs_2, fs_jpim1 
     
    599630 
    600631      ! Recompute delta, shear and div, inputs for mechanical redistribution  
     632!$OMP PARALLEL 
     633!$OMP DO schedule(static) private(jj,ji,zdst,delta) 
    601634      DO jj = k_j1+1, k_jpj-1 
    602635         DO ji = fs_2, jpim1   !RB bug no vect opt due to zmask 
     
    634667      ! * Invariants of the stress tensor are required for limitd_me 
    635668      !   (accelerates convergence and improves stability) 
     669!$OMP DO schedule(static) private(jj,ji,zdst) 
    636670      DO jj = k_j1+1, k_jpj-1 
    637671         DO ji = fs_2, fs_jpim1 
     
    641675         END DO 
    642676      END DO 
    643  
    644       ! Lateral boundary condition 
    645       CALL lbc_lnk_multi( divu_i (:,:), 'T', 1., delta_i(:,:), 'T', 1.,  shear_i(:,:), 'T', 1. ) 
    646  
     677!$OMP END DO NOWAIT 
    647678      ! * Store the stress tensor for the next time step 
     679!$OMP WORKSHARE 
    648680      stress1_i (:,:) = zs1 (:,:) 
    649681      stress2_i (:,:) = zs2 (:,:) 
    650682      stress12_i(:,:) = zs12(:,:) 
     683!$OMP END WORKSHARE NOWAIT 
     684!$OMP END PARALLEL 
     685      ! Lateral boundary condition 
     686      CALL lbc_lnk_multi( divu_i (:,:), 'T', 1., delta_i(:,:), 'T', 1.,  shear_i(:,:), 'T', 1. ) 
    651687 
    652688      ! 
Note: See TracChangeset for help on using the changeset viewer.