-
Notifications
You must be signed in to change notification settings - Fork 9
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
subsurface floats dataset #321
subsurface floats dataset #321
Conversation
Comments? Awesome. :) |
@milancurcic, I don't remember exactly how this works, but do we always create a wrapper in the |
Someone asked me for the subsurface floats dataset recently, so I decided that instead of updating my code, I would do it here. I'm thinking of adding Andro (#319) or YoMaHa after this, based on Argo floats. |
Adapter is needed whenever a dataset needs to be re-organized to be a CloudDrift conformable ragged-array dataset ( Dataset function is merely a convenience accessor to an existing ragged-array dataset, so that the user doesn't need to find and manage data URLs. For example, in case of GDP, we simply So, I expect that every From the end-user (as in consumer of data for analysis; not a contributor to the library) point of view, they should only ever have to access |
Thanks, it makes sense. |
clouddrift/adapters/subsurface.py
Outdated
@@ -0,0 +1,170 @@ | |||
""" | |||
This module defines functions used to adapt the subsurface float trajectories as | |||
a ragged-array dataset. |
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.
Tiny bit more info here about the dataset perhaps?
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.
rename to subsurfacefloat.py?
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.
Does this dataset have a proper name? It's not clear to me from its website. If not, I suggest subsurface_floats
.
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.
That was also my hesitation. I don't see any real defined name for it.. They write subsurface float trajectories, that's why I didn't put the s. I don't really mind either way.
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.
I added some details. Let me know if you think this should be further improved.
Looks good but it does not seem like the dataset can be used with |
@philippemiron I will test this locally today. Can you also cast all float variables except time, lat, lon to float32? |
@milancurcic Yes. However, doesn't this in the glad adapter converts all variables?
|
Yes. I special-cased GLAD because all longitudes are in the Gulf (rather than global) and the position error included in the dataset exceeds the precision of the single-precision ulp. Since subsurface floats are global (as I understand it), it's safest to keep lat, lon as float64. |
Ok good! I will add this for the 3 datasets I'm working on.
|
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 is great; thank you. Will merge.
* subsurface floats dataset * more update * add rowsize/ids * remove ids * more fixes * small lint * added to the doc * we can deal with conflict later * update * lint * a bit more details * remove exp dimension * docstring edits * lint * remove numbers to have simpler docstring * double to single for data --------- Co-authored-by: Philippe Miron <philippe.miron@dtn.com> Co-authored-by: selipot <selipot@miami.edu> Co-authored-by: milancurcic <caomaco@gmail.com>
resolves #320
Comments?