Convert equiangular grid on ellipsoid to sphere

Hello all!

I am interested in transforming an equiangular (geographic) grid on the ellipsoid to the sphere. My end goal is to use pyshtools to perform spherical harmonic analysis on the grid, which must be on the sphere.

I am aware of mapproject -N, but this seems to be for xyz tables only. Given the resolution of the data, I would prefer to stick to grid operations (if possible!). If I had to use mapproject, my current rough plan is the following:

  1. convert all geodetic coordinates to geocentric coordinates via mapproject -Ng
  2. as the conversion is non-linear, interpolate from the output geocentric coordinates onto a “nice” equiangular grid of geocentric latitude

How does this sound? Is there an easier way to achieve this? Thanks!

Yes, mapproject is for tables. You could try grdproject for grids. I hope you find it useful.

Maybe there’s something to do with -j option (which determines how the calculation is done (cartesian, sphere, ellipsoid,…)

I thought that with the help of GDAL we could do it, but couldn’t find a way. At this time, your plan to go through mapproject -N seems the best solution.

Thank you all for the insights. I will update the post if I come across something worth sharing!