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.
#2254 (Bug in ENT (energy conserving at T-point) scheme) – NEMO

Opened 5 years ago

Closed 5 years ago

Last modified 2 years ago

#2254 closed Bug (fixed)

Bug in ENT (energy conserving at T-point) scheme

Reported by: jchanut Owned by: jchanut
Priority: low Milestone:
Component: DYN Version: v4.0
Severity: minor Keywords: dynvor v4.0
Cc:

Description (last modified by nicolasmartin)

Context

Newly implemented ENT scheme.

Analysis

2d computation of coriolis force in barotropic mode stepping is wrong.
One has:

         CASE( np_ENT )             ! energy conserving scheme (t-point)
         DO jj = 2, jpjm1
            DO ji = 2, jpim1   ! vector opt.

               z1_hu = ssumask(ji,jj) / ( hu_0(ji,jj) + zhup2_e(ji,jj) + 1._wp - ssumask(ji,jj) )
               z1_hv = ssvmask(ji,jj) / ( hv_0(ji,jj) + zhvp2_e(ji,jj) + 1._wp - ssvmask(ji,jj) )

               zu_trd(ji,jj) = + r1_4 * r1_e1e2u(ji,jj) * z1_hu                   &
                  &               * (  e1e2t(ji+1,jj)*zhtp2_e(ji+1,jj)*ff_t(ji+1,jj) * ( va_e(ji+1,jj) + va_e(ji+1,jj-1) )   &
                  &                  + e1e2t(ji  ,jj)*zhtp2_e(ji  ,jj)*ff_t(ji  ,jj) * ( va_e(ji  ,jj) + va_e(ji  ,jj-1) )   )
                  !
               zv_trd(ji,jj) = - r1_4 * r1_e1e2v(ji,jj) * z1_hv                    &
                  &               * (  e1e2t(ji,jj+1)*zhtp2_e(ji,jj+1)*ff_t(ji,jj+1) * ( ua_e(ji,jj+1) + ua_e(ji-1,jj+1) )   &
                  &                  + e1e2t(ji,jj  )*zhtp2_e(ji,jj  )*ff_t(ji,jj  ) * ( ua_e(ji,jj  ) + ua_e(ji-1,jj  ) )   )
            END DO
         END DO

However, inverse depths z1_hu, z1_hv hold roughly twice their correct values. One has certainly thought that zhup2_e and zhvp2_e are depths anomalies but these are total depths.

Fix

One should therefore have:

               z1_hu = ssumask(ji,jj) / ( zhup2_e(ji,jj) + 1._wp - ssumask(ji,jj) )
               z1_hv = ssvmask(ji,jj) / ( zhvp2_e(ji,jj) + 1._wp - ssvmask(ji,jj) )

Commit History (2)

ChangesetAuthorTimeChangeLog
10742jchanut2019-03-12T12:00:06+01:00

Bug with ENT scheme #2254

10741jchanut2019-03-12T11:58:46+01:00

Bug with ENT scheme #2254

Change History (5)

comment:1 Changed 5 years ago by jchanut

In 10741:

Error: Failed to load processor CommitTicketReference
No macro or processor named 'CommitTicketReference' found

comment:2 Changed 5 years ago by jchanut

In 10742:

Error: Failed to load processor CommitTicketReference
No macro or processor named 'CommitTicketReference' found

comment:3 Changed 5 years ago by jchanut

  • Resolution set to fixed
  • Status changed from new to closed

comment:4 Changed 5 years ago by nicolasmartin

  • Description modified (diff)

comment:5 Changed 2 years ago by nemo

  • Keywords v4.0 added
Note: See TracTickets for help on using tickets.