Opened 13 years ago

Closed 13 years ago

Last modified 4 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 13 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 13 years ago by ctlod

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

comment:3 Changed 6 years ago by nicolasmartin

  • Keywords BDY added; key_bdy removed

comment:4 Changed 4 years ago by jpalmier

In 9127:

create branch -- GMED #365

comment:5 Changed 4 years ago by jpalmier

In 9187:

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

comment:6 Changed 4 years ago by marc

In 9258:

Adding Julien's GMED ticket 365 for DMS constants for Anderson scheme (incl fixes to a couple of other tickets)

Note: See TracTickets for help on using tickets.