Description:
<jats:p>Abstract. A
general circulation ocean model is translated from Fortran to Python. 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 framework that provides a just-in-time compiler for array
operations and that supports parallel execution on both CPU and GPU targets. For applications containing more than a million grid elements, such as a
typical 1∘×1∘ horizontal resolution global ocean model,
Veros is approximately half as fast as the MPI-parallelized Fortran base code
on 24 CPUs and as fast as the Fortran reference when running on a high-end
GPU. By replacing the original conjugate gradient stream function solver with
a solver from the pyAMG Python package, this particular subroutine
outperforms the corresponding Fortran version by up to 1 order of magnitude. The study is concluded with a simple application in which the North Atlantic
wave response to a Southern Ocean wind perturbation is investigated. It is
found that even in a realistic setting the phase speeds of boundary waves
matched the expectations based on theory and idealized models.
</jats:p>