Skip to content

Commit

Permalink
docs: use cards for notebook examples page
Browse files Browse the repository at this point in the history
fix: GOT5.6 names in database
  • Loading branch information
tsutterley committed Nov 2, 2024
1 parent 3d34f83 commit b18de08
Show file tree
Hide file tree
Showing 17 changed files with 91 additions and 29 deletions.
3 changes: 2 additions & 1 deletion doc/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ dependencies:
- scipy
- setuptools_scm
- sphinx
- sphinx-argparse>=0.4
- sphinx-design
- sphinx_rtd_theme
- timescale>=0.0.3
- pip:
- sphinx-argparse>=0.4
- ..
Binary file added doc/source/_assets/antarctic_cotidal_chart.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/source/_assets/antarctic_tidal_currents.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/source/_assets/antarctic_tide_range.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/source/_assets/arctic_ocean_map.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/source/_assets/atlas_compact.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/source/_assets/check_tide_map.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/source/_assets/ocean_pole_tide_map.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/source/_assets/ross_ice_shelf_map.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/source/_assets/solve_synthetic_tides.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/source/_assets/tide_forecasts.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 3 additions & 2 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,12 @@
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
"sphinx.ext.autodoc",
"numpydoc",
"myst_nb",
"numpydoc",
"sphinx.ext.autodoc",
"sphinx.ext.graphviz",
"sphinx.ext.viewcode",
"sphinx_design",
"sphinxarg.ext"
]

Expand Down
8 changes: 2 additions & 6 deletions doc/source/notebooks/Plot-Arctic-Ocean-Map.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@
" TMDwidgets.directory,\n",
" TMDwidgets.model,\n",
" TMDwidgets.compress,\n",
" TMDwidgets.datepick\n",
"])"
]
},
Expand Down Expand Up @@ -305,7 +306,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3.10.6 64-bit",
"display_name": "base",
"language": "python",
"name": "python3"
},
Expand All @@ -320,11 +321,6 @@
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.14"
},
"vscode": {
"interpreter": {
"hash": "31f2aee4e71d21fbe5cf8b01ff0e069b9275f58929596ceb00d14d90e3e16cd6"
}
}
},
"nbformat": 4,
Expand Down
13 changes: 5 additions & 8 deletions doc/source/notebooks/Plot-Tide-Forecasts.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@
"outputs": [],
"source": [
"# default coordinates to use\n",
"LAT,LON = (32.86710263,-117.25750387)\n",
"m = pyTMD.tools.leaflet(center=(LAT,LON), zoom=12,\n",
"LAT,LON = (45.00,-65.75)\n",
"m = pyTMD.tools.leaflet(center=(LAT,LON), zoom=7,\n",
" zoom_control=True, marker_control=True)\n",
"# show map\n",
"m.map"
Expand Down Expand Up @@ -174,7 +174,7 @@
"args = (YMD.year,YMD.month,YMD.day)\n",
"ax1.set_xlabel('Time from {0:4d}-{1:02d}-{2:02d} UTC [Hours]'.format(*args))\n",
"ttl = ax1.set_title(None)\n",
"fig.subplots_adjust(left=0.10,right=0.98,bottom=0.10,top=0.95)\n",
"fig.subplots_adjust(left=0.11,right=0.98,bottom=0.10,top=0.95)\n",
"\n",
"# delta time (TT - UT1) file\n",
"delta_file = pyTMD.utilities.get_data_path(['data','merged_deltat.data'])\n",
Expand Down Expand Up @@ -263,7 +263,7 @@
" l2.set_data(hours[htindex], TIDE.data[htindex])\n",
" l3.set_data(hours[ltindex], TIDE.data[ltindex])\n",
" # update plot title\n",
" ttl.set_text(u'{0:0.6f}\\u00b0N {1:0.6f}\\u00b0W'.format(LAT,LON))\n",
" ttl.set_text(u'{0:0.6f}\\u00b0N {1:0.6f}\\u00b0E'.format(LAT,LON))\n",
" ax1.relim()\n",
" ax1.autoscale_view()\n",
" fig.canvas.draw()\n",
Expand All @@ -276,11 +276,8 @@
}
],
"metadata": {
"interpreter": {
"hash": "31f2aee4e71d21fbe5cf8b01ff0e069b9275f58929596ceb00d14d90e3e16cd6"
},
"kernelspec": {
"display_name": "Python 3",
"display_name": "base",
"language": "python",
"name": "python3"
},
Expand Down
67 changes: 67 additions & 0 deletions doc/source/user_guide/Examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ The available examples include:

.. toctree::
:maxdepth: 1
:hidden:

../notebooks/Check-Tide-Map
../notebooks/Plot-Antarctic-Cotidal-Charts
Expand All @@ -21,3 +22,69 @@ The available examples include:
../notebooks/Plot-Ross-Ice-Shelf-Map
../notebooks/Plot-Tide-Forecasts
../notebooks/Solve-Synthetic-Tides

.. grid:: 1 2 3 4

.. grid-item-card:: Check Tide Map
:text-align: center
:img-top: ../_assets/check_tide_map.png
:link: ../notebooks/Check-Tide-Map.html
:link-alt: Checks if given points are within a tide model domain

.. grid-item-card:: Plot Antarctic Cotidal Charts
:text-align: center
:img-top: ../_assets/antarctic_cotidal_chart.png
:link: ../notebooks/Plot-Antarctic-Cotidal-Charts.html
:link-alt: Plots cotidal charts for selected constituents around Antarctica

.. grid-item-card:: Plot Antarctic Tidal Currents
:text-align: center
:img-top: ../_assets/antarctic_tidal_currents.png
:link: ../notebooks/Plot-Antarctic-Tidal-Currents.html
:link-alt: Creates an animation of hourly tidal currents around Antarctica

.. grid-item-card:: Plot Antarctic Tide Range
:text-align: center
:img-top: ../_assets/antarctic_tide_range.png
:link: ../notebooks/Plot-Antarctic-Tide-Range.html
:link-alt: Plots the total combined tidal amplitude for all constituents around Antarctica

.. grid:: 1 2 3 4

.. grid-item-card:: Plot Arctic Ocean Map
:text-align: center
:img-top: ../_assets/arctic_ocean_map.png
:link: ../notebooks/Plot-Arctic-Ocean-Map.html
:link-alt: Creates an animation of hourly tidal elevations for the Arctic Ocean

.. grid-item-card:: Plot ATLAS Compact
:text-align: center
:img-top: ../_assets/atlas_compact.png
:link: ../notebooks/Plot-ATLAS-Compact.html
:link-alt: Plots the global and local solutions from an ATLAS compact model

.. grid-item-card:: Plot Ocean Pole Tide Map
:text-align: center
:img-top: ../_assets/ocean_pole_tide_map.png
:link: ../notebooks/Plot-Ocean-Pole-Tide-Map.html
:link-alt: Plots maps of the real and imaginary geocentric pole tide admittance functions


.. grid-item-card:: Plot Ross Ice Shelf Map
:text-align: center
:img-top: ../_assets/ross_ice_shelf_map.png
:link: ../notebooks/Plot-Ross-Ice-Shelf-Map.html
:link-alt: Creates an animation of hourly tidal elevations for the Ross Ice Shelf

.. grid:: 1 2 3 4

.. grid-item-card:: Plot Tide Forecasts
:text-align: center
:img-top: ../_assets/tide_forecasts.png
:link: ../notebooks/Plot-Tide-Forecasts.html

.. grid-item-card:: Solve Synthetic Tides
:text-align: center
:img-top: ../_assets/solve_synthetic_tides.png
:link: ../notebooks/Solve-Synthetic-Tides.html

12 changes: 6 additions & 6 deletions providers/GSFC.json
Original file line number Diff line number Diff line change
Expand Up @@ -269,14 +269,14 @@
"GOT5.5/ocean_tides/j1.nc",
"GOT5.5/ocean_tides/k1.nc",
"GOT5.5/ocean_tides/k2.nc",
"GOT5.6/ocean_tides/l2.nc",
"GOT5.6/ocean_tides/m1.nc",
"GOT5.6/ocean_tides/l2'.nc",
"GOT5.6/ocean_tides/m1'.nc",
"GOT5.5/ocean_tides/m2.nc",
"GOT5.6/ocean_tides/m3.nc",
"GOT5.5/ocean_tides/m4.nc",
"GOT5.5/ocean_tides/ms4.nc",
"GOT5.5/ocean_tides/mu2.nc",
"GOT5.6/ocean_tides/n2.nc",
"GOT5.6/ocean_tides/n2'.nc",
"GOT5.5/ocean_tides/o1.nc",
"GOT5.5/ocean_tides/oo1.nc",
"GOT5.5/ocean_tides/p1.nc",
Expand All @@ -299,14 +299,14 @@
"GOT5.5/extrapolated/j1x.nc",
"GOT5.5/extrapolated/k1x.nc",
"GOT5.5/extrapolated/k2x.nc",
"GOT5.6/extrapolated/l2x.nc",
"GOT5.6/extrapolated/m1x.nc",
"GOT5.6/extrapolated/l2'x.nc",
"GOT5.6/extrapolated/m1'x.nc",
"GOT5.5/extrapolated/m2x.nc",
"GOT5.6/extrapolated/m3x.nc",
"GOT5.5/extrapolated/m4x.nc",
"GOT5.5/extrapolated/ms4x.nc",
"GOT5.5/extrapolated/mu2x.nc",
"GOT5.6/extrapolated/n2x.nc",
"GOT5.6/extrapolated/n2'x.nc",
"GOT5.5/extrapolated/o1x.nc",
"GOT5.5/extrapolated/oo1x.nc",
"GOT5.5/extrapolated/p1x.nc",
Expand Down
12 changes: 6 additions & 6 deletions pyTMD/data/database.json
Original file line number Diff line number Diff line change
Expand Up @@ -1622,14 +1622,14 @@
"GOT5.5/ocean_tides/j1.nc",
"GOT5.5/ocean_tides/k1.nc",
"GOT5.5/ocean_tides/k2.nc",
"GOT5.6/ocean_tides/l2.nc",
"GOT5.6/ocean_tides/m1.nc",
"GOT5.6/ocean_tides/l2'.nc",
"GOT5.6/ocean_tides/m1'.nc",
"GOT5.5/ocean_tides/m2.nc",
"GOT5.6/ocean_tides/m3.nc",
"GOT5.5/ocean_tides/m4.nc",
"GOT5.5/ocean_tides/ms4.nc",
"GOT5.5/ocean_tides/mu2.nc",
"GOT5.6/ocean_tides/n2.nc",
"GOT5.6/ocean_tides/n2'.nc",
"GOT5.5/ocean_tides/o1.nc",
"GOT5.5/ocean_tides/oo1.nc",
"GOT5.5/ocean_tides/p1.nc",
Expand All @@ -1652,14 +1652,14 @@
"GOT5.5/extrapolated/j1x.nc",
"GOT5.5/extrapolated/k1x.nc",
"GOT5.5/extrapolated/k2x.nc",
"GOT5.6/extrapolated/l2x.nc",
"GOT5.6/extrapolated/m1x.nc",
"GOT5.6/extrapolated/l2'x.nc",
"GOT5.6/extrapolated/m1'x.nc",
"GOT5.5/extrapolated/m2x.nc",
"GOT5.6/extrapolated/m3x.nc",
"GOT5.5/extrapolated/m4x.nc",
"GOT5.5/extrapolated/ms4x.nc",
"GOT5.5/extrapolated/mu2x.nc",
"GOT5.6/extrapolated/n2x.nc",
"GOT5.6/extrapolated/n2'x.nc",
"GOT5.5/extrapolated/o1x.nc",
"GOT5.5/extrapolated/oo1x.nc",
"GOT5.5/extrapolated/p1x.nc",
Expand Down

0 comments on commit b18de08

Please sign in to comment.