diff --git a/CHANGELOG.md b/CHANGELOG.md index 1592b8d0db844f11736ba2ccedc7e8d4ccd70f6c..3683b4d037abe18c16383245252cd3b3d00e24e4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,8 @@ # Changelog All notable changes to this project will be documented in this file. +## v0.6.8 - 2025-03-07 - bugfix in time harmonizing + ## v0.6.7 - 2025-02-21 - fixed output format ### general: diff --git a/dist/toarstats-0.6.8-py3-none-any.whl b/dist/toarstats-0.6.8-py3-none-any.whl new file mode 100644 index 0000000000000000000000000000000000000000..1564e5d2908e466cfeba98841c55dba6c1413182 Binary files /dev/null and b/dist/toarstats-0.6.8-py3-none-any.whl differ diff --git a/setup.cfg b/setup.cfg index 256d56f3d0d17f498ee8f1b5788e57201c5a8322..bdd4fbc3f9ff610553a4f00e5dd10c8bf8f0966b 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = toarstats -version = 0.6.7 +version = 0.6.8 author = Niklas Selke, Martin Schultz, Max Lensing author_email = n.selke@fz-juelich.de, m.schultz@fz-juelich.de, m.lensing@fz-juelich.de description = Collection of statistics for the TOAR community diff --git a/toarstats/metrics/stats_utils.py b/toarstats/metrics/stats_utils.py index 36f4d439999e68e283c7cee7cd766d287efedd97..41b5d5b99ede08104aa2565be465fa5e1716988d 100644 --- a/toarstats/metrics/stats_utils.py +++ b/toarstats/metrics/stats_utils.py @@ -301,14 +301,13 @@ def harmonize_time(ser_list, ref, mtype, rsfreq=None): :return: A list of series with harmonized datetime indices """ if mtype == "custom": - custom_index = pd.DatetimeIndex([ref.index.min().strftime("%Y-%m-%d")]) for record in ser_list: - record["ser"].index = custom_index + record["ser"].reindex([ref.index.min()]) else: if rsfreq is None: rsfreq = RSTAGS[mtype] - tmin = ref.index.min() - tmax = ref.index.max() + tmin = ref.index.min().strftime("%Y-%m-%d") + tmax = ref.index.max().strftime("%Y-%m-%d") try: newindex = pd.date_range(tmin, tmax, freq=rsfreq)