Ejemplo n.º 1
0
 def test_multi_max(self, pr_series):
     a = pr_series(np.array([3, 4, 20, 20, 0, 6, 15, 25, 0, 0]))
     rxnday = xci.max_n_day_precipitation_amount(a, 2)
     assert rxnday == 40 * 3600 * 24
     assert len(rxnday) == 1
     assert rxnday.time.dt.year == 2000
Ejemplo n.º 2
0
 def test_sumlength_max(self, pr_series):
     a = pr_series(np.array([3, 4, 20, 20, 0, 6, 9, 25, 0, 0]))
     rxnday = xci.max_n_day_precipitation_amount(a, len(a))
     assert rxnday == a.sum("time") * 3600 * 24
     assert rxnday.time.dt.year == 2000