-
Notifications
You must be signed in to change notification settings - Fork 38
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
Preprocessor multimodel_statistics
fails when data have no time dimension
#890
Comments
really, one should not run a multimodel preproc when there is not even a single time point - there is no meaningful statistical quantity that gets computed even with a single time point; a lot of our other preprocs would not work without a time point, I suggest you don't test with that kind of data, but we probably do need an initial check on the data before kickstarting the MM preproc - @bouweandela @jvegasbsc what you fellas think of this? |
This works in nearly every statistical package: from statistics import mean
mean([2])
>>> 2 Besides the fact that the mean of a single number is trivial, one might reasonably expect that it works the same for a cube with a single time point. |
I think there is an exception raised if the number of coincident time points for all models is lower than 3 - I don't know if a multimodel with no time variation is useful in any way, if it is, and the user is interested in a spatial-only statistic then sure, that'd be something to put in = do you know of such a case @stefsmeets ? 🍺 |
@valeriupredoi See #41 for a description of the problem by @ledm, there he tries to compute multimodel statistics after taking a time average. |
@bouweandela how did you remember of such an old issue? Good one, we should probably get that PR @Peter9192 has worked on in and then see about these issues the sooner the better 👍 |
Yes, that's why @stefsmeets is working on #856, so we can test pull requests like that without manually running recipe_permetrics.yml with and without the changes and then comparing the output. |
I fully agree with @stefsmeets and @bouweandela here; calculating multi-model statistics should be independent of any dimension. There is no need for a time dimension, since the statistic is calculated over the model dimension and not over the time dimension. For example, suppose we have There are plenty of use cases that either do not need a time (multi-model mean maps) or horizontal (multi-model mean time series) dimension. |
A related problem, it also appears to fail when data have a scalar time coordinate. |
Hi all, there is again a problem when using mulitmodel statistics for one time point. Maybe it was again intorduced with pull request #1301. I don't know... The error message says:
The preprocessor I used:
|
I fixed this as part of #968, but it looks like that may not be ready in time before v2.4. |
Ok, we'll have to live with it for one more cycle then. Let's prioritize it in the next round. |
Moving this to v2.6 since there is not open PR yet. |
I've been working with the I'd like to work on this now because I think this can be fixed very easily. @bouweandela I saw that you are planning to work on #968. Does this somehow conflict with my plans? |
Draft PR: #1808 (this also solved 4 other issues) |
I did some work making things lazy a long time ago and also included other changes (such as fixing some issues with dimensions), expecting that it would be merged quite soon. Unfortunately that didn't happen. It would be nice if you could take the changes from there that fix the other problems, so I don't end up with a massive merge conflict, but don't worry about it if it's difficult. I do not really expect lazy multimodel statistics to make it into v2.8, v2.9 seems more realistic. |
Describe the bug
Hi all, I'm developing some tests for the multimodel statistics using real data (#856), and I'm coming accross this bug:
Running multimodel statistics with a list of cubes with no time dimension, will result in
ValueError: Cannot guess bounds for a coordinate of length 1.
The bug can be reproduced by:
See the full stack trace below.
The text was updated successfully, but these errors were encountered: