{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "## Plot Ocean Pole Tide Map\n", "Plots maps of the real and imaginary geocentric pole tide admittance functions from [Desai et al. (2002)](https://doi.org/10.1029/2001JC001224)\n", "\n", "- [IERS map of ocean pole tide coefficients](ftp://maia.usno.navy.mil/conventions/2010/2010_update/chapter7/additional_info/opoleloadcoefcmcor.txt.gz)\n", "\n", "#### Python Dependencies\n", " - [numpy: Scientific Computing Tools For Python](https://www.numpy.org) \n", " - [matplotlib: Python 2D plotting library](http://matplotlib.org/) \n", " - [cartopy: Python package designed for geospatial data processing](https://scitools.org.uk/cartopy/docs/latest/) \n", "\n", "#### Program Dependencies\n", "\n", "- `io.ocean_pole_tide.py`: Read ocean pole load tide map from IERS\n", "- `utilities.py`: download and management utilities for files" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### Load modules" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "import matplotlib.pyplot as plt\n", "import cartopy.crs as ccrs\n", "import pyTMD.io\n", "import pyTMD.utilities" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### Read ocean pole tide coefficient maps" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# read ocean pole tide map from Desai (2002)\n", "ocean_pole_tide_file = pyTMD.utilities.get_data_path(['data','opoleloadcoefcmcor.txt.gz'])\n", "iur,iun,iue,ilon,ilat = pyTMD.io.ocean_pole_tide(ocean_pole_tide_file)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### Plot ocean pole tide maps" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "fig,(ax1,ax2) = plt.subplots(ncols=2,sharex=True,sharey=True,figsize=(10,4),\n", " subplot_kw=dict(projection=ccrs.PlateCarree()))\n", "ax1.imshow(iur.real.T,extent=(ilon[0],ilon[-1],ilat[0],ilat[-1]),origin='lower')\n", "ax2.imshow(iur.imag.T,extent=(ilon[0],ilon[-1],ilat[0],ilat[-1]),origin='lower')\n", "ax1.set_title('Radial Ocean Pole Tide (real component)')\n", "ax2.set_title('Radial Ocean Pole Tide (imaginary component)')\n", "ax1.coastlines(); ax2.coastlines()\n", "fig.subplots_adjust(left=0.01, right=0.99, bottom=0.10, top=0.95, wspace=0.05)\n", "plt.show()" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3.10.6 64-bit", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.10.6" }, "metadata": { "interpreter": { "hash": "31f2aee4e71d21fbe5cf8b01ff0e069b9275f58929596ceb00d14d90e3e16cd6" } }, "vscode": { "interpreter": { "hash": "31f2aee4e71d21fbe5cf8b01ff0e069b9275f58929596ceb00d14d90e3e16cd6" } } }, "nbformat": 4, "nbformat_minor": 4 }