Exemple #1
0
 def test_all_year_freeze(self, tasmin_series):
     a = tasmin_series(np.zeros(365) - 10 + K2C)
     cfd = xci.consecutive_frost_days(a)
     assert cfd == 365
Exemple #2
0
 def test_no_freeze(self, tasmin_series):
     a = tasmin_series(np.array([3, 4, 5, 1, 3]) + K2C)
     cfd = xci.consecutive_frost_days(a)
     assert cfd == 0
Exemple #3
0
 def test_all_year_freeze(self):
     a = self.time_series(np.zeros(365) - 10 + K2C)
     cfd = xci.consecutive_frost_days(a)
     assert cfd == 365
Exemple #4
0
 def test_one_freeze_day(self, tasmin_series):
     a = tasmin_series(np.array([3, 4, 5, -1, 3]) + K2C)
     cfd = xci.consecutive_frost_days(a)
     assert cfd == 1
     assert cfd.time.dt.year == 2000
Exemple #5
0
 def test_no_freeze(self):
     a = self.time_series(np.array([3, 4, 5, 1, 3]) + K2C)
     cfd = xci.consecutive_frost_days(a)
     assert cfd == 0