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

**URL:** <https://discourse.pangeo.io/t/local-cfl-instability-in-a-2d-explicit-navier-stokes-solver-from-cfd-to-oceanography/5870>\
**Category:** Science\
**Created:** [October 30, 2026, 2:48am UTC](https://discourse.pangeo.io/t/local-cfl-instability-in-a-2d-explicit-navier-stokes-solver-from-cfd-to-oceanography/5870 "2026-10-30T02:48:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cut-Mauliditya](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.pangeo.io/cut-mauliditya/32/3852_2.png) [@Cut-Mauliditya](https://discourse.pangeo.io/u/Cut-Mauliditya)\
**Post date:** [October 30, 2026, 2:48am UTC](https://discourse.pangeo.io/t/local-cfl-instability-in-a-2d-explicit-navier-stokes-solver-from-cfd-to-oceanography/5870/1 "2026-10-30T02:48:24Z")

</div>

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](https://doi.org/10.5281/zenodo.23762575)  
GitHub : [GitHub Repository](https://github.com/Cut-Mauliditya/Numerical-Simulation-of-the-Navier-Stokes-Equations)

I would love to hear any feedback or advice!

 ![advective explosion](https://canada1.discourse-cdn.com/flex030/uploads/pangeo/original/2X/1/1e639e7744892b5f15ff2a2d5e2a4b759e820b36.png)

 ![diffusive explosion](https://canada1.discourse-cdn.com/flex030/uploads/pangeo/original/2X/7/771e1aef320cd0e662bfcf53d5e4840ee2f928aa.png)

 ![global instability](https://canada1.discourse-cdn.com/flex030/uploads/pangeo/original/2X/2/2d894d4e146b6f71fb262aef71fa8d521956709a.png)
