Spherical Coordinate Support for NLSW Simulations

Celeris WebGPU now includes initial support for running simulations directly on a spherical latitude/longitude grid. This is intended for larger-scale tsunami and basin-scale applications where Cartesian meter-based grids become awkward or inaccurate over large domains.

For now, spherical-grid support is implemented for the Nonlinear Shallow Water equations only. Boussinesq and COULWAVE modes should still use the standard Cartesian grid.

The new option is controlled through:

"grid_type": 2,
"NLSW_or_Bous": 0

When grid_type = 2, the model interprets:

"dx": dlon,
"dy": dlat

as longitude and latitude spacing in degrees, not meters.

The grid location is defined with, for example, :

"lat_LL": 21.26,
"lon_LL": 201.94,
"lat_UR": 21.42,
"lon_UR": 202.16

The model then builds the longitude and latitude vectors internally from the lower-left corner and the degree spacing. For Pacific-wide or dateline-adjacent domains, using a continuous 0-360 longitude convention is recommended.

Internally, the NLSW equations are modified to include the spherical metric terms, including factors such as:

R cos(phi)
tan(phi)

where phi is latitude and R is Earth radius. The spherical version also accounts for latitude-dependent Coriolis forcing using:

f = 2 Omega sin(phi)

This means the model evolves the shallow-water equations on a longitude/latitude grid while still using the existing WebGPU simulation infrastructure as much as possible.

A few practical notes:

  • Bathymetry/topography should be supplied on the same lat/lon grid.
  • Boundary outputs and time-series boundary inputs can be used with spherical grids.
  • Tooltip coordinates now report longitude and latitude instead of Cartesian x/y.
  • Time-step estimation accounts for the physical meter spacing implied by dlon, dlat, and latitude.
  • The existing rendering and Explorer views should work, though very large geographic domains may need adjusted visualization settings.

This is currently a first implementation focused on NLSW tsunami-scale workflows. Feedback and test cases are welcome, especially for large domains, nested lat/lon grids, and dateline-adjacent applications.

You can see an example of a lat/lon setup, with tsunami initial condition, here: