.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "api/gallery/climate/plot_10_budyko_sellers_ice_albedo.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_climate_plot_10_budyko_sellers_ice_albedo.py: Budyko and Sellers's ice-albedo feedback (1969) =============================================== Mikhail Budyko and William Sellers independently built energy-balance models in which ice reflects more sunlight than ocean or land. Colder climates grow more ice and absorb less, which cools them further. Both found that a drop of a few percent in sunlight could freeze the whole planet, and that a frozen Earth would stay frozen until the Sun grew far brighter: a hysteresis loop. Inverting the energy balance gives the solar constant that holds each temperature, which traces every equilibrium at once. .. GENERATED FROM PYTHON SOURCE LINES 13-43 .. image-sg:: /api/gallery/climate/images/sphx_glr_plot_10_budyko_sellers_ice_albedo_001.png :alt: Snowball hysteresis :srcset: /api/gallery/climate/images/sphx_glr_plot_10_budyko_sellers_ice_albedo_001.png :class: sphx-glr-single-img .. code-block:: Python import matplotlib.pyplot as plt import numpy as np from earthsciencekit.climate import equilibrium_solar_constant parameters = (0.62, 0.62, 0.3, 265.0, 8.0) temperature = np.linspace(220, 310, 2001) solar = equilibrium_solar_constant(temperature, *parameters) slope = np.diff(solar) folds = np.where(np.sign(slope[1:]) != np.sign(slope[:-1]))[0] + 1 escape, collapse = solar[folds] assert escape > 1361 > collapse crossings = np.where(np.diff(np.sign(solar - 1361)))[0] assert crossings.size == 3 stable = np.r_[slope > 0, True] fig, ax = plt.subplots() ax.plot(np.where(stable, solar, np.nan), temperature, "C0", label="stable") ax.plot(np.where(~stable, solar, np.nan), temperature, "C0--", label="unstable") cold, warm = slice(None, folds[0]), slice(folds[1], None) freeze = temperature[cold][np.argmin(abs(solar[cold] - collapse))] thaw = temperature[warm][np.argmin(abs(solar[warm] - escape))] ax.annotate("", xy=(collapse, freeze), xytext=(collapse, temperature[folds[1]]), arrowprops={"arrowstyle": "->", "color": "tab:blue"}) ax.annotate("", xy=(escape, thaw), xytext=(escape, temperature[folds[0]]), arrowprops={"arrowstyle": "->", "color": "tab:red"}) ax.axvline(1361, color="0.5", ls=":", label="present Sun") ax.set(xlabel="solar constant [W/m²]", ylabel="equilibrium temperature [K]", title="Snowball hysteresis") ax.legend(loc="lower right") plt.show() .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.079 seconds) .. _sphx_glr_download_api_gallery_climate_plot_10_budyko_sellers_ice_albedo.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/climate/plot_10_budyko_sellers_ice_albedo.ipynb :alt: Launch JupyterLite :width: 150 px .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_10_budyko_sellers_ice_albedo.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_10_budyko_sellers_ice_albedo.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_10_budyko_sellers_ice_albedo.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_