# Bug: segmentation fault with 4D sea ice outputs

**URL:** <https://nemo-ocean.discourse.group/t/bug-segmentation-fault-with-4d-sea-ice-outputs/1051>\
**Category:** Versions\
**Tags:** SI3, IOM\
**Created:** [13 October 2026 15:18 UTC](https://nemo-ocean.discourse.group/t/bug-segmentation-fault-with-4d-sea-ice-outputs/1051 "2026-10-13T15:18:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jraylmer](https://avatars.discourse-cdn.com/v4/letter/j/c0e974/32.png) [@jraylmer](https://nemo-ocean.discourse.group/u/jraylmer)\
**Post date:** [13 October 2026 15:18 UTC](https://nemo-ocean.discourse.group/t/bug-segmentation-fault-with-4d-sea-ice-outputs/1051/1 "2026-10-13T15:18:53Z")

</div>

Requesting either or both of the following outputs causes an otherwise functional configuration to crash with a seg. fault:

- `icesalt_lay`
- `icetemp_lay`

These are in the field group `SBC_4D` in `field_def_nemo-ice.xml`. They are functions of ice thickness category and layer (i.e., 4D fields; not counting time). I am using `ORCA2_ICE`-based configurations, but I doubt this matters.

I guess this is something to do with subroutine `iom_duplicate_grid` in `src/IOM/iom.F90`, called from `iom_init` in the same module, when the input `cdaxe` is present and/or contains more than one new axis, but not sure. There is no specific error pointing towards those routines, but I am working on a development branch that adds a new 4D group in a similar way and I get the same problem with my new outputs. This also happens in a release branch without modification (5.0.2; [#dcc7fb8c](https://forge.nemo-ocean.eu/nemo/nemo/-/commit/dcc7fb8c1779fa8409e41e4ce3ab7d45b9ceb796)).

There seems to be no point pasting the error messages as it’s just random memory addresses. Deactivating those 4D outputs makes this go away and the simulation runs as expected.
