Changes between Initial Version and Version 2 of Ticket #2080
- Timestamp:
- 2018-05-02T18:27:15+02:00 (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #2080 – Description
initial v2 3 3 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 4 4 5 {{{#!f 5 6 IF( ln_vvl_ztilde .OR. ln_vvl_layer .AND. ll_do_bclinic ) THEN 7 }}} 6 8 7 9 is the same as 8 10 11 {{{#!f 9 12 IF( ln_vvl_ztilde .OR. ( ln_vvl_layer .AND. ll_do_bclinic ) ) THEN 13 }}} 10 14 11 15 But I think it should be 12 16 17 {{{#!f 13 18 IF( ( ln_vvl_ztilde .OR. ln_vvl_layer ) .AND. ll_do_bclinic ) THEN 19 }}} 14 20 15 21 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.