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

* **19** of **19**   **(100.0%)**  changed or added relevant lines in **2** files are covered.
* No unchanged relevant lines lost coverage.
* Overall coverage increased (+**0.3%**) to **91.183%**

---



|  Totals | [![Coverage Status](https://coveralls.io/builds/28182372/badge)](https://coveralls.io/builds/28182372) |
| :-- | --: |
| Change from base [Build 1486](https://coveralls.io/builds/28162155): |  0.3% |
| Covered Lines: | 1696 |
| Relevant Lines: | 1860 |

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

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

* **19** of **19**   **(100.0%)**  changed or added relevant lines in **2** files are covered.
* No unchanged relevant lines lost coverage.
* Overall coverage increased (+**0.3%**) to **91.183%**

---



|  Totals | [![Coverage Status](https://coveralls.io/builds/28182372/badge)](https://coveralls.io/builds/28182372) |
| :-- | --: |
| Change from base [Build 1486](https://coveralls.io/builds/28162155): |  0.3% |
| Covered Lines: | 1696 |
| Relevant Lines: | 1860 |

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

diff --git a/HISTORY.rst b/HISTORY.rst
index ec7dbd31..4d84de91 100644
--- a/HISTORY.rst
+++ b/HISTORY.rst
@@ -5,6 +5,7 @@ History
 0.14.x
 ------
 * Fix in `subset.wrap_lons_and_split_at_greenwich` to preserve multi-region dataframes.
+* Improve the memory use of `indices.growing_season_length`.
 
 
 0.13.x (2020-01-10)
diff --git a/xclim/atmos/_temperature.py b/xclim/atmos/_temperature.py
index 9fadd0b6..0129412f 100644
--- a/xclim/atmos/_temperature.py
+++ b/xclim/atmos/_temperature.py
@@ -420,8 +420,7 @@ growing_season_length = Tas(
     description="{freq} number of days between the first occurrence of at least "
     "six consecutive days with mean daily temperature over {thresh} and "
     "the first occurrence of at least {window} consecutive days with "
-    "mean daily temperature below {thresh} after July 1st in the northern "
-    "hemisphere and January 1st in the southern hemisphere",
+    "mean daily temperature below {thresh} after {mid_date}.",
     cell_methods="",
     compute=indices.growing_season_length,
 )
diff --git a/xclim/indices/_threshold.py b/xclim/indices/_threshold.py
index 486ee841..d950da28 100644
--- a/xclim/indices/_threshold.py
+++ b/xclim/indices/_threshold.py
@@ -1,5 +1,7 @@
 import numpy as np
 import xarray
+import datetime
+from typing import Union
 
 from xclim import run_length as rl
 from xclim import utils
@@ -304,15 +306,21 @@ def growing_degree_days(
 
 @declare_units("days", tas="[temperature]", thresh="[temperature]")
 def growing_season_length(
-    tas: xarray.DataArray, thresh: str = "5.0 degC", window: int = 6, freq: str = "YS"
+    tas: xarray.DataArray,
+    thresh: str = "5.0 degC",
+    window: int = 6,
+    mid_date: str = "07-01",
+    freq: str = "YS",
 ):
     r"""Growing season length.
 
     The number of days between the first occurrence of at least
     six consecutive days with mean daily temperature over 5℃ and
     the first occurrence of at least six consecutive days with
-    mean daily temperature below 5℃ after July 1st in the northern
-    hemisphere and January 1st in the southern hemisphere.
+    mean daily temperature below 5℃ after a certain date. (Usually
+    July 1st in the northern hemisphere and January 1st in the southern hemisphere.)
+
+    WARNING: The default values are only valid for the northern hemisphere.
 
     Parameters
     ---------
@@ -322,6 +330,8 @@ def growing_season_length(
       Threshold temperature on which to base evaluation [℃] or [K]. Default: '5.0 degC'.
     window : int
       Minimum number of days with temperature above threshold to mark the beginning and end of growing season.
+    mid_date : str
+      Date of the year after which to look for the end of the season. Should have the format '%m-%d'.
     freq : str
       Resampling frequency; Defaults to "YS".
 
@@ -344,50 +354,45 @@ def growing_season_length(
     .. math::
 
         TG_{ij} < 5 ℃
-    """
 
-    # i = xr.DataArray(np.arange(tas.time.size), dims='time')
-    # ind = xr.broadcast(i, tas)[0]
-    #
-    # c = ((tas > thresh) * 1).rolling(time=window).sum()
-    # i1 = ind.where(c == window).resample(time=freq).min(dim='time')
-    #
-    # # Resample sets the time to T00:00.
-    # i11 = i1.reindex_like(c, method='ffill')
-    #
-    # # TODO: Adjust for southern hemisphere
-    #
-    # #i2 = ind.where(c == 0).where(tas.time.dt.month >= 7)
-    # # add check to make sure indice of end of growing season is after growing season start
-    # i2 = ind.where((c==0) & (ind > i11)).where(tas.time.dt.month >= 7)
-    #
-    # d = i2 - i11
-    #
-    # # take min value (first occurence after july)
-    # gsl = d.resample(time=freq).min(dim='time')
-    #
-    # # turn nan into 0
-    # gsl = xr.where(np.isnan(gsl), 0, gsl)
-
-    # compute growth season length on resampled data
+    Examples
+    --------
+    If working in the Southern Hemisphere, one can use:
+    >>> gsl = growing_season_length(tas, mid_date='01-01', freq='AS-Jul')
+    """
     thresh = utils.convert_units_to(thresh, tas)
 
-    c = ((tas > thresh) * 1).rolling(time=window).sum(allow_lazy=True, skipna=False)
-
-    def compute_gsl(c):
-        nt = c.time.size
-        i = xarray.DataArray(np.arange(nt), dims="time").chunk({"time": 1})
-        ind = xarray.broadcast(i, c)[0].chunk(c.chunks)
-        i1 = ind.where(c == window).min(dim="time")
-        i1 = xarray.where(np.isnan(i1), nt, i1)
-        i11 = i1.reindex_like(c, method="ffill")
-        i2 = ind.where((c == 0) & (ind > i11)).where(c.time.dt.month >= 7)
-        i2 = xarray.where(np.isnan(i2), nt, i2)
-        d = (i2 - i1).min(dim="time")
-        return d
-
-    gsl = c.resample(time=freq).apply(compute_gsl)
-
+    mid_doy = datetime.datetime.strptime(mid_date, "%m-%d").timetuple().tm_yday
+
+    def compute_gsl(yrdata):
+        if (
+            yrdata.chunks is not None
+            and len(yrdata.chunks[yrdata.dims.index("time")]) > 1
+        ):
+            yrdata = yrdata.chunk({"time": -1})
+        mid_idx = np.where(yrdata.time.dt.dayofyear == mid_doy)[0]
+        if (
+            mid_idx.size == 0
+        ):  # The mid date is not in the group. Happens at boundaries.
+            allNans = xarray.full_like(yrdata.isel(time=0), np.nan)
+            allNans.attrs = {}
+            return allNans
+        end = rl.first_run(
+            yrdata.where(yrdata.time >= yrdata.time[mid_idx][0]) < thresh,
+            window,
+            "time",
+        )
+        beg = rl.first_run(yrdata > thresh, window, "time")
+        sl = end - beg
+        sl = xarray.where(
+            beg.isnull() & end.notnull(), 0, sl
+        )  # If everything is under thresh
+        sl = xarray.where(
+            beg.notnull() & end.isnull(), yrdata.time.size - beg, sl
+        )  # If gs is not ended at end of year
+        return sl.where(sl >= 0)  # When end happens before beg.
+
+    gsl = tas.resample(time=freq).map(compute_gsl)
     return gsl
 
 
diff --git a/xclim/run_length.py b/xclim/run_length.py
index 96811898..0824dc57 100644
--- a/xclim/run_length.py
+++ b/xclim/run_length.py
@@ -262,7 +262,8 @@ def rle_1d(
     if n == 0:
         e = "run length array empty"
         warn(e)
-        return None, None, None
+        # Returning None makes some other 1d func below fail.
+        return np.array(np.nan), 0, np.array(np.nan)
 
     y = np.array(ia[1:] != ia[:-1])  # pairwise unequal (string safe)
     i = np.append(np.where(y), n - 1)  # must include last element position

growing season length memory use
### Description
Calling growing season length calculation on large multiyear datasets (e.g. mf_datset of nrcan over canada) causes memory errors / accumulation.
Dask writing of chunks to netcdf (xr.to_netcdf) does not seem to work as expected and RAM use quickly accumulates and crashes... 

Running calculation on single years can alleviate the problem but still requires large amounts of memory

Unsure as to why this occurs ... Is it a dask/xarray problem or something in our xclim code


diff --git a/tests/test_indices.py b/tests/test_indices.py
index b0a1161d..0c4297d1 100644
--- a/tests/test_indices.py
+++ b/tests/test_indices.py
@@ -334,48 +334,32 @@ class TestGrowingDegreeDays:
 
 
 class TestGrowingSeasonLength:
-    def test_simple(self, tas_series):
+    @pytest.mark.parametrize(
+        "d1,d2,expected",
+        [
+            ("1950-01-01", "1951-01-01", 0),  # No growing season
+            ("2000-01-01", "2000-12-31", 365),  # All year growing season
+            ("2000-07-10", "2001-01-01", np.nan),  # End happens before start
+            ("2000-06-15", "2001-01-01", 199),  # No end
+            ("2000-06-15", "2000-07-15", 31),  # Normal case
+        ],
+    )
+    def test_simple(self, tas_series, d1, d2, expected):
         # test for different growing length
 
-        # generate 5 years of data
-        a = np.zeros(366 * 2 + 365 * 3)
-        tas = tas_series(a, start="2000/1/1")
-
-        # 2000 : no growing season
-
-        # 2001 : growing season all year
-        d1 = "27-12-2000"
-        d2 = "31-12-2001"
-        buffer = tas.sel(time=slice(d1, d2))
-        tas = tas.where(~tas.time.isin(buffer.time), 280)
-
-        # 2002 : growing season in June only
-        d1 = "6-1-2002"
-        d2 = "6-10-2002"
-        buffer = tas.sel(time=slice(d1, d2))
-        tas = tas.where(~tas.time.isin(buffer.time), 280)
-        #
-        # comment:
-        # correct answer should be 10 (i.e. there are 10 days
-        # with tas > 5 degC) but current definition imposes end
-        # of growing season to be equal or later than July 1st.
-
-        # growing season in Aug only
-        d1 = "8-1-2003"
-        d2 = "8-10-2003"
-        buffer = tas.sel(time=slice(d1, d2))
-        tas = tas.where(~tas.time.isin(buffer.time), 280)
-
-        # growing season from June to end of July
-        d1 = "6-1-2004"
-        d2 = "7-31-2004"
-        buffer = tas.sel(time=slice(d1, d2))
-        tas = tas.where(~tas.time.isin(buffer.time), 280)
-
+        # generate a year of data
+        tas = tas_series(np.zeros(365), start="2000/1/1")
+        warm_period = tas.sel(time=slice(d1, d2))
+        tas = tas.where(~tas.time.isin(warm_period.time), 280)
         gsl = xci.growing_season_length(tas)
-        target = [0, 365, 25, 10, 61]
-
-        np.testing.assert_array_equal(gsl, target)
+        np.testing.assert_array_equal(gsl, expected)
+
+    def test_southhemisphere(self, tas_series):
+        tas = tas_series(np.zeros(2 * 365), start="2000/1/1")
+        warm_period = tas.sel(time=slice("2000-11-01", "2001-03-01"))
+        tas = tas.where(~tas.time.isin(warm_period.time), 280)
+        gsl = xci.growing_season_length(tas, mid_date="01-01", freq="AS-Jul")
+        np.testing.assert_array_equal(gsl.sel(time="2000-07-01"), 121)
 
 
 class TestHeatingDegreeDays:

environment.yml
pip install -e .[dev]
parse_log_pytest
environment.yml
pytest pytest-cov
apt-get update apt-get install -y gcc
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
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
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==0.9
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@7d331b5a2753f334d6e066d14ed64f6b5718e051#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
  - 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
  - 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
  - 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.9=py37_2
  - 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_indices.py::TestGrowingSeasonLength::test_simple[2000-01-01-2000-12-31-365] tests/test_indices.py::TestGrowingSeasonLength::test_simple[2000-07-10-2001-01-01-nan] tests/test_indices.py::TestGrowingSeasonLength::test_simple[2000-06-15-2001-01-01-199] tests/test_indices.py::TestGrowingSeasonLength::test_southhemisphere
tests/test_indices.py::TestTnDaysBelow::test_simple tests/test_indices.py::TestRainOnFrozenGround::test_simple tests/test_indices.py::TestRainOnFrozenGround::test_small_rain tests/test_indices.py::TestRainOnFrozenGround::test_consecutive_rain
tests/test_indices.py::TestBaseFlowIndex::test_simple tests/test_indices.py::TestMaxNDayPrecipitationAmount::test_single_max tests/test_indices.py::TestMaxNDayPrecipitationAmount::test_sumlength_max tests/test_indices.py::TestMaxNDayPrecipitationAmount::test_multi_max tests/test_indices.py::TestMax1DayPrecipitationAmount::test_single_max tests/test_indices.py::TestMax1DayPrecipitationAmount::test_multi_max tests/test_indices.py::TestMax1DayPrecipitationAmount::test_uniform_max tests/test_indices.py::TestColdSpellDurationIndex::test_simple tests/test_indices.py::TestColdSpellDays::test_simple tests/test_indices.py::TestConsecutiveFrostDays::test_one_freeze_day tests/test_indices.py::TestConsecutiveFrostDays::test_no_freeze tests/test_indices.py::TestConsecutiveFrostDays::test_all_year_freeze tests/test_indices.py::TestCoolingDegreeDays::test_no_cdd tests/test_indices.py::TestCoolingDegreeDays::test_cdd tests/test_indices.py::TestDailyFreezeThawCycles::test_simple tests/test_indices.py::TestDailyFreezeThawCycles::test_zeroed_thresholds tests/test_indices.py::TestDailyPrIntensity::test_simple tests/test_indices.py::TestDailyPrIntensity::test_mm tests/test_indices.py::TestDaysOverPrecipThresh::test_simple tests/test_indices.py::TestDaysOverPrecipThresh::test_quantile tests/test_indices.py::TestDaysOverPrecipThresh::test_nd tests/test_indices.py::TestFreshetStart::test_simple tests/test_indices.py::TestFreshetStart::test_no_start tests/test_indices.py::TestGrowingDegreeDays::test_simple tests/test_indices.py::TestGrowingSeasonLength::test_simple[1950-01-01-1951-01-01-0] tests/test_indices.py::TestGrowingSeasonLength::test_simple[2000-06-15-2000-07-15-31] tests/test_indices.py::TestHeatingDegreeDays::test_simple tests/test_indices.py::TestHeatWaveIndex::test_simple tests/test_indices.py::TestHeatWaveFrequency::test_1d tests/test_indices.py::TestHeatWaveMaxLength::test_1d tests/test_indices.py::TestHeatWaveTotalLength::test_1d tests/test_indices.py::TestTxDaysAbove::test_simple tests/test_indices.py::TestLiquidPrecipitationRatio::test_simple tests/test_indices.py::TestMaximumConsecutiveDryDays::test_simple tests/test_indices.py::TestMaximumConsecutiveDryDays::test_run_start_at_0 tests/test_indices.py::TestMaximumConsecutiveTxDays::test_simple tests/test_indices.py::TestPrecipAccumulation::test_simple tests/test_indices.py::TestPrecipAccumulation::test_yearly tests/test_indices.py::TestPrecipAccumulation::test_mixed_phases tests/test_indices.py::TestTGXN10p::test_tg10p_simple tests/test_indices.py::TestTGXN10p::test_tx10p_simple tests/test_indices.py::TestTGXN10p::test_tn10p_simple tests/test_indices.py::TestTGXN10p::test_doy_interpolation tests/test_indices.py::TestTGXN90p::test_tg90p_simple tests/test_indices.py::TestTGXN90p::test_tx90p_simple tests/test_indices.py::TestTGXN90p::test_tn90p_simple tests/test_indices.py::TestTas::test_tas tests/test_indices.py::TestTxMean::test_attrs tests/test_indices.py::TestTxMax::test_simple tests/test_indices.py::TestTgMaxTgMinIndices::test_static_daily_temperature_range tests/test_indices.py::TestTgMaxTgMinIndices::test_static_variable_daily_temperature_range tests/test_indices.py::TestTgMaxTgMinIndices::test_static_extreme_temperature_range tests/test_indices.py::TestTgMaxTgMinIndices::test_uniform_freeze_thaw_cycles tests/test_indices.py::TestTgMaxTgMinIndices::test_static_freeze_thaw_cycles tests/test_indices.py::TestWarmDayFrequency::test_1d tests/test_indices.py::TestWarmNightFrequency::test_1d tests/test_indices.py::TestTxTnDaysAbove::test_1d tests/test_indices.py::TestWarmSpellDurationIndex::test_simple tests/test_indices.py::TestWinterRainRatio::test_simple tests/test_indices.py::TestTG::test_cmip3
HISTORY.rst xclim/run_length.py xclim/atmos/_temperature.py xclim/indices/_threshold.py
HISTORY.rst xclim/run_length.py xclim/atmos/_temperature.py xclim/indices/_threshold.py