.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "api/gallery/atmosphere/plot_02_pascal_perier_puy_de_dome.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_02_pascal_perier_puy_de_dome.py: Pascal and Périer on the Puy de Dôme (1648) =========================================== At Blaise Pascal's request, his brother-in-law Florin Périer carried a mercury barometer from Clermont to the top of the Puy de Dôme, about 500 toises (975 m) higher. The column fell by 3 inches and 1.5 lines, about 85 mm, while a second barometer left in the town stayed put. Air has weight, and there is less of it above a mountain. An isothermal column at 10 °C reproduces the measured drop to within a few millimetres. .. GENERATED FROM PYTHON SOURCE LINES 12-36 .. image-sg:: /api/gallery/atmosphere/images/sphx_glr_plot_02_pascal_perier_puy_de_dome_001.png :alt: The barometer falls on the mountain :srcset: /api/gallery/atmosphere/images/sphx_glr_plot_02_pascal_perier_puy_de_dome_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none model drop 84.3 mm, Périer measured 84.6 mm | .. code-block:: Python import matplotlib.pyplot as plt import numpy as np from earthsciencekit.atmosphere import barometer_column_height, barometric_pressure from earthsciencekit.constants import GRAVITY mercury, climb = 13595.1, 975.0 inch, line = 27.07e-3, 27.07e-3 / 12 measured_drop = 3 * inch + 1.5 * line height = np.linspace(0, 1500, 151) pressure = barometric_pressure(101325, height, 283.15, GRAVITY) column = barometer_column_height(pressure, mercury, GRAVITY) drop = float(column[0] - barometer_column_height(barometric_pressure(101325, climb, 283.15, GRAVITY), mercury, GRAVITY)) assert abs(drop - measured_drop) < 3e-3 print(f"model drop {drop * 1000:.1f} mm, Périer measured {measured_drop * 1000:.1f} mm") fig, ax = plt.subplots() ax.plot(column * 1000, height, label="isothermal column, 283 K") ax.plot([column[0] * 1000, column[0] * 1000 - measured_drop * 1000], [0, climb], "o", color="tab:red", label="Périer, 19 September 1648") ax.set(xlabel="mercury column [mm]", ylabel="height above Clermont [m]", title="The barometer falls on the mountain") ax.legend() plt.show() .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.090 seconds) .. _sphx_glr_download_api_gallery_atmosphere_plot_02_pascal_perier_puy_de_dome.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_02_pascal_perier_puy_de_dome.ipynb :alt: Launch JupyterLite :width: 150 px .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_02_pascal_perier_puy_de_dome.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_02_pascal_perier_puy_de_dome.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_02_pascal_perier_puy_de_dome.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_