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 14856 for NEMO/branches/2021/dev_r14122_HPC-08_Mueller_OSMOSIS_streamlining/src/OCE/TRA/traadv_qck.F90 – NEMO

Ignore:
Timestamp:
2021-05-12T17:58:07+02:00 (3 years ago)
Author:
smueller
Message:

Synchronizing with /NEMO/trunk@14854 (ticket #2353)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2021/dev_r14122_HPC-08_Mueller_OSMOSIS_streamlining/src/OCE/TRA/traadv_qck.F90

    r14822 r14856  
    2727   USE lbclnk          ! ocean lateral boundary condition (or mpp link) 
    2828   USE lib_fortran     ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined) 
     29#if defined key_loop_fusion 
     30   USE traadv_qck_lf   ! QCK    scheme            (tra_adv_qck  routine - loop fusion version) 
     31#endif 
    2932 
    3033   IMPLICIT NONE 
     
    9194      INTEGER                                  , INTENT(in   ) ::   kjpt            ! number of tracers 
    9295      REAL(wp)                                 , INTENT(in   ) ::   p2dt            ! tracer time-step 
    93       ! TEMP: [tiling] This can be A2D(nn_hls) if using XIOS (subdomain support) 
     96      ! TEMP: [tiling] This can be A2D(nn_hls) after all lbc_lnks removed in the nn_hls = 2 case in tra_adv_fct 
    9497      REAL(wp), DIMENSION(jpi,jpj,jpk         ), INTENT(in   ) ::   pU, pV, pW      ! 3 ocean volume transport components 
    9598      REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt,jpt), INTENT(inout) ::   pt              ! tracers and RHS of tracer equation 
    9699      !!---------------------------------------------------------------------- 
    97100      ! 
    98       IF( ntile == 0 .OR. ntile == 1 )  THEN                       ! Do only on the first tile 
     101#if defined key_loop_fusion 
     102      CALL tra_adv_qck_lf ( kt, kit000, cdtype, p2dt, pU, pV, pW, Kbb, Kmm, pt, kjpt, Krhs ) 
     103#else 
     104      IF( .NOT. l_istiled .OR. ntile == 1 )  THEN                       ! Do only on the first tile 
    99105         IF( kt == kit000 )  THEN 
    100106            IF(lwp) WRITE(numout,*) 
     
    117123      CALL tra_adv_cen2_k( kt, cdtype, pW, Kmm, pt, kjpt, Krhs ) 
    118124      ! 
     125#endif 
    119126   END SUBROUTINE tra_adv_qck 
    120127 
     
    129136      INTEGER                                  , INTENT(in   ) ::   kjpt       ! number of tracers 
    130137      REAL(wp)                                 , INTENT(in   ) ::   p2dt       ! tracer time-step 
    131       ! TEMP: [tiling] This can be A2D(nn_hls) if using XIOS (subdomain support) 
     138      ! TEMP: [tiling] This can be A2D(nn_hls) after all lbc_lnks removed in the nn_hls = 2 case in tra_adv_fct 
    132139      REAL(wp), DIMENSION(jpi,jpj,jpk         ), INTENT(in   ) ::   pU        ! i-velocity components 
    133140      REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt,jpt), INTENT(inout) ::   pt              ! active tracers and RHS of tracer equation 
     
    149156            zfd(ji,jj,jk) = pt(ji+1,jj,jk,jn,Kbb)        ! Downstream in the x-direction for the tracer 
    150157         END_3D 
    151          IF (nn_hls.EQ.1) CALL lbc_lnk( 'traadv_qck', zfc(:,:,:), 'T', 1.0_wp , zfd(:,:,:), 'T', 1.0_wp )   ! Lateral boundary conditions 
     158         IF (nn_hls==1) CALL lbc_lnk( 'traadv_qck', zfc(:,:,:), 'T', 1.0_wp , zfd(:,:,:), 'T', 1.0_wp, ld4only= .TRUE. )   ! Lateral boundary conditions 
    152159 
    153160         ! 
     
    167174         END_3D 
    168175         !--- Lateral boundary conditions 
    169          IF (nn_hls.EQ.1) CALL lbc_lnk( 'traadv_qck', zfu(:,:,:), 'T', 1.0_wp , zfd(:,:,:), 'T', 1.0_wp, zfc(:,:,:), 'T', 1.0_wp,  zwx(:,:,:), 'T', 1.0_wp ) 
     176         IF (nn_hls==1) CALL lbc_lnk( 'traadv_qck', zfu(:,:,:), 'T', 1.0_wp , zfd(:,:,:), 'T', 1.0_wp, zfc(:,:,:), 'T', 1.0_wp,  zwx(:,:,:), 'T', 1.0_wp ) 
    170177 
    171178         !--- QUICKEST scheme 
     
    176183            zfu(ji,jj,jk) = tmask(ji-1,jj,jk) + tmask(ji,jj,jk) + tmask(ji+1,jj,jk) - 2. 
    177184         END_3D 
    178          IF (nn_hls.EQ.1) CALL lbc_lnk( 'traadv_qck', zfu(:,:,:), 'T', 1.0_wp )      ! Lateral boundary conditions 
     185         IF (nn_hls==1) CALL lbc_lnk( 'traadv_qck', zfu(:,:,:), 'T', 1.0_wp, ld4only= .TRUE. )      ! Lateral boundary conditions 
    179186 
    180187         ! 
     
    214221      INTEGER                                  , INTENT(in   ) ::   kjpt       ! number of tracers 
    215222      REAL(wp)                                 , INTENT(in   ) ::   p2dt       ! tracer time-step 
    216       ! TEMP: [tiling] This can be A2D(nn_hls) if using XIOS (subdomain support) 
     223      ! TEMP: [tiling] This can be A2D(nn_hls) after all lbc_lnks removed in the nn_hls = 2 case in tra_adv_fct 
    217224      REAL(wp), DIMENSION(jpi,jpj,jpk         ), INTENT(in   ) ::   pV        ! j-velocity components 
    218225      REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt,jpt), INTENT(inout) ::   pt              ! active tracers and RHS of tracer equation 
     
    229236         zfd(:,:,:) = 0.0     ;   zwy(:,:,:) = 0.0 
    230237         ! 
    231          DO jk = 1, jpkm1 
    232             ! 
    233             !--- Computation of the ustream and downstream value of the tracer and the mask 
    234             DO_2D( 0, 0, nn_hls-1, nn_hls-1 ) 
    235                ! Upstream in the x-direction for the tracer 
    236                zfc(ji,jj,jk) = pt(ji,jj-1,jk,jn,Kbb) 
    237                ! Downstream in the x-direction for the tracer 
    238                zfd(ji,jj,jk) = pt(ji,jj+1,jk,jn,Kbb) 
    239             END_2D 
    240          END DO 
    241          IF (nn_hls.EQ.1) CALL lbc_lnk( 'traadv_qck', zfc(:,:,:), 'T', 1.0_wp , zfd(:,:,:), 'T', 1.0_wp )   ! Lateral boundary conditions 
     238         !--- Computation of the ustream and downstream value of the tracer and the mask 
     239         DO_3D( 0, 0, nn_hls-1, nn_hls-1, 1, jpkm1 ) 
     240            ! Upstream in the x-direction for the tracer 
     241            zfc(ji,jj,jk) = pt(ji,jj-1,jk,jn,Kbb) 
     242            ! Downstream in the x-direction for the tracer 
     243            zfd(ji,jj,jk) = pt(ji,jj+1,jk,jn,Kbb) 
     244         END_3D 
     245 
     246         IF (nn_hls==1) CALL lbc_lnk( 'traadv_qck', zfc(:,:,:), 'T', 1.0_wp , zfd(:,:,:), 'T', 1.0_wp, ld4only= .TRUE. )   ! Lateral boundary conditions 
    242247 
    243248         ! 
     
    259264 
    260265         !--- Lateral boundary conditions 
    261          IF (nn_hls.EQ.1) CALL lbc_lnk( 'traadv_qck', zfu(:,:,:), 'T', 1.0_wp , zfd(:,:,:), 'T', 1.0_wp, zfc(:,:,:), 'T', 1.0_wp, zwy(:,:,:), 'T', 1.0_wp ) 
     266         IF (nn_hls==1) CALL lbc_lnk( 'traadv_qck', zfu(:,:,:), 'T', 1.0_wp , zfd(:,:,:), 'T', 1.0_wp, zfc(:,:,:), 'T', 1.0_wp, zwy(:,:,:), 'T', 1.0_wp ) 
    262267 
    263268         !--- QUICKEST scheme 
     
    268273            zfu(ji,jj,jk) = tmask(ji,jj-1,jk) + tmask(ji,jj,jk) + tmask(ji,jj+1,jk) - 2. 
    269274         END_3D 
    270          IF (nn_hls.EQ.1) CALL lbc_lnk( 'traadv_qck', zfu(:,:,:), 'T', 1.0_wp )    !--- Lateral boundary conditions 
     275         IF (nn_hls==1) CALL lbc_lnk( 'traadv_qck', zfu(:,:,:), 'T', 1.0_wp, ld4only= .TRUE. )    !--- Lateral boundary conditions 
    271276         ! 
    272277         ! Tracer flux on the x-direction 
     
    306311      CHARACTER(len=3)                         , INTENT(in   ) ::   cdtype   ! =TRA or TRC (tracer indicator) 
    307312      INTEGER                                  , INTENT(in   ) ::   kjpt     ! number of tracers 
    308       ! TEMP: [tiling] This can be A2D(nn_hls) if using XIOS (subdomain support) 
     313      ! TEMP: [tiling] This can be A2D(nn_hls) after all lbc_lnks removed in the nn_hls = 2 case in tra_adv_fct 
    309314      REAL(wp), DIMENSION(jpi,jpj,jpk         ), INTENT(in   ) ::   pW      ! vertical velocity 
    310315      REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt,jpt), INTENT(inout) ::   pt              ! active tracers and RHS of tracer equation 
     
    365370      !---------------------------------------------------------------------- 
    366371      ! 
    367       DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 1, jpkm1 ) 
     372      DO_3D( 1, 0, 1, 0, 1, jpkm1 ) 
    368373         zc     = puc(ji,jj,jk)                         ! Courant number 
    369374         zcurv  = pfd(ji,jj,jk) + pfu(ji,jj,jk) - 2. * pfc(ji,jj,jk) 
Note: See TracChangeset for help on using the changeset viewer.