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 11822 for NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/src/OCE/DYN/dynkeg.F90 – NEMO

Ignore:
Timestamp:
2019-10-29T11:41:36+01:00 (5 years ago)
Author:
acc
Message:

Branch 2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps. Sette tested updates to branch to align with trunk changes between 10721 and 11740. Sette tests are passing but results differ from branch before these changes (except for GYRE_PISCES and VORTEX) and branch results already differed from trunk because of algorithmic fixes. Will need more checks to confirm correctness.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/src/OCE/DYN/dynkeg.F90

    r10946 r11822  
    7676      REAL(wp), DIMENSION(jpi,jpj,jpk,jpt), INTENT(inout) ::  puu, pvv         ! ocean velocities and RHS of momentum equation 
    7777      ! 
    78       INTEGER  ::   ji, jj, jk, jb    ! dummy loop indices 
    79       INTEGER  ::   ii, ifu, ib_bdy   ! local integers 
    80       INTEGER  ::   ij, ifv, igrd     !   -       - 
    81       REAL(wp) ::   zu, zv            ! local scalars 
     78      INTEGER  ::   ji, jj, jk             ! dummy loop indices 
     79      REAL(wp) ::   zu, zv                   ! local scalars 
    8280      REAL(wp), DIMENSION(jpi,jpj,jpk)        ::   zhke 
    8381      REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) ::   ztrdu, ztrdv  
     
    9997       
    10098      zhke(:,:,jpk) = 0._wp 
    101        
    102       IF (ln_bdy) THEN 
    103          ! Maria Luneva & Fred Wobus: July-2016 
    104          ! compensate for lack of turbulent kinetic energy on liquid bdy points 
    105          DO ib_bdy = 1, nb_bdy 
    106             IF( cn_dyn3d(ib_bdy) /= 'none' ) THEN 
    107                igrd = 2           ! Copying normal velocity into points outside bdy 
    108                DO jb = 1, idx_bdy(ib_bdy)%nblenrim(igrd) 
    109                   DO jk = 1, jpkm1 
    110                      ii   = idx_bdy(ib_bdy)%nbi(jb,igrd) 
    111                      ij   = idx_bdy(ib_bdy)%nbj(jb,igrd) 
    112                      ifu   = NINT( idx_bdy(ib_bdy)%flagu(jb,igrd) ) 
    113                      puu(ii-ifu,ij,jk,Kmm) = puu(ii,ij,jk,Kmm) * umask(ii,ij,jk) 
    114                   END DO 
    115                END DO 
    116                ! 
    117                igrd = 3           ! Copying normal velocity into points outside bdy 
    118                DO jb = 1, idx_bdy(ib_bdy)%nblenrim(igrd) 
    119                   DO jk = 1, jpkm1 
    120                      ii   = idx_bdy(ib_bdy)%nbi(jb,igrd) 
    121                      ij   = idx_bdy(ib_bdy)%nbj(jb,igrd) 
    122                      ifv   = NINT( idx_bdy(ib_bdy)%flagv(jb,igrd) ) 
    123                      pvv(ii,ij-ifv,jk,Kmm) = pvv(ii,ij,jk,Kmm) * vmask(ii,ij,jk) 
    124                   END DO 
    125                END DO 
    126             ENDIF 
    127          ENDDO   
    128       ENDIF  
    12999 
    130100      SELECT CASE ( kscheme )             !== Horizontal kinetic energy at T-point  ==! 
     
    142112            END DO 
    143113         END DO 
    144          ! 
    145114      CASE ( nkeg_HW )                          !--  Hollingsworth scheme  --! 
    146115         DO jk = 1, jpkm1 
     
    162131         CALL lbc_lnk( 'dynkeg', zhke, 'T', 1. ) 
    163132         ! 
    164       END SELECT 
    165  
    166       IF (ln_bdy) THEN 
    167          ! restore velocity masks at points outside boundary 
    168          puu(:,:,:,Kmm) = puu(:,:,:,Kmm) * umask(:,:,:) 
    169          pvv(:,:,:,Kmm) = pvv(:,:,:,Kmm) * vmask(:,:,:) 
    170       ENDIF       
    171  
     133      END SELECT  
    172134      ! 
    173135      DO jk = 1, jpkm1                    !==  grad( KE ) added to the general momentum trends  ==! 
Note: See TracChangeset for help on using the changeset viewer.