Local CFL instability in a 2D explicit Navier-Stokes solver (from CFD to Oceanography)

Hi Pangeo!

I’m transitioning from geophysics to physical oceanography and built an explicit 2D Navier-Stokes solver in NumPy to understand numerical stability.

I found an interesting bottleneck: my global CFL condition was perfectly safe (C < 0.5), but the simulation still exploded at Re = 765 due to a local non-linear advection instability at the stagnation point. I ended up mapping the local CFL field to catch the exact cell causing the explosion (I’ve attached the plot below).

I know large-scale ocean models (like MOM or NEMO) use implicit/semi-implicit schemes to bypass this, but I’m curious: how does the Pangeo community handle local stability checks when running high-resolution explicit models? Do you use local CFL mapping, or are there other standard diagnostics?

If anyone is interested, the full derivation, paper (DOI), and Python code are here:
DOI : Zenodo link
GitHub : GitHub Repository

I would love to hear any feedback or advice!