*Article* **Parallel Implementation of a PETSc-Based Framework for the General Curvilinear Coastal Ocean Model**

#### **Manuel Valera 1,\*, Mary P. Thomas 1,2 and Mariangel Garcia 1,3 and Jose E. Castillo 1**


Received: 24 April 2019; Accepted: 10 June 2019; Published: 13 June 2019

**Abstract:** The General Curvilinear Coastal Ocean Model (GCCOM) is a 3D curvilinear, structured-mesh, non-hydrostatic, large-eddy simulation model that is capable of running oceanic simulations. GCCOM is an inherently computationally expensive model: it uses an elliptic solver for the dynamic pressure; meter-scale simulations requiring memory footprints on the order of 10<sup>12</sup> cells and terabytes of output data. As a solution for parallel optimization, the Fortran-interfaced Portable–Extensible Toolkit for Scientific Computation (PETSc) library was chosen as a framework to help reduce the complexity of managing the 3D geometry, to improve parallel algorithm design, and to provide a parallelized linear system solver and preconditioner. GCCOM discretizations are based on an Arakawa-C staggered grid, and PETSc DMDA (Data Management for Distributed Arrays) objects were used to provide communication and domain ownership managemen<sup>t</sup> of the resultant multi-dimensional arrays, while the fully curvilinear Laplacian system for pressure is solved by the PETSc linear solver routines. In this paper, the framework design and architecture are described in detail, and results are presented that demonstrate the multiscale capabilities of the model and the parallel framework to 240 cores over domains of order 10<sup>7</sup> total cells per variable, and the correctness and performance of the multiphysics aspects of the model for a baseline experiment stratified seamount.

**Keywords:** high performance computing; HPC; PETSc; parallelization; scalability; parallel performance; streams; curvilinear; non-hydrostatic; ocean modeling; GCCOM
