Conformance error when using `zdf_tke` with wave model Stokes drift and tiling
Context
-
Branches impacted: branch_4.2 -
Reference configuration/test case: ORCA2 -
Computing architecture: -
Dependencies: ln_zdftke = .TRUE.
,ln_sdw = .TRUE.
,ln_mxhsw = .TRUE.
,ln_tile = .TRUE.
,key_qco
-
Any other relevant information
Analysis
Arrays hsw
and zmxlm
do not have the same horizontal shape when the tiling is active:
hsw(jpi,jpj)
zmxlm(A2D(nn_hls),jpk)
so the following code in tke_avn causes a conformance error:
IF(ln_sdw .AND. ln_mxhsw) THEN
zmxlm(:,:,1)= vkarmn * MAX ( 1.6 * hsw(:,:) , 0.02 ) ! surface mixing length = F(wave height)
! from terray et al 1999 and mellor and blumberg 2004 it should be 0.85 and not 1.6
zcoef = vkarmn * ( (rn_ediff*rn_ediss)**0.25 ) / rn_ediff
zmxlm(:,:,1)= zcoef * MAX ( 1.6 * hsw(:,:) , 0.02 ) ! surface mixing length = F(wave height)
ELSE
Fix
This bug was fixed by eda456c9, but no issue or merge request was created for it.
The same fix needs to be applied to branch_4.2.