
.. DO NOT EDIT.
.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY.
.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE:
.. "_gallery\plot_heat_conductance.py"
.. LINE NUMBERS ARE GIVEN BELOW.

.. only:: html

    .. note::
        :class: sphx-glr-download-link-note

        Click :ref:`here <sphx_glr_download__gallery_plot_heat_conductance.py>`
        to download the full example code

.. rst-class:: sphx-glr-example-title

.. _sphx_glr__gallery_plot_heat_conductance.py:


Heat conductance canopy atmosphere
==================================

Plot heat conductance between canopy (or soil) and atmosphere as a function
of wind speed.

.. GENERATED FROM PYTHON SOURCE LINES 8-33



.. image:: /_gallery/images/sphx_glr_plot_heat_conductance_001.png
    :alt: plot heat conductance
    :class: sphx-glr-single-img





.. code-block:: default

    import matplotlib.pyplot as plt
    import numpy as np

    from allen1989.transfer import heat_conductance

    # compute data
    data = []
    wss = np.linspace(0., 10, 100)

    for hc in (1.5, 1, 0.5):
        data.append((hc, [heat_conductance(hc, ws) for ws in wss]))

    # plot curves
    fig, axes = plt.subplots(1, 1, figsize=(10, 6), squeeze=False)
    ax = axes[0, 0]

    for hc, conds in data:
        ax.plot(wss, conds, label=f"{hc:.1f}")

    ax.legend(loc='upper left', title="canopy height [m]")
    ax.set_xlabel("ws [m.s-1]")
    ax.set_ylabel("ga [m.s-1]")

    fig.tight_layout()
    plt.show()


.. rst-class:: sphx-glr-timing

   **Total running time of the script:** ( 0 minutes  0.230 seconds)


.. _sphx_glr_download__gallery_plot_heat_conductance.py:


.. only :: html

 .. container:: sphx-glr-footer
    :class: sphx-glr-footer-example



  .. container:: sphx-glr-download sphx-glr-download-python

     :download:`Download Python source code: plot_heat_conductance.py <plot_heat_conductance.py>`



  .. container:: sphx-glr-download sphx-glr-download-jupyter

     :download:`Download Jupyter notebook: plot_heat_conductance.ipynb <plot_heat_conductance.ipynb>`


.. only:: html

 .. rst-class:: sphx-glr-signature

    `Gallery generated by Sphinx-Gallery <https://sphinx-gallery.github.io>`_
