Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

MarkWieczorek
Copy link
Member

@MarkWieczorek MarkWieczorek commented Apr 23, 2024

This PR adds functional support of boule Ellipsoid classes in many pyshtools routines. To use this PR, you must first install boule version 0.5 or greater.

Create a grid of an ellipsoid using one of the boule predefined ellipsoids:

grid = pysh.SHGrid.from_ellipsoid(ellipsoid=boule.Mars2009, lmax=100)
grid.plot()

Create an area-weighted histogram of spherical elevations with respect to an ellipsoid:

grid = pysh.datasets.Mars.MOLA_shape().expand()
hist, bin_edges = grid.histogram(ellipsoid=boule.Mars2009)
fig, ax = grid.plot_histogram(ellipsoid=boule.Mars2009, bins=100)

Plot spherical heights with respect to an ellipsoid

fig, ax = grid.plot(ellipsoid=boule.Mars2009, colorbar='bottom')
figure = grid.plotgmt(ellipsoid=boule.Mars2009, colorbar='right')
figure.show()

Create grids of the spherical gravity vector components, gravity disturbance, and gravity potential on a rotating ellipsoid

clm = pysh.datasets.Mars.MRO120F()
grids = clm.expand(ellipsoid=boule.Mars2009)
grids.plot()

Create grids of the gravity gradient tensor on a flattened ellipsoid

grids = clm.tensor(ellipsoid=boule.Mars2009, degree0=True)
grids.plot()

Create a grid of the geoid height with respect to an ellipsoid

geoid = clm.geoid(boule.Mars2009)
geoid.plot()

Create grids of the magnetic field tensor on a flattened ellipsoid

glm = pysh.datasets.Mars.Langlais2019()
grids = glm.tensor(ellipsoid=boule.Mars2009)
grids.plot()

Notes

  • Almost all of the real calculations are performed using pre-existing pyshtools routines (fortran or python). The boule ellipsoids are used only to obtain ellipsoid parameters such as a, b, c, f, omega, GM, reference_normal_gravity_potential.
  • Neither boule nor pyshtools compute the normal gravity of a triaxial ellipsoid (yet).
  • The vector components of the gravity and magnetic field are for spherical components, r-hat, theta-hat, and phi-hat. r-hat and theta-hat are not normal and tangent to the ellipsoid. The transformation from spherical components to geodetic components will be implemented in a future release or PR.
  • All heights above the ellipsoid are spherical heights, and not geodetic (ellipsoidal) heights that are measured normal to the ellipsoid.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant