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.
#1928 (Missing bits of code in triads) – NEMO

Opened 7 years ago

Closed 4 years ago

#1928 closed Bug (fixed)

Missing bits of code in triads

Reported by: jchanut Owned by: agn
Priority: low Milestone:
Component: OCE Version: trunk
Severity: minor Keywords:
Cc:

Description (last modified by nemo)

Context

ldf_slp_triad routine (Griffies isopycnal mixing)

Analysis

  1. Vertical density gradient computation makes use of zalbet(:,:,:) array and scalar zbeta0, both of which being undefined.
zdzrho_raw = ( - zalbet(ji,jj,jk) * zdkt + zbeta0*zdks ) / e3w_n(ji,jj,jk+kp)
  1. I think that something is wrong in the switch from Lemarié more compact stencil and original scheme, e.g. in the use of rn_sw_triad (0,1) here:
zisw = (rn_sw_triad - 1._wp ) + rn_sw_triad    &
&            * 2._wp * ABS( 0.5_wp - kp - ( 0.5_wp - ip ) * SIGN( 1._wp , zdxrho(ji+ip,jj,jk,1-ip) )  )
zjsw = (rn_sw_triad - 1._wp ) + rn_sw_triad    &
&            * 2._wp * ABS( 0.5_wp - kp - ( 0.5_wp - jp ) * SIGN( 1._wp , zdyrho(ji,jj+jp,jk,1-jp) )  )

Shouldn't it be:

zisw = (1._wp - rn_sw_triad) + rn_sw_triad    &
&            * 2._wp * ABS( 0.5_wp - kp - ( 0.5_wp - ip ) * SIGN( 1._wp , zdxrho(ji+ip,jj,jk,1-ip) )  )
zjsw = (1._wp - rn_sw_triad) + rn_sw_triad    &
&            * 2._wp * ABS( 0.5_wp - kp - ( 0.5_wp - jp ) * SIGN( 1._wp , zdyrho(ji,jj+jp,jk,1-jp) )  )

Fix

zdzrho_raw = ( - rab_b(ji,jj,jk+kp,jp_tem) * zdkt + rab_b(ji,jj,jk+kp,jp_sal)*zdks ) / e3w_n(ji,jj,jk+kp)
  1. Given above if confirmed (this part of the code is obscure to me)

Commit History (5)

ChangesetAuthorTimeChangeLog
12198smasson2019-12-12T09:16:14+01:00

trunk: bugfix in ldf_slp_triad, see #1928

12000mathiot2019-11-28T13:22:58+01:00

add suggestion ticket #1928

11999mathiot2019-11-28T13:11:48+01:00

branch to add the ticket #1928 suggestion

10643jchanut2019-02-07T10:25:23+01:00

Additional fix to Griffies triads, #1928

9736jchanut2018-06-05T10:03:33+02:00

Fix bugs in Griffies triads, #1928

Change History (12)

comment:1 Changed 7 years ago by nicolasmartin

  • Description modified (diff)

comment:2 Changed 6 years ago by nicolasmartin

  • Description modified (diff)
  • Owner nemo deleted
  • Status changed from new to assigned

comment:3 Changed 6 years ago by clevy

  • Owner set to agn

comment:4 Changed 6 years ago by nemo

  • Description modified (diff)
  • Severity set to minor

comment:5 Changed 6 years ago by jchanut

In 9736:

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

comment:6 Changed 6 years ago by jchanut

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

comment:7 Changed 5 years ago by mathiot

  • Resolution fixed deleted
  • Status changed from closed to reopened

In your fix about zdzrho_raw, you changed 2 things:

  • The undefined zalbet and zbeta0 by rab_b. I totally agree with this.
  • The depth alpha and beta was evaluated. It changed from jk to jk+kp.

I am wondering if the second point is not a possible bug:

  • In 3.6 rab_b is evaluated at jk in the computation of zdzrho_raw
  • In equation D.8 of the doc (https://www.nemo-ocean.eu/wp-content/uploads/NEMO_book.pdf) it seems also to be evaluated at level jk
  • A test in eORCA025 shows instability pattern on temperature if rab_b evaluated at jk+kp. (if rab_b evaluated at jk, it looks stable)

Suggestion:

replace :

zdzrho_raw = ( - rab_b(ji,jj,jk+kp,jp_tem) * zdkt + rab_b(ji,jj,jk+kp,jp_sal)*zdks ) / e3w_n(ji,jj,jk+kp)

by:

zdzrho_raw = ( - rab_b(ji,jj,jk,jp_tem) * zdkt + rab_b(ji,jj,jk,jp_sal)*zdks ) / e3w_n(ji,jj,jk+kp)

Confirmation/comments welcome.

comment:8 Changed 5 years ago by jchanut

In 10643:

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

comment:9 Changed 4 years ago by mathiot

In 11999:

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

comment:10 Changed 4 years ago by mathiot

In 12000:

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

comment:11 Changed 4 years ago by smasson

In 12198:

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

comment:12 Changed 4 years ago by smasson

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

closed after George's agreement.

Note: See TracTickets for help on using tickets.