The “NaN error" problem #2832
-
Hi all, Conducting LES by using Oceananigans is very enjoyable and efficient, but recently I usually meet the NaN error problem and I can not figure out what happens. The case I try to simulate is about the evolution of surface and bottom boundary layers under the conditions of surface heat loss, geostrophic balance, and tidal forcing. At first, I just consider the heat loss and geostrophic balance, and everything goes well, but when I try to add the tidal forcing, there is always a NaN error when the simulation time arrives at about two days. I have checked out the discussions and found that @glwagner put forward possible reasons for the NaN error problem in discussion #1436. I have tried to change the time step, but it seems doesn't work. Could you please help me figure out the reasons? Thanks in advance! My script is attached here :-D
The Hovmöller Diagram of XY-Plane-Averaged-U-velocity before the time simulation stopped is shown below: And the error information is:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
@zwei961120 I would try reducing the
A Also, to diagnose the problem I think you should look at slices of Other than that, nothing else pops out when I read your script. The setup seems sound! |
Beta Was this translation helpful? Give feedback.
@zwei961120 I would try reducing the
cfl
in theTimeStepWizard
tocfl=0.5
. It looks like yourΔt
is increasing just prior to blow up:A
cfl=1.0
is at the very edge of the "practical CFL" for RK3. I'd recommend going no higher thancfl=0.8
. Butcfl=0.5
(or even justcfl=0.1
, for sanity's sake) should provide a conservative buffer.Also, to diagnose the problem I think you should look at slices of
w
, rather than the horizontal average oru
(which is rather smoothed).Other than that, nothing else pops out when I read your script. …