id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc,branch_review,mp_status,wp_comment
2080,bug in z tilde?,davestorkey,davestorkey,"== 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
{{{#!f
IF( ln_vvl_ztilde .OR. ln_vvl_layer .AND. ll_do_bclinic ) THEN
}}}
is the same as
{{{#!f
IF( ln_vvl_ztilde .OR. ( ln_vvl_layer .AND. ll_do_bclinic ) ) THEN
}}}
But I think it should be
{{{#!f
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
...
",Bug,closed,normal,,OCE,trunk,minor,fixed,,,,,