xskillscore.core.resampling.resample_iterations¶
- xskillscore.core.resampling.resample_iterations(forecast, iterations, dim='member', dim_max=None, replace=True)¶
Resample over
dim
by indexiterations
times.Note
This gives the same result as
resample_iterations_idx()
but slower. When usingdask
, the number of tasks inresample_iterations()
will scale withiterations
but constant chunksize, whereas the tasks inresample_iterations_idx()
will stay constant with increasing chunksize.- Parameters:
- Returns:
forecast_smp – data resampled along dimension
dim
with additionaldim='iteration'
.- Return type:
xr.DataArray, xr.Dataset
Examples
>>> a = xr.DataArray(np.random.rand(1000, 3, 3), dims=['time', 'x', 'y']) >>> xs.resample_iterations(a, 500, 'time') <xarray.DataArray (time: 1000, x: 3, y: 3, iteration: 500)>
See also
resample_iterations_idx()
References
Mason, S. J., & Mimmack, G. M. (1992). The use of bootstrap confidence intervals for the correlation coefficient in climatology. Theoretical and Applied Climatology, 45(4), 229–233. https://doi.org/10/b6fnsv
Mason, S. J. (2008). Understanding forecast verification statistics. Meteorological Applications, 15(1), 31–40. https://doi.org/10/bgvgnz
Goddard, L., Kumar, A., Solomon, A., Smith, D., Boer, G., Gonzalez, P., Kharin, V., Merryfield, W., Deser, C., Mason, S. J., Kirtman, B. P., Msadek, R., Sutton, R., Hawkins, E., Fricker, T., Hegerl, G., Ferro, C. a. T., Stephenson, D. B., Meehl, G. A., … Delworth, T. (2013). A verification framework for interannual-to-decadal predictions experiments. Climate Dynamics, 40(1–2), 245–272. https://doi.org/10/f4jjvf