6.4 Veros—A High-Performance Ocean Simulator Written in Pure Python

Tuesday, 9 January 2018: 11:15 AM
Room 8 ABC (ACC) (Austin, Texas)
Dion Häfner, Niels Bohr Institute, Copenhagen, Denmark; and R. L. Jacobsen, C. Eden, M. Jochum, M. R. B. Kristensen, R. Nuterman, and B. Vinter

A primitive equation ocean general circulation model is translated from Fortran to Python. It is described how its code structure is optimized to exploit available Python utilities. remove simulation bottlenecks, and comply with modern best practices. Furthermore, support for Bohrium is added, a recently developed framework that automatically fuses array operations and supports parallel execution on CPUs and GPUs, and that can be used as a drop-in replacement for NumPy.

For applications containing more than a million grid elements, the typical size of a one degree resolution ocean model, Veros is approximately a third as fast as the MPI-parallelized Fortran base code. By replacing the original conjugate gradient streamfunction solver with a solver from the pyAMG Python package, this particular subroutine outperforms the corresponding Fortran version by a factor of 3 to 9.

The study is concluded with a simple application in which the response of the North Atlantic to a Southern Ocean wind perturbation is investigated.

- Indicates paper has been withdrawn from meeting
- Indicates an Award Winner