-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ref
& hist
times in bias adjustment methods must match
#1995
base: main
Are you sure you want to change the base?
Conversation
it keeps saying that some checks were not successful, but I don't see any red x, showing the failures. |
Weird, the previous CI shows some runs "cancelled". I don't see why they were cancelled... |
It's a configuration issue. I'll see what I can do. |
So all this discussion about conflict values of time with I guess that's why "ref": ref.rename(time="time_hist"),
"hist": hist.rename(time="time_hist"),
"sim": sim, I'll try and see if the class For MBCn, I didn't see this with the groupies-like implementation since it doesn't use |
Ready for xclim next version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. I think the replace_sim
logic needs a bit more doc, the current docstring does not list "same size same calendar" as a requirement for sim
.
xclim/sdba/adjustment.py
Outdated
if cls._replace_sim_time: | ||
sim_time = sim.time | ||
sim["time"] = ref["time"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would only work with a uniform calendar, no ? Should we raise a meaningful error if the sizes and/or calendars are different ?
Hmm, should I just leave this a case-by-case for each specific method? I don't think there is much documentation on I guess e.g. if not cls._allow_diff_calendars and len(calendars) > 1:
raise ValueError(
"Inputs are defined on different calendars,"
f" this is not supported for {cls.__name__} adjustment."
) vs. # This below implies that ref.time and sim.time have the same size
# Since `ref,hist, sim` are in the same `map_groups` call, they must have
# the same time
if cls._replace_sim_time:
sim_time = sim.time
sim["time"] = ref["time"] maybe I should simply have : EDIT: This would already be better, we can anticipate a wrong input, and raise an error if need-be |
Héhé I guess you're right about the other having almost no doc. The difference though is that |
Yes good point, that's what I was slowly converging to when thinking about your comment. Is |
FYI, the issues with conda are fixed here: 9aa4e4a |
I can just add You know, there is an implicit assumption in other function that
|
Just to say: |
I'll wait for it to be merged in main, if you'd like another course of action tell me |
@coxipi Feel free to cherry-pick that commit. There's also the issue of the xarray/flox bug that still needs addressing. I think neither this PR nor mine can be merged until that's addressed at the very least. |
I've added the change from the commit you linked, we'll see |
Note It appears that this Pull Request modifies the On inspection, the No further action is required. |
Nope, that's not it. It looks like they've changed their download URL from |
Pull Request Checklist:
number
) and pull request (:pull:number
) has been addedWhat kind of change does this PR introduce?
ref
andhist
times do not matchDoes this PR introduce a breaking change?
Other information: