[MITgcm-support] NaNQ

Matthew Mazloff mmazloff at MIT.EDU
Tue Mar 20 11:54:17 EDT 2007


Hi Sergey,

I can't take credit for this solution...it was a mitgcm thread from  
awhile back...it works very well....

         IF(rhsMax.gt.1e10) stop 'overflow!!!!'
         _END_MASTER( myThid )
        ENDIF


after

      IF ( debugLevel .GE. debLevZero ) THEN
         _BEGIN_MASTER( myThid )
         write(standardmessageunit,'(A,1P2E22.14)')
      &  ' cg2d: Sum(rhs),rhsMax = ',
      &                                  sumRHS,rhsMax

in

cg2d.F

this will kill the model before it reaches nans.  (you might want to  
change the tolerance of rhsMax.)  (not sure what to do if using non- 
hydro...maybe put it in cg3d too)

JMC, can we check something like this into the model?

-Matt





On Mar 20, 2007, at 11:27 AM, Sergey Vinogradov wrote:

> Hi
> Does anyone know how to make MITgcm break its execution once it  
> starts to produce NaNQs? I'm not sure if it is platform/compiler-  
> dependent; NaNQs are being dumped if a numerical instability is  
> encountered (or by some other reasons??) but the model continues to  
> run further and burn precious CPU time.
> Thanks,
>
> -- 
> Sergey Vinogradov, Ph.D.,    :: Oceanography
> Atmospheric and Environmental Research, Inc.
> 131 Hartwell Ave., Lexington, MA 02421,  USA
> Phone: 1-781-761-2256         sergey at aer.com
> Fax:   1-781-761-2299     http://www.aer.com
>
> _______________________________________________
> MITgcm-support mailing list
> MITgcm-support at mitgcm.org
> http://mitgcm.org/mailman/listinfo/mitgcm-support




More information about the MITgcm-support mailing list