.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "api/gallery/atmosphere/plot_13_richardson_numerical_forecast.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_13_richardson_numerical_forecast.py: Richardson's numerical forecast (1922) ====================================== In *Weather Prediction by Numerical Process*, Richardson computed by hand a six-hour forecast for two points over Germany, from the observations of 20 May 1910. He predicted a surface pressure rise of 145 hPa, about a hundred times too large. The pressure tendency is the column-mean divergence times the surface pressure, and the divergence at any one level is much larger than the column mean, because convergence below nearly cancels divergence above. A column-mean error of 7e-6 per second, the size of the divergence at a single level, is enough to reproduce his result. .. GENERATED FROM PYTHON SOURCE LINES 14-37 .. image-sg:: /api/gallery/atmosphere/images/sphx_glr_plot_13_richardson_numerical_forecast_001.png :alt: Small divergence errors, huge tendencies :srcset: /api/gallery/atmosphere/images/sphx_glr_plot_13_richardson_numerical_forecast_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none six-hour pressure change: 144 hPa | .. code-block:: Python import matplotlib.pyplot as plt import numpy as np from earthsciencekit.atmosphere import surface_pressure_tendency six_hours = 6 * 3600 surface_pressure = 101325.0 richardson = float(surface_pressure_tendency(-6.6e-6, surface_pressure)) * six_hours assert abs(richardson - 145e2) < 3e2 divergence = np.logspace(-8, -5, 200) change = -surface_pressure_tendency(-divergence, surface_pressure) * six_hours / 100 assert np.isclose(-surface_pressure_tendency(1e-7, surface_pressure) * six_hours, 218.8, rtol=1e-3) print(f"six-hour pressure change: {richardson / 100:.0f} hPa") fig, ax = plt.subplots() ax.loglog(divergence, -change) ax.axhline(145, color="tab:red", ls="--", label="Richardson's 145 hPa") ax.axvspan(1e-8, 1e-7, color="tab:green", alpha=0.2, label="realistic column mean") ax.set(xlabel="column-mean convergence [1/s]", ylabel="pressure rise in 6 h [hPa]", title="Small divergence errors, huge tendencies") ax.legend() plt.show() .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.172 seconds) .. _sphx_glr_download_api_gallery_atmosphere_plot_13_richardson_numerical_forecast.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_13_richardson_numerical_forecast.ipynb :alt: Launch JupyterLite :width: 150 px .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_13_richardson_numerical_forecast.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_13_richardson_numerical_forecast.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_13_richardson_numerical_forecast.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_