.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "api/gallery/oceanography/plot_13_stommel_western_intensification.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_13_stommel_western_intensification.py: Stommel's western intensification (1948) ======================================== Henry Stommel asked why the strongest currents, like the Gulf Stream and the Kuroshio, run along the western sides of ocean basins. On a uniformly rotating Earth his wind-driven gyre is symmetric. Once the Coriolis parameter increases northward, the return flow crowds into a western boundary layer of width ``friction / beta`` while the interior obeys Sverdrup's balance. .. GENERATED FROM PYTHON SOURCE LINES 11-34 .. image-sg:: /api/gallery/oceanography/images/sphx_glr_plot_13_stommel_western_intensification_001.png :alt: uniform rotation: peak at 3000 km, beta plane: peak at 250 km :srcset: /api/gallery/oceanography/images/sphx_glr_plot_13_stommel_western_intensification_001.png :class: sphx-glr-single-img .. code-block:: Python import matplotlib.pyplot as plt import numpy as np from earthsciencekit.oceanography import stommel_streamfunction from earthsciencekit.units import convert width, length, stress, density, friction = 6000e3, 3000e3, 0.1, 1025, 1e-6 x, y = np.meshgrid(np.linspace(0, width, 601), np.linspace(0, length, 151)) fig, axes = plt.subplots(1, 2, figsize=(10, 3.6), sharey=True) for ax, beta, label in zip(axes, [0, 2e-11], ["uniform rotation", "beta plane"]): psi = convert(stommel_streamfunction(x, y, stress, width, length, density, beta, friction), "m^3/s", "Sv") peak = x[0, np.argmax(psi[75])] ax.contour(x / 1e3, y / 1e3, psi, levels=10, cmap="viridis") ax.set(xlabel="eastward distance [km]", title=f"{label}: peak at {peak / 1e3:.0f} km") if beta == 0: assert np.isclose(peak, width / 2) else: assert peak < 0.1 * width axes[0].set_ylabel("northward distance [km]") fig.tight_layout() plt.show() .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.199 seconds) .. _sphx_glr_download_api_gallery_oceanography_plot_13_stommel_western_intensification.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_13_stommel_western_intensification.ipynb :alt: Launch JupyterLite :width: 150 px .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_13_stommel_western_intensification.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_13_stommel_western_intensification.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_13_stommel_western_intensification.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_