IGF



Seminarium fizyki atmosfery

PyMPDATA: an example-rich, just-in-time compiled implementation of MPDATA

dr Sylwester Arabas

AGH Akademia Górniczo-Hutnicza

13 czerwca 2025 13:15

ul. Pasteura 5, B5.58 and online via Zoom

This talk presents PyMPDATA, an open-source Python implementation of the Smolarkiewicz finite-difference scheme for solving advection and diffusion terms in conservation-law PDEs. The scheme—MPDATA (Multidimensional Positive Definite Advection Transport Algorithm)—is known for its sign-preserving, high-order, oscillation-free solutions and genuinely multidimensional formulation.

After a brief visual introduction to the scheme’s principles, the talk will trace the evolution of MPDATA’s open implementations, leading to the motivation and design goals of PyMPDATA. Unlike native-code versions (e.g., Fortran or C++), PyMPDATA requires no prior compilation or linking, and installs with all dependencies via a single "pip install PyMPDATA". Despite being written in pure Python, it delivers performance competitive with—and in documented cases superior to—C++ implementations like libmpdata++, thanks to just-in-time (JIT) compilation, multithreading, and MPI support enabled through Numba (an LLVM-based Python JIT compiler). PyMPDATA is designed for a uniform setup and usage experience across Linux, macOS, Windows, and cloud platforms like Google Colab, making it especially easy to adopt in both research and education.

The project emphasizes usability: its documentation includes a gallery of executable Jupyter notebooks spanning a range of applications—from basic tutorials (including one featured in the MPDATA Wikipedia article) to canonical CFD test cases like buoyancy-driven convection. It has already been used in original research in cloud (bin) microphysics and mathematical finance (pricing of path-dependent derivatives using a 2D Black-Scholes framework cast as an advection problem)—both of which will be briefly highlighted in the talk.

 

Join Zoom Meeting
https://uw-edu-pl.zoom.us/j/95334438148?pwd=SDd7aCMl5xbbKbYk2o2iz4iNjyJqv4.1

Meeting ID: 953 3443 8148
Passcode: 639747


Bieżące wydarzenia
Wydarzenia archiwalne