From a1b565bba8b5439a2cc9b0130057d5af9e054ba6 Mon Sep 17 00:00:00 2001 From: Mike Kittridge Date: Wed, 6 Nov 2024 18:07:53 +1300 Subject: [PATCH] pandas --- eto/methods/ETo.py | 2 +- eto/methods/hargreaves.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/eto/methods/ETo.py b/eto/methods/ETo.py index b1b24e5..53a95df 100644 --- a/eto/methods/ETo.py +++ b/eto/methods/ETo.py @@ -34,7 +34,7 @@ def eto_fao(self, max_ETo=15, min_ETo=0, interp=False, maxgap=15): ###### ## ETo equation - if 'H' in self.freq: + if 'h' in self.freq.lower(): ETo_FAO = (0.408*self.ts_param['delta']*(self.ts_param['R_n'] - self.ts_param['G']) + self.ts_param['gamma']*37/(self.ts_param['T_mean'] + 273)*self.ts_param['U_2']*(self.ts_param['e_mean'] - self.ts_param['e_a']))/(self.ts_param['delta'] + self.ts_param['gamma']*(1 + 0.34*self.ts_param['U_2'])) else: ETo_FAO = (0.408*self.ts_param['delta']*(self.ts_param['R_n'] - self.ts_param['G']) + self.ts_param['gamma']*900/(self.ts_param['T_mean'] + 273)*self.ts_param['U_2']*(self.ts_param['e_s'] - self.ts_param['e_a']))/(self.ts_param['delta'] + self.ts_param['gamma']*(1 + 0.34*self.ts_param['U_2'])) diff --git a/eto/methods/hargreaves.py b/eto/methods/hargreaves.py index 70e59a8..0b8ec59 100644 --- a/eto/methods/hargreaves.py +++ b/eto/methods/hargreaves.py @@ -32,7 +32,7 @@ def hargreaves(self, max_ETo=15, min_ETo=0, interp=False, maxgap=15): ###### ## ETo equation - if 'H' in self.freq: + if 'h' in self.freq.lower(): raise ValueError('Hargreaves should not be calculated at time frequencies of less than a day.') ETo_Har = 0.0023*(self.ts_param['T_mean'] + 17.8)*((self.ts_param['T_max'] - self.ts_param['T_min']) **0.5)*self.ts_param['R_a']*0.408