You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: joss/paper.md
+12-10Lines changed: 12 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,14 +40,14 @@ date: 7 May 2025
40
40
bibliography: paper.bib
41
41
---
42
42
# Summary
43
-
Ocean surface gravity waves are an important component of air-sea interaction, influencing energy, momentum, and gas exchanges across the ocean-atmosphere interface. In specific applications such as refraction by ocean currents or bathymetry, ray tracing provides a computationally efficient way to gain insight into wave propagation. In this paper, we introduce `Mantaray`, an open-source software package implemented in Rust, with a Python interface, that solves the ray equations for ocean surface gravity waves. Mantaray is designed for performance, robustness, and ease of use. The package is modular to facilitate further development and can currently be applied to both idealized and realistic wave propagation problems \ref{fig:examples}.
43
+
Ocean surface gravity waves are an important component of air-sea interaction, influencing energy, momentum, and gas exchanges across the ocean-atmosphere interface. In specific applications such as refraction by ocean currents or bathymetry, ray tracing provides a computationally efficient way to gain insight into wave propagation. In this paper, we introduce `Mantaray`, an open-source software package implemented in Rust, with a Python interface, that solves the ray equations for ocean surface gravity waves. Mantaray is designed for performance, robustness, and ease of use. The package is modular to facilitate further development and can currently be applied to both idealized and realistic wave propagation problems (Fig. \ref{fig:examples}).
44
44
45
-
{ width=100% }
45
+
{ width=100% }
46
46
47
47
# Statement of need
48
-
Ray tracing is a long-standing method for approximating wave propagation across a wide range of disciplines, including optics, seismology, and oceanography, providing a simple framework for studying the evolution of waves in spatially varying media. For ocean surface gravity waves, ray-based approaches have been used to study refraction by mesoscale currents (e.g., @mapp1985wave, @romero2017observations, @marechal2022variability), changes in bathymetry (e.g., @munk1947refraction, @kukulka2017surface), and statistical effects such as directional diffusion of wave action (e.g., @smit2019swell, @VBY2023).
48
+
Ray tracing is a long-standing method for investigating wave propagation across a wide range of disciplines, including optics, seismology, and oceanography, providing a simple framework for studying the evolution of waves in spatially varying media. For ocean surface gravity waves, ray-based approaches have been used to study refraction by mesoscale currents (e.g., @mapp1985wave, @romero2017observations, @marechal2022variability), changes in bathymetry (e.g., @munk1947refraction, @kukulka2017surface), and statistical effects such as directional diffusion of wave action (e.g., @smit2019swell, @VBY2023).
49
49
50
-
Ray tracing has been widely used in surface wave studies, but the software implementations are often not shared or are written in low-level languages such as Fortran or C (e.g., @oreilly2016california), which can be difficult to maintain and integrate into modern workflows. More recently, open-source Python tools—such as the one by @halsne2023ocean—have improved accessibility and reproducibility. Mantaray complements these efforts by providing a ray tracing solution built in Rust, a modern programming language that combines memory safety and execution speed with tool for seamless Python integration. This choice balances the ease-of-use associated with Python and the computational efficiency of languages like Fortran or C/C++, filling a gap for users who need robust, high-performance ray tracing within a user-friendly environment.
50
+
Although ray tracing has been widely used in surface wave studies, the software implementations are often not shared or are written in low-level languages such as Fortran or C/C++ (e.g., @oreilly2016california), which can be difficult to maintain and integrate into modern workflows. More recently, open-source Python tools—such as the one by @halsne2023ocean—have improved accessibility and reproducibility. Mantaray complements these efforts by providing a ray tracing solution built in Rust, a modern programming language that combines memory safety and execution speed with tools for seamless Python integration. This choice balances the ease-of-use associated with Python and the computational efficiency of languages like Fortran or C/C++, filling a gap for users who need robust, high-performance ray tracing within a user-friendly environment.
51
51
52
52
While Rust is still relatively new in the scientific software ecosystem, especially in oceanography, the development of Mantaray illustrates its potential for broader adoption in geoscientific computing. Our package aims to help establish Rust as a top-of-mind language for developing efficient, modern scientific software.
53
53
@@ -56,17 +56,17 @@ Mantaray is composed of two primary layers:
56
56
57
57
1. Core Engine (Rust): Implements the numerical integration of the ray equations considering stationary (no time dependence) currents ${\mathbf U}(x, y)$ in a Cartesian domain.
58
58
59
-
For linear surface gravity waves, with dispersion relationship given by:
59
+
The dispersion relationship for linear surface gravity waves is given by:
60
60
61
61
$$\sigma = [gk\tanh{(kH(x, y))}]^{1/2},$$
62
62
63
-
where $\sigma$ is the intrinsic frequency of the waves, $g$ is the gravitational acceleration, $k$ is the wavenumber magnitude, and $H$ is the water depth, the ray equations can be written as:
63
+
where $\sigma$ is the intrinsic frequency of the waves, $g$ is the gravitational acceleration, $k$ is the wavenumber magnitude, and $H$ is the water depth. The ray equations describing wave propagation can be written as (@phillips1966):
where ${\mathbf c_g}$ is the group velocity, ${\mathbf k} = (k_x, k_y)$ is the wavenumber vector, and ${\mathbf x} = (x, y)$ is the wave position vector.
Example:* The `ray_tracing` functionality works similarly, but it takes a collection of initial conditions as `numpy` arrays. In the case below, we are propagating four identical rays, with different initial positions.
112
+
*Example:* The `ray_tracing` functionality works similarly, but it takes a collection of initial conditions as `numpy` arrays. In the case below, we are propagating four identical rays, with different initial positions.
0 commit comments