.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "api/gallery/oceanography/plot_02_laplace_tidal_equations.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code or to run this example in your browser via JupyterLite. .. rst-class:: sphx-glr-example-title .. _sphx_glr_api_gallery_oceanography_plot_02_laplace_tidal_equations.py: Laplace's tidal equations (1776) ================================ Pierre-Simon Laplace replaced Newton's static bulge with the dynamics of a thin ocean on a rotating Earth. Long waves in that ocean travel at ``sqrt(g h)``. To keep pace with the Moon's bulge at the equator the ocean would have to be about 22 km deep; the real ocean, about 4 km deep, cannot follow it, so real tides are a forced dynamic response, not an equilibrium. .. GENERATED FROM PYTHON SOURCE LINES 11-34 .. image-sg:: /api/gallery/oceanography/images/sphx_glr_plot_02_laplace_tidal_equations_001.png :alt: The ocean cannot keep up with the tidal bulge :srcset: /api/gallery/oceanography/images/sphx_glr_plot_02_laplace_tidal_equations_001.png :class: sphx-glr-single-img .. code-block:: Python import matplotlib.pyplot as plt import numpy as np from earthsciencekit.constants import EARTH_RADIUS, GRAVITY, OMEGA_EARTH from earthsciencekit.oceanography import shallow_wave_speed surface_speed = OMEGA_EARTH * EARTH_RADIUS critical_depth = surface_speed**2 / GRAVITY assert np.isclose(shallow_wave_speed(critical_depth, GRAVITY), surface_speed) assert 21e3 < critical_depth < 23e3 assert shallow_wave_speed(4000, GRAVITY) < 0.5 * surface_speed depth = np.logspace(1, np.log10(40e3), 300) fig, ax = plt.subplots() ax.semilogx(depth / 1e3, shallow_wave_speed(depth, GRAVITY), label="long-wave speed sqrt(g h)") ax.axhline(surface_speed, color="k", ls="--", label="equatorial surface speed") ax.axvline(4, color="tab:blue", alpha=0.4, lw=6, label="mean ocean depth") ax.axvline(critical_depth / 1e3, color="tab:red", ls=":", label=f"resonant depth {critical_depth / 1e3:.0f} km") ax.set(xlabel="ocean depth [km]", ylabel="speed [m/s]", title="The ocean cannot keep up with the tidal bulge") ax.legend() plt.show() .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.141 seconds) .. _sphx_glr_download_api_gallery_oceanography_plot_02_laplace_tidal_equations.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: lite-badge .. image:: images/jupyterlite_badge_logo.svg :target: ../../../lite/lab/index.html?path=api/gallery/oceanography/plot_02_laplace_tidal_equations.ipynb :alt: Launch JupyterLite :width: 150 px .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_02_laplace_tidal_equations.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_02_laplace_tidal_equations.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_02_laplace_tidal_equations.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_