# Nesting and Periodic boundaries not working correctly

**URL:** <https://forum.croco-ocean.org/t/nesting-and-periodic-boundaries-not-working-correctly/368>\
**Category:** nesting\
**Tags:** nesting, physics-params, dynamics-numerics\
**Created:** [June 15, 2022, 8:16am UTC](https://forum.croco-ocean.org/t/nesting-and-periodic-boundaries-not-working-correctly/368 "2022-06-15T08:16:27Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![vcombes](https://forum.croco-ocean.org/letter_avatar_proxy/v4/letter/v/ba9def/32.png) [@vcombes](https://forum.croco-ocean.org/u/vcombes)\
**Post date:** [June 15, 2022, 8:16am UTC](https://forum.croco-ocean.org/t/nesting-and-periodic-boundaries-not-working-correctly/368/1 "2022-06-15T08:16:27Z")

</div>

Hi,

This is an issue that Patrick Marchesiello solved for me ~12 years ago in an old version of ROMS\_Agrif.  
However, this patch was apparently not applied to the Croco model:

I have downloaded the last version of Croco and the nesting is not coded correctly when using periodic boundary conditions. To illustrate the error, I have a run an experiment of an eddy propagating in a periodic channel (EW\_Periodic, North/South walls) using a nested grid (child grid is shown as a magenta frame in the figure below).  
As you can see after a couple of days (2nd figure), the EW\_PERIODIC is applied to the child grid while it should NOT.

If anyone wants to reproduce this example quickly (runs in a couple of minutes using 4 cpus) a simple cppdefs.h, param.h, AGRIF\_FixedGrids.in, croco\_grd.nc, croco\_grd.nc.1, croco\_ini.nc, croco\_ini.nc.1, Croco.in, Croco.in.1 can be downloaded from my webpage here:

[https://www.vincentcombes.com/TEST\_EW\_PERIODIC.zip](https://www.vincentcombes.com/TEST_EW_PERIODIC.zip)

**Initial Condition (SSH):**

![image description](https://forum.croco-ocean.org/uploads/default/original/1X/8e1986f6d034d72c2539f260f6cc60c62dfeb42e.jpeg)

**After a couple of days (Error):**

![image description](https://forum.croco-ocean.org/uploads/default/original/1X/8ff70554b00f13217044b88404ba504dec7cf1fb.jpeg)

It would be great if it could be fixed in the Croco code

Thanks to the development team

Vincent

---

<div class="post-metadata">

**Author:** ![vcombes](https://forum.croco-ocean.org/letter_avatar_proxy/v4/letter/v/ba9def/32.png) [@vcombes](https://forum.croco-ocean.org/u/vcombes)\
**Post date:** [August 1, 2023, 2:08pm UTC](https://forum.croco-ocean.org/t/nesting-and-periodic-boundaries-not-working-correctly/368/2 "2023-08-01T14:08:03Z")

</div>

Hi everyone,

After 1 year of silence, I am back with this work.

Has anyone fixed that issue ?

Thank you

Vincent

---

<div class="post-metadata">

**Author:** ![vcombes](https://forum.croco-ocean.org/letter_avatar_proxy/v4/letter/v/ba9def/32.png) [@vcombes](https://forum.croco-ocean.org/u/vcombes)\
**Post date:** [January 23, 2025, 8:58am UTC](https://forum.croco-ocean.org/t/nesting-and-periodic-boundaries-not-working-correctly/368/3 "2025-01-23T08:58:05Z")

</div>

Hi CROCO developers,

I am still interesting in a solution to this problem.  
I have tried many things and thought I was able to fix it, but it seems not …  
Especially in a real case experiment.

Thank you for any help on this !

Vincent

---

<div class="post-metadata">

**Author:** ![sjullien](https://forum.croco-ocean.org/user_avatar/forum.croco-ocean.org/sjullien/32/255_2.png) [@sjullien](https://forum.croco-ocean.org/u/sjullien)\
**Post date:** [January 23, 2025, 3:53pm UTC](https://forum.croco-ocean.org/t/nesting-and-periodic-boundaries-not-working-correctly/368/4 "2025-01-23T15:53:09Z")

</div>

Hi Vincent, Sorry for not responding earlier to your post. We are not planning to include this feature (periodic nest) in CROCO because it is very intrusive and requests duplicating many routines, which may induce other problems with some modules. For these reasons it is not planned to include that. Sorry.

---

<div class="post-metadata">

**Author:** ![vcombes](https://forum.croco-ocean.org/letter_avatar_proxy/v4/letter/v/ba9def/32.png) [@vcombes](https://forum.croco-ocean.org/u/vcombes)\
**Post date:** [January 27, 2025, 8:56am UTC](https://forum.croco-ocean.org/t/nesting-and-periodic-boundaries-not-working-correctly/368/5 "2025-01-27T08:56:12Z")

</div>

Thank you,

I agree that there will be many files to update if we want this configuration to work for all cases.  
Perhaps it could be possible to fix it in a simpler case (i.e., no atmospheric coupling, no sediments, no waves, etc.), focusing only on the ROMS ocean folder.  
I have tried quite a lot, but unfortunately, without success.

I am open to any kind of help

Vincent
