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 15621 – NEMO

Changeset 15621


Ignore:
Timestamp:
2021-12-29T10:51:58+01:00 (2 years ago)
Author:
techene
Message:

#2605 update RK3 loops and add lbc_lnk accordinly

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2021/dev_r14318_RK3_stage1/src/OCE/stprk3_stg.F90

    r15592 r15621  
    3434   USE agrif_oce_interp 
    3535# endif 
     36!!st -dbg stp2d (r3u) 
     37   USE lbclnk         ! ocean lateral boundary conditions (or mpp link) 
    3638    
    3739   ! 
     
    148150      ! 
    149151      IF( .NOT.lk_linssh )   CALL dom_qco_r3c( ssh(:,:,Kaa), r3t(:,:,Kaa), r3u(:,:,Kaa), r3v(:,:,Kaa), r3f(:,:) )   ! "after" ssh/h_0 ratio at t,u,v-column 
     152!!      SELECT CASE( kstg ) 
     153         ! 
     154!!      CASE ( 3 ) 
     155         !!st required at each stage for div hor loops 
     156         CALL lbc_lnk( 'stprk3_stg', r3u(:,:,Kaa), 'U', 1._wp, r3v(:,:,Kaa), 'V', 1._wp, r3f(:,:), 'F', 1._wp ) 
     157         ! 
     158!!      END SELECT 
    150159      ! 
    151160      ! 
     
    153162      ! 
    154163      !                                            !- horizontal components -!   (zaU,zaV)  
    155       zub(:,:) = un_adv(:,:)*r1_hu(:,:,Kmm) - uu_b(:,:,Kmm)    ! barotropic velocity correction 
    156       zvb(:,:) = vn_adv(:,:)*r1_hv(:,:,Kmm) - vv_b(:,:,Kmm) 
    157       DO jk = 1, jpkm1                                         ! horizontal advective velocity 
    158          zaU(:,:,jk) = uu(:,:,jk,Kmm) + zub(:,:)*umask(:,:,jk) 
    159          zaV(:,:,jk) = vv(:,:,jk,Kmm) + zvb(:,:)*vmask(:,:,jk) 
    160       END DO 
     164      DO_2D_OVR( nn_hls, nn_hls, nn_hls, nn_hls ) 
     165         zub(ji,jj) = un_adv(ji,jj)*r1_hu(ji,jj,Kmm) - uu_b(ji,jj,Kmm)    ! barotropic velocity correction 
     166         zvb(ji,jj) = vn_adv(ji,jj)*r1_hv(ji,jj,Kmm) - vv_b(ji,jj,Kmm) 
     167      END_2D 
     168      DO_3D_OVR( nn_hls, nn_hls, nn_hls, nn_hls, 1, jpkm1 )           ! horizontal advective velocity 
     169         zaU(ji,jj,jk) = uu(ji,jj,jk,Kmm) + zub(ji,jj)*umask(ji,jj,jk) 
     170         zaV(ji,jj,jk) = vv(ji,jj,jk,Kmm) + zvb(ji,jj)*vmask(ji,jj,jk) 
     171      END_3D 
     172 
    161173      !                                            !- vertical components -!   ww 
    162174                         CALL wzv  ( kstp, Kbb, Kmm, Kaa, zaU, zaV, ww )     ! ww cross-level velocity 
     
    224236            ! 
    225237            DO jn = 1, jptra 
    226                DO_3D( 0, 0, 0, 0, 1, jpkm1 ) 
    227                tr(ji,jj,jk,jn,Krhs) = 0._wp                              ! set tracer trends to zero 
    228                END_3D 
     238               tr(:,:,:,jn,Krhs) = 0._wp                              ! set tracer trends to zero !!st ::: required because of tra_adv new loops 
    229239            END DO 
    230240            !                                      !==  advection of passive tracers  ==! 
     
    254264         ! 
    255265         DO jn = 1, jptra 
    256             DO_3D( 0, 0, 0, 0, 1, jpkm1 ) 
    257             tr(ji,jj,jk,jn,Krhs) = 0._wp                              ! set tracer trends to zero 
    258             END_3D 
     266            tr(:,:,:,jn,Krhs) = 0._wp                              ! set tracer trends to zero !!st ::: required because of tra_adv new loops 
    259267         END DO 
    260268         !                                         !==  advection of passive tracers  ==! 
     
    394402      ! 
    395403      DO jk = 1, jpkm1                                            ! corrected horizontal velocity 
    396          uu(:,:,jk,Kaa) = uu(:,:,jk,Kaa) + zub(:,:)*umask(:,:,jk) 
    397          vv(:,:,jk,Kaa) = vv(:,:,jk,Kaa) + zvb(:,:)*vmask(:,:,jk) 
     404         uu(A2D(0),jk,Kaa) = uu(A2D(0),jk,Kaa) + zub(A2D(0))*umask(A2D(0),jk) 
     405         vv(A2D(0),jk,Kaa) = vv(A2D(0),jk,Kaa) + zvb(A2D(0))*vmask(A2D(0),jk) 
    398406      END DO 
    399 !!st pourquoi ne pas mettre A2D(0) ici ?  
    400           
     407 
    401408 
    402409      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     
    411418      CALL lbc_lnk( 'stp_RK3_stg', uu(:,:,:,       Kaa), 'U', -1., vv(:,:,:       ,Kaa), 'V', -1.   & 
    412419         &                       , ts(:,:,:,jp_tem,Kaa), 'T',  1., ts(:,:,:,jp_sal,Kaa), 'T',  1. ) 
     420      ! lbc_lnk needed for zdf_sh2 when using nn_hls = 2, moved here to allow tiling in zdf_phy 
     421      IF( nn_hls == 2 .AND. l_zdfsh2 ) CALL lbc_lnk( 'stp_RK3_stg', avm_k, 'W', 1.0_wp ) 
     422      ! 
    413423      ! 
    414424      !                                              !* BDY open boundaries 
Note: See TracChangeset for help on using the changeset viewer.