diff --git a/HISTORY.rst b/HISTORY.rst
index 1660b080..d6263236 100644
--- a/HISTORY.rst
+++ b/HISTORY.rst
@@ -8,6 +8,8 @@ History
 * CRS definitions of projected DataSets are now written to file according to Climate and Forecast-convention standards
 * Add utilities to merge attributes and update history in xclim.core.formatting
 * Ensembles : Allow alignment of datasets with same frequency but different offsets
+* Bug fixes in run_length for run-with-dates methods when the date is not found in the run.
+* Remove deepcopy from subset.subset_shape to improve memory usage.
 
 0.15.x (2020-03-12)
 -------------------
diff --git a/xclim/indices/_multivariate.py b/xclim/indices/_multivariate.py
index b8014fe0..f861fd08 100644
--- a/xclim/indices/_multivariate.py
+++ b/xclim/indices/_multivariate.py
@@ -107,7 +107,7 @@ def cold_spell_duration_index(
 
     below = tasmin < thresh
 
-    return below.resample(time=freq).apply(
+    return below.resample(time=freq).map(
         rl.windowed_run_count, window=window, dim="time"
     )
 
@@ -565,7 +565,7 @@ def heat_wave_frequency(
 
     cond = (tasmin > thresh_tasmin) & (tasmax > thresh_tasmax)
     group = cond.resample(time=freq)
-    return group.apply(rl.windowed_run_events, window=window, dim="time")
+    return group.map(rl.windowed_run_events, window=window, dim="time")
 
 
 @declare_units(
@@ -636,7 +636,7 @@ def heat_wave_max_length(
 
     cond = (tasmin > thresh_tasmin) & (tasmax > thresh_tasmax)
     group = cond.resample(time=freq)
-    max_l = group.apply(rl.longest_run, dim="time")
+    max_l = group.map(rl.longest_run, dim="time")
     return max_l.where(max_l >= window, 0)
 
 
@@ -691,7 +691,7 @@ def heat_wave_total_length(
 
     cond = (tasmin > thresh_tasmin) & (tasmax > thresh_tasmax)
     group = cond.resample(time=freq)
-    return group.apply(rl.windowed_run_count, args=(window,), dim="time")
+    return group.map(rl.windowed_run_count, args=(window,), dim="time")
 
 
 @declare_units("", pr="[precipitation]", prsn="[precipitation]", tas="[temperature]")
@@ -1374,7 +1374,7 @@ def warm_spell_duration_index(
 
     above = tasmax > thresh
 
-    return above.resample(time=freq).apply(
+    return above.resample(time=freq).map(
         rl.windowed_run_count, window=window, dim="time"
     )
 
diff --git a/xclim/indices/_simple.py b/xclim/indices/_simple.py
index 210e4e42..a0cce9fb 100644
--- a/xclim/indices/_simple.py
+++ b/xclim/indices/_simple.py
@@ -414,7 +414,7 @@ def consecutive_frost_days(tasmin: xarray.DataArray, freq: str = "AS-JUL"):
     if fu != tu:
         frz = units.convert(frz, fu, tu)
     group = (tasmin < frz).resample(time=freq)
-    return group.apply(rl.longest_run, dim="time")
+    return group.map(rl.longest_run, dim="time")
 
 
 @declare_units("days", tasmin="[temperature]")
diff --git a/xclim/indices/_threshold.py b/xclim/indices/_threshold.py
index 2e3b1be6..68e25bb0 100644
--- a/xclim/indices/_threshold.py
+++ b/xclim/indices/_threshold.py
@@ -89,7 +89,7 @@ def cold_spell_days(
     over = tas < t
     group = over.resample(time=freq)
 
-    return group.apply(rl.windowed_run_count, window=window, dim="time")
+    return group.map(rl.windowed_run_count, window=window, dim="time")
 
 
 @declare_units("mm/day", pr="[precipitation]", thresh="[precipitation]")
@@ -223,7 +223,7 @@ def maximum_consecutive_wet_days(
     thresh = convert_units_to(thresh, pr, "hydro")
 
     group = (pr > thresh).resample(time=freq)
-    return group.apply(rl.longest_run, dim="time")
+    return group.map(rl.longest_run, dim="time")
 
 
 @declare_units("C days", tas="[temperature]", thresh="[temperature]")
@@ -458,7 +458,7 @@ def growing_season_length(
     )
 
 
-@declare_units("days", tas="[temperature]", thresh="[temperature]")
+@declare_units("", tas="[temperature]", thresh="[temperature]")
 def last_spring_frost(
     tas: xarray.DataArray,
     thresh: str = "0 degC",
@@ -533,7 +533,7 @@ def heat_wave_index(
     over = tasmax > thresh
     group = over.resample(time=freq)
 
-    return group.apply(rl.windowed_run_count, window=window, dim="time")
+    return group.map(rl.windowed_run_count, window=window, dim="time")
 
 
 @declare_units("C days", tas="[temperature]", thresh="[temperature]")
@@ -628,7 +628,7 @@ def hot_spell_max_length(
 
     cond = tasmax > thresh_tasmax
     group = cond.resample(time=freq)
-    max_l = group.apply(rl.longest_run, dim="time")
+    max_l = group.map(rl.longest_run, dim="time")
     return max_l.where(max_l >= window, 0)
 
 
@@ -686,7 +686,7 @@ def hot_spell_frequency(
 
     cond = tasmax > thresh_tasmax
     group = cond.resample(time=freq)
-    return group.apply(rl.windowed_run_events, window=window, dim="time")
+    return group.map(rl.windowed_run_events, window=window, dim="time")
 
 
 @declare_units("days", tasmin="[temperature]", thresh="[temperature]")
@@ -901,7 +901,7 @@ def maximum_consecutive_dry_days(
     t = convert_units_to(thresh, pr, "hydro")
     group = (pr < t).resample(time=freq)
 
-    return group.apply(rl.longest_run, dim="time")
+    return group.map(rl.longest_run, dim="time")
 
 
 @declare_units("days", tasmin="[temperature]", thresh="[temperature]")
@@ -944,7 +944,7 @@ def maximum_consecutive_frost_free_days(
     t = convert_units_to(thresh, tasmin)
     group = (tasmin > t).resample(time=freq)
 
-    return group.apply(rl.longest_run, dim="time")
+    return group.map(rl.longest_run, dim="time")
 
 
 @declare_units("days", tasmax="[temperature]", thresh="[temperature]")
@@ -987,7 +987,7 @@ def maximum_consecutive_tx_days(
     t = convert_units_to(thresh, tasmax)
     group = (tasmax > t).resample(time=freq)
 
-    return group.apply(rl.longest_run, dim="time")
+    return group.map(rl.longest_run, dim="time")
 
 
 @declare_units("[area]", sic="[]", area="[area]", thresh="[]")
diff --git a/xclim/indices/generic.py b/xclim/indices/generic.py
index 5ec2020c..d16a9173 100644
--- a/xclim/indices/generic.py
+++ b/xclim/indices/generic.py
@@ -69,7 +69,7 @@ def select_resample_op(da: xr.DataArray, op, freq: str = "YS", **indexer):
     if isinstance(op, str):
         return getattr(r, op)(dim="time", keep_attrs=True)
 
-    return r.apply(op)
+    return r.map(op)
 
 
 def doymax(da: xr.DataArray):
diff --git a/xclim/indices/run_length.py b/xclim/indices/run_length.py
index e5c9b55e..3e0866da 100644
--- a/xclim/indices/run_length.py
+++ b/xclim/indices/run_length.py
@@ -248,7 +248,10 @@ def first_run(
         if isinstance(coord, str):
             crd = getattr(crd.dt, coord)
 
-        return lazy_indexing(crd, out)
+        out = lazy_indexing(crd, out)
+
+    if dim in out:
+        out = out.drop_vars(dim)
 
     return out
 
@@ -321,30 +324,20 @@ def run_length_with_date(
     """
     include_date = datetime.strptime(date, "%m-%d").timetuple().tm_yday
 
-    def _crld(rlda, rlwindow, rldoy, rldim):
-        mid_index = np.where(rlda.time.dt.dayofyear == rldoy)[0]
-        if (
-            mid_index.size == 0
-        ):  # The date is not within the group. Happens at boundaries.
-            all_nans = xr.full_like(rlda.isel(time=0), np.nan)
-            all_nans.attrs = {}
-            return all_nans
-        end = first_run(
-            (~rlda).where(rlda.time >= rlda.time[mid_index][0]),
-            window=rlwindow,
-            dim=rldim,
-        )
-        beg = first_run(rlda, window=rlwindow, dim=rldim)
-        sl = end - beg
-        sl = xr.where(
-            beg.isnull() & end.notnull(), 0, sl
-        )  # If series is never triggered
-        sl = xr.where(
-            beg.notnull() & end.isnull(), rlda.time.size - beg, sl
-        )  # If series is not ended by end of resample time frequency
-        return sl.where(sl >= 0)
-
-    return _crld(rlda=da, rlwindow=window, rldoy=include_date, rldim=dim)
+    mid_index = np.where(da.time.dt.dayofyear == include_date)[0]
+    if mid_index.size == 0:  # The date is not within the group. Happens at boundaries.
+        return xr.full_like(da.isel(time=0), np.nan, float).drop_vars("time")
+
+    end = first_run(
+        (~da).where(da.time >= da.time[mid_index][0]), window=window, dim=dim,
+    )
+    beg = first_run(da, window=window, dim=dim)
+    sl = end - beg
+    sl = xr.where(beg.isnull() & end.notnull(), 0, sl)  # If series is never triggered
+    sl = xr.where(
+        beg.notnull() & end.isnull(), da.time.size - beg, sl
+    )  # If series is not ended by end of resample time frequency
+    return sl.where(sl >= 0)
 
 
 def run_end_after_date(
@@ -378,29 +371,21 @@ def run_end_after_date(
     """
     after_date = datetime.strptime(date, "%m-%d").timetuple().tm_yday
 
-    def _cred(rlda, rlwindow, rldoy, rldim, rlcoord):
-        mid_idx = np.where(rlda.time.dt.dayofyear == rldoy)[0]
-        if (
-            mid_idx.size == 0
-        ):  # The date is not within the group. Happens at boundaries.
-            all_nans = xr.full_like(rlda.isel(time=0), np.nan)
-            all_nans.attrs = {}
-            return all_nans
-        end = first_run(
-            (~rlda).where(rlda.time >= rlda.time[mid_idx][0]),
-            window=rlwindow,
-            dim=rldim,
-            coord=rlcoord,
-        )
-        beg = first_run(
-            rlda.where(rlda.time < rlda.time[mid_idx][0]), window=rlwindow, dim=rldim,
-        )
-        end = xr.where(
-            end.isnull() & beg.notnull(), rlda.time.isel(time=-1).dt.dayofyear, end
-        )
-        return end.where(beg.notnull())
-
-    return _cred(rlda=da, rlwindow=window, rldoy=after_date, rldim=dim, rlcoord=coord)
+    mid_idx = np.where(da.time.dt.dayofyear == after_date)[0]
+    if mid_idx.size == 0:  # The date is not within the group. Happens at boundaries.
+        return xr.full_like(da.isel(time=0), np.nan, float).drop_vars("time")
+
+    end = first_run(
+        (~da).where(da.time >= da.time[mid_idx][0]),
+        window=window,
+        dim=dim,
+        coord=coord,
+    )
+    beg = first_run(da.where(da.time < da.time[mid_idx][0]), window=window, dim=dim)
+    end = xr.where(
+        end.isnull() & beg.notnull(), da.time.isel(time=-1).dt.dayofyear, end
+    )
+    return end.where(beg.notnull())
 
 
 def last_run_before_date(
@@ -434,20 +419,12 @@ def last_run_before_date(
     """
     before_date = datetime.strptime(date, "%m-%d").timetuple().tm_yday
 
-    def _clrbd(rlda, rlwindow, rlbefore_date, rldim, rlcoord):
-        mid_idx = np.where(rlda.time.dt.dayofyear == rlbefore_date)[0]
-        if (
-            mid_idx.size == 0
-        ):  # The date is not within the group. Happens at boundaries.
-            all_nans = xr.full_like(rlda.isel(time=0), np.nan)
-            all_nans.attrs = dict()
-            return all_nans
-        run = rlda.where(rlda.time <= rlda.time[mid_idx][0])
-        return last_run(run, window=rlwindow, dim=rldim, coord=rlcoord)
-
-    return _clrbd(
-        rlda=da, rlwindow=window, rlbefore_date=before_date, rldim=dim, rlcoord=coord
-    )
+    mid_idx = np.where(da.time.dt.dayofyear == before_date)[0]
+    if mid_idx.size == 0:  # The date is not within the group. Happens at boundaries.
+        return xr.full_like(da.isel(time=0), np.nan, float).drop_vars("time")
+
+    run = da.where(da.time <= da.time[mid_idx][0])
+    return last_run(run, window=window, dim=dim, coord=coord)
 
 
 def rle_1d(
diff --git a/xclim/subset.py b/xclim/subset.py
index 778876c5..c83e4a31 100644
--- a/xclim/subset.py
+++ b/xclim/subset.py
@@ -1,4 +1,3 @@
-import copy
 import logging
 import warnings
 from functools import wraps
@@ -458,11 +457,10 @@ def subset_shape(
     """
     wgs84 = CRS("+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs")
 
-    # TODO : edge case using polygon splitting decorator touches original ds when subsetting?
     if isinstance(ds, xarray.DataArray):
-        ds_copy = copy.deepcopy(ds._to_temp_dataset())
+        ds_copy = ds._to_temp_dataset()
     else:
-        ds_copy = copy.deepcopy(ds)
+        ds_copy = ds.copy()
 
     if isinstance(shape, gpd.GeoDataFrame):
         poly = shape.copy()

`subset_shape` with large input data
* xclim version: 0.15.0
* Python version: 3.8
* Operating System: ubuntu

### Description

Calling the `subset_shape` function on a large input dataset crashes when the dataset doesn't fit in memory. Not with a large polygon subset, but a large source dataset. So I want to subset a small portion of a large file.


### What I Did

I was using xclim through finch, the source data is the daily bccaqv2 datasets. 

### What I Received

```
finch         | INFO:PYWPS:Subsetting file 1 of 48 
finch         | Traceback (most recent call last):
finch         |   File "/opt/conda/envs/finch/lib/python3.8/site-packages/pywps/app/Process.py", line 243, in _run_process
finch         |     self.handler(wps_request, wps_response)  # the user must update the wps_response.
finch         |   File "/code/finch/processes/wps_base.py", line 36, in _handler_wrapper
finch         |     return self.wrapped_handler(request, response)
finch         |   File "/code/finch/processes/wps_ensemble_indices_polygon.py", line 74, in _handler
finch         |     return ensemble_common_handler(self, request, response, finch_subset_shape)
finch         |   File "/code/finch/processes/ensemble_utils.py", line 528, in ensemble_common_handler
finch         |     subsetted_files = subset_function(
finch         |   File "/code/finch/processes/subset.py", line 234, in finch_subset_shape
finch         |     process_threaded(_subset, netcdf_inputs)
finch         |   File "/code/finch/processes/utils.py", line 274, in process_threaded
finch         |     outputs = [function(r) for r in inputs]
finch         |   File "/code/finch/processes/utils.py", line 274, in <listcomp>
finch         |     outputs = [function(r) for r in inputs]
finch         |   File "/code/finch/processes/subset.py", line 219, in _subset
finch         |     subsetted = subset_shape(
finch         |   File "/opt/conda/envs/finch/lib/python3.8/site-packages/xclim/subset.py", line 208, in func_checker
finch         |     final = func(*formatted_args, **kwargs)
finch         |   File "/opt/conda/envs/finch/lib/python3.8/site-packages/xclim/subset.py", line 465, in subset_shape
finch         |     ds_copy = copy.deepcopy(ds)
finch         |   File "/opt/conda/envs/finch/lib/python3.8/copy.py", line 153, in deepcopy
finch         |     y = copier(memo)
finch         |   File "/opt/conda/envs/finch/lib/python3.8/site-packages/xarray/core/dataset.py", line 1181, in __deepcopy__
finch         |     return self.copy(deep=True)
finch         |   File "/opt/conda/envs/finch/lib/python3.8/site-packages/xarray/core/dataset.py", line 1073, in copy
finch         |     variables = {k: v.copy(deep=deep) for k, v in self._variables.items()}
finch         |   File "/opt/conda/envs/finch/lib/python3.8/site-packages/xarray/core/dataset.py", line 1073, in <dictcomp>
finch         |     variables = {k: v.copy(deep=deep) for k, v in self._variables.items()}
finch         |   File "/opt/conda/envs/finch/lib/python3.8/site-packages/xarray/core/variable.py", line 885, in copy
finch         |     data = np.array(data)
finch         |   File "/opt/conda/envs/finch/lib/python3.8/site-packages/xarray/core/indexing.py", line 677, in __array__
finch         |     self._ensure_cached()
finch         |   File "/opt/conda/envs/finch/lib/python3.8/site-packages/xarray/core/indexing.py", line 674, in _ensure_cached
finch         |     self.array = NumpyIndexingAdapter(np.asarray(self.array))
finch         |   File "/opt/conda/envs/finch/lib/python3.8/site-packages/numpy/core/_asarray.py", line 85, in asarray
finch         |     return array(a, dtype, copy=False, order=order)
finch         |   File "/opt/conda/envs/finch/lib/python3.8/site-packages/xarray/core/indexing.py", line 653, in __array__
finch         |     return np.asarray(self.array, dtype=dtype)
finch         |   File "/opt/conda/envs/finch/lib/python3.8/site-packages/numpy/core/_asarray.py", line 85, in asarray
finch         |     return array(a, dtype, copy=False, order=order)
finch         |   File "/opt/conda/envs/finch/lib/python3.8/site-packages/xarray/core/indexing.py", line 557, in __array__
finch         |     return np.asarray(array[self.key], dtype=None)
finch         |   File "/opt/conda/envs/finch/lib/python3.8/site-packages/numpy/core/_asarray.py", line 85, in asarray
finch         |     return array(a, dtype, copy=False, order=order)
finch         |   File "/opt/conda/envs/finch/lib/python3.8/site-packages/xarray/coding/variables.py", line 72, in __array__
finch         |     return self.func(self.array)
finch         |   File "/opt/conda/envs/finch/lib/python3.8/site-packages/xarray/coding/variables.py", line 218, in _scale_offset_decoding
finch         |     data = np.array(data, dtype=dtype, copy=True)
finch         |   File "/opt/conda/envs/finch/lib/python3.8/site-packages/xarray/coding/variables.py", line 72, in __array__
finch         |     return self.func(self.array)
finch         |   File "/opt/conda/envs/finch/lib/python3.8/site-packages/xarray/coding/variables.py", line 138, in _apply_mask
finch         |     data = np.asarray(data, dtype=dtype)
finch         |   File "/opt/conda/envs/finch/lib/python3.8/site-packages/numpy/core/_asarray.py", line 85, in asarray
finch         |     return array(a, dtype, copy=False, order=order)
finch         |   File "/opt/conda/envs/finch/lib/python3.8/site-packages/xarray/core/indexing.py", line 557, in __array__
finch         |     return np.asarray(array[self.key], dtype=None)
finch         |   File "/opt/conda/envs/finch/lib/python3.8/site-packages/xarray/backends/netCDF4_.py", line 72, in __getitem__
finch         |     return indexing.explicit_indexing_adapter(
finch         |   File "/opt/conda/envs/finch/lib/python3.8/site-packages/xarray/core/indexing.py", line 837, in explicit_indexing_adapter
finch         |     result = raw_indexing_method(raw_key.tuple)
finch         |   File "/opt/conda/envs/finch/lib/python3.8/site-packages/xarray/backends/netCDF4_.py", line 85, in _getitem
finch         |     array = getitem(original_array, key)
finch         |   File "netCDF4/_netCDF4.pyx", line 4389, in netCDF4._netCDF4.Variable.__getitem__
finch         | MemoryError: Unable to allocate 55.9 GiB for an array with shape (1068, 510, 55115) and data type int16
```

diff --git a/tests/test_run_length.py b/tests/test_run_length.py
index 072f5052..53342644 100644
--- a/tests/test_run_length.py
+++ b/tests/test_run_length.py
@@ -37,15 +37,15 @@ class TestLongestRun:
         )
         values[1:11] = 1
         da = xr.DataArray(values != 0, coords={"time": time}, dims="time")
-        lt = da.resample(time="M").apply(rl.longest_run_ufunc)
+        lt = da.resample(time="M").map(rl.longest_run_ufunc)
         assert lt[0] == 10
         np.testing.assert_array_equal(lt[1:], 0)
 
         # n-dim version versus ufunc
         da3d = xr.open_dataset(self.nc_pr).pr[:, 40:50, 50:68] != 0
-        lt_orig = da3d.resample(time="M").apply(rl.longest_run_ufunc)
+        lt_orig = da3d.resample(time="M").map(rl.longest_run_ufunc)
         # override 'auto' usage of ufunc for small number of gridpoints
-        lt_Ndim = da3d.resample(time="M").apply(
+        lt_Ndim = da3d.resample(time="M").map(
             rl.longest_run, dim="time", ufunc_1dim=False
         )
         np.testing.assert_array_equal(lt_orig, lt_Ndim)
@@ -57,7 +57,7 @@ class TestLongestRun:
         )
         values[0:10] = 1
         da = xr.DataArray(values != 0, coords={"time": time}, dims="time")
-        lt = da.resample(time="M").apply(rl.longest_run_ufunc)
+        lt = da.resample(time="M").map(rl.longest_run_ufunc)
         assert lt[0] == 10
         np.testing.assert_array_equal(lt[1:], 0)
 
@@ -65,9 +65,9 @@ class TestLongestRun:
         da3d = xr.open_dataset(self.nc_pr).pr[:, 40:50, 50:68] * 0
         da3d[0:10,] = da3d[0:10,] + 1
         da3d = da3d == 1
-        lt_orig = da3d.resample(time="M").apply(rl.longest_run_ufunc)
+        lt_orig = da3d.resample(time="M").map(rl.longest_run_ufunc)
         # override 'auto' usage of ufunc for small number of gridpoints
-        lt_Ndim = da3d.resample(time="M").apply(
+        lt_Ndim = da3d.resample(time="M").map(
             rl.longest_run, dim="time", ufunc_1dim=False
         )  # override 'auto' for small
         np.testing.assert_array_equal(lt_orig, lt_Ndim)
@@ -80,7 +80,7 @@ class TestLongestRun:
         values[-10:] = 1
         da = xr.DataArray(values != 0, coords={"time": time}, dims="time")
 
-        lt = da.resample(time="M").apply(rl.longest_run_ufunc)
+        lt = da.resample(time="M").map(rl.longest_run_ufunc)
         assert lt[-1] == 10
         np.testing.assert_array_equal(lt[:-1], 0)
 
@@ -88,8 +88,8 @@ class TestLongestRun:
         da3d = xr.open_dataset(self.nc_pr).pr[:, 40:50, 50:68] * 0
         da3d[-10:,] = da3d[-10:,] + 1
         da3d = da3d == 1
-        lt_orig = da3d.resample(time="M").apply(rl.longest_run_ufunc)
-        lt_Ndim = da3d.resample(time="M").apply(
+        lt_orig = da3d.resample(time="M").map(rl.longest_run_ufunc)
+        lt_Ndim = da3d.resample(time="M").map(
             rl.longest_run, dim="time", ufunc_1dim=False
         )
         np.testing.assert_array_equal(lt_orig, lt_Ndim)
@@ -101,14 +101,14 @@ class TestLongestRun:
         )
         da = xr.DataArray(values != 0, coords={"time": time}, dims="time")
 
-        lt = da.resample(time="M").apply(rl.longest_run_ufunc)
+        lt = da.resample(time="M").map(rl.longest_run_ufunc)
         np.testing.assert_array_equal(lt, da.resample(time="M").count(dim="time"))
 
         # n-dim version versus ufunc
         da3d = xr.open_dataset(self.nc_pr).pr[:, 40:50, 50:68] * 0 + 1
         da3d = da3d == 1
-        lt_orig = da3d.resample(time="M").apply(rl.longest_run_ufunc)
-        lt_Ndim = da3d.resample(time="M").apply(
+        lt_orig = da3d.resample(time="M").map(rl.longest_run_ufunc)
+        lt_Ndim = da3d.resample(time="M").map(
             rl.longest_run, dim="time", ufunc_1dim=False
         )
         np.testing.assert_array_equal(lt_orig, lt_Ndim)
@@ -121,7 +121,7 @@ class TestLongestRun:
         )
         da = xr.DataArray(values != 0, coords={"time": time}, dims="time")
 
-        lt = da.resample(time="M").apply(rl.longest_run_ufunc)
+        lt = da.resample(time="M").map(rl.longest_run_ufunc)
         n = da.resample(time="M").count(dim="time")
         np.testing.assert_array_equal(lt[0], n[0])
         np.testing.assert_array_equal(lt[1], 26)
@@ -130,8 +130,8 @@ class TestLongestRun:
         da3d = xr.open_dataset(self.nc_pr).pr[:, 40:50, 50:68] * 0 + 1
         da3d[35,] = da3d[35,] + 1
         da3d = da3d == 1
-        lt_orig = da3d.resample(time="M").apply(rl.longest_run_ufunc)
-        lt_Ndim = da3d.resample(time="M").apply(
+        lt_orig = da3d.resample(time="M").map(rl.longest_run_ufunc)
+        lt_Ndim = da3d.resample(time="M").map(
             rl.longest_run, dim="time", ufunc_1dim=False
         )
         np.testing.assert_array_equal(lt_orig, lt_Ndim)
@@ -186,8 +186,8 @@ class TestWindowedRunEvents:
 
         # n-dim version versus ufunc
         da3d = xr.open_dataset(self.nc_pr).pr[:, 40:50, 50:68] != 0
-        lt_orig = da3d.resample(time="M").apply(rl.windowed_run_events_ufunc, window=4)
-        lt_Ndim = da3d.resample(time="M").apply(
+        lt_orig = da3d.resample(time="M").map(rl.windowed_run_events_ufunc, window=4)
+        lt_Ndim = da3d.resample(time="M").map(
             rl.windowed_run_events, window=4, dim="time", ufunc_1dim=False
         )
         np.testing.assert_array_equal(lt_orig, lt_Ndim)
@@ -204,8 +204,8 @@ class TestWindowedRunCount:
 
         # n-dim version versus ufunc
         da3d = xr.open_dataset(self.nc_pr).pr[:, 40:50, 50:68] != 0
-        lt_orig = da3d.resample(time="M").apply(rl.windowed_run_count_ufunc, window=4)
-        lt_Ndim = da3d.resample(time="M").apply(
+        lt_orig = da3d.resample(time="M").map(rl.windowed_run_count_ufunc, window=4)
+        lt_Ndim = da3d.resample(time="M").map(
             rl.windowed_run_count, window=4, dim="time", ufunc_1dim=False
         )
         np.testing.assert_array_equal(lt_orig, lt_Ndim)
@@ -305,3 +305,20 @@ class TestRunsWithDates:
             runs, window=1, date=date, dim="time", coord=coord
         )
         np.testing.assert_array_equal(np.mean(out.load()), expected)
+
+    @pytest.mark.parametrize(
+        "func",
+        [rl.last_run_before_date, rl.run_end_after_date, rl.run_length_with_date],
+    )
+    @pytest.mark.parametrize("use_dask", [True, False])
+    def test_run_with_dates_no_date(self, tas_series, use_dask, func):
+        t = np.ones(90)
+        tas = tas_series(t, start="2000-01-01")
+        runs = xr.concat((tas, tas), dim="dim0")
+        runs = runs == 1
+
+        if use_dask:
+            runs = runs.chunk({"time": 10, "dim0": 1})
+
+        out = runs.resample(time="MS").map(func, window=1, date="07-01", dim="time")
+        assert out.isnull().all()

environment.yml
pip install -e .[dev]
parse_log_pytest
environment.yml
pytest pytest-cov pytest
apt-get update apt-get install -y gcc libspatialindex-dev
3.7
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
attrs @ file:///home/conda/feedstock_root/build_artifacts/attrs_1722977137225/work
bleach==6.0.0
bokeh @ file:///home/conda/feedstock_root/build_artifacts/bokeh_1660586590972/work
boltons @ file:///home/conda/feedstock_root/build_artifacts/boltons_1711936407380/work
Bottleneck @ file:///home/conda/feedstock_root/build_artifacts/bottleneck_1649629660965/work
branca @ file:///home/conda/feedstock_root/build_artifacts/branca_1714071803448/work
Brotli @ file:///home/conda/feedstock_root/build_artifacts/brotli-split_1648883617327/work
bump2version==1.0.1
certifi @ file:///home/conda/feedstock_root/build_artifacts/certifi_1725278078093/work/certifi
cffi==1.15.1
cfgv==3.3.1
cftime @ file:///home/conda/feedstock_root/build_artifacts/cftime_1649636858592/work
charset-normalizer @ file:///home/conda/feedstock_root/build_artifacts/charset-normalizer_1728479282467/work
click @ file:///home/conda/feedstock_root/build_artifacts/click_1651215140632/work
click-plugins==1.1.1
cligj @ file:///home/conda/feedstock_root/build_artifacts/cligj_1633637764473/work
cloudpickle @ file:///home/conda/feedstock_root/build_artifacts/cloudpickle_1674202310934/work
coverage==7.2.7
cryptography==44.0.2
cycler @ file:///home/conda/feedstock_root/build_artifacts/cycler_1635519461629/work
cytoolz==0.11.2
dask==2021.10.0
distlib==0.3.9
distributed @ file:///tmp/build/80754af9/distributed_1635968201545/work
docutils==0.20.1
exceptiongroup==1.2.2
filelock==3.12.2
Fiona==1.8.20
flake8==5.0.4
folium @ file:///home/conda/feedstock_root/build_artifacts/folium_1709209270269/work
fonttools @ file:///home/conda/feedstock_root/build_artifacts/fonttools_1651017735934/work
fsspec @ file:///home/conda/feedstock_root/build_artifacts/fsspec_1674184942191/work
GDAL==3.3.2
geojson @ file:///home/conda/feedstock_root/build_artifacts/geojson_1699269511365/work
geopandas @ file:///home/conda/feedstock_root/build_artifacts/geopandas_1638382567988/work
HeapDict @ file:///home/conda/feedstock_root/build_artifacts/heapdict_1722613793866/work
identify==2.5.24
idna @ file:///home/conda/feedstock_root/build_artifacts/idna_1726459485162/work
importlib-metadata==4.2.0
iniconfig==2.0.0
jaraco.classes==3.2.3
jeepney==0.9.0
Jinja2 @ file:///home/conda/feedstock_root/build_artifacts/jinja2_1715127149914/work
joblib @ file:///home/conda/feedstock_root/build_artifacts/joblib_1691577114857/work
keyring==23.9.3
kiwisolver @ file:///home/conda/feedstock_root/build_artifacts/kiwisolver_1648854392523/work
llvmlite==0.38.0
locket @ file:///home/conda/feedstock_root/build_artifacts/locket_1650660393415/work
mapclassify @ file:///home/conda/feedstock_root/build_artifacts/mapclassify_1673861555770/work
markdown-it-py==2.2.0
MarkupSafe @ file:///home/conda/feedstock_root/build_artifacts/markupsafe_1648737551960/work
matplotlib @ file:///home/conda/feedstock_root/build_artifacts/matplotlib-suite_1651609498426/work
mccabe==0.7.0
mdurl==0.1.2
more-itertools==9.1.0
msgpack @ file:///home/conda/feedstock_root/build_artifacts/msgpack-python_1648745991116/work
munch==2.5.0
munkres==1.1.4
netCDF4 @ file:///home/conda/feedstock_root/build_artifacts/netcdf4_1636302995763/work
networkx @ file:///home/conda/feedstock_root/build_artifacts/networkx_1646092782768/work
nodeenv==1.9.1
numba @ file:///home/conda/feedstock_root/build_artifacts/numba_1652226558760/work
numexpr @ file:///home/conda/feedstock_root/build_artifacts/numexpr_1649636747170/work
numpy @ file:///home/conda/feedstock_root/build_artifacts/numpy_1649806299270/work
olefile @ file:///home/conda/feedstock_root/build_artifacts/olefile_1701735466804/work
packaging @ file:///home/conda/feedstock_root/build_artifacts/packaging_1696202382185/work
pandas==1.3.5
partd @ file:///home/conda/feedstock_root/build_artifacts/partd_1695667515973/work
Pillow @ file:///home/conda/feedstock_root/build_artifacts/pillow_1630696604087/work
Pint @ file:///home/conda/feedstock_root/build_artifacts/pint_1635280347517/work
pkginfo==1.10.0
platformdirs==2.6.2
pluggy==1.2.0
pre-commit==2.21.0
psutil @ file:///home/conda/feedstock_root/build_artifacts/psutil_1653089169272/work
py==1.11.0
pycodestyle==2.9.1
pycparser==2.21
pyflakes==2.5.0
Pygments==2.17.2
pyparsing @ file:///home/conda/feedstock_root/build_artifacts/pyparsing_1724616129934/work
pyproj @ file:///home/conda/feedstock_root/build_artifacts/pyproj_1650061576675/work
PySocks @ file:///home/conda/feedstock_root/build_artifacts/pysocks_1648857264451/work
pytest==7.4.4
pytest-cov==4.1.0
pytest-runner==6.0.1
python-dateutil @ file:///home/conda/feedstock_root/build_artifacts/python-dateutil_1709299778482/work
pytz @ file:///home/conda/feedstock_root/build_artifacts/pytz_1726055524169/work
PyYAML @ file:///home/conda/feedstock_root/build_artifacts/pyyaml_1648757092905/work
readme-renderer==37.3
requests @ file:///home/conda/feedstock_root/build_artifacts/requests_1716354486713/work
requests-toolbelt==1.0.0
rfc3986==2.0.0
rich==13.8.1
Rtree @ file:///home/conda/feedstock_root/build_artifacts/rtree_1665582585745/work
scikit-learn @ file:///home/conda/feedstock_root/build_artifacts/scikit-learn_1640464152916/work
scipy @ file:///home/conda/feedstock_root/build_artifacts/scipy_1637806658031/work
SecretStorage==3.3.3
Shapely @ file:///home/conda/feedstock_root/build_artifacts/shapely_1635194349843/work
six @ file:///home/conda/feedstock_root/build_artifacts/six_1620240208055/work
sortedcontainers @ file:///home/conda/feedstock_root/build_artifacts/sortedcontainers_1621217038088/work
tblib @ file:///home/conda/feedstock_root/build_artifacts/tblib_1702066284995/work
threadpoolctl @ file:///home/conda/feedstock_root/build_artifacts/threadpoolctl_1643647933166/work
tomli==2.0.1
toolz @ file:///home/conda/feedstock_root/build_artifacts/toolz_1706112571092/work
tornado @ file:///home/conda/feedstock_root/build_artifacts/tornado_1648827244717/work
tox==3.28.0
twine==4.0.2
typing_extensions @ file:///home/conda/feedstock_root/build_artifacts/typing_extensions_1688315532570/work
unicodedata2 @ file:///home/conda/feedstock_root/build_artifacts/unicodedata2_1649111917568/work
urllib3 @ file:///home/conda/feedstock_root/build_artifacts/urllib3_1708239446578/work
virtualenv==20.16.2
watchdog==3.0.0
webencodings==0.5.1
xarray @ file:///home/conda/feedstock_root/build_artifacts/xarray_1639125986756/work
-e git+https://github.com/Ouranosinc/xclim.git@e940cdb3cfa9bf5b0284067673e99e9f9f02530d#egg=xclim
xyzservices @ file:///home/conda/feedstock_root/build_artifacts/xyzservices_1684539629266/work
zict @ file:///home/conda/feedstock_root/build_artifacts/zict_1651156074437/work
zipp @ file:///home/conda/feedstock_root/build_artifacts/zipp_1677313463193/work

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
  - attrs=24.2.0=pyh71513ae_0
  - bokeh=2.4.3=pyhd8ed1ab_3
  - boltons=24.0.0=pyhd8ed1ab_0
  - boost-cpp=1.74.0=h312852a_4
  - bottleneck=1.3.4=py37hda87dfa_1
  - branca=0.7.2=pyhd8ed1ab_0
  - brotli=1.0.9=h166bdaf_7
  - brotli-bin=1.0.9=h166bdaf_7
  - brotli-python=1.0.9=py37hd23a5d3_7
  - bzip2=1.0.8=h7f98852_4
  - c-ares=1.18.1=h7f98852_0
  - ca-certificates=2025.2.25=h06a4308_0
  - cairo=1.16.0=h6cf1ce9_1008
  - certifi=2024.8.30=pyhd8ed1ab_0
  - cfitsio=3.470=hb418390_7
  - cftime=1.6.0=py37hda87dfa_1
  - charset-normalizer=3.4.0=pyhd8ed1ab_0
  - click=8.1.3=py37h89c1867_0
  - click-plugins=1.1.1=py_0
  - cligj=0.7.2=pyhd8ed1ab_1
  - cloudpickle=2.2.1=pyhd8ed1ab_0
  - curl=7.79.1=h2574ce0_1
  - cycler=0.11.0=pyhd8ed1ab_0
  - cytoolz=0.11.2=py37h540881e_2
  - dask=2021.10.0=pyhd8ed1ab_0
  - dask-core=2021.10.0=pyhd3eb1b0_0
  - distributed=2021.10.0=py37h06a4308_0
  - expat=2.4.8=h27087fc_0
  - fiona=1.8.20=py37hb7e2723_2
  - folium=0.16.0=pyhd8ed1ab_0
  - font-ttf-dejavu-sans-mono=2.37=hab24e00_0
  - font-ttf-inconsolata=3.000=h77eed37_0
  - font-ttf-source-code-pro=2.038=h77eed37_0
  - font-ttf-ubuntu=0.83=h77eed37_3
  - fontconfig=2.14.0=h8e229c2_0
  - fonts-conda-ecosystem=1=0
  - fonts-conda-forge=1=0
  - fonttools=4.33.3=py37h540881e_0
  - freetype=2.10.4=h0708190_1
  - freexl=1.0.6=h7f98852_0
  - fsspec=2023.1.0=pyhd8ed1ab_0
  - gdal=3.3.2=py37hd5a0ba4_2
  - geojson=3.1.0=pyhd8ed1ab_0
  - geopandas=0.10.2=pyhd8ed1ab_1
  - geopandas-base=0.10.2=pyha770c72_1
  - geos=3.9.1=h9c3ff4c_2
  - geotiff=1.7.0=h4f31c25_0
  - gettext=0.19.8.1=h73d1719_1008
  - giflib=5.2.1=h36c2ea0_2
  - hdf4=4.2.15=h10796ff_3
  - hdf5=1.12.1=nompi_h2750804_100
  - heapdict=1.0.1=pyhd8ed1ab_1
  - icu=68.2=h9c3ff4c_0
  - idna=3.10=pyhd8ed1ab_0
  - importlib_metadata=4.11.4=hd8ed1ab_0
  - jbig=2.1=h7f98852_2003
  - jinja2=3.1.4=pyhd8ed1ab_0
  - joblib=1.3.2=pyhd8ed1ab_0
  - jpeg=9e=h166bdaf_1
  - json-c=0.15=h98cffda_0
  - kealib=1.4.14=h87e4c3c_3
  - keyutils=1.6.1=h166bdaf_0
  - kiwisolver=1.4.2=py37h7cecad7_1
  - krb5=1.19.3=h3790be6_0
  - lcms2=2.12=hddcbb42_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - lerc=2.2.1=h9c3ff4c_0
  - libblas=3.9.0=16_linux64_openblas
  - libbrotlicommon=1.0.9=h166bdaf_7
  - libbrotlidec=1.0.9=h166bdaf_7
  - libbrotlienc=1.0.9=h166bdaf_7
  - libcblas=3.9.0=16_linux64_openblas
  - libcurl=7.79.1=h2574ce0_1
  - libdap4=3.20.6=hd7c4107_2
  - libdeflate=1.7=h7f98852_5
  - libedit=3.1.20191231=he28a2e2_2
  - libev=4.33=h516909a_1
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgdal=3.3.2=hd2dd7ad_2
  - libgfortran-ng=13.2.0=h69a702a_0
  - libgfortran5=13.2.0=ha4646dd_0
  - libglib=2.68.4=h174f98d_1
  - libgomp=11.2.0=h1234567_1
  - libiconv=1.17=h166bdaf_0
  - libkml=1.3.0=h238a007_1014
  - liblapack=3.9.0=16_linux64_openblas
  - libllvm11=11.1.0=hf817b99_2
  - libnetcdf=4.8.1=nompi_hb3fd0d9_101
  - libnghttp2=1.43.0=h812cca2_1
  - libnsl=2.0.0=h7f98852_0
  - libopenblas=0.3.21=h043d6bf_0
  - libpng=1.6.37=h21135ba_2
  - libpq=13.3=hd57d9b9_0
  - librttopo=1.1.0=h1185371_6
  - libspatialindex=1.9.3=h9c3ff4c_4
  - libspatialite=5.0.1=h8694cbe_6
  - libssh2=1.10.0=ha56f1ee_2
  - libstdcxx-ng=11.2.0=h1234567_1
  - libtiff=4.3.0=hf544144_1
  - libuuid=2.32.1=h7f98852_1000
  - libwebp-base=1.2.2=h7f98852_1
  - libxcb=1.13=h7f98852_1004
  - libxml2=2.9.12=h72842e0_0
  - libzip=1.8.0=h4de3113_1
  - llvmlite=0.38.0=py37h4ff587b_0
  - locket=1.0.0=pyhd8ed1ab_0
  - lz4-c=1.9.3=h9c3ff4c_1
  - mapclassify=2.5.0=pyhd8ed1ab_1
  - markupsafe=2.1.1=py37h540881e_1
  - matplotlib-base=3.5.2=py37hc347a89_0
  - msgpack-python=1.0.3=py37h7cecad7_1
  - munch=2.5.0=py_0
  - munkres=1.1.4=pyh9f0ad1d_0
  - ncurses=6.4=h6a678d5_0
  - netcdf4=1.5.8=nompi_py37hf784469_101
  - networkx=2.7=pyhd8ed1ab_0
  - nomkl=1.0=h5ca1d4c_0
  - nspr=4.32=h9c3ff4c_1
  - nss=3.69=hb5efdd6_1
  - numba=0.55.1=py37h43839f2_1
  - numexpr=2.8.0=py37h85a3170_102
  - numpy=1.21.6=py37h976b520_0
  - olefile=0.47=pyhd8ed1ab_0
  - openjpeg=2.4.0=hb52868f_1
  - openssl=1.1.1w=h7f8727e_0
  - packaging=23.2=pyhd8ed1ab_0
  - pandas=1.3.5=py37h8c16a72_0
  - partd=1.4.1=pyhd8ed1ab_0
  - pcre=8.45=h9c3ff4c_0
  - pillow=8.3.2=py37h0f21c89_0
  - pint=0.18=pyhd8ed1ab_0
  - pip=22.3.1=py37h06a4308_0
  - pixman=0.40.0=h36c2ea0_0
  - poppler=21.09.0=ha39eefc_3
  - poppler-data=0.4.12=hd8ed1ab_0
  - postgresql=13.3=h2510834_0
  - proj=8.0.1=h277dcde_0
  - psutil=5.9.1=py37h540881e_0
  - pthread-stubs=0.4=h36c2ea0_1001
  - pyparsing=3.1.4=pyhd8ed1ab_0
  - pyproj=3.2.1=py37hcc46e62_6
  - pysocks=1.7.1=py37h89c1867_5
  - python=3.7.16=h7a1cb2a_0
  - python-dateutil=2.9.0=pyhd8ed1ab_0
  - python_abi=3.7=2_cp37m
  - pytz=2024.2=pyhd8ed1ab_0
  - pyyaml=6.0=py37h540881e_4
  - readline=8.2=h5eee18b_0
  - requests=2.32.2=pyhd8ed1ab_0
  - rtree=1.0.1=py37h0b55af0_0
  - scikit-learn=1.0.2=py37hf9e9bfc_0
  - scipy=1.7.3=py37hf2a6cf1_0
  - setuptools=65.6.3=py37h06a4308_0
  - shapely=1.8.0=py37h48c49eb_0
  - six=1.16.0=pyh6c4a22f_0
  - sortedcontainers=2.4.0=pyhd8ed1ab_0
  - sqlite=3.45.3=h5eee18b_0
  - tblib=3.0.0=pyhd8ed1ab_0
  - threadpoolctl=3.1.0=pyh8a188c0_0
  - tiledb=2.3.4=he87e0bf_0
  - tk=8.6.14=h39e8969_0
  - toolz=0.12.1=pyhd8ed1ab_0
  - tornado=6.1=py37h540881e_3
  - typing-extensions=4.7.1=hd8ed1ab_0
  - typing_extensions=4.7.1=pyha770c72_0
  - tzcode=2022a=h166bdaf_0
  - tzdata=2025b=h78e105d_0
  - unicodedata2=14.0.0=py37h540881e_1
  - urllib3=2.2.1=pyhd8ed1ab_0
  - wheel=0.38.4=py37h06a4308_0
  - xarray=0.20.2=pyhd8ed1ab_0
  - xerces-c=3.2.3=h9d8b166_3
  - xorg-kbproto=1.0.7=h7f98852_1002
  - xorg-libice=1.0.10=h7f98852_0
  - xorg-libsm=1.2.3=hd9c2040_1000
  - xorg-libx11=1.7.2=h7f98852_0
  - xorg-libxau=1.0.9=h7f98852_0
  - xorg-libxdmcp=1.1.3=h7f98852_0
  - xorg-libxext=1.3.4=h7f98852_1
  - xorg-libxrender=0.9.10=h7f98852_1003
  - xorg-renderproto=0.11.1=h7f98852_1002
  - xorg-xextproto=7.3.0=h7f98852_1002
  - xorg-xproto=7.0.31=h7f98852_1007
  - xyzservices=2023.5.0=pyhd8ed1ab_0
  - xz=5.6.4=h5eee18b_1
  - yaml=0.2.5=h7f98852_2
  - zict=2.2.0=pyhd8ed1ab_0
  - zipp=3.15.0=pyhd8ed1ab_0
  - zlib=1.2.13=h5eee18b_1
  - zstd=1.5.0=ha95c52a_0
  - pip:
      - bleach==6.0.0
      - bump2version==1.0.1
      - cffi==1.15.1
      - cfgv==3.3.1
      - coverage==7.2.7
      - cryptography==44.0.2
      - distlib==0.3.9
      - docutils==0.20.1
      - exceptiongroup==1.2.2
      - filelock==3.12.2
      - flake8==5.0.4
      - identify==2.5.24
      - importlib-metadata==4.2.0
      - iniconfig==2.0.0
      - jaraco-classes==3.2.3
      - jeepney==0.9.0
      - keyring==23.9.3
      - markdown-it-py==2.2.0
      - mccabe==0.7.0
      - mdurl==0.1.2
      - more-itertools==9.1.0
      - nodeenv==1.9.1
      - pkginfo==1.10.0
      - platformdirs==2.6.2
      - pluggy==1.2.0
      - pre-commit==2.21.0
      - py==1.11.0
      - pycodestyle==2.9.1
      - pycparser==2.21
      - pyflakes==2.5.0
      - pygments==2.17.2
      - pytest==7.4.4
      - pytest-cov==4.1.0
      - pytest-runner==6.0.1
      - readme-renderer==37.3
      - requests-toolbelt==1.0.0
      - rfc3986==2.0.0
      - rich==13.8.1
      - secretstorage==3.3.3
      - tomli==2.0.1
      - tox==3.28.0
      - twine==4.0.2
      - virtualenv==20.16.2
      - watchdog==3.0.0
      - webencodings==0.5.1
prefix: /opt/conda/envs/xclim

tests/test_run_length.py::TestRunsWithDates::test_run_with_dates_no_date[True-last_run_before_date] tests/test_run_length.py::TestRunsWithDates::test_run_with_dates_no_date[True-run_end_after_date] tests/test_run_length.py::TestRunsWithDates::test_run_with_dates_no_date[True-run_length_with_date] tests/test_run_length.py::TestRunsWithDates::test_run_with_dates_no_date[False-last_run_before_date] tests/test_run_length.py::TestRunsWithDates::test_run_with_dates_no_date[False-run_end_after_date] tests/test_run_length.py::TestRunsWithDates::test_run_with_dates_no_date[False-run_length_with_date]
tests/test_run_length.py::TestFirstRun::test_simple[True-False-False-30] tests/test_run_length.py::TestFirstRun::test_simple[True-False-True-expected1] tests/test_run_length.py::TestFirstRun::test_simple[True-False-dayofyear-31] tests/test_run_length.py::TestLastRun::test_simple[True-False-False-39] tests/test_run_length.py::TestLastRun::test_simple[True-False-True-expected1] tests/test_run_length.py::TestLastRun::test_simple[True-False-dayofyear-40] tests/test_run_length.py::TestRunsWithDates::test_run_length_with_date[True-07-01-210-70] tests/test_run_length.py::TestRunsWithDates::test_run_length_with_date[True-07-01-190-50] tests/test_run_length.py::TestRunsWithDates::test_run_length_with_date[True-04-01-150-nan] tests/test_run_length.py::TestRunsWithDates::test_run_length_with_date[True-11-01-150-164] tests/test_run_length.py::TestRunsWithDates::test_run_end_after_date[True-dayofyear-07-01-210-211] tests/test_run_length.py::TestRunsWithDates::test_run_end_after_date[True-False-07-01-190-190] tests/test_run_length.py::TestRunsWithDates::test_run_end_after_date[True-dayofyear-04-01-150-nan] tests/test_run_length.py::TestRunsWithDates::test_run_end_after_date[True-dayofyear-11-01-150-305] tests/test_run_length.py::TestRunsWithDates::test_last_run_before_date[True-dayofyear-07-01-210-182] tests/test_run_length.py::TestRunsWithDates::test_last_run_before_date[True-False-07-01-190-181] tests/test_run_length.py::TestRunsWithDates::test_last_run_before_date[True-dayofyear-04-01-150-nan] tests/test_run_length.py::TestRunsWithDates::test_last_run_before_date[True-dayofyear-11-01-150-150]
tests/test_run_length.py::TestRLE::test_dataarray tests/test_run_length.py::TestLongestRun::test_simple tests/test_run_length.py::TestLongestRun::test_start_at_0 tests/test_run_length.py::TestLongestRun::test_end_start_at_0 tests/test_run_length.py::TestLongestRun::test_all_true tests/test_run_length.py::TestLongestRun::test_almost_all_true tests/test_run_length.py::TestFirstRun::test_run_1d tests/test_run_length.py::TestFirstRun::test_real_data tests/test_run_length.py::TestFirstRun::test_simple[False-False-False-30] tests/test_run_length.py::TestFirstRun::test_simple[False-False-True-expected1] tests/test_run_length.py::TestFirstRun::test_simple[False-False-dayofyear-31] tests/test_run_length.py::TestFirstRun::test_simple[False-True-False-30] tests/test_run_length.py::TestFirstRun::test_simple[False-True-True-expected1] tests/test_run_length.py::TestFirstRun::test_simple[False-True-dayofyear-31] tests/test_run_length.py::TestWindowedRunEvents::test_simple tests/test_run_length.py::TestWindowedRunCount::test_simple tests/test_run_length.py::TestLastRun::test_simple[False-False-False-39] tests/test_run_length.py::TestLastRun::test_simple[False-False-True-expected1] tests/test_run_length.py::TestLastRun::test_simple[False-False-dayofyear-40] tests/test_run_length.py::TestLastRun::test_simple[False-True-False-39] tests/test_run_length.py::TestLastRun::test_simple[False-True-True-expected1] tests/test_run_length.py::TestLastRun::test_simple[False-True-dayofyear-40] tests/test_run_length.py::TestRunsWithDates::test_run_length_with_date[False-07-01-210-70] tests/test_run_length.py::TestRunsWithDates::test_run_length_with_date[False-07-01-190-50] tests/test_run_length.py::TestRunsWithDates::test_run_length_with_date[False-04-01-150-nan] tests/test_run_length.py::TestRunsWithDates::test_run_length_with_date[False-11-01-150-164] tests/test_run_length.py::TestRunsWithDates::test_run_end_after_date[False-dayofyear-07-01-210-211] tests/test_run_length.py::TestRunsWithDates::test_run_end_after_date[False-False-07-01-190-190] tests/test_run_length.py::TestRunsWithDates::test_run_end_after_date[False-dayofyear-04-01-150-nan] tests/test_run_length.py::TestRunsWithDates::test_run_end_after_date[False-dayofyear-11-01-150-305] tests/test_run_length.py::TestRunsWithDates::test_last_run_before_date[False-dayofyear-07-01-210-182] tests/test_run_length.py::TestRunsWithDates::test_last_run_before_date[False-False-07-01-190-181] tests/test_run_length.py::TestRunsWithDates::test_last_run_before_date[False-dayofyear-04-01-150-nan] tests/test_run_length.py::TestRunsWithDates::test_last_run_before_date[False-dayofyear-11-01-150-150]
xclim/indices/run_length.py xclim/indices/_threshold.py HISTORY.rst xclim/subset.py xclim/indices/_multivariate.py xclim/indices/_simple.py xclim/indices/generic.py
xclim/indices/run_length.py xclim/indices/_threshold.py HISTORY.rst xclim/subset.py xclim/indices/_multivariate.py xclim/indices/_simple.py xclim/indices/generic.py