.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "api/gallery/atmosphere/plot_04_hadley_circulation.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_atmosphere_plot_04_hadley_circulation.py: Hadley's circulation (1735) =========================== George Hadley explained the trade winds. Air heated at the equator rises and flows poleward aloft, and air returns towards the equator near the ground. The ground there moves eastward faster than at the latitude the air came from, so the returning air lags behind and blows from the east. Today the deflection is written with the Coriolis parameter ``f = 2 Omega sin(phi)``. A ring of air that leaves the equator at rest and keeps its angular momentum gains the westerly wind ``Omega a sin^2(phi) / cos(phi)``, whose growth with latitude is ``f + u tan(phi) / a``. .. GENERATED FROM PYTHON SOURCE LINES 14-37 .. image-sg:: /api/gallery/atmosphere/images/sphx_glr_plot_04_hadley_circulation_001.png :alt: Coriolis parameter, Upper branch conserving angular momentum :srcset: /api/gallery/atmosphere/images/sphx_glr_plot_04_hadley_circulation_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none angular-momentum wind at 30 degrees: 134 m/s | .. code-block:: Python import matplotlib.pyplot as plt import numpy as np from earthsciencekit.atmosphere import coriolis_parameter from earthsciencekit.constants import EARTH_RADIUS, OMEGA_EARTH latitude = np.deg2rad(np.linspace(0, 30, 301)) f = coriolis_parameter(latitude) u = OMEGA_EARTH * EARTH_RADIUS * np.sin(latitude) ** 2 / np.cos(latitude) dudy = np.gradient(u, EARTH_RADIUS * latitude) np.testing.assert_allclose(dudy[1:-1], (f + u * np.tan(latitude) / EARTH_RADIUS)[1:-1], rtol=1e-3) np.testing.assert_allclose(coriolis_parameter(-latitude), -f) print(f"angular-momentum wind at 30 degrees: {u[-1]:.0f} m/s") fig, axes = plt.subplots(1, 2, figsize=(10, 3.5)) axes[0].plot(np.rad2deg(latitude), f * 1e4) axes[0].set(xlabel="latitude [degree]", ylabel="f [10^-4 /s]", title="Coriolis parameter") axes[1].plot(np.rad2deg(latitude), u) axes[1].set(xlabel="latitude [degree]", ylabel="zonal wind [m/s]", title="Upper branch conserving angular momentum") fig.tight_layout() plt.show() .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.188 seconds) .. _sphx_glr_download_api_gallery_atmosphere_plot_04_hadley_circulation.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/atmosphere/plot_04_hadley_circulation.ipynb :alt: Launch JupyterLite :width: 150 px .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_04_hadley_circulation.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_04_hadley_circulation.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_04_hadley_circulation.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_