Beispiel #1
0
 def test_bootstrap_tx90p_anchored_freq(self, tasmax_series, use_dask):
     self.bootstrap_testor(
         tasmax_series,
         98,
         lambda x, y, z: tx90p(x, y, freq="Q-APR", bootstrap=z),
         use_dask=use_dask,
     )
Beispiel #2
0
    def test_tx90p_simple(self, tasmax_series):
        i = 366
        tas = np.array(range(i))
        tas = tasmax_series(tas, start="1/1/2000")
        t90 = percentile_doy(tas, per=0.1)

        # create cold spell in june
        tas[175:180] = 1

        out = xci.tx90p(tas, t90, freq="MS")
        assert out[0] == 30
        assert out[1] == 29
        assert out[5] == 25