{ "cells": [ { "cell_type": "markdown", "id": "385d21fd-6f63-41d8-8633-79721f90fe8d", "metadata": {}, "source": [ "# Ground gravity of Southern Africa\n", "\n", "This is a public domain compilation of ground measurements of gravity from Southern Africa distributed by the [NOAA NCEI](https://www.ngdc.noaa.gov/). From the [dataset description](https://www.ngdc.noaa.gov/mgg/gravity/1999/data/regional/africa/africa.txt):\n", "\n", "> This data base (14,559 records) was received in January 1986. Principal gravity parameters include elevation and observed gravity. The observed gravity values are referenced to the International Gravity Standardization Net 1971 (IGSN 71). The data are randomly distributed within the boundaries of the Republic of South Africa.\n", "\n", "Data download location: https://www.ngdc.noaa.gov/mgg/gravity/1999/data/regional/africa/\n", "\n", "The horizontal datum is not specified and heights are referenced to \"sea level\", which we will interpret as the geoid (which realization is likely not relevant since the uncertainty in the height is probably larger than geoid model differences).\n", "\n", "Here, we will download and repackage the data (position and absolute gravity value, no anomalies) into a CSV file. Heights will remain the same and we'll conversion to geometric heights to be done in tutorials for better educational purposes.\n", "\n", "License: [public domain](https://www.ngdc.noaa.gov/ngdcinfo/privacy.html#copyright-notice)" ] }, { "cell_type": "code", "execution_count": 1, "id": "34fa5814-2463-44eb-97a1-9aa57670e3df", "metadata": {}, "outputs": [], "source": [ "import os\n", "import matplotlib.pyplot as plt\n", "import numpy as np\n", "import pandas as pd\n", "import verde as vd\n", "import pooch\n", "import pygmt" ] }, { "cell_type": "markdown", "id": "15c63575-49cf-4503-86fe-abd6f455f552", "metadata": {}, "source": [ "## Download the data\n", "\n", "Download the text version of the data from the NOAA servers." ] }, { "cell_type": "code", "execution_count": 2, "id": "50ee303e-927d-4ba8-8d3e-e3c8849505ec", "metadata": {}, "outputs": [], "source": [ "fname = pooch.retrieve(\n", " url=\"https://www.ngdc.noaa.gov/mgg/gravity/1999/data/regional/africa/africa.ast\",\n", " known_hash=\"md5:9eab1ed16d1689f4da579e7084fe1203\",\n", ")" ] }, { "cell_type": "code", "execution_count": 3, "id": "fbc2e32b-9b7c-4404-925c-9e00a7c12ff6", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "size: 0.611478 Mb\n" ] } ], "source": [ "print(f\"size: {os.path.getsize(fname) / 1e6} Mb\")" ] }, { "cell_type": "markdown", "id": "86ca37f7-c83c-4741-941b-27c29f6d70f8", "metadata": {}, "source": [ "## Read the data\n", "\n", "Use pandas to read the data and set column names (they aren't in the file)." ] }, { "cell_type": "code", "execution_count": 4, "id": "6bbd81fa-0f94-46e0-b458-a324295b6e2b", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", " | latitude | \n", "longitude | \n", "height_sea_level_m | \n", "gravity_mgal | \n", "
---|---|---|---|---|
0 | \n", "-34.39150 | \n", "17.71900 | \n", "-589.0 | \n", "979724.79 | \n", "
1 | \n", "-34.48000 | \n", "17.76100 | \n", "-495.0 | \n", "979712.90 | \n", "
2 | \n", "-34.35400 | \n", "17.77433 | \n", "-406.0 | \n", "979725.89 | \n", "
3 | \n", "-34.13900 | \n", "17.78500 | \n", "-267.0 | \n", "979701.20 | \n", "
4 | \n", "-34.42200 | \n", "17.80500 | \n", "-373.0 | \n", "979719.00 | \n", "
... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "
14554 | \n", "-17.95833 | \n", "21.22500 | \n", "1053.1 | \n", "978182.09 | \n", "
14555 | \n", "-17.98333 | \n", "21.27500 | \n", "1033.3 | \n", "978183.09 | \n", "
14556 | \n", "-17.99166 | \n", "21.70833 | \n", "1041.8 | \n", "978182.69 | \n", "
14557 | \n", "-17.95833 | \n", "21.85000 | \n", "1033.3 | \n", "978193.18 | \n", "
14558 | \n", "-17.94166 | \n", "21.98333 | \n", "1022.6 | \n", "978211.38 | \n", "
14559 rows × 4 columns
\n", "\n", " | latitude | \n", "longitude | \n", "height_sea_level_m | \n", "gravity_mgal | \n", "
---|---|---|---|---|
0 | \n", "-34.12971 | \n", "18.34444 | \n", "32.2 | \n", "979656.12 | \n", "
1 | \n", "-34.08833 | \n", "18.36028 | \n", "592.5 | \n", "979508.21 | \n", "
2 | \n", "-34.19583 | \n", "18.37418 | \n", "18.4 | \n", "979666.46 | \n", "
3 | \n", "-34.23972 | \n", "18.40388 | \n", "25.0 | \n", "979671.03 | \n", "
4 | \n", "-34.16444 | \n", "18.41112 | \n", "228.7 | \n", "979616.11 | \n", "
... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "
14354 | \n", "-17.95833 | \n", "21.22500 | \n", "1053.1 | \n", "978182.09 | \n", "
14355 | \n", "-17.98333 | \n", "21.27500 | \n", "1033.3 | \n", "978183.09 | \n", "
14356 | \n", "-17.99166 | \n", "21.70833 | \n", "1041.8 | \n", "978182.69 | \n", "
14357 | \n", "-17.95833 | \n", "21.85000 | \n", "1033.3 | \n", "978193.18 | \n", "
14358 | \n", "-17.94166 | \n", "21.98333 | \n", "1022.6 | \n", "978211.38 | \n", "
14359 rows × 4 columns
\n", "\n", " | longitude | \n", "latitude | \n", "height_sea_level_m | \n", "gravity_mgal | \n", "
---|---|---|---|---|
0 | \n", "18.34444 | \n", "-34.12971 | \n", "32.2 | \n", "979656.12 | \n", "
1 | \n", "18.36028 | \n", "-34.08833 | \n", "592.5 | \n", "979508.21 | \n", "
2 | \n", "18.37418 | \n", "-34.19583 | \n", "18.4 | \n", "979666.46 | \n", "
3 | \n", "18.40388 | \n", "-34.23972 | \n", "25.0 | \n", "979671.03 | \n", "
4 | \n", "18.41112 | \n", "-34.16444 | \n", "228.7 | \n", "979616.11 | \n", "
... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "
14354 | \n", "21.22500 | \n", "-17.95833 | \n", "1053.1 | \n", "978182.09 | \n", "
14355 | \n", "21.27500 | \n", "-17.98333 | \n", "1033.3 | \n", "978183.09 | \n", "
14356 | \n", "21.70833 | \n", "-17.99166 | \n", "1041.8 | \n", "978182.69 | \n", "
14357 | \n", "21.85000 | \n", "-17.95833 | \n", "1033.3 | \n", "978193.18 | \n", "
14358 | \n", "21.98333 | \n", "-17.94166 | \n", "1022.6 | \n", "978211.38 | \n", "
14359 rows × 4 columns
\n", "\n", " | longitude | \n", "latitude | \n", "height_sea_level_m | \n", "gravity_mgal | \n", "
---|---|---|---|---|
0 | \n", "18.34444 | \n", "-34.12971 | \n", "32.2 | \n", "979656.12 | \n", "
1 | \n", "18.36028 | \n", "-34.08833 | \n", "592.5 | \n", "979508.21 | \n", "
2 | \n", "18.37418 | \n", "-34.19583 | \n", "18.4 | \n", "979666.46 | \n", "
3 | \n", "18.40388 | \n", "-34.23972 | \n", "25.0 | \n", "979671.03 | \n", "
4 | \n", "18.41112 | \n", "-34.16444 | \n", "228.7 | \n", "979616.11 | \n", "
... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "
14354 | \n", "21.22500 | \n", "-17.95833 | \n", "1053.1 | \n", "978182.09 | \n", "
14355 | \n", "21.27500 | \n", "-17.98333 | \n", "1033.3 | \n", "978183.09 | \n", "
14356 | \n", "21.70833 | \n", "-17.99166 | \n", "1041.8 | \n", "978182.69 | \n", "
14357 | \n", "21.85000 | \n", "-17.95833 | \n", "1033.3 | \n", "978193.18 | \n", "
14358 | \n", "21.98333 | \n", "-17.94166 | \n", "1022.6 | \n", "978211.38 | \n", "
14359 rows × 4 columns
\n", "