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 14576 for NEMO/branches/2021/dev_r14273_HPC-02_Daley_Tiling/src/OCE/LDF – NEMO

Ignore:
Timestamp:
2021-03-03T17:04:07+01:00 (3 years ago)
Author:
hadcv
Message:

#2600: Merge in dev_r14393_HPC-03_Mele_Comm_Cleanup r14538

Location:
NEMO/branches/2021/dev_r14273_HPC-02_Daley_Tiling/src/OCE/LDF
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2021/dev_r14273_HPC-02_Daley_Tiling/src/OCE/LDF/ldfslp.F90

    r14574 r14576  
    371371         ! 
    372372         ip = jl   ;   jp = jl                ! guaranteed nonzero gradients ( absolute value larger than repsln) 
    373          DO_3D( 1, 0, 1, 0, 1, jpkm1 )        ! done each pair of triad ! NB: not masked ==>  a minimum value is set 
     373         ! [comm_cleanup] ! DO_3D( 1, 0, 1, 0, 1, jpkm1 )        ! done each pair of triad ! NB: not masked ==>  a minimum value is set 
     374         DO_3D( nn_hls, nn_hls-1, nn_hls, nn_hls-1, 1, jpkm1 )        ! done each pair of triad ! NB: not masked ==>  a minimum value is set 
    374375            zdit = ( ts(ji+1,jj,jk,jp_tem,Kbb) - ts(ji,jj,jk,jp_tem,Kbb) )    ! i-gradient of T & S at u-point 
    375376            zdis = ( ts(ji+1,jj,jk,jp_sal,Kbb) - ts(ji,jj,jk,jp_sal,Kbb) ) 
     
    383384         ! 
    384385         IF( ln_zps .AND. l_grad_zps ) THEN     ! partial steps: correction of i- & j-grad on bottom 
    385             DO_2D( 1, 0, 1, 0 ) 
     386            ! [comm_cleanup] ! DO_2D( 1, 0, 1, 0 ) 
     387            DO_2D( nn_hls, nn_hls-1, nn_hls, nn_hls-1 ) 
    386388               iku  = mbku(ji,jj)          ;   ikv  = mbkv(ji,jj)             ! last ocean level (u- & v-points) 
    387389               zdit = gtsu(ji,jj,jp_tem)   ;   zdjt = gtsv(ji,jj,jp_tem)      ! i- & j-gradient of Temperature 
     
    397399 
    398400      DO kp = 0, 1                            !==  unmasked before density i- j-, k-gradients  ==! 
    399          DO_3D( 1, 1, 1, 1, 1, jpkm1 )        ! done each pair of triad ! NB: not masked ==>  a minimum value is set 
     401         ! [comm_cleanup] ! DO_3D( 1, 1, 1, 1, 1, jpkm1 )        ! done each pair of triad ! NB: not masked ==>  a minimum value is set 
     402         DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 1, jpkm1 )      ! done each pair of triad ! NB: not masked ==>  a minimum value is set 
    400403            IF( jk+kp > 1 ) THEN              ! k-gradient of T & S a jk+kp 
    401404               zdkt = ( ts(ji,jj,jk+kp-1,jp_tem,Kbb) - ts(ji,jj,jk+kp,jp_tem,Kbb) ) 
     
    412415      END DO 
    413416      ! 
    414       DO_2D( 1, 1, 1, 1 )                     !==  Reciprocal depth of the w-point below ML base  ==! 
     417      ! [comm_cleanup] ! DO_2D( 1, 1, 1, 1 )                     !==  Reciprocal depth of the w-point below ML base  ==! 
     418      DO_2D( nn_hls, nn_hls, nn_hls, nn_hls )                   !== Reciprocal depth of the w-point below ML base  ==! 
    415419         jk = MIN( nmln(ji,jj), mbkt(ji,jj) ) + 1     ! MIN in case ML depth is the ocean depth 
    416420         z1_mlbw(ji,jj) = 1._wp / gdepw(ji,jj,jk,Kmm) 
     
    432436      DO jl = 0, 1                            ! calculate slope of the 4 triads immediately ONE level below mixed-layer base 
    433437         DO kp = 0, 1                         ! with only the slope-max limit   and   MASKED 
    434             DO_2D( 1, 0, 1, 0 ) 
     438            ! [comm_cleanup] ! DO_2D( 1, 0, 1, 0 ) 
     439            DO_2D( nn_hls, nn_hls-1, nn_hls, nn_hls-1 ) 
    435440               ip = jl   ;   jp = jl 
    436441               ! 
     
    469474               ! Must mask contribution to slope from dz/dx at constant s for triads jk=1,kp=0 that poke up though ocean surface 
    470475               znot_thru_surface = REAL( 1-1/(jk+kp), wp )  !jk+kp=1,=0.; otherwise=1.0 
    471                DO_2D( 1, 0, 1, 0 ) 
     476               ! [comm_cleanup] ! DO_2D( 1, 0, 1, 0 ) 
     477               DO_2D( nn_hls, nn_hls-1, nn_hls, nn_hls-1 ) 
    472478                  ! 
    473479                  ! Calculate slope relative to geopotentials used for GM skew fluxes 
     
    552558      CALL lbc_lnk( 'ldfslp', wslp2, 'W', 1.0_wp )      ! lateral boundary confition on wslp2 only   ==>>> gm : necessary ? to be checked 
    553559      ! 
     560      ! [comm_cleanup] - this comm have to be deleted !!!!! 
     561      IF (nn_hls.eq.2) THEN 
     562         CALL lbc_lnk( 'ldfslp', triadi(:,:,:,:,0), 'U', 1.0_wp, triadi(:,:,:,:,1), 'U', 1.0_wp ) 
     563         CALL lbc_lnk( 'ldfslp', triadj(:,:,:,:,0), 'V', 1.0_wp, triadj(:,:,:,:,1), 'V', 1.0_wp ) 
     564         CALL lbc_lnk( 'ldfslp', triadi_g(:,:,:,:,0), 'U', 1.0_wp, triadi_g(:,:,:,:,1), 'U', 1.0_wp ) 
     565         CALL lbc_lnk( 'ldfslp', triadj_g(:,:,:,:,0), 'V', 1.0_wp, triadj_g(:,:,:,:,1), 'V', 1.0_wp ) 
     566      END IF 
     567 
    554568      IF( ln_timing )   CALL timing_stop('ldf_slp_triad') 
    555569      ! 
  • NEMO/branches/2021/dev_r14273_HPC-02_Daley_Tiling/src/OCE/LDF/ldftra.F90

    r14574 r14576  
    647647      !                       ! Compute lateral diffusive coefficient at T-point 
    648648      IF( ln_traldf_triad ) THEN 
    649          DO_3D( 0, 0, 0, 0, 1, jpk ) 
     649         ! [comm_cleanup] ! DO_3D( 0, 0, 0, 0, 1, jpk ) 
     650         DO_3D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1, 1, jpk ) 
    650651            ! Take the max of N^2 and zero then take the vertical sum 
    651652            ! of the square root of the resulting N^2 ( required to compute 
     
    661662         END_3D 
    662663      ELSE 
    663          DO_3D( 0, 0, 0, 0, 1, jpk ) 
     664         ! [comm_cleanup] ! DO_3D( 0, 0, 0, 0, 1, jpk ) 
     665         DO_3D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1, 1, jpk ) 
    664666            ! Take the max of N^2 and zero then take the vertical sum 
    665667            ! of the square root of the resulting N^2 ( required to compute 
     
    677679      ENDIF 
    678680 
    679       DO_2D( 0, 0, 0, 0 ) 
     681      ! [comm_cleanup] ! DO_2D( 0, 0, 0, 0 ) 
     682      DO_2D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1 ) 
    680683         zfw = MAX( ABS( 2. * omega * SIN( rad * gphit(ji,jj) ) ) , 1.e-10 ) 
    681684         ! Rossby radius at w-point taken betwenn 2 km and  40km 
     
    687690      !                                         !==  Bound on eiv coeff.  ==! 
    688691      z1_f20 = 1._wp / (  2._wp * omega * sin( rad * 20._wp )  ) 
    689       DO_2D( 0, 0, 0, 0 ) 
     692      ! [comm_cleanup] ! DO_2D( 0, 0, 0, 0 ) 
     693      DO_2D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1 ) 
    690694         zzaei = MIN( 1._wp, ABS( ff_t(ji,jj) * z1_f20 ) ) * zaeiw(ji,jj)     ! tropical decrease 
    691695         zaeiw(ji,jj) = MIN( zzaei , paei0 )                                  ! Max value = paei0 
     
    693697      CALL lbc_lnk( 'ldftra', zaeiw(:,:), 'W', 1.0_wp )       ! lateral boundary condition 
    694698      ! 
    695       DO_2D( 0, 0, 0, 0 )                       !== aei at u- and v-points  ==! 
     699      ! [comm_cleanup] ! DO_2D( 0, 0, 0, 0 ) 
     700      DO_2D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1 ) 
    696701         paeiu(ji,jj,1) = 0.5_wp * ( zaeiw(ji,jj) + zaeiw(ji+1,jj  ) ) * umask(ji,jj,1) 
    697702         paeiv(ji,jj,1) = 0.5_wp * ( zaeiw(ji,jj) + zaeiw(ji  ,jj+1) ) * vmask(ji,jj,1) 
     
    751756      zpsi_uw(:,:,jpk) = 0._wp   ;   zpsi_vw(:,:,jpk) = 0._wp 
    752757      ! 
    753       DO_3D( 1, 0, 1, 0, 2, jpkm1 ) 
     758      ! [comm_cleanup] ! DO_3D( 1, 0, 1, 0, 2, jpkm1 ) 
     759      DO_3D( nn_hls, nn_hls-1, nn_hls, nn_hls-1, 2, jpkm1 ) 
    754760         zpsi_uw(ji,jj,jk) = - r1_4 * e2u(ji,jj) * ( wslpi(ji,jj,jk  ) + wslpi(ji+1,jj,jk) )   & 
    755761            &                                    * ( aeiu (ji,jj,jk-1) + aeiu (ji  ,jj,jk) ) * wumask(ji,jj,jk) 
     
    758764      END_3D 
    759765      ! 
    760       DO_3D( 1, 0, 1, 0, 1, jpkm1 ) 
     766      ! [comm_cleanup] ! DO_3D( 1, 0, 1, 0, 1, jpkm1 ) 
     767      DO_3D( nn_hls, nn_hls-1, nn_hls, nn_hls-1, 1, jpkm1 ) 
    761768         pu(ji,jj,jk) = pu(ji,jj,jk) - ( zpsi_uw(ji,jj,jk) - zpsi_uw(ji,jj,jk+1) ) 
    762769         pv(ji,jj,jk) = pv(ji,jj,jk) - ( zpsi_vw(ji,jj,jk) - zpsi_vw(ji,jj,jk+1) ) 
    763770      END_3D 
    764       DO_3D( 0, 0, 0, 0, 1, jpkm1 ) 
     771      ! [comm_cleanup] ! DO_3D( 0, 0, 0, 0, 1, jpkm1 ) 
     772      DO_3D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1, 1, jpkm1 ) 
    765773         pw(ji,jj,jk) = pw(ji,jj,jk) + (  zpsi_uw(ji,jj,jk) - zpsi_uw(ji-1,jj  ,jk)   & 
    766774            &                             + zpsi_vw(ji,jj,jk) - zpsi_vw(ji  ,jj-1,jk) ) 
Note: See TracChangeset for help on using the changeset viewer.