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.
#365 (wrong scale factors used in bdyvol) – NEMO

Opened 16 years ago

Closed 15 years ago

Last modified 7 years ago

#365 closed Bug (fixed)

wrong scale factors used in bdyvol

Reported by: gm Owned by: nemo
Priority: normal Milestone:
Component: OCE Version: trunk
Severity: Keywords: BDY
Cc:

Description

in bdyvol.F90 the sum of the forcing contribution is performed using e1v * e2u whereas the surface of a box at T-point is simply e1t*e2t. Therefore the folling lines:

z_cflxemp = 0.e0
DO jj = 1, jpj

DO ji = 1, jpi

z_cflxemp = z_cflxemp + emp(ji,jj) * bdytmask(ji,jj) * tmask_i(ji,jj) / rau0 * e1v(ji,jj) * e2u(ji,jj)

END DO

END DO

should be changed into

z_cflxemp = 0.e0
DO jj = 1, jpj

DO ji = 1, jpi

z_cflxemp = z_cflxemp + emp(ji,jj) * bdytmask(ji,jj) * tmask_i(ji,jj) / rauw * e1t(ji,jj) * e2t(ji,jj)

END DO

END DO

or in a more compact form (like the one used in obcvol.F90)

z_cflxemp = SUM ( emp(:,:) * bdytmask(:,:) * e1t(:,:) * e2t(:,:) / rauw )

by the way, introducing a scalar equal to 1/rauw will reduce the cpu time (less division):

REAL(wp)
zraur ! temporary scalar

...

zraur = 1.e0 / rauw
z_cflxemp = SUM ( emp(:,:) * bdytmask(:,:) * e1t(:,:) * e2t(:,:) * zraur )

gurvan

Commit History (3)

ChangesetAuthorTimeChangeLog
9187jpalmier2018-01-05T17:33:15+01:00

JPALM -- GMED #365 -- enable Anderson DMS tuning

9127jpalmier2017-12-19T12:37:01+01:00

create branch -- GMED #365

1521ctlod2009-07-22T12:48:06+02:00

wrong scale factors, see ticket: #365

Change History (6)

comment:1 Changed 16 years ago by gm

N.B.

the last line should be read as:

zraur = 1.e0 / rauw

z_cflxemp = SUM ( emp(:,:) * bdytmask(:,:) * e1t(:,:) * e2t(:,:) * zraur )

comment:2 Changed 15 years ago by ctlod

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

comment:3 Changed 8 years ago by nicolasmartin

  • Keywords BDY added; key_bdy removed

comment:4 Changed 7 years ago by jpalmier

In 9127:

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

comment:5 Changed 7 years ago by jpalmier

In 9187:

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

comment:6 Changed 7 years ago by marc

In 9258:

Error: Failed to load processor CommitTicketReference
No macro or processor named 'CommitTicketReference' found
Note: See TracTickets for help on using tickets.