Exemplo n.º 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
Exemplo n.º 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
Exemplo n.º 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
Exemplo n.º 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
Exemplo n.º 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