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

Changeset 15471


Ignore:
Timestamp:
2021-11-04T17:28:56+01:00 (7 months ago)
Author:
jchanut
Message:

#1791: correct thicknesses at last level with vvl. This ensures total depth is correct (eg matches depth at rest + sea level anomaly) which may otherwise induce unstabilities, and unconsistencies with external mode. The correction is active over steps (no change with purely s-coordinates or in between two adjacent z-levels with partial cells). Contrary to qco formulation, the vvl scheme can lead to negative thicknesses at velocity points, even if total depth at T-points is positive. This is a rare case which is not taken into account in this correction.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/trunk/src/OCE/DOM/domvvl.F90

    r15014 r15471  
    683683      ! 
    684684      INTEGER ::   ji, jj, jk                                       ! dummy loop indices 
     685      INTEGER ::   iku, ikum1, ikv, ikvm1, ikf, ikfm1 
    685686      REAL(wp) ::  zlnwd                                            ! =1./0. when ln_wd_il = T/F 
    686687      !!---------------------------------------------------------------------- 
     
    700701               &                           + e1e2t(ji+1,jj) * ( pe3_in(ji+1,jj,jk) - e3t_0(ji+1,jj,jk) ) ) 
    701702         END_3D 
     703         ! 
     704         ! Bottom correction: 
     705         DO_2D( 1, 0, 1, 0 ) 
     706            iku    = mbku(ji  ,jj) 
     707            ikum1  = iku - 1 
     708            pe3_out(ji,jj,iku) = ( umask(ji,jj,iku) * (1.0_wp - zlnwd) + zlnwd )    &  
     709               &     * ( 0.5_wp *  r1_e1e2u(ji,jj)                                  & 
     710               &     * (    e1e2t(ji  ,jj) * ( SUM(tmask(ji  ,jj,:)*(pe3_in(ji  ,jj,:) - e3t_0(ji  ,jj,:))) )   &                
     711               &          + e1e2t(ji+1,jj) * ( SUM(tmask(ji+1,jj,:)*(pe3_in(ji+1,jj,:) - e3t_0(ji+1,jj,:))) ) ) & 
     712               &     - SUM(pe3_out(ji,jj,1:ikum1))) 
     713         END_2D 
     714          
    702715         CALL lbc_lnk( 'domvvl', pe3_out(:,:,:), 'U', 1._wp ) 
    703716         pe3_out(:,:,:) = pe3_out(:,:,:) + e3u_0(:,:,:) 
     
    709722               &                           + e1e2t(ji,jj+1) * ( pe3_in(ji,jj+1,jk) - e3t_0(ji,jj+1,jk) ) ) 
    710723         END_3D 
     724         ! 
     725         ! Bottom correction: 
     726         DO_2D( 1, 0, 1, 0 ) 
     727            ikv    = mbkv(ji  ,jj) 
     728            ikvm1  = ikv - 1 
     729            pe3_out(ji,jj,ikv) = ( vmask(ji,jj,ikv) * (1.0_wp - zlnwd) + zlnwd )    &  
     730               &     * ( 0.5_wp *  r1_e1e2v(ji,jj)                                  & 
     731               &     * (    e1e2t(ji,jj  ) * ( SUM(tmask(ji,jj  ,:)*(pe3_in(ji,jj  ,:) - e3t_0(ji,jj  ,:))) )   &                
     732               &          + e1e2t(ji,jj+1) * ( SUM(tmask(ji,jj+1,:)*(pe3_in(ji,jj+1,:) - e3t_0(ji,jj+1,:))) ) ) & 
     733               &     - SUM(pe3_out(ji,jj,1:ikvm1))) 
     734         END_2D 
    711735         CALL lbc_lnk( 'domvvl', pe3_out(:,:,:), 'V', 1._wp ) 
    712736         pe3_out(:,:,:) = pe3_out(:,:,:) + e3v_0(:,:,:) 
     
    719743               &                           + e1e2u(ji,jj+1) * ( pe3_in(ji,jj+1,jk) - e3u_0(ji,jj+1,jk) ) ) 
    720744         END_3D 
     745         ! 
     746         ! Bottom correction: 
     747         DO_2D( 0, 0, 0, 0 ) 
     748            ikf    = MIN(mbku(ji  ,jj),mbku(ji,jj+1)) 
     749            ikfm1  = ikf - 1 
     750            pe3_out(ji,jj,ikf) = ( umask(ji,jj,ikf) * umask(ji,jj+1,ikf) * (1.0_wp - zlnwd) + zlnwd )           &  
     751               &     * ( 0.5_wp *  r1_e1e2f(ji,jj)                                                              & 
     752               &     * (    e1e2u(ji,jj  ) * ( SUM(umask(ji,jj  ,:)*(pe3_in(ji,jj  ,:) - e3u_0(ji,jj  ,:))) )   &                
     753               &          + e1e2u(ji,jj+1) * ( SUM(umask(ji,jj+1,:)*(pe3_in(ji,jj+1,:) - e3u_0(ji,jj+1,:))) ) ) & 
     754               &     - SUM(pe3_out(ji,jj,1:ikfm1))) 
     755         END_2D 
    721756         CALL lbc_lnk( 'domvvl', pe3_out(:,:,:), 'F', 1._wp ) 
    722757         pe3_out(:,:,:) = pe3_out(:,:,:) + e3f_0(:,:,:) 
Note: See TracChangeset for help on using the changeset viewer.