Since March 2022 along with NEMO 4.2 release,
the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 14321 for NEMO/branches/UKMO/NEMO_4.0.4_revert_a_i_last_couple/src/OCE/C1D – NEMO
Revert the code change that went into NEMO4.0.4 as changeset [13444] and ticket #2514. This crashes the Met Office coupled model as a_i_last_couple is allocated in sbc_cpl_alloc ahead of when jpl is set (jpl is set in par_init). Therefore it is allocated an array size with the wrong value of jpl. When it then copies a_i into this array (in sbc_cpl_snd) it puts data off the end of the array into random memory. During the next call to OASIS (i.e. call cpl_snd) some of this affected memory is processed and a segmentation fault occurs.