Transfer of a bug fix from a previous OSMOSIS development branch
Context
A developer of the OSMOSIS ocean surface boundary-layer scheme has reported a bug that had previously been fixed in a previous OSMOSIS development branch. This bug is present in both the latest NEMO release version and the main
branch.
Analysis
The corresponding bug fix in the previous development branch has been applied after a streamlined, ported version of the OSMOSIS implementation maintained in the development branch had been merged into the NEMO trunk
, and has not yet been carried forward into the current OSMOSIS reference version.
Fix
It is proposed to transfer the bug fix made with revision 15069 in the previous OSMOSIS development branch to the current NEMO versions. This bug fix corresponds to the modification
--- a/src/OCE/ZDF/zdfosm.F90
+++ b/src/OCE/ZDF/zdfosm.F90
@@ -1665,7 +1665,7 @@ CONTAINS
& e3w(ji,jj,jm,Kmm) )
! zhbl_s = MIN(zhbl_s, gdepw(ji,jj, mbkt(ji,jj) + 1,Kmm) - depth_tol)
- IF ( zhbl_s >= mbkt(ji,jj) + 1 ) THEN
+ IF ( zhbl_s >= gdepw(ji,jj,mbkt(ji,jj) + 1,Kmm) ) THEN
zhbl_s = MIN( zhbl_s, gdepw(ji,jj,mbkt(ji,jj)+1,Kmm) - depth_tol )
l_pyc(ji,jj) = .FALSE.
ENDIF
of the current version of zdfosm.F90
.