Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions pyet/meteo_utils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
"""The meteo_utils module contains utility functions for meteorological data.

"""
"""The meteo_utils module contains utility functions for meteorological data."""

from numpy import cos, exp, isnan, log, pi, sin, tan
from pandas import Series, to_numeric
Expand Down Expand Up @@ -264,7 +262,11 @@ def calc_ea(tmean=None, tmax=None, tmin=None, rhmax=None, rhmin=None, rh=None, e
es = calc_es(tmax=tmax, tmin=tmin)
else:
es = calc_e0(tmean)
return rh / 100 * es
if rh is None and tmin is not None:
ea = calc_e0(tmin) # assuming Tdew close to Tmin, Allen 1998
else:
ea = rh / 100 * es
return ea


def day_of_year(tindex):
Expand Down
Loading