Opened 17 months ago

Closed 17 months ago

Last modified 16 months 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: release-4.0
Severity: minor Keywords: dynvor
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 (4)

comment:1 Changed 17 months ago by jchanut

In 10741:

Bug with ENT scheme #2254

comment:2 Changed 17 months ago by jchanut

In 10742:

Bug with ENT scheme #2254

comment:3 Changed 17 months ago by jchanut

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

comment:4 Changed 16 months ago by nicolasmartin

  • Description modified (diff)
Note: See TracTickets for help on using tickets.