Replies: 3 comments 1 reply
-
@navidcy check out this issue which proposes another feature for debuggint that's similar: #4181. The idea is to add something to |
Beta Was this translation helpful? Give feedback.
-
One can also use the NaNChecker to do that. I think you want to use the erroring version then. |
Beta Was this translation helpful? Give feedback.
-
Something like this might work function find_nans(sim)
nans_in_u = isnan.(interior(sim.model.velocities.u))
@show findall(nans_in_u)
end |
Beta Was this translation helpful? Give feedback.
-
Often when you run big simulation and get NaN it's useful if you get a sense of where the NaN first started. I have in mind eg of a global ocean simulation with realistic bathymetry. In this case whether the NaN originate from the surface or the interior, or whether it came from shallow ocean regions or not it might give an indication for what the issue is. Even if many NaNs are found, still reporting where they came from might be useful. E.g.
What's a good way to do that without adding too much overhead to the
nan_checker
?I guess one should import and extend
Oceananigans.jl/src/Models/nan_checker.jl
Lines 22 to 52 in c3a5654
right?
cc @taimoorsohail
Beta Was this translation helpful? Give feedback.
All reactions