# ESTUARY and WKB - keys WKB\_KZ\_FILTER and WKB\_TIME\_FILTER

**URL:** <https://forum.croco-ocean.org/t/estuary-and-wkb-keys-wkb-kz-filter-and-wkb-time-filter/608>\
**Category:** run / config issues\
**Tags:** wkb\
**Created:** [March 11, 2024, 4:05pm UTC](https://forum.croco-ocean.org/t/estuary-and-wkb-keys-wkb-kz-filter-and-wkb-time-filter/608 "2024-03-11T16:05:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![slegac](https://forum.croco-ocean.org/user_avatar/forum.croco-ocean.org/slegac/32/267_2.png) [@slegac](https://forum.croco-ocean.org/u/slegac)\
**Post date:** [March 11, 2024, 4:05pm UTC](https://forum.croco-ocean.org/t/estuary-and-wkb-keys-wkb-kz-filter-and-wkb-time-filter/608/1 "2024-03-11T16:05:35Z")

</div>

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](https://croco-ocean.gitlabpages.inria.fr/croco_doc/model/model.equations.wci.html#embedded-wave-model)), 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](https://gitlab.inria.fr/croco-ocean/croco/-/blob/master/OCEAN/wkb_wwave.F?ref_type=heads#L531)

`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?

---

<div class="post-metadata">

**Author:** ![slegac](https://forum.croco-ocean.org/user_avatar/forum.croco-ocean.org/slegac/32/267_2.png) [@slegac](https://forum.croco-ocean.org/u/slegac)\
**Post date:** [March 15, 2024, 12:20pm UTC](https://forum.croco-ocean.org/t/estuary-and-wkb-keys-wkb-kz-filter-and-wkb-time-filter/608/2 "2024-03-15T12:20:35Z")

</div>

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](https://gitlab.inria.fr/croco-ocean/croco/-/tree/c5c2848128b457c72423341821ba21f6a1d6bf31))

- ana\_grid.F : modification for ESTUARY test case to add small orthogonal tidal flat at the limits north and south [ana\_grid.F](https://forum.croco-ocean.org/uploads/short-url/i1ZHVaX4yH2kFdAcVBEzEx49XEu.F) (33.8 KB)

- cppdefs.h  
[cppdefs.h](https://forum.croco-ocean.org/uploads/short-url/sfH8XJhHrLPWhygdkSm4UIszYeV.h) (44.4 KB)

- param.h  
[param.h](https://forum.croco-ocean.org/uploads/short-url/1qeE4OGfSGc2RvKrtCOzzq4a3Ej.h) (32.6 KB)

- croco.in.txt  
[croco.in.txt](https://forum.croco-ocean.org/uploads/short-url/g3EThCb5ogZz05qBQh4PC7v9IHM.txt) (2.5 KB)

 ![config_estuary_wkb_bathy](https://forum.croco-ocean.org/uploads/default/original/1X/8c41e821b20ba85a55e35d786d06750e39afa64e.png)  
 ![config_estuary_wkb_pbmrlcew](https://forum.croco-ocean.org/uploads/default/original/1X/2159b5dcd4e57581cb546ea438e4b3b4a8b646e8.png)
