Changeset 3968


Ignore:
Timestamp:
2013-07-10T16:38:12+02:00 (7 years ago)
Author:
cbricaud
Message:

use after vertical scale factors in vvl case, see ticket #1059

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMOGCM/NEMO/OPA_SRC/BDY/bdydyn.F90

    r3294 r3968  
    3030   USE lbclnk          ! ocean lateral boundary conditions (or mpp link) 
    3131   USE in_out_manager  ! 
     32   USE domvvl          ! variable volume 
    3233 
    3334   IMPLICIT NONE 
     
    8485      pu2d(:,:) = 0.e0 
    8586      pv2d(:,:) = 0.e0 
    86       DO jk = 1, jpkm1   !! Vertically integrated momentum trends 
    87           pu2d(:,:) = pu2d(:,:) + fse3u(:,:,jk) * umask(:,:,jk) * ua(:,:,jk) 
    88           pv2d(:,:) = pv2d(:,:) + fse3v(:,:,jk) * vmask(:,:,jk) * va(:,:,jk) 
    89       END DO 
    90       pu2d(:,:) = pu2d(:,:) * phur(:,:) 
    91       pv2d(:,:) = pv2d(:,:) * phvr(:,:) 
     87      IF (lk_vvl) THEN 
     88         DO jk = 1, jpkm1   !! Vertically integrated momentum trends 
     89            pu2d(:,:) = pu2d(:,:) + fse3u_a(:,:,jk) * umask(:,:,jk) * ua(:,:,jk) 
     90            pv2d(:,:) = pv2d(:,:) + fse3v_a(:,:,jk) * vmask(:,:,jk) * va(:,:,jk) 
     91         END DO 
     92         pu2d(:,:) = pu2d(:,:) / ( hu_0(:,:) + sshu_a(:,:) + 1._wp - umask(:,:,1) ) 
     93         pv2d(:,:) = pv2d(:,:) / ( hv_0(:,:) + sshv_a(:,:) + 1._wp - vmask(:,:,1) ) 
     94      ELSE 
     95         DO jk = 1, jpkm1   !! Vertically integrated momentum trends 
     96            pu2d(:,:) = pu2d(:,:) + fse3u(:,:,jk) * umask(:,:,jk) * ua(:,:,jk) 
     97            pv2d(:,:) = pv2d(:,:) + fse3v(:,:,jk) * vmask(:,:,jk) * va(:,:,jk) 
     98         END DO 
     99         pu2d(:,:) = pu2d(:,:) * phur(:,:) 
     100         pv2d(:,:) = pv2d(:,:) * phvr(:,:) 
     101      ENDIF 
    92102      DO jk = 1 , jpkm1 
    93          ua(:,:,jk) = ua(:,:,jk) - pu2d(:,:) 
    94          va(:,:,jk) = va(:,:,jk) - pv2d(:,:) 
     103         ua(:,:,jk) = ua(:,:,jk) - pu2d(:,:) * umask(:,:,jk) 
     104         va(:,:,jk) = va(:,:,jk) - pv2d(:,:) * vmask(:,:,jk) 
    95105      END DO 
    96106 
Note: See TracChangeset for help on using the changeset viewer.