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.
#2080 (bug in z tilde?) – NEMO

Opened 6 years ago

Last modified 5 years ago

#2080 closed Bug

bug in z tilde? — at Initial Version

Reported by: davestorkey Owned by:
Priority: normal Milestone:
Component: OCE Version: trunk
Severity: minor Keywords:
Cc:

Description

Context

I think the IF test in line 327 of domvvl.F90 might be wrong. (I'm looking at the dev_merge_2017 branch). In fortran AND has precedence over OR, so the line

IF( ln_vvl_ztilde .OR. ln_vvl_layer .AND. ll_do_bclinic ) THEN

is the same as

IF( ln_vvl_ztilde .OR. ( ln_vvl_layer .AND. ll_do_bclinic ) ) THEN

But I think it should be

IF( ( ln_vvl_ztilde .OR. ln_vvl_layer ) .AND. ll_do_bclinic ) THEN

If ln_vvl_ztilde is true and kcall=2 then ll_do_bclinic is set to false. But ( ln_vvl_ztilde .OR. ln_vvl_layer .AND. ll_do_bclinic ) evaluates as true in this case so it will still do the baroclinic calculation even though ll_do_bclinic is false. I don't know if this will give a wrong result or if it just an inefficiency - a repeated calculation.

I haven't tested z tilde. I'm just reading the code. Could someone confirm that they agree with me (or disagree with me)?

Analysis

...

Fix

...

Commit History (1)

ChangesetAuthorTimeChangeLog
11415jchanut2019-08-07T11:05:58+02:00

#2080, correct conditional statement

Change History (0)

Note: See TracTickets for help on using tickets.