ESTUARY and WKB - keys WKB_KZ_FILTER and WKB_TIME_FILTER

Hello,

I’m working on an ESTUARY configuration with MRL_WCI; MRL_CEW and WKB_WWAVE.
Forcing is a sinusoidal tide (amplitude 2m, period 12h), river input with 400m3/s and west boundary wave (amplitude 0.5m, period 8s).

When MRL_CEW is activated, I observe a north/south asymmetry in hrm values, with higher values in the northern part of the estuary.
Without MRL_CEW, the hrm field is symmetrical (as expected).

I thought that enabling the WKB_KZ_FILTER and WKB_TIME_FILTER keys would solve the problem (from description in 1.3. Wave-averaged Equations — Croco Doc 1.3 documentation), but my simulation explodes at the first time step when I enable them.

I searched the code and found this line, which seems strange in my case with tidal forcing as Dstp is the water depth : OCEAN/wkb_wwave.F · master · croco-ocean / croco · GitLab

Dstp(i,j)=max(h(i,j)+zwave(i,j,wmod),eps)

If I change this line 531 to :

Dstp(i,j)=max(h(i,j)+zeta(i,j,knew),eps)

my simulation is stable and symmetrical with keys WKB_KZ_FILTER and WKB_TIME_FILTER.

Could it be a bug on this particular line?

To complete with more informations, I post here 2 images showing the bathymetry used and illustrating the assymetry obtained with MRL_CEW after 12 hours of simulation (comparaison of 3 cases with MRL_CEW, without MRL_CEW, with MRL_CEW and filtering and correction on wkb_wwave to avoid simulation blowup)

I put also the files needed to reproduce the problem.

Source code used is from branch master commit sha c5c2848128b457c72423341821ba21f6a1d6bf31
( Files · c5c2848128b457c72423341821ba21f6a1d6bf31 · croco-ocean / croco · GitLab)

  • ana_grid.F : modification for ESTUARY test case to add small orthogonal tidal flat at the limits north and south ana_grid.F (33.8 KB)

  • cppdefs.h
    cppdefs.h (44.4 KB)

  • param.h
    param.h (32.6 KB)

  • croco.in.txt
    croco.in.txt (2.5 KB)