Esempio n. 1
0
 def test_q27(self, ndq_series):
     out = streamflow.freq_analysis(ndq_series,
                                    mode="max",
                                    t=2,
                                    dist="gamma",
                                    window=7)
     assert out.shape == (1, 2, 3)
Esempio n. 2
0
 def test_no_indexer(self, ndq_series):
     out = streamflow.freq_analysis(ndq_series,
                                    mode="max",
                                    t=[2, 5],
                                    dist="gamma")
     assert out.long_name == "N-year return period max annual 1-day flow"
     assert out.shape == (2, 2, 3)  # nrt, nx, ny
Esempio n. 3
0
 def test_simple(self, ndq_series):
     out = streamflow.freq_analysis(ndq_series,
                                    mode='max',
                                    t=[2, 5],
                                    dist='gamma',
                                    season='DJF')
     assert out.long_name == 'N-year return period max winter 1-day flow'
Esempio n. 4
0
 def test_simple(self, ndq_series):
     out = streamflow.freq_analysis(ndq_series,
                                    mode="max",
                                    t=[2, 5],
                                    dist="gamma",
                                    season="DJF")
     assert out.long_name == "N-year return period max winter 1-day flow"
     assert out.shape == (2, 2, 3)  # nrt, nx, ny
Esempio n. 5
0
 def test_empty(self, ndq_series):
     q = ndq_series.copy()
     q[:, 0, 0] = np.nan
     out = streamflow.freq_analysis(q,
                                    mode="max",
                                    t=2,
                                    dist="genextreme",
                                    window=6,
                                    freq="YS")
     assert np.isnan(out.values[:, 0, 0]).all()
Esempio n. 6
0
 def test_no_indexer(self, ndq_series):
     out = streamflow.freq_analysis(ndq_series,
                                    mode='max',
                                    t=[2, 5],
                                    dist='gamma')
     assert out.long_name == 'N-year return period max annual 1-day flow'