`LagrangianAveragedDynamicSmag` tests sometimes fail
In a few of the CI runs, I get errors like these with the `LagrangianAveragedDynamicSmag`:

Where the two numbers are small, but differently small. Generally one of them is order 1e-16 and other is 1e-30. It doesn't happen every time, but often enough that I've noticed. That's what made the last CI run fail btw. Specifically this is the test that failed this previous time: https://github.com/tomchor/Oceanostics.jl/blob/56f7f8fefccac571de5bbaac6b3c91be198094c5/test/runtests.jl#L363-L371
Which compares the KE dissipation from the closure model with the total tendency. Since all that's there is the closure model and no other tendencies, they should be the same. I know that `eps(Float64) ~ 1e-16` so I'm wondering if this is just natural uncertainty due to limited machine precision, of if there's something else at play here (since the tolerance is already `2*eps()` for that test).
Since for some reason I can't reproduce these errors locally, it's been hard for me to investigate.
关闭于 2025-01-24 3 条评论