.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples/hourly_pm.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. .. rst-class:: sphx-glr-example-title .. _sphx_glr_auto_examples_hourly_pm.py: ======================= Penman Monteith Hourly ======================= .. GENERATED FROM PYTHON SOURCE LINES 6-32 .. code-block:: Python import pandas as pd from ETUtil import PenmanMonteith constants = { 'altitude': 1208.5, 'lat_dec_deg': 39.4575, 'long_dec_deg': -118.77388, 'wind_z': 3.0, } df = pd.DataFrame([[91.80, 49.36, 3.33, 2.56064, 78], [91.80, 49.36, 3.33, 2.56064, 78], [91.80, 49.36, 3.33, 2.56064, 78]], columns=['temp', 'tdew', 'wind_speed', 'sol_rad', 'rel_hum'], index=pd.date_range('20150701 11:00', '20150701 13:00', periods=3)) units = {'temp': 'Fahrenheit', 'tdew': 'Fahrenheit', 'wind_speed': 'MilesPerHour', 'sol_rad': 'Mega_Joule_per_Meter_square'} pm = PenmanMonteith(df, units=units, constants=constants) .. GENERATED FROM PYTHON SOURCE LINES 33-36 .. code-block:: Python pet = pm() .. rst-class:: sphx-glr-script-out .. code-block:: none Warning: default value 0.23 of parameter albedo which is a numeric value between 0 and 1 (dimensionless), albedo of evaporative surface representing the portion of the incident radiation that is reflected back at the surface. Default is 0.23 for surface covered with short reference crop, which is for the calculation of Matt-Shuttleworth reference crop evaporation. is being used Warning: default value 0.23 of parameter a_s which is fraction of extraterrestrial radiation reaching earth on sunless days is being used Warning: default value 0.5 of parameter b_s which is difference between fracion of extraterrestrial radiation reaching full-sun days and that on sunless days is being used frequency is assigned to None .. GENERATED FROM PYTHON SOURCE LINES 37-40 .. code-block:: Python pet.head() .. rst-class:: sphx-glr-script-out .. code-block:: none 2015-07-01 11:00:00 0.564799 2015-07-01 12:00:00 0.566378 2015-07-01 13:00:00 0.566342 Freq: h, dtype: float64 .. GENERATED FROM PYTHON SOURCE LINES 41-44 .. code-block:: Python pm.plot_inputs() # %% .. image-sg:: /auto_examples/images/sphx_glr_hourly_pm_001.png :alt: hourly pm :srcset: /auto_examples/images/sphx_glr_hourly_pm_001.png, /auto_examples/images/sphx_glr_hourly_pm_001_2_00x.png 2.00x :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none for temp [0.17933188 0.80862126 0.1643547 ] for tdew [0.17991982 0.52139611 0.47267124] for t1 [0.70902876 0.22039724 0.79747585] for is_day [0.24008161 0.13686468 0.98653872] for ird [0.60659676 0.61009049 0.74945963] for solar_dec [0.96536527 0.62577079 0.80348441] for rnl [0.8375196 0.53208276 0.70545087] .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.995 seconds) .. _sphx_glr_download_auto_examples_hourly_pm.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: hourly_pm.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: hourly_pm.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: hourly_pm.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_