.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "api/gallery/hydrology/plot_10_horton_infiltration_capacity.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_hydrology_plot_10_horton_infiltration_capacity.py: Horton's infiltration capacity (1933) ===================================== Robert Horton described the soil surface as a separator: rain up to the infiltration capacity enters the soil and feeds groundwater, and rain beyond it runs off over the surface. The capacity falls exponentially during a storm from an initial to a steady value. Overland flow produced this way, Hortonian or infiltration-excess runoff, is the shaded area where the rain exceeds the capacity. .. GENERATED FROM PYTHON SOURCE LINES 12-34 .. image-sg:: /api/gallery/hydrology/images/sphx_glr_plot_10_horton_infiltration_capacity_001.png :alt: Horton: 16.2 mm runs off over the surface :srcset: /api/gallery/hydrology/images/sphx_glr_plot_10_horton_infiltration_capacity_001.png :class: sphx-glr-single-img .. code-block:: Python import matplotlib.pyplot as plt import numpy as np from earthsciencekit.hydrology import horton_cumulative_infiltration, horton_infiltration_rate time = np.linspace(0, 3 * 3600, 361) capacity = horton_infiltration_rate(time, 25 / 3.6e6, 4 / 3.6e6, 1 / 1800) # mm/h converted to m/s rain = np.full_like(time, 12 / 3.6e6) infiltration = np.minimum(rain, capacity) runoff_depth = np.trapezoid(rain - infiltration, time) total = horton_cumulative_infiltration(time[-1], 25 / 3.6e6, 4 / 3.6e6, 1 / 1800) assert np.isclose(total, np.trapezoid(capacity, time), rtol=1e-4) and runoff_depth > 0 fig, ax = plt.subplots() ax.plot(time / 3600, capacity * 3.6e6, label="infiltration capacity") ax.plot(time / 3600, rain * 3.6e6, "k--", label="rain, 12 mm/h") ax.fill_between(time / 3600, capacity * 3.6e6, rain * 3.6e6, where=rain > capacity, alpha=0.3, label="overland flow") ax.set(xlabel="time [h]", ylabel="rate [mm/h]", title=f"Horton: {runoff_depth * 1e3:.1f} mm runs off over the surface") ax.legend() plt.show() .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.081 seconds) .. _sphx_glr_download_api_gallery_hydrology_plot_10_horton_infiltration_capacity.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/hydrology/plot_10_horton_infiltration_capacity.ipynb :alt: Launch JupyterLite :width: 150 px .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_10_horton_infiltration_capacity.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_10_horton_infiltration_capacity.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_10_horton_infiltration_capacity.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_