Preprints
https://doi.org/10.5194/egusphere-2026-1180
https://doi.org/10.5194/egusphere-2026-1180
22 Jun 2026
 | 22 Jun 2026
Status: this preprint is open for discussion and under review for Geoscientific Model Development (GMD).

A High-Fidelity CUDA Implementation of the Shchepetkin Density-Jacobian Pressure Gradient Scheme for ROMS

Pavel Alam Munshi

Abstract. Baroclinic pressure gradients in terrain-following ocean models require careful numerical treatment to avoid generating spurious currents over steep topography. The Shchepetkin density Jacobian algorithm achieves high accuracy through harmonic mean density slope reconstruction and fourth-order monotonized cubic polynomial corrections, but has largely remained on CPU architectures despite growing GPU adoption in Earth system models. This work presents the first publicly available CUDA implementation of the complete Shchepetkin density-Jacobian pressure gradient scheme as used in the Regional Ocean Modeling System (ROMS). No algorithmic simplifications were introduced during GPU porting. Validation against CPU reference solutions on the "Tall Isolated Seamount" benchmark (Beckmann and Haidvogel, 1993) with steep topography (r ≈ 0.4) demonstrates maximum relative error of π’ͺ (10−6) across the 54 × 51 × 13 computational domain. A "lake at rest" test using a horizontally uniform density field over the same Seamount bathymetry confirms the well-balanced property: the kernel produces exactly zero pressure gradient force to machine precision. The small discrepancies in the Seamount comparison reflect floating-point precision and architectural differences between GPU and CPU rather than algorithmic deficiencies. The standalone kernel architecture enables integration into existing ocean models. Source code and validation data are made publicly available under an open-source license.

Publisher's note: Copernicus Publications remains neutral with regard to jurisdictional claims made in the text, published maps, institutional affiliations, or any other geographical representation in this paper. While Copernicus Publications makes every effort to include appropriate place names, the final responsibility lies with the authors. Views expressed in the text are those of the authors and do not necessarily reflect the views of the publisher.
Share
Pavel Alam Munshi

Status: open (until 17 Aug 2026)

Comment types: AC – author | RC – referee | CC – community | EC – editor | CEC – chief editor | : Report abuse
Pavel Alam Munshi
Pavel Alam Munshi
Metrics will be available soon.
Latest update: 22 Jun 2026
Download
Short summary
Simulating ocean currents near steep underwater terrain requires a mathematically delicate pressure calculation. Porting this calculation to graphics processor hardware has historically forced researchers to simplify the method and lose accuracy. This work shows the complete, unmodified calculation can run on a graphics processor, with results matching the traditional approach to better than one part in a million.
Share