<html aria-label="message body"><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">shelfice_thermodynamics.F can crash when the line<br> saltFreeze = (- bqe - SQRT(discrim))*recip_aqe<br>returns 0, so that<br> freshWaterFlux = rUnit2mass<br> & * shiTransCoeffS(i,j,bi,bj)<br> & * ( 1. _d 0 - sLoc(I,J) / saltFreeze )<br>returns NaN.<br><br>This appears to be a consequence of "sLoc(I,J) = 0”<br>One possible fix is to add:<br> sLoc(I,J) = MAX(salt(I,J,K,bi,bj), 0.1 _d 0)<br><br>>>>>>>><br><br><div>Kayhan Momeni, from his ongoing llc4320 simulation has extracted all the model state variables</div><div>at the time step before (3205150) and during (3205151) the first NaN:</div><div><a href="https://nasa-ext.box.com/s/5ah3cffma49vkvfwgjsown7ytgs8i5i1">https://nasa-ext.box.com/s/5ah3cffma49vkvfwgjsown7ytgs8i5i1</a></div><div><br></div><div>I have created a small (17x17x173) regional set-up that (approximately) recreates this crash:</div><div><a href="https://nasa-ext.box.com/s/varcd6iu3ilg44bzly9hnzee1wnigfod">https://nasa-ext.box.com/s/varcd6iu3ilg44bzly9hnzee1wnigfod</a></div><div><a href="https://nasa-ext.box.com/s/bpq9p9yksksdhgr2knofj9fsqj0ntv5x">https://nasa-ext.box.com/s/bpq9p9yksksdhgr2knofj9fsqj0ntv5x</a></div><div><a href="https://nasa-ext.box.com/s/atgqgp43st6o4u4976gfr5not465zbdr">https://nasa-ext.box.com/s/atgqgp43st6o4u4976gfr5not465zbdr</a></div><div><br></div><div>I have verified that the small set-up is able to reproduce the SHICE_fwFlux NaN, the white grid cell at center of:</div><div><a href="https://nasa-ext.box.com/s/trhs4kd8vpt9tx4t8riq934olrks3h30">https://nasa-ext.box.com/s/trhs4kd8vpt9tx4t8riq934olrks3h30</a></div><div><br></div><div>All of the above are under: <a href="https://nasa-ext.box.com/s/q4sx5w4bnwui4v1afec9k2kb41ejml3v">https://nasa-ext.box.com/s/q4sx5w4bnwui4v1afec9k2kb41ejml3v</a></div><div><br></div></body></html>