.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "tutorials/normal_gravity.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note Click :ref:`here ` to download the full example code .. rst-class:: sphx-glr-example-title .. _sphx_glr_tutorials_normal_gravity.py: .. _normal_gravity: Normal Gravity ============== One of the main uses for ellipsoids in geodesy and geophysics is the computation of *normal gravity* (usually represented by :math:`\gamma`): Normal gravity is the magnitude of the gradient of the gravity potential (gravitational + centrifugal) generated by the ellipsoid. The calculation is performed by the :meth:`boule.Ellipsoid.normal_gravity` method. It implements the closed-form formula of [LiGotze2001]_ which can calculate normal gravity at any latitude and (geometric) height. As an example, lets calculate a profile of normal gravity from pole to pole at a height of 1000 m using the :ref:`WGS84 ` ellipsoid. .. GENERATED FROM PYTHON SOURCE LINES 27-43 .. code-block:: default import numpy as np import matplotlib.pyplot as plt import boule as bl latitude = np.linspace(-90, 90, 100) gamma = bl.WGS84.normal_gravity(latitude, height=1000) plt.figure(figsize=(8, 5)) plt.plot(latitude, gamma, "-k") plt.title("WGS84 normal gravity") plt.xlabel("latitude") plt.ylabel("normal gravity (mGal)") plt.show() .. image-sg:: /tutorials/images/sphx_glr_normal_gravity_001.png :alt: WGS84 normal gravity :srcset: /tutorials/images/sphx_glr_normal_gravity_001.png :class: sphx-glr-single-img .. GENERATED FROM PYTHON SOURCE LINES 44-46 This calculation can be performed for any ellipsoid. For example, here is the normal gravity of the :ref:`Martian ellipsoid `: .. GENERATED FROM PYTHON SOURCE LINES 46-57 .. code-block:: default gamma_mars = bl.MARS.normal_gravity(latitude, height=1000) plt.figure(figsize=(8, 5)) plt.plot(latitude, gamma_mars, "-k") plt.title("Mars normal gravity") plt.xlabel("latitude") plt.ylabel("normal gravity (mGal)") plt.show() .. image-sg:: /tutorials/images/sphx_glr_normal_gravity_002.png :alt: Mars normal gravity :srcset: /tutorials/images/sphx_glr_normal_gravity_002.png :class: sphx-glr-single-img .. GENERATED FROM PYTHON SOURCE LINES 58-62 Notice that the overall trend is the same as for the Earth (the Martian ellipsoid is also oblate) but the range of values is different. The mean gravity on Mars is much weaker than on the Earth: around 370,000 mGal or 3.7 m/s² when compared to 970,000 mGal or 9.7 m/s². .. rst-class:: sphx-glr-timing **Total running time of the script:** ( 0 minutes 0.263 seconds) .. _sphx_glr_download_tutorials_normal_gravity.py: .. only :: html .. container:: sphx-glr-footer :class: sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: normal_gravity.py ` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: normal_gravity.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_