diff --git a/pyet/meteo_utils.py b/pyet/meteo_utils.py index 0e35c58..5842ea0 100644 --- a/pyet/meteo_utils.py +++ b/pyet/meteo_utils.py @@ -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 @@ -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):