-
Notifications
You must be signed in to change notification settings - Fork 280
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
Allow concatenate of cube with anonymous dimensions #851
Comments
Just found #336
I understand the logic, but I think, given the criteria or similar dim/length, it should be allowed with a warning. Either that, or the user can pass an argument to disambiguate. |
When I initially read this I thought that it sounded like a jolly good idea, as long as a warning is raised. However, this could lead to problems and may be difficult to implement. For instance, what happens if you have multiple anonymous dimensions of the same size? |
I never said it would be easy 😉
I think there are two options: The assumption would also be based on dimension number. If cube A and cube B dim 2 and dim 3 both have anonymous 100 pt coords it would be perverse to try and concatenate 2A with 3B and 3A with 2B. Its an assumption, but a fairly reasonable one, and a warning is raised or Scratch any automated guess and just require the user to pass a mapping list when there are anonymous coords present. Essentially the logic at the minute is: However, in reality the logic should be: i.e. if a dimension is anonymous, its possible that it is compatible with another anonymous coord...(or indeed a non-anonymous coord...but lets not get into that) |
I absolutely agree with that, but there is always the worry that people will use this to go wildly wrong and get work with some incorrect data. Having said that, a suitable warning should be sufficient to avoid this.
I think that is a good way of describing it.
Well perhaps we should get into that. Allowing anonymous coords to be compatible would be to make a common operation less painful, and is done only in the presence of a clear warning. It does not make sense to allow an anonymous coord to be compatible with a non-anonymous one, it unleashes a lot of painful ways to go wrong and it isn't really in the scope of what we are trying to achieve. In my mind this case is simple: an anonymous coord can only be compatible with another anonymous coord (in the presence of a clear warning), and not with a non-anonymous coord. |
Closing due to inactivity. |
I just tried to concatenate two cubes like this with contiguous time coords
Concatenate failed until I added dummy coords to dims 2 and 3 (i.e. lat and lon). I propose that in such circumstances, concatenate assumes that anonymous coords that are the same size and dimension are assumed to be compatible, with a warning issues to the user accordingly.
The text was updated successfully, but these errors were encountered: