.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "api/gallery/glaciology/plot_04_stefan_sea_ice_growth.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_glaciology_plot_04_stefan_sea_ice_growth.py: Stefan's sea-ice growth (1891) ============================== Josef Stefan treated the growth of polar sea ice as a moving-boundary problem: the latent heat released as water freezes at the base must be conducted up through the ice already formed. The thickness then grows as the square root of the freezing degree-days, so four times the cold makes only twice the ice. The example integrates a synthetic Arctic winter. .. GENERATED FROM PYTHON SOURCE LINES 11-34 .. image-sg:: /api/gallery/glaciology/images/sphx_glr_plot_04_stefan_sea_ice_growth_001.png :alt: Stefan: growth slows as the ice thickens (freeboard 0.18 m) :srcset: /api/gallery/glaciology/images/sphx_glr_plot_04_stefan_sea_ice_growth_001.png :class: sphx-glr-single-img .. code-block:: Python import matplotlib.pyplot as plt import numpy as np from earthsciencekit.constants import ICE_DENSITY, LATENT_HEAT_FUSION from earthsciencekit.glaciology import sea_ice_freeboard, stefan_ice_thickness conductivity, freezing = 2.2, 271.35 # W/(m K), K for seawater day = np.arange(0, 241) fig, ax = plt.subplots() for amplitude, label in [(30, "high Arctic"), (15, "marginal sea")]: air = freezing - amplitude * np.sin(np.pi * day / 240) degree_seconds = np.concatenate([[0], np.cumsum(freezing - air[1:])]) * 86400 thickness = stefan_ice_thickness(degree_seconds, conductivity, ICE_DENSITY, LATENT_HEAT_FUSION) ax.plot(day, thickness, label=f"{label}, {amplitude} K mean amplitude") quadrupled = stefan_ice_thickness(4e8, conductivity, ICE_DENSITY, LATENT_HEAT_FUSION) assert np.isclose(quadrupled, 2 * stefan_ice_thickness(1e8, conductivity, ICE_DENSITY, LATENT_HEAT_FUSION)) freeboard = sea_ice_freeboard(thickness[-1], ICE_DENSITY, 1025) title = f"Stefan: growth slows as the ice thickens (freeboard {freeboard:.2f} m)" ax.set(xlabel="days since freeze-up", ylabel="ice thickness [m]", title=title) ax.legend() plt.show() .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.085 seconds) .. _sphx_glr_download_api_gallery_glaciology_plot_04_stefan_sea_ice_growth.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/glaciology/plot_04_stefan_sea_ice_growth.ipynb :alt: Launch JupyterLite :width: 150 px .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_04_stefan_sea_ice_growth.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_04_stefan_sea_ice_growth.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_04_stefan_sea_ice_growth.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_