A bug has been found in the wave model code for version 38r1 and 40r1 of OpenIFS. The bug causes the wave model to crash under specific circumstances. Only if (i) wave model output is enabled; (ii) model restarts are enabled; (iii) low resolutions are used such that the wave model needs to take multiple sub-timesteps for each atmospheric model timestep.

If all the above conditions are true, then the model will crash with a traceback as follows:

(pid=18787):           /var/tmp/nagc/openifs/build_tests/oifs40r1v2/src/wam/Wam_oper/abort1.F:48  :  master.exe() [0xadf397]
(pid=18787):    /var/tmp/nagc/openifs/build_tests/oifs40r1v2/src/wam/Wam_oper/file_transfer.F:97  :  master.exe() [0xda49bd]
(pid=18787):      /var/tmp/nagc/openifs/build_tests/oifs40r1v2/src/wam/Wam_oper/gsfile_new.F:268  :  master.exe() [0xd64e6b]
(pid=18787):        /var/tmp/nagc/openifs/build_tests/oifs40r1v2/src/wam/Wam_oper/wamodel.F:1525  :  master.exe() [0xcb7054]
(pid=18787):         /var/tmp/nagc/openifs/build_tests/oifs40r1v2/src/wam/Wam_oper/wavemdl.F:481  :  master.exe() [0xabba66]
(pid=18787): /var/tmp/nagc/openifs/build_tests/oifs40r1v2/src/ifs/phys_ec/wvcouple.F90:252 (discriminator 22)  :  master.exe() [0x96b189]
(pid=18787):     /var/tmp/nagc/openifs/build_tests/oifs40r1v2/src/ifs/control/cnt4.F90:1203 (discriminator 8)  :  master.exe() [0x5956e7]
(pid=18787):                        /var/tmp/nagc/openifs/build_tests/oifs40r1v2/src/ifs/control/cnt3.F90:248  :  master.exe() [0x5869d6]
(pid=18787):                         /var/tmp/nagc/openifs/build_tests/oifs40r1v2/src/ifs/control/cnt2.F90:77  :  master.exe() [0x5867a2]
(pid=18787):                         /var/tmp/nagc/openifs/build_tests/oifs40r1v2/src/ifs/control/cnt1.F90:87  :  master.exe() [0x5592f8]
(pid=18787):                        /var/tmp/nagc/openifs/build_tests/oifs40r1v2/src/ifs/control/cnt0.F90:140  :  master.exe() [0x410a0f]
(pid=18787):                          /var/tmp/nagc/openifs/build_tests/oifs40r1v2/src/programs/master.F90:62  :  master.exe() [0x40f925] 


The model may also show the following in the NODE_001.01 file:

******************************************
*                                        *
*   ERROR FOLLOWING CALL TO INQUIRE      *
*   IN FILE_TRANSFER                     *
*   COULD NOT FIND FILE fort.30
*                                        *
******************************************

Code fix

The fix to this problem is to make a single line change in the file: src/wam/Wam_oper/wamodel.F at line: 1497. Change:

        IF (CDATEE.EQ.CDTPRO.OR.LDWRRE) THEN

to

        IF ( (CDATEE.EQ.CDTPRO) .OR. (LDWRRE.AND.KADV.EQ.NADV) ) THEN

This ensures the file I/O is only done after completing all of the internal wave model timesteps.

As OpenIFS 40r1v2 is the last of the 40r1 releases, this fix will need to be applied to existing code.  It will be fixed in the forthcoming release of OpenIFS 43r3v1.