{ "cells": [ { "cell_type": "markdown", "id": "385d21fd-6f63-41d8-8633-79721f90fe8d", "metadata": {}, "source": [ "# Moon - Topography grid at 10 arc-minute resolution\n", "\n", "Global 10 arc-minute resolution grids of topography referenced to the Lunar spheroid of [Wieczorek (2015)](https://doi.org/10.1016/b978-0-444-53802-4.00169-x).\n", "\n", "**Source:** Wieczorek, M. A. (2015). Spherical harmonic model of the shape of Earth's Moon: MoonTopo2600p [Data set]. Zenodo. https://doi.org/10.5281/zenodo.3870924\n", "\n", "**License:** [CC-BY](https://doi.org/10.5281/zenodo.3870924)\n", "\n", "## Notes\n", "\n", "Converted the original surface radius to topography by referencing it to a Lunar spheroid." ] }, { "cell_type": "code", "execution_count": 1, "id": "34fa5814-2463-44eb-97a1-9aa57670e3df", "metadata": {}, "outputs": [], "source": [ "import os\n", "import numpy as np\n", "import xarray as xr\n", "import pooch\n", "import pyshtools as pysh\n", "import boule as bl\n", "import pygmt" ] }, { "cell_type": "markdown", "id": "15c63575-49cf-4503-86fe-abd6f455f552", "metadata": {}, "source": [ "## Download the data\n", "\n", "Use [SHTOOLS](https://github.com/SHTOOLS/SHTOOLS) to download and load the spherical harmonic model of the lunar surface radius." ] }, { "cell_type": "code", "execution_count": 2, "id": "50ee303e-927d-4ba8-8d3e-e3c8849505ec", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "kind = 'real'\n", "normalization = '4pi'\n", "csphase = 1\n", "lmax = 2600\n", "error_kind = None\n", "header = None\n", "header2 = None\n", "name = 'MoonTopo2600p'\n", "units = 'm'\n" ] } ], "source": [ "model = pysh.datasets.Moon.MoonTopo2600p()\n", "model.info()" ] }, { "cell_type": "markdown", "id": "86ca37f7-c83c-4741-941b-27c29f6d70f8", "metadata": {}, "source": [ "## Exapand into a grid\n", "\n", "Use SHTOOLS to expand the model into a grid with the specified resolution. We need to calculate the maximum degree in a DH2 format grid that will lead to the desired resolution. This is much much faster than getting SHTOOLS to calculate on points that we determine." ] }, { "cell_type": "code", "execution_count": 3, "id": "6bbd81fa-0f94-46e0-b458-a324295b6e2b", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "539\n" ] }, { "data": { "text/html": [ "
<xarray.DataArray (lat: 1081, lon: 2161)> Size: 19MB\n", "array([[1737357.49657955, 1737357.49657955, 1737357.49657955, ...,\n", " 1737357.49657955, 1737357.49657955, 1737357.49657955],\n", " [1737147.2594899 , 1737146.03157056, 1737144.80323881, ...,\n", " 1737149.71400626, 1737148.48697555, 1737147.2594899 ],\n", " [1736772.35120098, 1736770.18430705, 1736768.01522304, ...,\n", " 1736776.67819384, 1736774.51584863, 1736772.35120098],\n", " ...,\n", " [1737534.82779181, 1737537.82030324, 1737540.80741147, ...,\n", " 1737528.82673762, 1737531.82992171, 1737534.82779181],\n", " [1737753.06508854, 1737753.94936189, 1737754.82851639, ...,\n", " 1737751.2813716 , 1737752.17574291, 1737753.06508854],\n", " [1737389.04433197, 1737389.04433197, 1737389.04433197, ...,\n", " 1737389.04433197, 1737389.04433197, 1737389.04433197]])\n", "Coordinates:\n", " * lat (lat) float64 9kB 90.0 89.83 89.67 89.5 ... -89.67 -89.83 -90.0\n", " * lon (lon) float64 17kB 0.0 0.1667 0.3333 0.5 ... 359.7 359.8 360.0\n", "Attributes:\n", " actual_range: [1728405.536820701, 1747918.9755397812]\n", " comment: pyshtools grid\n", " nlat: 1081\n", " nlon: 2161\n", " lmax: 539\n", " kind: real\n", " grid: DH\n", " extend: True\n", " sampling: 2\n", " units: m
<xarray.DataArray (lat: 1081, lon: 2161)> Size: 19MB\n", "array([[ 206.49657955, 206.49657955, 206.49657955, ..., 206.49657955,\n", " 206.49657955, 206.49657955],\n", " [ -3.7405101 , -4.96842944, -6.19676119, ..., -1.28599374,\n", " -2.51302445, -3.7405101 ],\n", " [-378.64879902, -380.81569295, -382.98477696, ..., -374.32180616,\n", " -376.48415137, -378.64879902],\n", " ...,\n", " [ 383.82779181, 386.82030324, 389.80741147, ..., 377.82673762,\n", " 380.82992171, 383.82779181],\n", " [ 602.06508854, 602.94936189, 603.82851639, ..., 600.2813716 ,\n", " 601.17574291, 602.06508854],\n", " [ 238.04433197, 238.04433197, 238.04433197, ..., 238.04433197,\n", " 238.04433197, 238.04433197]])\n", "Coordinates:\n", " * lat (lat) float64 9kB 90.0 89.83 89.67 89.5 ... -89.67 -89.83 -90.0\n", " * lon (lon) float64 17kB 0.0 0.1667 0.3333 0.5 ... 359.7 359.8 360.0
<xarray.DataArray 'topography' (latitude: 1081, longitude: 2161)> Size: 19MB\n", "array([[ 206.49657955, 206.49657955, 206.49657955, ..., 206.49657955,\n", " 206.49657955, 206.49657955],\n", " [ -3.7405101 , -4.96842944, -6.19676119, ..., -1.28599374,\n", " -2.51302445, -3.7405101 ],\n", " [-378.64879902, -380.81569295, -382.98477696, ..., -374.32180616,\n", " -376.48415137, -378.64879902],\n", " ...,\n", " [ 383.82779181, 386.82030324, 389.80741147, ..., 377.82673762,\n", " 380.82992171, 383.82779181],\n", " [ 602.06508854, 602.94936189, 603.82851639, ..., 600.2813716 ,\n", " 601.17574291, 602.06508854],\n", " [ 238.04433197, 238.04433197, 238.04433197, ..., 238.04433197,\n", " 238.04433197, 238.04433197]])\n", "Coordinates:\n", " * latitude (latitude) float64 9kB 90.0 89.83 89.67 ... -89.67 -89.83 -90.0\n", " * longitude (longitude) float64 17kB 0.0 0.1667 0.3333 ... 359.7 359.8 360.0\n", "Attributes:\n", " Conventions: CF-1.8\n", " title: Topographic height of the Moon at 10 arc-minute resolution\n", " crs: Lunar sphere with radius 1737151 m and 0 flattening\n", " source: Generated from the spherical harmonic model of Wieczorek ...\n", " license: CC-BY\n", " references: https://doi.org/10.5281/zenodo.3870924\n", " long_name: topographic height above the reference sphere\n", " standard_name: height_above_reference_ellipsoid\n", " description: height of topography referenced to the lunar spheroid\n", " units: m\n", " actual_range: (-8745.0, 10768.0)\n", " max_degree: 539
<xarray.DataArray 'topography' (latitude: 1081, longitude: 2161)> Size: 9MB\n", "array([[ 206., 206., 206., ..., 206., 206., 206.],\n", " [ -4., -5., -6., ..., -1., -3., -4.],\n", " [-379., -381., -383., ..., -374., -376., -379.],\n", " ...,\n", " [ 384., 387., 390., ..., 378., 381., 384.],\n", " [ 602., 603., 604., ..., 600., 601., 602.],\n", " [ 238., 238., 238., ..., 238., 238., 238.]], dtype=float32)\n", "Coordinates:\n", " * latitude (latitude) float64 9kB 90.0 89.83 89.67 ... -89.67 -89.83 -90.0\n", " * longitude (longitude) float64 17kB 0.0 0.1667 0.3333 ... 359.7 359.8 360.0\n", "Attributes:\n", " Conventions: CF-1.8\n", " title: Topographic height of the Moon at 10 arc-minute resolution\n", " crs: Lunar sphere with radius 1737151 m and 0 flattening\n", " source: Generated from the spherical harmonic model of Wieczorek ...\n", " license: CC-BY\n", " references: https://doi.org/10.5281/zenodo.3870924\n", " long_name: topographic height above the reference sphere\n", " standard_name: height_above_reference_ellipsoid\n", " description: height of topography referenced to the lunar spheroid\n", " units: m\n", " actual_range: [-8745. 10768.]\n", " max_degree: 539