.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "api/gallery/hydrology/plot_09_sherman_unit_hydrograph.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_09_sherman_unit_hydrograph.py: Sherman's unit hydrograph (1932) ================================ LeRoy Sherman proposed that a catchment responds linearly to rain: one centimetre of excess rainfall in a given interval always produces the same hydrograph, and a storm produces the sum of these responses, shifted and scaled by its bursts of rain. The example takes a Nash (1957) cascade of reservoirs as the unit hydrograph of a 50 km^2 catchment, convolves it with a three-hour storm, and checks that the flood carries the volume of the excess rain. .. GENERATED FROM PYTHON SOURCE LINES 13-34 .. image-sg:: /api/gallery/hydrology/images/sphx_glr_plot_09_sherman_unit_hydrograph_001.png :alt: Sherman: the storm is a sum of unit responses :srcset: /api/gallery/hydrology/images/sphx_glr_plot_09_sherman_unit_hydrograph_001.png :class: sphx-glr-single-img .. code-block:: Python import matplotlib.pyplot as plt import numpy as np from earthsciencekit.hydrology import nash_unit_hydrograph, unit_hydrograph_convolution area, step = 50e6, 3600.0 hours = np.arange(72) unit = area * nash_unit_hydrograph(hours * step, 3, 4 * step) # m^3/s per metre of excess rain storm = np.array([0.006, 0.015, 0.004]) # m of excess rain per hour flood = unit_hydrograph_convolution(storm, unit) assert np.isclose(flood.sum() * step, storm.sum() * area, rtol=1e-2) fig, ax = plt.subplots() for i, burst in enumerate(storm): ax.plot(hours + i, burst * unit, ":", label=f"hour {i + 1}: {burst * 1e3:g} mm") ax.plot(np.arange(flood.size), flood, "k", lw=2, label="storm hydrograph") ax.set(xlim=(0, 48), xlabel="time [h]", ylabel="direct runoff [m^3/s]", title="Sherman: the storm is a sum of unit responses") ax.legend() plt.show() .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.080 seconds) .. _sphx_glr_download_api_gallery_hydrology_plot_09_sherman_unit_hydrograph.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_09_sherman_unit_hydrograph.ipynb :alt: Launch JupyterLite :width: 150 px .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_09_sherman_unit_hydrograph.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_09_sherman_unit_hydrograph.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_09_sherman_unit_hydrograph.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_