Description
It's come to light that the LatitudeLongitudeGrid
consumes almost 1 kb of parameter space as an argument on the GPU. This is a problem because at least for some versions of CUDA + GPUs (unsure how much is due to the GPU itself vs the CUDA version) we only have 4 kb of parameter space.
I'm wondering if we can save space by removing the latitude and longitude spacings Δλ
and Δφ
:
Oceananigans.jl/src/Grids/latitude_longitude_grid.jl
Lines 369 to 398 in 4076823
these are used when metrics are not precomputed. So, removing them would require either discontinuing support for non-precomputed-metrics (I'm ok with this), or at least making it so that we can't build a grid on a GPU without precomputing metrics (fine too).
We don't need either Δλ
or Δφ
inside kernels, right?
Unfortunately, I do not think that the same kind of savings is possible for OrthogonalSphericalShellGrid
.