-
Notifications
You must be signed in to change notification settings - Fork 5
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
Feat/add contiguous #129
Feat/add contiguous #129
Conversation
(I will work some more on the failing tests; I think this is an issue with identifying if a ds is a candidate for "usual" or "ragged" traj classes). |
I think this should be ready for a bit of review and comments! :)
trajan/accessor.py I think it is ugly and not very clear. But given how little we can assume about how "generic" nc files that should be readable by trajan may be formatted, I wonder if this is the best I can do so far?
|
Cool! I will try to take a look tomorrow, I agree that the logics are messy. That's why I would like there to be a grid mapping with no guessing involved. Would be nice if a license attribute was standard. Another suggestion for CF. |
I think I implemented your comments :) . I think this may be quite brittle until the following things are standardized (I do not think this is a standard yet?):
|
I can try to robustify a bit the discovery of |
One choice we should discuss is that this class converts the dataset on opening to traj2d. In trajan so far this requires an explicit operation (e.g. This may affect the API and require a lot of changes later if we decide to change. |
A quick sanity check would be to see that it sums to length of the index dimension? |
Yes, I agree it is not at all clear from CF-convention. |
This should be implemented to the best I could in da1fe22 . |
I am not sure how to implement this, but I can try to get something this afternoon - I let you know :) . |
Ok! I can also make some code suggestions on this branch a bit later if you want? will coordinate with you before I start. |
Btw, do you have an example / pointer of where this technique is used? :) |
@gauteh , regarding the discussion about the Ok, maybe I can add a This is quite a lot of machinery though - is it what you were thinking about / do you think the complexity is worth it? Do you think it could be suitable to merge this PR (possibly with minor updates) first, and then add this extra functionality in an additional follow up PR, as this would touch quite a few extra classes and aspects about the architecture of the code? :) . |
(this is just because separating this in different PR feels like a nice separation of concerns, and make it easier for me to think "atomatically" about these changes - also, it will be easier to play around with different designs / PRs with different approaches to this, if relevant :) ). |
…thods yet without resorting to python hackery)
I made some attempts. I haven't found a good way to fall back on using |
Ok! :) Are you "happy for now" / ready to merge, and we follow this up in subsequent PRs? Or do you want some of the specific points to be improved before merging? :) |
Yes 😊 feels like dataset type detection is a bit insecure, but it was in the first place anyway 😊 |
This adds the possibility to open "simple" (i.e. with scalar variables, support for several-dimensional-per-sample variables would require some extra work) ragged contiguous dataset.
Includes test and example.