Skip to content

Commit

Permalink
data: update EOP files for latest (#52)
Browse files Browse the repository at this point in the history
feat: adding notebook plotting OPT admittance functions
  • Loading branch information
tsutterley authored Apr 27, 2021
1 parent d68a78d commit 15d2cab
Show file tree
Hide file tree
Showing 8 changed files with 2,266 additions and 1,957 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/auto-update-files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@ jobs:
uses: peter-evans/create-pull-request@v3
with:
assignees: ${{ github.actor }}
title: "Automatic time updates"
title: "data: automatic time updates"
11 changes: 9 additions & 2 deletions doc/source/getting_started/Examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ Jupyter Notebooks providing demonstrations of ``pyTMD`` functionality:
Creates an animation of hourly tidal currents around Antarctica
- Plot Tides under the Ross Ice Shelf in Antarctica |github ross| |nbviewer ross|
Creates an animation of hourly tidal elevations around Antarctica

- Plot Radial Ocean Pole Tide Components from `Desai et al. (2002) <https://doi.org/10.1029/2001JC001224>`_ |github opt| |nbviewer opt|
Plots maps of the real and imaginary geocentric pole tide admittance functions

.. |github check| image:: https://img.shields.io/badge/GitHub-view-6f42c1?style=flat&logo=Github
:target: https://github.com/tsutterley/pyTMD/blob/main/notebooks/Check\ Tide\ Map.ipynb
Expand Down Expand Up @@ -54,4 +55,10 @@ Jupyter Notebooks providing demonstrations of ``pyTMD`` functionality:
:target: https://github.com/tsutterley/pyTMD/blob/main/notebooks/Plot\ Ross\ Ice\ Shelf\ Map.ipynb

.. |nbviewer ross| image:: https://raw.githubusercontent.com/jupyter/design/master/logos/Badges/nbviewer_badge.svg
:target: https://nbviewer.jupyter.org/github/tsutterley/pyTMD/blob/main/notebooks/Plot\ Ross\ Ice\ Shelf\ Map.ipynb
:target: https://nbviewer.jupyter.org/github/tsutterley/pyTMD/blob/main/notebooks/Plot\ Ross\ Ice\ Shelf\ Map.ipynb

.. |github opt| image:: https://img.shields.io/badge/GitHub-view-6f42c1?style=flat&logo=Github
:target: https://github.com/tsutterley/pyTMD/blob/main/notebooks/Plot\ Ocean\ Pole\ Tide\ Map.ipynb

.. |nbviewer opt| image:: https://raw.githubusercontent.com/jupyter/design/master/logos/Badges/nbviewer_badge.svg
:target: https://nbviewer.jupyter.org/github/tsutterley/pyTMD/blob/main/notebooks/Plot\ Ocean\ Pole\ Tide\ Map.ipynb
118 changes: 118 additions & 0 deletions notebooks/Plot Ocean Pole Tide Map.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
{
"metadata": {
"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.8.5"
},
"orig_nbformat": 2,
"kernelspec": {
"name": "python38564bit6ed16a024b5248b294c9e6352cf40d27",
"display_name": "Python 3.8.5 64-bit"
},
"metadata": {
"interpreter": {
"hash": "31f2aee4e71d21fbe5cf8b01ff0e069b9275f58929596ceb00d14d90e3e16cd6"
}
}
},
"nbformat": 4,
"nbformat_minor": 2,
"cells": [
{
"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",
"- `utilities.py`: Download and management utilities for files\n",
"- `read_ocean_pole_tide.py`: Read ocean pole load tide map from IERS"
],
"cell_type": "markdown",
"metadata": {}
},
{
"source": [
"#### Load modules"
],
"cell_type": "markdown",
"metadata": {}
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import matplotlib.pyplot as plt\n",
"import cartopy.crs as ccrs\n",
"from pyTMD.utilities import get_data_path\n",
"from pyTMD.read_ocean_pole_tide import read_ocean_pole_tide"
]
},
{
"source": [
"#### Read ocean pole tide coefficient maps"
],
"cell_type": "markdown",
"metadata": {}
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# read ocean pole tide map from Desai (2002)\n",
"ocean_pole_tide_file = get_data_path(['data','opoleloadcoefcmcor.txt.gz'])\n",
"iur,iun,iue,ilon,ilat = read_ocean_pole_tide(ocean_pole_tide_file)"
]
},
{
"source": [
"#### Plot ocean pole tide maps"
],
"cell_type": "markdown",
"metadata": {}
},
{
"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()\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
]
}
Loading

0 comments on commit 15d2cab

Please sign in to comment.