Simulation blowing up with NaN values

General scientific issues regarding ROMS

Moderators: arango, robertson

Post Reply
Message
Author
sonaljit.m
Posts: 43
Joined: Wed Nov 30, 2016 11:18 pm
Location: University of Massachusetts Dartmouth

Simulation blowing up with NaN values

#1 Unread post by sonaljit.m »

Hi everyone,
I built a 3D grid using Pyroms, and initialized it with temperature, salinity and velocity data. The compilation worked smoothly, however when I run the code it BLOWS UP showing exit_flag 1. The error output is shown below:

Code: Select all

   STEP   Day HH:MM:SS  KINETIC_ENRG   POTEN_ENRG    TOTAL_ENRG    NET_VOLUME
          C => (i,j,k)       Cu            Cv            Cw         Max Speed

      0     0 00:00:00  7.830182E-03  1.548918E+04  1.548918E+04  1.476278E+14
          (706,345,32)  6.403771E-02  1.064610E-01  0.000000E+00  5.211719E-01
      DEF_QUICK   - creating  quicksave    file, Grid 01: ocean_qck.nc
      WRT_QUICK   - wrote quicksave   fields (Index=1,1) in record = 0000001
      1     0 00:02:00 -6.460950+180           NaN           NaN  1.860338E+73
          (001,348,32)  9.462384E+79  5.479670E+81  8.028372E-84  7.755148E+82

 Elapsed CPU time (seconds):

 Thread # 15 CPU:      26.913
 Thread # 11 CPU:      26.913
 Thread #  3 CPU:      26.913
 Thread # 13 CPU:      26.913
 Thread #  7 CPU:      26.913
 Thread # 12 CPU:      26.913
 Thread #  2 CPU:      26.913
 Thread #  4 CPU:      26.913
 Thread # 14 CPU:      26.913
 Thread #  6 CPU:      26.913
 Thread #  9 CPU:      26.913
 Thread #  5 CPU:      26.913
 Thread #  8 CPU:      26.913
 Thread #  1 CPU:      26.913
 Thread #  0 CPU:      26.913
 Thread # 10 CPU:      26.913
 Total:               430.608

 Nonlinear model elapsed time profile, Grid: 01

  Allocation and array initialization ..............      1794.225  (******* %)
  Ocean state initialization .......................        66.487  (15.4404 %)
  Reading of input data ............................         0.121  ( 0.0282 %)
  Processing of input data .........................         0.233  ( 0.0542 %)
  Processing of output time averaged data ..........         0.003  ( 0.0007 %)
  Computation of vertical boundary conditions ......         0.180  ( 0.0418 %)
  Computation of global information integrals ......        13.398  ( 3.1113 %)
  Writing of output data ...........................         0.999  ( 0.2319 %)
  Model 2D kernel ..................................        16.106  ( 3.7402 %)
  2D/3D coupling, vertical metrics .................        11.025  ( 2.5603 %)
  Omega vertical velocity ..........................         4.623  ( 1.0735 %)
  Equation of state for seawater ...................        16.351  ( 3.7972 %)
  3D equations right-side terms ....................        32.517  ( 7.5514 %)
  3D equations predictor step ......................        31.986  ( 7.4282 %)
  Pressure gradient ................................        20.436  ( 4.7458 %)
  Biharmonic mixing of tracers, geopotentials ......         5.382  ( 1.2499 %)
  Corrector time-step for 3D momentum ..............        63.435  (14.7316 %)
  Corrector time-step for tracers ..................        36.577  ( 8.4943 %)
                                              Total:      2114.084  490.9536

 All percentages are with respect to total time =          430.608


 ROMS/TOMS - Output NetCDF summary for Grid 01:

 ROMS/TOMS - Blows up ................ exit_flag:   1


 MAIN: Abnormal termination: BLOWUP.

As you can see, at the 1st time step I'm getting NaN values in KINETIC_ENRG (Cv) and POTEN_ENRG (Cw). Any idea why this is happening?

Thanks,
Sonaljit.

User avatar
kate
Posts: 4088
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: Simulation blowing up with NaN values

#2 Unread post by kate »

This is what I wrote on the wiki:
ROMS will check for extreme values of velocity and density at run time, including looking for NaN and Inf. If found, it will save a record to the restart file and die. If this happens early in the run, you might just try a shorter timestep. If it happens after many days/years of model time, you need to dig more deeply. Find out which field went bad and where in the domain it happened. The restart record can be viewed to look for this trouble. I've had runs go bad at the bottom with a bottom stress instability, at the top with a surface forcing problem, at the boundary with boundary condition issues. I've also had it go bad in the middle of the water column in no place special due to some other instability - it goes from fine to terrible in just a few timesteps. This last can often be run past with a shorter timestep, while the other problems call for more thoughtful responses.

Post Reply