[MITgcm-support] the floating-point exception issue

Dimitris Menemenlis dmenemenlis at gmail.com
Thu Apr 24 13:20:04 EDT 2025


Hi Han, so the model runs for a while before it crashes?
Did you change the horizontal grid spacing, in which case you may have to shorten deltat to avoid CFL violations.
Or perhaps you introduced some initial shock in the solution because of your new initial conditions?
In which case reducing deltat initially, to get rid of this instability, before increasing it again with new initial conditions.
One set of monitor variables to look for are the CFL numbers in STDOUT.
In general CFL numbers should be below 0.5.
If you exceed that, your model may crash.

Cheers,

Dimitris


> On Apr 23, 2025, at 7:51 AM, han <hylhwyjy at 163.com> wrote:
> 
> Dear all,
> 
> I am a new user of MITgcm.Recently, I've been  trying to establish an ocean simulation model for a certain area (similar to tutorial_global_oce_latlon case). 
> After I used the initial bathymetry(bathyFile), temperature(hydrogThetaFile), salinity(hydrogSaltFile),velocity(uVelInitFile,vVelInitFile), wind stress(zonalWindFile,meridWindFile) files generated by myself and modified some parameters, I found that the model could run normally, but there would be floating-point exceptions, as shown in the following code
> 
> Note: The following floating-point exceptions are signalling: IEEE_INVALID_FLAG
> STOP NORMAL END
> Note: The following floating-point exceptions are signalling: IEEE_INVALID_FLAG
> STOP NORMAL END
> Note: The following floating-point exceptions are signalling: IEEE_INVALID_FLAG
> STOP NORMAL END
> Note: The following floating-point exceptions are signalling: IEEE_INVALID_FLAG IEEE_OVERFLOW_FLAG
> STOP NORMAL END
> 
> 
> In the STDOUT file, it can be seen that the calculation has diverged and NAN values appear, like this
> 
> (PID.TID 0000.0001) SOLVE_FOR_PRESSURE: putPmEinXvector =    F
> cg2d: Sum(rhs),rhsMax =   1.24232198821943E-02  4.08393649685423E+00
> ...
> cg2d: Sum(rhs),rhsMax =                    NaN                   NaN
> cg2d: Sum(rhs),rhsMax =                    NaN                   NaN
> cg2d: Sum(rhs),rhsMax =                    NaN                   NaN
> cg2d: Sum(rhs),rhsMax =                    NaN                   NaN
> cg2d: Sum(rhs),rhsMax =                    NaN                   NaN
> ...
> 
> 
> I am looking to you for some guidance and advice.
> 
> Thanks very much in advance!
> 
> 
> Best regards,
> Han
> 
> _______________________________________________
> MITgcm-support mailing list
> MITgcm-support at mitgcm.org
> http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.mitgcm.org/pipermail/mitgcm-support/attachments/20250424/3f2d4a5a/attachment-0001.html>


More information about the MITgcm-support mailing list