Opened 11 years ago

Closed 10 years ago

Last modified 4 years ago

#435 closed Bug (fixed)

wrong index uslpml & vslpml in ldfslp.F90 (v3.2 & v3.3beta)

Reported by: dupontf Owned by: nemo
Priority: normal Milestone:
Component: OCE Version: release-3.2
Severity: Keywords: LDF
Cc:

Description

In ldfslp.F90 line 533 we have:

ik = MAX( 1, nmln(ji,jj) , nmln(ji+1,jj)

but this loop computes the local vertical density gradient evaluated from N2 (zwy) and is therefore strictly a T-point operation. (not a U-point operation). Therefore we should have instead:

ik = MAX( 1, nmln(ji,jj))

For the same reason, the subsequent mpp call is incorrect

CALL lbc_lnk( zwy, 'U', -1. )

and should be

CALL lbc_lnk( zwy, 'T', 1. )

The logic applies at line 583 where

ik = MAX( 1, nmln(ji,jj) , nmln(ji,jj+1)

and the subsequent mpp call.

In fact, If I am correct, the second computation of zwy (line 580-594) is redundant.

Fred.

Commit History (4)

ChangesetAuthorTimeChangeLog
2401gm2010-11-17T12:09:36+01:00

v3.3beta: #435: bug correction of the slope just below the ML (uslpiml, vslpjml)

2389smasson2010-11-15T16:52:06+01:00

ticket #435, bug fix on uslpml and vslpml

1515ctlod2009-07-21T16:35:10+02:00

wrong sign in the lbc related to pn2 in the computation of the slope just below the mixed layer (step II), see ticket: #435

1514ctlod2009-07-21T12:40:49+02:00

wrong sign in the lbc related to pn2 in the computation of the slope just below the mixed layer, see ticket: #435

Attachments (1)

ldfslp.F90 (47.0 KB) - added by gm 10 years ago.
ldfslp for v3.3beta - suppress Griffies operator for v3.2

Download all attachments as: .zip

Change History (8)

comment:1 Changed 11 years ago by ctlod

2 points here:
(1) wrong sign in the lbc related to pn2 in the computation of the slope just below the mixed layer. This is definitively a bug that have to be corrected in v3.2 (see ldfslp.F90)
(2) replace ik = MAX( 1, nmln(ji,jj) , nmln(ji+1,jj) by ik = MAX( 1, nmln(ji,jj)), but this is not a bug! updated comments in the routine are required on the reason why we are doing this.

comment:2 Changed 11 years ago by ctlod

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

The commit has ben done in 2 steps:
1/ correct the bug, see changeset [1514]
2/ style and optimization, see changeset [1515]

Changed 10 years ago by gm

ldfslp for v3.3beta - suppress Griffies operator for v3.2

comment:3 Changed 10 years ago by gm

  • Priority changed from minor to major
  • Resolution fixed deleted
  • Status changed from closed to reopened
  • Summary changed from wrong index in ldfslp.F90 to wrong index uslpml & vslpml in ldfslp.F90 (v3.2 & v3.3beta)
  • Version changed from nemo_v3_1 to nemo_v3_2

Following discussion with Frederic Dupond, there is a bug in the computation of the slope at the base of the mixed layer.
It causes the north fold boundary condition not to be exactly symmetric. It also impact the value of dz(rho) at the base of the mixed layer which is used to compute uslpml and vlspml (and thus surface levels of uslp & vslp).

wslpiml and wslpjml (and thus wslpi, wslpj) are unaffected. =⇒ eiv velocities are unaffected

Hard to predict the ocean response to such a bug… probably quite small as the wrong slopes have not a crazy value, just a slightly inaccurate one.

Gurvan

a sldslp.F90 module is provided in attachment for v3.3beta. Its application to v3.2 is straight forward.

The changes concerns :

  • ldf_slp routine :

compute dz(rho) (zwy renamed zdzr) prior to the call of ldf_slp_mxl

add the i-, j- and k-gradients in argument of ldf_slp_mxl call

  • ldf_slp_mxl routine :

the routine has been entirely re-written (1 big loop for the ML slope computation, and use of p_dzr, etc…)

comment:4 Changed 10 years ago by smasson

done for NEMO v3.2, see changeset:2389

comment:5 Changed 10 years ago by gm

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

done in NEMO v3.3beta, see changetset: 2401

comment:6 Changed 10 years ago by gm

Additional note:

The modified code (see changetset:2401) has been tested in ORCA2-LIM in a 10years simulation

only tiny differences have been found, and only in the arctic ocean. Fortunately, no significant changes in the mixed layer depth nor in the subsurface T & S.

It is therefore not recommended to redo already done simulations using the old ldfslp module

comment:7 Changed 4 years ago by nicolasmartin

  • Keywords LDF added; ldfslp removed
Note: See TracTickets for help on using tickets.