coveralls: ## Pull Request Test Coverage Report for [Build 1461](https://coveralls.io/builds/27991654)

* **25** of **27**   **(92.59%)**  changed or added relevant lines in **1** file are covered.
* No unchanged relevant lines lost coverage.
* Overall coverage decreased (**-0.2%**) to **90.777%**

---

|  Changes Missing Coverage | Covered Lines | Changed/Added Lines | % |
| :-----|--------------|--------|---: |
| [xclim/ensembles.py](https://coveralls.io/builds/27991654/source?filename=xclim%2Fensembles.py#L196) | 25 | 27 | 92.59%
<!-- | **Total:** | **25** | **27** | **92.59%** | -->


|  Totals | [![Coverage Status](https://coveralls.io/builds/27991654/badge)](https://coveralls.io/builds/27991654) |
| :-- | --: |
| Change from base [Build 1460](https://coveralls.io/builds/27989588): |  -0.2% |
| Covered Lines: | 1683 |
| Relevant Lines: | 1854 |

---
##### 💛  - [Coveralls](https://coveralls.io)

huard: I suggest we release 0.13 once this is merged. 
tlogan2000: This looks cool but will need a bit of time to review.  @aulemahal I would maybe want to get you to benchmark using some of the climatedata.ca data (lots of gridcells (all of canada), 24 realizations 151 timesteps  ) ...  

Quick question for @aulemahal ... between the two new option in  https://github.com/Ouranosinc/xclim-benchmark/pull/2 (apply and apply rechunk) if I understand apply is the 'faster' option but can use more memory... anyway to combine the two with a rule of thumb chunksize? e.g. if chunksizes > n apply_rechunk else apply...
aulemahal: @tlogan2000  I generated 25 realizations of random data made of 4 chunks of 50x1000x500. I think this resembles  what you were thinking of? 

It gives the following:
![ensemble_percentile_memuse_ManyRealizations_FewLargeChunks_SmallTimeDim](https://user-images.githubusercontent.com/20629530/72107184-d2ec3980-32fe-11ea-92e6-0ad8002432f4.png)
Without rechunking, it behaves as expected, but the default rechunking fails (highest red line). I think this is due to the small size of the time dimensions and its chunks here (4x50). Thus, when rechunking, we get chunks of 2x1000x500, which seems not efficient. 

I added a test so that the rechunking is done on the dimensions with the largest chunks, that the lowest red line. It's incredibly better, dask is so mysterious... Coming up in the PRs.

diff --git a/HISTORY.rst b/HISTORY.rst
index 2da52984..50dd6f92 100644
--- a/HISTORY.rst
+++ b/HISTORY.rst
@@ -10,6 +10,7 @@ History
 * Fixed `ensembles.create_ensemble` errors for builds against xarray master branch.
 * Reformatted code to make better use of Python3.6 conventions (f-strings and object signatures).
 * Fixed randomly failing tests of `checks.missing_any`.
+* Improvement of `ensemble.ensemble_percentile` and `ensemble.create_ensemble`.
 
 0.12.x-beta (2019-11-18)
 ------------------------
diff --git a/xclim/ensembles.py b/xclim/ensembles.py
index ddbccd9a..f333face 100644
--- a/xclim/ensembles.py
+++ b/xclim/ensembles.py
@@ -36,6 +36,7 @@ def create_ensemble(
     a new dimension (name:'realization'). In the case where input files have unequal time dimensions, the output
     ensemble Dataset is created for maximum time-step interval of all input files.  Before concatenation, datasets not
     covering the entire time span have their data padded with NaN values.
+    Dataset and variable attributes of the first dataset are copied to the resulting dataset.
 
     Parameters
     ----------
@@ -48,7 +49,7 @@ def create_ensemble(
       Only applicable when "datasets" is a sequence of file paths.
 
     xr_kwargs :
-      Any keyword arguments to be given to xarray when opening the files.
+      Any keyword arguments to be given to `xr.open_dataset` when opening the files (or to `xr.open_mfdataset` if mf_flag is True)
 
     Returns
     -------
@@ -74,19 +75,16 @@ def create_ensemble(
     >>> datasets.append(glob.glob('/dir2/*.nc'))
     >>> ens = ensembles.create_ensemble(datasets, mf_flag=True)
     """
-
-    dim = "realization"
-
     time_flag, time_all = _ens_checktimes(datasets, mf_flag, **xr_kwargs)
 
-    ds1 = _ens_align_datasets(datasets, mf_flag, time_flag, time_all)
+    ds = _ens_align_datasets(datasets, mf_flag, time_flag, time_all, **xr_kwargs)
 
-    for v in list(ds1[0].data_vars):
-        list1 = [ds[v] for ds in ds1]
-        data = xr.concat(list1, dim=dim)
-        if v == list(ds1[0].data_vars)[0]:
-            ens = xr.Dataset(data_vars=None, coords=data.coords, attrs=ds1[0].attrs)
-        ens[v] = data
+    dim = xr.IndexVariable("realization", np.arange(len(ds)), attrs={"axis": "E"})
+
+    ens = xr.concat(ds, dim)
+    for vname, var in ds[0].variables.items():
+        ens[vname].attrs.update(**var.attrs)
+    ens.attrs.update(**ds[0].attrs)
 
     return ens
 
@@ -142,12 +140,11 @@ def ensemble_mean_std_max_min(ens: xr.Dataset) -> xr.Dataset:
 def ensemble_percentiles(
     ens: xr.Dataset,
     values: Tuple[int, int, int] = (10, 50, 90),
-    time_block: Optional[int] = None,
+    keep_chunk_size: Optional[bool] = None,
 ) -> xr.Dataset:
     """Calculate ensemble statistics between a results from an ensemble of climate simulations.
 
-    Returns a Dataset containing ensemble statistics for input climate simulations.
-    Alternatively calculate ensemble percentiles (default) or ensemble mean and standard deviation.
+    Returns a Dataset containing ensemble percentiles for input climate simulations.
 
     Parameters
     ----------
@@ -155,9 +152,11 @@ def ensemble_percentiles(
       Ensemble dataset (see xclim.ensembles.create_ensemble).
     values : Tuple[int, int, int]
       Percentile values to calculate. Default: (10, 50, 90).
-    time_block : Optional[int]
-      For large ensembles, iteratively calculate percentiles in time-step blocks (n==time_block).
-      If not defined, the function tries to estimate an appropriate value.
+    keep_chunk_size : Optional[bool]
+      For ensembles using dask arrays, all chunks along the 'realization' axis are merged.
+      If True, the dataset is rechunked along the dimension with the largest chunks, so that the chunks keep the same size (approx)
+      If False, no shrinking is performed, resulting in much larger chunks
+      If not defined, the function decides which is best
 
     Returns
     -------
@@ -177,34 +176,58 @@ def ensemble_percentiles(
     Calculate non-default percentiles (25th and 75th)
     >>> ens_percs = ensembles.ensemble_percentiles(ens, values=(25, 50, 75))
     >>> print(ens_percs['tas_p25'])
-    Calculate by time blocks (n=10) if ensemble size is too large to load in memory
-    >>> ens_percs = ensembles.ensemble_percentiles(ens, time_block=10)
+    If the original array has many small chunks, it might be more efficient to do:
+    >>> ens_percs = ensembles.ensemble_percentiles(ens, keep_chunk_size=False)
     >>> print(ens_percs['tas_p25'])
     """
 
     ds_out = ens.drop_vars(names=set(ens.data_vars))
-    dims = list(ens.dims)
     for v in ens.data_vars:
-        # Percentile calculation requires load to memory : automate size for large ensemble objects
-        if not time_block:
-            time_block = round(
-                2e8 / (ens[v].size / ens[v].shape[dims.index("time")]), -1
-            )  # 2E8
-
-        if time_block > len(ens[v].time):
-            out = _calc_percentiles_simple(ens, v, values)
-
+        # Percentile calculation forbids any chunks along realization
+        if len(ens.chunks.get("realization", [])) > 1:
+            if keep_chunk_size is None:
+                # Enable smart rechunking is chunksize exceed 2E8 elements after merging along realization
+                keep_chunk_size = (
+                    np.prod(ens[v].isel(realization=0).data.chunksize)
+                    * ens.realization.size
+                    > 2e8
+                )
+            if keep_chunk_size:
+                # Smart rechunk on dimension where chunks are the largest
+                chkDim, chks = max(
+                    ens.chunks.items(),
+                    key=lambda kv: 0 if kv[0] == "realization" else max(kv[1]),
+                )
+                var = ens[v].chunk(
+                    {"realization": -1, chkDim: len(chks) * ens.realization.size,}
+                )
+            else:
+                var = ens[v].chunk({"realization": -1})
         else:
-            # loop through blocks
-            warnings.warn(
-                f"Large ensemble size detected: statistics will be"
-                f" calculated in blocks of {int(time_block)} time-steps.",
-                UserWarning,
-                stacklevel=2,
+            var = ens[v]
+
+        for p in values:
+            perc = xr.apply_ufunc(
+                _calc_perc,
+                var,
+                input_core_dims=[["realization"]],
+                output_core_dims=[[]],
+                keep_attrs=True,
+                kwargs=dict(p=p),
+                dask="parallelized",
+                output_dtypes=[ens[v].dtype],
             )
-            out = _calc_percentiles_blocks(ens, v, values, time_block)
-        for vv in out.data_vars:
-            ds_out[vv] = out[vv]
+
+            perc.name = f"{v}_p{p:02d}"
+            ds_out[perc.name] = perc
+
+            if "description" in ds_out[perc.name].attrs:
+                ds_out[perc.name].attrs[
+                    "description"
+                ] = f"{ds_out[perc.name].attrs['description']} : {p}th percentile of ensemble"
+            else:
+                ds_out[perc.name].attrs["description"] = f"{p}th percentile of ensemble"
+
     return ds_out
 
 
@@ -341,98 +364,33 @@ def _ens_align_datasets(
     return ds_all
 
 
-def _calc_percentiles_simple(ens, v, values):
-    ds_out = ens.drop_vars(names=set(ens.data_vars))
-    dims = list(ens[v].dims)
-    outdims = [x for x in dims if "realization" not in x]
-
-    # print('loading ensemble data to memory')
-    arr = ens[v].load()  # percentile calc requires loading the array
-    coords = {}
-    for c in outdims:
-        coords[c] = arr[c]
-    for p in values:
-        outvar = v + "_p" + str(p)
-
-        out1 = _calc_perc(arr, p)
-
-        ds_out[outvar] = xr.DataArray(out1, dims=outdims, coords=coords)
-        ds_out[outvar].attrs = ens[v].attrs
-        if "description" in ds_out[outvar].attrs.keys():
-            ds_out[outvar].attrs[
-                "description"
-            ] = f"{ds_out[outvar].attrs['description']} : {p}th percentile of ensemble"
-        else:
-            ds_out[outvar].attrs["description"] = f"{p}th percentile of ensemble"
-    return ds_out
-
-
-def _calc_percentiles_blocks(ens, v, values, time_block):
-    ds_out = ens.drop_vars(names=set(ens.data_vars))
-    dims = list(ens[v].dims)
-    outdims = [x for x in dims if "realization" not in x]
-
-    blocks = list(range(0, len(ens.time) + 1, int(time_block)))
-    if blocks[-1] != len(ens[v].time):
-        blocks.append(len(ens[v].time))
-    arr_p_all = {}
-    for t in range(0, len(blocks) - 1):
-        # print('Calculating block ', t + 1, ' of ', len(blocks) - 1)
-        time_sel = slice(blocks[t], blocks[t + 1])
-        arr = (
-            ens[v].isel(time=time_sel).load()
-        )  # percentile calc requires loading the array
-        coords = {}
-        for c in outdims:
-            coords[c] = arr[c]
-        for p in values:
-
-            out1 = _calc_perc(arr, p)
-
-            if t == 0:
-                arr_p_all[str(p)] = xr.DataArray(out1, dims=outdims, coords=coords)
-            else:
-                arr_p_all[str(p)] = xr.concat(
-                    [
-                        arr_p_all[str(p)],
-                        xr.DataArray(out1, dims=outdims, coords=coords),
-                    ],
-                    dim="time",
-                )
-    for p in values:
-        outvar = v + "_p" + str(p)
-        ds_out[outvar] = arr_p_all[str(p)]
-        ds_out[outvar].attrs = ens[v].attrs
-        if "description" in ds_out[outvar].attrs.keys():
-            ds_out[outvar].attrs[
-                "description"
-            ] = f"{ds_out[outvar].attrs['description']} : {p}th percentile of ensemble"
+def _calc_perc(arr, p=50):
+    """Ufunc-like computing a percentile over the last axis of the array.
 
-        else:
-            ds_out[outvar].attrs["description"] = f"{p}th percentile of ensemble"
+    Processes cases with invalid values separately, which makes it more efficent than np.nanpercentile for array with only a few invalid points.
 
-    return ds_out
-
-
-def _calc_perc(arr, p):
-    dims = arr.dims
-    # make sure realization is the first dimension
-    if dims.index("realization") != 0:
-        arr = arr.transpose(
-            "realization", *[dim for dim in dims if dim != "realization"]
-        )
+    Parameters
+    ----------
+    arr : np.array
+        Percentile is computed over the last axis.
+    p : scalar
+        Percentile to compute, between 0 and 100. (the default is 50)
 
-    nan_count = np.isnan(arr).sum(axis=0)
-    out = np.percentile(arr, p, axis=0)
-    if np.any((nan_count > 0) & (nan_count < arr.shape[0])):
-        arr1 = arr.values.reshape(arr.shape[0], int(arr.size / arr.shape[0]))
-        # only use nanpercentile where we need it (slow performace compared to standard) :
-        nan_index = np.where((nan_count > 0) & (nan_count < arr.shape[0]))
+    Returns
+    -------
+    np.array
+    """
+    nan_count = np.isnan(arr).sum(axis=-1)
+    out = np.percentile(arr, p, axis=-1)
+    nans = (nan_count > 0) & (nan_count < arr.shape[-1])
+    if np.any(nans):
+        arr1 = arr.reshape(int(arr.size / arr.shape[-1]), arr.shape[-1])
+        # only use nanpercentile where we need it (slow performance compared to standard) :
+        nan_index = np.where(nans)
         t = np.ravel_multi_index(nan_index, nan_count.shape)
         out[np.unravel_index(t, nan_count.shape)] = np.nanpercentile(
-            arr1[:, t], p, axis=0
+            arr1[t, :], p, axis=-1
         )
-
     return out
 
 

Optimize/improve  xclim ensemble stats utilities
There are currently functional versions of the following utilities but they could use improvement / polishing:
```python
xclim.utils.utils.create_ensemble()
xclim.utils.ensemble_percentiles()
xclim.utils.calc_percentiles_simple()
xclim.utils.calc_percentiles_blocks()
xclim.utils.calc_perc()
```
**Ideas to explore:**

For ensemble creation :
-  create dimension using IndexVariable  (instead of just a string) and make sure that it has attribute axis='E'. 


**Try to achieve dask enabled percentile calculation (remove 'time_block' method):**

- try DataArray.reduce(np.nanpercentile, dim='realization') - Check performance (nanpercentile seems slow)

- use DataArray.apply(xclim.utils.calc_perc, dim='realization') - 'calc_perc' only applies nanpercentile where needed ... should technically be faster


diff --git a/tests/test_ensembles.py b/tests/test_ensembles.py
index 60f94f58..34aa4aa7 100644
--- a/tests/test_ensembles.py
+++ b/tests/test_ensembles.py
@@ -137,10 +137,13 @@ class TestEnsembleStats:
         out1 = ensembles.ensemble_percentiles(ens, values=(25, 75))
         assert np.all(out1["tg_mean_p75"] > out1["tg_mean_p25"])
 
-    def test_calc_perc_blocks(self):
+    @pytest.mark.parametrize("keep_chunk_size", [False, True, None])
+    def test_calc_perc_dask(self, keep_chunk_size):
         ens = ensembles.create_ensemble(self.nc_files_simple)
-        out1 = ensembles.ensemble_percentiles(ens)
-        out2 = ensembles.ensemble_percentiles(ens, values=(10, 50, 90), time_block=10)
+        out2 = ensembles.ensemble_percentiles(
+            ens.chunk({"time": 2}), values=(10, 50, 90), keep_chunk_size=keep_chunk_size
+        )
+        out1 = ensembles.ensemble_percentiles(ens.load())
         np.testing.assert_array_equal(out1["tg_mean_p10"], out2["tg_mean_p10"])
         np.testing.assert_array_equal(out1["tg_mean_p50"], out2["tg_mean_p50"])
         np.testing.assert_array_equal(out1["tg_mean_p90"], out2["tg_mean_p90"])

pip install -e .[dev]
parse_log_pytest
requirements.txt
pytest pytest-cov
apt-get update apt-get install -y gcc
3.9
requirements_dev.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
attrs==25.3.0
backports.tarfile==1.2.0
bokeh==3.4.3
boltons==25.0.0
Bottleneck==1.3.8
bump2version==1.0.1
cachetools==5.5.2
certifi==2025.1.31
cffi==1.17.1
cfgv==3.4.0
cftime==1.6.4.post1
chardet==5.2.0
charset-normalizer==3.4.1
click==8.1.8
click-plugins==1.1.1
cligj==0.7.2
cloudpickle==3.1.1
colorama==0.4.6
contourpy==1.3.0
coverage==7.8.0
cryptography==44.0.2
dask==2024.8.0
dask-expr==1.1.10
distlib==0.3.9
distributed==2024.8.0
docutils==0.21.2
exceptiongroup==1.2.2
filelock==3.18.0
fiona==1.10.1
flake8==7.2.0
fsspec==2025.3.2
geojson==3.2.0
geopandas==1.0.1
id==1.5.0
identify==2.6.9
idna==3.10
importlib_metadata==8.6.1
iniconfig==2.1.0
jaraco.classes==3.4.0
jaraco.context==6.0.1
jaraco.functools==4.1.0
jeepney==0.9.0
Jinja2==3.1.6
joblib==1.4.2
keyring==25.6.0
locket==1.0.0
lz4==4.4.3
markdown-it-py==3.0.0
MarkupSafe==3.0.2
mccabe==0.7.0
mdurl==0.1.2
more-itertools==10.6.0
msgpack==1.1.0
netCDF4==1.7.2
nh3==0.2.21
nodeenv==1.9.1
numpy==2.0.2
packaging==24.2
pandas==2.2.3
partd==1.4.2
pillow==11.1.0
Pint==0.9
platformdirs==4.3.7
pluggy==1.5.0
pre_commit==4.2.0
psutil==7.0.0
pyarrow==19.0.1
pyarrow-hotfix==0.6
pycodestyle==2.13.0
pycparser==2.22
pyflakes==3.3.2
Pygments==2.19.1
pyogrio==0.10.0
pyproj==3.6.1
pyproject-api==1.9.0
pytest==8.3.5
pytest-cov==6.0.0
pytest-runner==6.0.1
python-dateutil==2.9.0.post0
pytz==2025.2
PyYAML==6.0.2
readme_renderer==44.0
requests==2.32.3
requests-toolbelt==1.0.0
rfc3986==2.0.0
rich==14.0.0
rtree==1.4.0
scikit-learn==1.6.1
scipy==1.13.1
SecretStorage==3.3.3
shapely==2.0.7
six==1.17.0
sortedcontainers==2.4.0
tblib==3.1.0
threadpoolctl==3.6.0
tomli==2.2.1
toolz==1.0.0
tornado==6.4.2
tox==4.25.0
twine==6.1.0
typing_extensions==4.13.0
tzdata==2025.2
urllib3==2.3.0
virtualenv==20.29.3
watchdog==6.0.0
xarray==2024.7.0
-e git+https://github.com/Ouranosinc/xclim.git@0790e8c7cc4b5d933a034f1a6da1cdc1072c2e01#egg=xclim
xyzservices==2025.1.0
zict==3.0.0
zipp==3.21.0

name: xclim
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=3.0.16=h5eee18b_0
  - pip=25.0=py39h06a4308_0
  - python=3.9.21=he870216_1
  - readline=8.2=h5eee18b_0
  - setuptools=75.8.0=py39h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - wheel=0.45.1=py39h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - attrs==25.3.0
      - backports-tarfile==1.2.0
      - bokeh==3.4.3
      - boltons==25.0.0
      - bottleneck==1.3.8
      - bump2version==1.0.1
      - cachetools==5.5.2
      - certifi==2025.1.31
      - cffi==1.17.1
      - cfgv==3.4.0
      - cftime==1.6.4.post1
      - chardet==5.2.0
      - charset-normalizer==3.4.1
      - click==8.1.8
      - click-plugins==1.1.1
      - cligj==0.7.2
      - cloudpickle==3.1.1
      - colorama==0.4.6
      - contourpy==1.3.0
      - coverage==7.8.0
      - cryptography==44.0.2
      - dask==2024.8.0
      - dask-expr==1.1.10
      - distlib==0.3.9
      - distributed==2024.8.0
      - docutils==0.21.2
      - exceptiongroup==1.2.2
      - filelock==3.18.0
      - fiona==1.10.1
      - flake8==7.2.0
      - fsspec==2025.3.2
      - geojson==3.2.0
      - geopandas==1.0.1
      - id==1.5.0
      - identify==2.6.9
      - idna==3.10
      - importlib-metadata==8.6.1
      - iniconfig==2.1.0
      - jaraco-classes==3.4.0
      - jaraco-context==6.0.1
      - jaraco-functools==4.1.0
      - jeepney==0.9.0
      - jinja2==3.1.6
      - joblib==1.4.2
      - keyring==25.6.0
      - locket==1.0.0
      - lz4==4.4.3
      - markdown-it-py==3.0.0
      - markupsafe==3.0.2
      - mccabe==0.7.0
      - mdurl==0.1.2
      - more-itertools==10.6.0
      - msgpack==1.1.0
      - netcdf4==1.7.2
      - nh3==0.2.21
      - nodeenv==1.9.1
      - numpy==2.0.2
      - packaging==24.2
      - pandas==2.2.3
      - partd==1.4.2
      - pillow==11.1.0
      - pint==0.9
      - platformdirs==4.3.7
      - pluggy==1.5.0
      - pre-commit==4.2.0
      - psutil==7.0.0
      - pyarrow==19.0.1
      - pyarrow-hotfix==0.6
      - pycodestyle==2.13.0
      - pycparser==2.22
      - pyflakes==3.3.2
      - pygments==2.19.1
      - pyogrio==0.10.0
      - pyproj==3.6.1
      - pyproject-api==1.9.0
      - pytest==8.3.5
      - pytest-cov==6.0.0
      - pytest-runner==6.0.1
      - python-dateutil==2.9.0.post0
      - pytz==2025.2
      - pyyaml==6.0.2
      - readme-renderer==44.0
      - requests==2.32.3
      - requests-toolbelt==1.0.0
      - rfc3986==2.0.0
      - rich==14.0.0
      - rtree==1.4.0
      - scikit-learn==1.6.1
      - scipy==1.13.1
      - secretstorage==3.3.3
      - shapely==2.0.7
      - six==1.17.0
      - sortedcontainers==2.4.0
      - tblib==3.1.0
      - threadpoolctl==3.6.0
      - tomli==2.2.1
      - toolz==1.0.0
      - tornado==6.4.2
      - tox==4.25.0
      - twine==6.1.0
      - typing-extensions==4.13.0
      - tzdata==2025.2
      - urllib3==2.3.0
      - virtualenv==20.29.3
      - watchdog==6.0.0
      - xarray==2024.7.0
      - xyzservices==2025.1.0
      - zict==3.0.0
      - zipp==3.21.0
prefix: /opt/conda/envs/xclim

tests/test_ensembles.py::TestEnsembleStats::test_calc_perc_dask[False] tests/test_ensembles.py::TestEnsembleStats::test_calc_perc_dask[True] tests/test_ensembles.py::TestEnsembleStats::test_calc_perc_dask[None]
tests/test_ensembles.py::TestEnsembleStats::test_create_unequal_times tests/test_ensembles.py::TestEnsembleReduction::test_kmeans_rsqcutoff tests/test_ensembles.py::TestEnsembleReduction::test_kmeans_rsqopt tests/test_ensembles.py::TestEnsembleReduction::test_kmeans_nclust tests/test_ensembles.py::TestEnsembleReduction::test_kmeans_sampleweights tests/test_ensembles.py::TestEnsembleReduction::test_kmeans_variweights tests/test_ensembles.py::TestEnsembleReduction::test_kmeans_modelweights
tests/test_ensembles.py::TestEnsembleStats::test_checktimes tests/test_ensembles.py::TestEnsembleStats::test_create_ensemble tests/test_ensembles.py::TestEnsembleStats::test_no_time tests/test_ensembles.py::TestEnsembleStats::test_calc_perc[False] tests/test_ensembles.py::TestEnsembleStats::test_calc_perc[True] tests/test_ensembles.py::TestEnsembleStats::test_calc_perc_nans tests/test_ensembles.py::TestEnsembleStats::test_calc_mean_std_min_max
HISTORY.rst xclim/ensembles.py
HISTORY.rst xclim/ensembles.py