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/ldfslp.F90 – 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

File:
1 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      ! 
Note: See TracChangeset for help on using the changeset viewer.