.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "gallery/bushveld-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_gallery_bushveld-gravity.py: Gravity ground-based data over the Bushveld Complex, Southern Africa -------------------------------------------------------------------- This dataset contains ground gravity observations over the area that comprises the Bushveld Igenous Complex in Southern Africa, including preprocessed gravity fields such as the **gravity disturbance** and the **Bouguer gravity disturbance** (topography-free gravity disturbance). In addition, the dataset contains the heights of the observation points referenced on the WGS84 reference ellipsoid and over the mean sea-level (what can be considered to be the geoid). This dataset was built upon a portion of the Southern Africa gravity compilation available through NOAA NCEI. **Original source:** * Gravity: `NOAA NCEI `__ * Topography: `ETOPO1 `__ **Pre-processing:** `Source code for preparation of the original dataset for redistribution in Ensaio `__ .. GENERATED FROM PYTHON SOURCE LINES 29-35 .. code-block:: default import numpy as np import pandas as pd import pygmt import ensaio .. GENERATED FROM PYTHON SOURCE LINES 36-37 Download and cache the data and return the path to it on disk .. GENERATED FROM PYTHON SOURCE LINES 37-40 .. code-block:: default fname = ensaio.fetch_bushveld_gravity(version=1) print(fname) .. rst-class:: sphx-glr-script-out Out: .. code-block:: none /home/runner/work/_temp/cache/ensaio/v1/bushveld-gravity.csv.xz .. GENERATED FROM PYTHON SOURCE LINES 41-42 Load the CSV formatted data with pandas .. GENERATED FROM PYTHON SOURCE LINES 42-45 .. code-block:: default data = pd.read_csv(fname) data .. raw:: html
longitude latitude height_sea_level_m height_geometric_m gravity_mgal gravity_disturbance_mgal gravity_bouguer_mgal
0 25.01500 -26.26334 1230.2 1257.474535 978681.38 25.081592 -113.259165
1 25.01932 -26.38713 1297.0 1324.574150 978669.02 24.538158 -122.662101
2 25.02499 -26.39667 1304.8 1332.401322 978669.28 26.526960 -121.339321
3 25.04500 -26.07668 1165.2 1192.107148 978681.08 17.954814 -113.817543
4 25.07668 -26.35001 1262.5 1289.971792 978665.19 12.700307 -130.460126
... ... ... ... ... ... ... ...
3872 31.51500 -23.86333 300.5 312.710241 978776.85 -4.783965 -39.543608
3873 31.52499 -23.30000 280.7 292.686630 978798.55 48.012766 16.602026
3874 31.54832 -23.19333 245.7 257.592670 978803.55 49.161771 22.456674
3875 31.57333 -23.84833 226.8 239.199065 978808.44 5.116904 -20.419870
3876 31.37500 -23.00000 285.6 297.165672 978734.77 5.186926 -25.922627

3877 rows × 7 columns



.. GENERATED FROM PYTHON SOURCE LINES 46-47 Make a PyGMT map with the data points colored by the gravity data. .. GENERATED FROM PYTHON SOURCE LINES 47-73 .. code-block:: default fig = pygmt.Figure() fig.basemap( region=[ data.longitude.min(), data.longitude.max(), data.latitude.min(), data.latitude.max(), ], projection="M15c", frame=True, ) fig.coast(land="#444444") scale = np.max(np.abs(data.gravity_disturbance_mgal)) pygmt.makecpt( cmap="polar", series=[-scale, scale], ) fig.plot( x=data.longitude, y=data.latitude, color=data.gravity_disturbance_mgal, cmap=True, style="c0.1c", ) fig.colorbar(frame='af+l"gravity disturbance [mGal]"') fig.show() .. image-sg:: /gallery/images/sphx_glr_bushveld-gravity_001.png :alt: bushveld gravity :srcset: /gallery/images/sphx_glr_bushveld-gravity_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out Out: .. code-block:: none .. rst-class:: sphx-glr-timing **Total running time of the script:** ( 0 minutes 6.803 seconds) .. _sphx_glr_download_gallery_bushveld-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: bushveld-gravity.py ` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: bushveld-gravity.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_