Skip to content

Commit

Permalink
add training with different times possibility
Browse files Browse the repository at this point in the history
  • Loading branch information
coxipi authored Dec 9, 2024
1 parent 880f98c commit 066d3f3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion xclim/sdba/adjustment.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,11 @@ def train(cls, ref: DataArray, hist: DataArray, **kwargs) -> TrainAdjust:
# For some methods, `ref` and `hist` must share the same time array
if not cls._allow_diff_training_times:
cls._check_matching_times(ref, hist)

# We may also use a different time period for `hist` but still require
# it has the same size as `ref`'s time.
elif not cls._allow_diff_time_sizes:
cls._check_matching_time_sizes(ref, hist)
hist["time"] = ref.time
ds, params = cls._train(ref, hist, **kwargs)
obj = cls(
_trained=True,
Expand Down

0 comments on commit 066d3f3

Please sign in to comment.